/* =========================================================
 * CQIP Structured Blocks - Frontend Styles
 * Version: 4.2.0
 * Contemporary Corporate Neutral Theme
 * ========================================================= */

/* Master Container */
.cqip-structured-content-container {
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
}

/* Block Base Styling */
.cqip-block {
    margin-bottom: 3.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #e1e4e8;
    clear: both;
}

.cqip-block:last-child {
    border-bottom: none;
}

/* Section Headings */
.cqip-block-title {
    font-size: 2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e1e4e8;
    letter-spacing: -0.02em;
}

/* Subheadings (H3) */
.cqip-block h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 1.5rem 0 1rem 0;
    line-height: 1.3;
}

/* Paragraphs */
.cqip-block p {
    margin-bottom: 1rem;
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.7;
}

/* Lists */
.cqip-block ul,
.cqip-block ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.cqip-block li {
    margin-bottom: 0.5rem;
    color: #4a5568;
}

/* Links */
.cqip-block a {
    color: #3182ce;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.cqip-block a:hover {
    border-bottom-color: #3182ce;
}

/* Strong/Bold */
.cqip-block strong {
    font-weight: 600;
    color: #2d3748;
}

/* =========================================================
 * BLOCK TYPE SPECIFIC STYLES
 * ========================================================= */

/* --- Executive Summary / Answer First --- */
.cqip-answer_first_summary {
    background: #f7fafc;
    border-left: 4px solid #4a5568;
    padding: 2rem;
    border-radius: 4px;
    margin-bottom: 3rem;
}

.cqip-answer-box {
    font-size: 1.125rem;
    line-height: 1.75;
    color: #2d3748;
}

.cqip-answer-box p:last-child {
    margin-bottom: 0;
}

/* --- Compliance Framework / Regulatory --- */
.cqip-compliance_framework {
    /* Inherits block base styles */
}

.cqip-compliance-wrap {
    background: #ffffff;
    border: 1px solid #e1e4e8;
    padding: 1.5rem;
    border-radius: 6px;
}

.cqip-standards-list {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.cqip-standards-list li {
    background: #f7fafc;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    border: 1px solid #e1e4e8;
    font-weight: 500;
    color: #2d3748;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.cqip-standards-list li:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.cqip-standards-list li .dashicons {
    margin-right: 8px;
    color: #48bb78;
    font-size: 18px;
}

/* --- Capabilities Grid --- */
.cqip-capability_group {
    /* Inherits block base styles */
}

.cqip-capabilities-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.cqip-capabilities-list li {
    background: #ffffff;
    padding: 1.5rem;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cqip-capabilities-list li:hover {
    border-color: #cbd5e0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transform: translateY(-2px);
}

.cqip-capabilities-list li strong {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.cqip-capabilities-list li p {
    margin-bottom: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.cqip-capabilities-list li ul {
    margin-top: 0.75rem;
    margin-bottom: 0;
}

/* --- Matrix / Solution Table --- */
.cqip-matrix_block {
    /* Inherits block base styles */
}

.cqip-table-wrapper {
    overflow-x: auto;
    border-radius: 6px;
    border: 1px solid #e1e4e8;
    background: #ffffff;
    margin-top: 1rem;
}

.cqip-table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.cqip-table-wrapper thead {
    background: #f7fafc;
    border-bottom: 2px solid #e1e4e8;
}

.cqip-table-wrapper th {
    text-align: left;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cqip-table-wrapper td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f0f0f1;
    vertical-align: top;
    color: #4a5568;
    font-size: 0.95rem;
}

.cqip-table-wrapper tbody tr:hover {
    background: #f7fafc;
}

.cqip-table-wrapper tbody tr:last-child td {
    border-bottom: none;
}

/* Alternating row colors (optional - remove if not desired) */
.cqip-table-wrapper tbody tr:nth-child(even) {
    background: #fafbfc;
}

.cqip-table-wrapper tbody tr:nth-child(even):hover {
    background: #f1f3f5;
}

/* --- Technical Deep-Dive --- */
.cqip-technical_explainer {
    /* Inherits block base styles */
}

.tech-sub {
    background: #ffffff;
    border: 1px solid #e1e4e8;
    padding: 1.5rem 2rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    transition: border-color 0.2s ease;
}

.tech-sub:hover {
    border-color: #cbd5e0;
}

.tech-sub:last-child {
    margin-bottom: 0;
}

.tech-sub h3 {
    margin-top: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e1e4e8;
}

/* --- FAQ Section --- */
.cqip-structured_faq {
    /* Inherits block base styles */
}

.cqip-faq-item {
    background: #ffffff;
    border: 1px solid #e1e4e8;
    border-left: 3px solid #4a5568;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.cqip-faq-item:hover {
    border-left-color: #2d3748;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cqip-faq-item:last-child {
    margin-bottom: 0;
}

.cqip-faq-question {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
}

.cqip-faq-answer {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.7;
}

.cqip-faq-answer p:last-child {
    margin-bottom: 0;
}

/* =========================================================
 * RESPONSIVE DESIGN
 * ========================================================= */

@media (max-width: 768px) {
    .cqip-structured-content-container {
        margin: 1.5rem auto;
    }
    
    .cqip-block-title {
        font-size: 1.75rem;
    }
    
    .cqip-block h3 {
        font-size: 1.25rem;
    }
    
    .cqip-capabilities-list {
        grid-template-columns: 1fr;
    }
    
    .cqip-standards-list {
        grid-template-columns: 1fr;
    }
    
    .cqip-answer_first_summary,
    .cqip-compliance-wrap,
    .tech-sub,
    .cqip-faq-item {
        padding: 1.25rem;
    }
    
    .cqip-table-wrapper {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

@media (max-width: 480px) {
    .cqip-block-title {
        font-size: 1.5rem;
    }
    
    .cqip-answer-box {
        font-size: 1rem;
    }
    
    .cqip-faq-question {
        font-size: 1rem;
    }
}

/* =========================================================
 * PRINT STYLES
 * ========================================================= */

@media print {
    .cqip-structured-content-container {
        max-width: 100%;
    }
    
    .cqip-block {
        page-break-inside: avoid;
    }
    
    .cqip-capabilities-list li,
    .tech-sub,
    .cqip-faq-item {
        page-break-inside: avoid;
    }
    
    .cqip-table-wrapper {
        border: 1px solid #000;
    }
    
    .cqip-table-wrapper th {
        background: #f0f0f0 !important;
        color: #000 !important;
    }
}

/* =========================================================
 * UTILITY CLASSES
 * ========================================================= */

/* Text alignment */
.cqip-block .text-center {
    text-align: center;
}

.cqip-block .text-right {
    text-align: right;
}

/* Spacing utilities */
.cqip-block .mt-1 { margin-top: 0.5rem; }
.cqip-block .mt-2 { margin-top: 1rem; }
.cqip-block .mt-3 { margin-top: 1.5rem; }

.cqip-block .mb-1 { margin-bottom: 0.5rem; }
.cqip-block .mb-2 { margin-bottom: 1rem; }
.cqip-block .mb-3 { margin-bottom: 1.5rem; }

/* =========================================================
 * AUTHOR BOX
 * ========================================================= */

.cqip-author-box {
    background: #f7fafc;
    border: 1px solid #e1e4e8;
    border-left: 4px solid #4a5568;
    border-radius: 6px;
    padding: 2rem;
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.cqip-author-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.cqip-author-avatar {
    flex-shrink: 0;
}

.cqip-author-avatar img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
}

.cqip-author-info {
    flex: 1;
}

.cqip-author-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.cqip-author-title {
    font-size: 0.95rem;
    color: #4a5568;
    font-weight: 500;
    margin: 0;
}

.cqip-author-bio {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.cqip-author-bio p {
    margin-bottom: 0.75rem;
}

.cqip-author-bio p:last-child {
    margin-bottom: 0;
}

.cqip-author-expertise {
    color: #4a5568;
    font-size: 0.875rem;
    line-height: 1.6;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.cqip-author-expertise strong {
    color: #2d3748;
    font-weight: 600;
}

.cqip-author-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cqip-author-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    color: #2d3748;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cqip-author-link:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    color: #1a1a1a;
    transform: translateY(-1px);
}

.cqip-author-link svg {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .cqip-author-box {
        padding: 1.5rem;
    }
    
    .cqip-author-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cqip-author-name {
        font-size: 1.25rem;
    }
    
    .cqip-author-links {
        flex-direction: column;
    }
    
    .cqip-author-link {
        width: 100%;
        justify-content: center;
    }
}
