/* ==========================================================================
   Staurax Docs stylesheet
   Premium corporate design. Standardized contrast, clean layouts, and high SEO visibility.
   ========================================================================== */

:root {
    /* Pure White Background theme to blend with the global Staurax website */
    --docs-bg: #ffffff;
    --docs-panel-bg: #ffffff;
    --docs-border: #e2e8f0;
    --docs-text-primary: #0f172a;
    --docs-text-secondary: #475569;
    --docs-text-muted: #64748b;
    
    --docs-brand: #2563eb; /* Staurax Corporate Blue */
    --docs-brand-hover: #1d4ed8;
    --docs-brand-light: #eff6ff;
    --docs-brand-border: rgba(37, 99, 235, 0.1);
    
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-head: 'Outfit', sans-serif;
    
    --header-height: 80px;
    --sidebar-width: 280px;
    --toc-width: 240px;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    /* Soft, subtle borders and shadows to avoid "AI slop" or glowing clutter */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Dark Mode Overrides disabled to ensure standard light-theme white background matching the core Staurax design */

/* --- Container & Layout --- */
body {
    background-color: var(--docs-bg) !important;
}

.dashboard-container {
    padding-top: calc(var(--header-height) + 30px) !important;
    background-color: var(--docs-bg) !important;
    min-height: 100vh;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: 48px;
    align-items: start;
}

/* --- Left Sidebar (Docs Menu) --- */
.sidebar {
    position: sticky;
    top: calc(var(--header-height) + 30px);
    max-height: calc(100vh - var(--header-height) - 60px);
    overflow-y: auto;
    z-index: 10;
    border-right: 1px solid var(--docs-border);
    padding-right: 32px;
}

.docs-sidebar-panel {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.docs-sidebar-title {
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--docs-text-primary);
    margin-bottom: 20px;
    border-bottom: 1px solid var(--docs-border);
    padding-bottom: 12px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 4px;
}

.sidebar-menu a {
    display: block;
    padding: 8px 16px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--docs-text-secondary);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.sidebar-menu a:hover {
    color: var(--docs-brand);
    background: var(--docs-brand-light);
}

.sidebar-menu a.active {
    color: var(--docs-brand);
    background: var(--docs-brand-light);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--docs-brand);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.sidebar-category-header {
    margin-top: 20px;
    margin-bottom: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--docs-text-muted);
    padding-left: 16px;
}

/* --- Main Content Area --- */
.content {
    min-width: 0;
}

.home-wrapper {
    position: relative;
    width: 100%;
}

/* Minimal Grid Background (Clean SEO, No AI Slop Blobs) */
.grid-overlay {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 400px;
    background-image: 
        linear-gradient(to right, var(--docs-border) 1px, transparent 1px),
        linear-gradient(to bottom, var(--docs-border) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at top, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at top, black 20%, transparent 70%);
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
}

/* --- Hero Search Section --- */
.hero {
    position: relative;
    z-index: 1;
    margin-bottom: 40px;
    text-align: left;
    padding: 16px 0;
}

.hero-badge {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--docs-panel-bg);
    border: 1px solid var(--docs-border);
    color: var(--docs-text-primary);
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.hero h1 {
    font-family: var(--font-head);
    font-size: 2.25rem; /* Scale down heading to prevent 3-line wrap */
    font-weight: 800;
    color: var(--docs-text-primary);
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 12px;
    max-width: 650px;
    margin-left: 0;
    margin-right: 0;
}

.text-brand {
    color: var(--docs-brand);
}

.hero p {
    font-size: 1rem;
    color: var(--docs-text-secondary);
    margin-bottom: 24px;
    max-width: 500px;
    margin-left: 0;
    margin-right: 0;
    line-height: 1.5;
}

.hero-search-wrapper {
    max-width: 480px;
    margin: 0;
}

.hero-search-inner {
    display: flex;
    align-items: center;
    background-color: var(--docs-panel-bg);
    border: 1px solid var(--docs-border);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.hero-search-inner:focus-within {
    border-color: var(--docs-brand);
    box-shadow: 0 0 0 3px var(--docs-brand-light), var(--shadow-sm);
}

.hero-search-inner svg {
    color: var(--docs-text-muted);
    margin-right: 12px;
    flex-shrink: 0;
}

.hero-search-inner input {
    width: 100%;
    border: none;
    outline: none;
    background: none;
    font-size: 0.9rem;
    color: var(--docs-text-primary);
    font-family: var(--font-sans);
}

.search-command {
    font-size: 0.65rem;
    background: var(--docs-bg);
    border: 1px solid var(--docs-border);
    border-radius: var(--radius-sm);
    padding: 2px 5px;
    color: var(--docs-text-muted);
    font-weight: 600;
    white-space: nowrap;
}

/* --- Category List & Cards --- */
.categories-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: relative;
    z-index: 1;
    max-width: 760px; /* Clean layout width constraint */
    margin: 0;
}

.category-card {
    background: transparent;
}

.category-header {
    margin-bottom: 12px;
}

/* Redesigned Category Header (as modern pill badges instead of a long line) */
.category-header h2 {
    font-family: var(--font-head);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--docs-brand);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background-color: var(--docs-brand-light);
    border: 1px solid var(--docs-brand-border);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin: 0;
}

/* Redesigned to horizontal list-rows instead of grid columns to resolve empty space */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.article-item {
    display: flex;
    align-items: center; /* Center items vertically */
    gap: 20px;
    padding: 16px 20px;
    border: 1px solid var(--docs-border);
    background-color: var(--docs-panel-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-item:hover {
    border-color: var(--docs-brand);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.article-icon {
    color: var(--docs-text-secondary);
    background-color: var(--docs-bg);
    border: 1px solid var(--docs-border);
    padding: 8px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.article-item:hover .article-icon {
    color: var(--docs-brand);
    background-color: var(--docs-brand-light);
    border-color: var(--docs-brand-border);
}

.article-meta {
    flex: 1;
    min-width: 0;
}

.article-meta h3 {
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--docs-text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.article-item:hover .article-meta h3 {
    color: var(--docs-brand);
}

.article-meta p {
    font-size: 0.85rem;
    color: var(--docs-text-secondary);
    line-height: 1.4;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-arrow {
    align-self: center;
    color: var(--docs-text-muted);
    opacity: 0;
    transform: translateX(-6px);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.article-item:hover .article-arrow {
    opacity: 1;
    color: var(--docs-brand);
    transform: translateX(0);
}

/* --- Single Article Styles --- */
.content-area {
    display: flex;
    gap: 40px;
    align-items: start;
    width: 100%;
}

.doc-article {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

/* Breadcrumbs */
.breadcrumbs {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--docs-text-muted);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumbs a {
    color: var(--docs-text-muted);
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: var(--docs-brand);
}

.breadcrumbs .separator {
    color: var(--docs-border);
}

.breadcrumbs .current {
    font-weight: 600;
    color: var(--docs-text-primary);
}

/* Article Typography */
.article-header {
    margin-bottom: 32px;
    padding-bottom: 8px;
}

.article-header h1 {
    font-family: var(--font-head);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--docs-text-primary);
    line-height: 1.2;
    margin-bottom: 12px;
}

.lead {
    font-size: 1.1rem;
    color: var(--docs-text-secondary);
    line-height: 1.6;
    margin: 0;
}

.article-content h2 {
    font-family: var(--font-head);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--docs-text-primary);
    margin-top: 36px;
    margin-bottom: 12px;
}

.article-content p {
    font-size: 0.95rem;
    color: var(--docs-text-secondary);
    line-height: 1.7;
    margin-top: 0;
    margin-bottom: 16px;
}

.article-content ul {
    list-style: none;
    padding-left: 0;
    margin-top: 0;
    margin-bottom: 24px;
}

.article-content li {
    position: relative;
    padding-left: 24px;
    font-size: 0.95rem;
    color: var(--docs-text-secondary);
    line-height: 1.6;
    margin-bottom: 10px;
}

.article-content li::before {
    content: "✦";
    position: absolute;
    left: 0;
    color: var(--docs-brand);
    font-weight: 700;
}

/* --- Code Blocks (Professional IDE style) --- */
.code-block-wrapper {
    margin: 24px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid #1e293b;
    background-color: #0f172a; /* Fixed deep dark color for IDE theme */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background-color: #1e293b;
    border-bottom: 1px solid #334155;
}

.language-badge {
    font-family: SFMono-Regular, Consolas, monospace;
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.copy-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    color: #f1f5f9;
    background-color: #334155;
}

.code-block-wrapper pre {
    padding: 18px;
    margin: 0;
    overflow-x: auto;
}

.code-block-wrapper code {
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.85rem;
    color: #cbd5e1; /* Clear high contrast code text */
    line-height: 1.6;
}

/* Inline code tags */
.article-content code:not(pre code) {
    font-family: SFMono-Regular, Consolas, monospace;
    font-size: 0.85rem;
    background-color: var(--docs-brand-light);
    color: var(--docs-brand);
    border: 1px solid var(--docs-brand-border);
    padding: 2px 6px;
    border-radius: 4px;
}

/* --- Rating Widget & Footer --- */
.article-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--docs-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.feedback-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--docs-text-secondary);
}

.feedback-btn {
    background: var(--docs-panel-bg);
    border: 1px solid var(--docs-border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    color: var(--docs-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.feedback-btn:hover {
    background-color: var(--docs-brand-light);
    color: var(--docs-brand);
    border-color: var(--docs-brand-border);
}

.last-updated {
    font-size: 0.8rem;
    color: var(--docs-text-muted);
}

/* --- Right Table of Contents (TOC) --- */
.toc-sidebar {
    width: var(--toc-width);
    position: sticky;
    top: calc(var(--header-height) + 30px);
    max-height: calc(100vh - var(--header-height) - 60px);
    overflow-y: auto;
    padding-left: 8px;
    flex-shrink: 0;
}

.toc-container {
    background: transparent;
}

.toc-container h4 {
    font-family: var(--font-head);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--docs-text-muted);
    margin-bottom: 12px;
    font-weight: 700;
}

.toc-container ul {
    list-style: none;
    border-left: 1px solid var(--docs-border);
    padding-left: 12px;
    margin: 0;
}

.toc-container li {
    margin-bottom: 8px;
}

.toc-container a {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--docs-text-muted);
    transition: color 0.2s ease;
}

.toc-container a:hover {
    color: var(--docs-text-primary);
}

/* Mobile Accordion Select details element styling for Sidebar */
.docs-mobile-nav {
    display: none;
}

/* --- Responsive Adaptability --- */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 240px 1fr;
        gap: 32px;
    }
    
    .toc-sidebar {
        display: none; /* Hide TOC on smaller laptops/tablets */
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding-top: calc(var(--header-height) + 20px) !important;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    /* Collapsible Navigation via Details/Summary on Mobile */
    .sidebar {
        position: relative;
        top: 0;
        max-height: none;
        overflow-y: visible;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border-right: none !important;
    }
    
    .docs-sidebar-panel {
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    .docs-sidebar-title {
        display: none;
    }
    
    .docs-mobile-nav {
        display: block;
        background: var(--docs-panel-bg);
        border: 1px solid var(--docs-border);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
        margin-bottom: 16px;
        overflow: hidden;
    }
    
    .docs-mobile-nav summary {
        padding: 14px 20px;
        font-family: var(--font-head);
        font-size: 0.95rem;
        font-weight: 700;
        color: var(--docs-text-primary);
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        user-select: none;
        list-style: none;
    }
    
    /* Remove native arrow and replace with standard text indicator */
    .docs-mobile-nav summary::-webkit-details-marker {
        display: none;
    }
    
    .docs-mobile-nav summary::after {
        content: "▼";
        font-size: 0.75rem;
        color: var(--docs-text-muted);
        transition: transform 0.2s ease;
    }
    
    .docs-mobile-nav[open] summary::after {
        transform: rotate(180deg);
    }
    
    .docs-mobile-nav-content {
        padding: 0 20px 20px 20px;
        border-top: 1px solid var(--docs-border);
        max-height: 350px;
        overflow-y: auto;
    }
    
    /* Force mobile docs menu to display as a vertical block list */
    .docs-mobile-nav .sidebar-menu {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        white-space: normal !important;
        padding: 0 !important;
        margin: 0 !important;
        align-items: stretch !important;
    }
    
    .docs-mobile-nav .sidebar-menu li {
        width: 100% !important;
        margin-bottom: 0 !important;
        display: block !important;
    }
    
    .docs-mobile-nav .sidebar-menu a {
        display: block !important;
        width: 100% !important;
        white-space: normal !important;
        padding: 10px 16px !important;
    }
    
    .docs-mobile-nav .sidebar-category-header {
        margin-top: 12px !important;
        margin-bottom: 4px !important;
        padding-left: 16px !important;
        display: block !important;
        width: 100% !important;
        font-size: 0.72rem !important;
    }
    
    /* Hide the original menu list on mobile, showing it inside details */
    .sidebar-menu-desktop {
        display: none;
    }
    
    /* Main Content adjustment */
    .hero {
        margin-bottom: 32px;
        padding: 16px 0;
    }
    
    .hero h1 {
        font-size: 2.25rem;
    }
    
    .hero p {
        font-size: 0.95rem;
        margin-bottom: 24px;
    }
    
    .article-list {
        grid-template-columns: 1fr;
    }
    
    .content-area {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .doc-article {
        padding: 0 !important;
    }
    
    .article-header h1 {
        font-size: 1.75rem;
    }
}

/* ==========================================================================
   Rich Article Components — Hostel Cloud & Full-Page Docs Articles
   ========================================================================== */

/* --- Header CTA Buttons Row --- */
.article-header-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.doc-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
}

.doc-cta-btn--primary {
    background: var(--docs-brand);
    color: #fff;
    border-color: var(--docs-brand);
}

.doc-cta-btn--primary:hover {
    background: var(--docs-brand-hover);
    border-color: var(--docs-brand-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25);
}

.doc-cta-btn--secondary {
    background: transparent;
    color: var(--docs-brand);
    border-color: var(--docs-brand);
}

.doc-cta-btn--secondary:hover {
    background: var(--docs-brand-light);
    transform: translateY(-2px);
}

/* --- Features Grid --- */
.doc-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 24px 0 36px;
}

.doc-feature-card {
    background: #ffffff;
    border: 1px solid var(--docs-border);
    border-radius: var(--radius-md);
    padding: 22px 20px;
    transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s;
}

.doc-feature-card:hover {
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.25);
    transform: translateY(-2px);
}

.doc-feature-icon {
    font-size: 1.75rem;
    margin-bottom: 12px;
    line-height: 1;
}

.doc-feature-card h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--docs-text-primary);
    margin: 0 0 8px;
    line-height: 1.35;
}

.doc-feature-card p {
    font-size: 0.875rem;
    color: var(--docs-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* --- Audience / Who-For List --- */
.doc-audience-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 36px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.doc-audience-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    background: #f8faff;
    border-left: 4px solid var(--docs-brand);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.9rem;
    color: var(--docs-text-secondary);
    line-height: 1.55;
}

.doc-audience-list li strong {
    color: var(--docs-text-primary);
    white-space: nowrap;
    margin-right: 4px;
}

/* --- Core Modules List --- */
.doc-modules-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
    margin: 24px 0 36px;
}

.doc-module-item {
    padding: 20px 18px;
    background: #ffffff;
    border: 1px solid var(--docs-border);
    border-radius: var(--radius-md);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.doc-module-item:hover {
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.07);
}

.doc-module-item h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--docs-brand);
    margin: 0 0 8px;
}

.doc-module-item p {
    font-size: 0.875rem;
    color: var(--docs-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* --- FAQ Accordion (AEO) --- */
.doc-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0 36px;
}

.doc-faq-item {
    border: 1px solid var(--docs-border);
    border-radius: var(--radius-md);
    background: #ffffff;
    overflow: hidden;
    transition: border-color 0.2s;
}

.doc-faq-item[open] {
    border-color: rgba(37, 99, 235, 0.3);
}

.doc-faq-question {
    padding: 18px 20px;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--docs-text-primary);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    user-select: none;
    transition: color 0.15s, background 0.15s;
}

.doc-faq-question:hover {
    color: var(--docs-brand);
    background: var(--docs-brand-light);
}

.doc-faq-item[open] .doc-faq-question {
    color: var(--docs-brand);
    background: var(--docs-brand-light);
    border-bottom: 1px solid rgba(37, 99, 235, 0.12);
}

.doc-faq-question::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--docs-brand);
    flex-shrink: 0;
    transition: transform 0.2s;
}

.doc-faq-item[open] .doc-faq-question::after {
    content: '−';
}

.doc-faq-answer {
    padding: 16px 20px 18px;
}

.doc-faq-answer p {
    font-size: 0.9rem;
    color: var(--docs-text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* --- Bottom CTA Block --- */
.doc-cta-block {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    border-radius: var(--radius-lg);
    padding: 44px 40px;
    text-align: center;
    margin: 48px 0 32px;
    color: #ffffff;
}

.doc-cta-block h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 16px;
    border: none;
    padding: 0;
}

.doc-cta-block p {
    font-size: 1rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    max-width: 620px;
    margin: 0 auto 28px;
}

.doc-cta-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}

.doc-cta-block .doc-cta-btn--primary {
    background: #ffffff;
    color: #2563eb;
    border-color: #ffffff;
}

.doc-cta-block .doc-cta-btn--primary:hover {
    background: #f0f6ff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.doc-cta-block .doc-cta-btn--secondary {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255,255,255,0.6);
}

.doc-cta-block .doc-cta-btn--secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: #ffffff;
}

/* --- Feature flat list (fallback) --- */
.doc-feature-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 36px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.doc-feature-list li {
    padding: 12px 16px 12px 40px;
    position: relative;
    background: #f8faff;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--docs-text-secondary);
}

.doc-feature-list li::before {
    content: '✓';
    position: absolute;
    left: 14px;
    color: var(--docs-brand);
    font-weight: 700;
}

/* --- article-content section spacing --- */
.article-content section {
    margin-bottom: 48px;
}

.article-content section:last-child {
    margin-bottom: 0;
}

/* --- Mobile responsive overrides for new components --- */
@media (max-width: 768px) {
    .doc-features-grid {
        grid-template-columns: 1fr;
    }

    .doc-modules-list {
        grid-template-columns: 1fr;
    }

    .doc-cta-block {
        padding: 32px 20px;
    }

    .doc-cta-block h2 {
        font-size: 1.35rem;
    }

    .article-header-cta {
        flex-direction: column;
    }

    .doc-cta-btn {
        justify-content: center;
        width: 100%;
    }

    .doc-audience-list li {
        flex-direction: column;
        gap: 4px;
    }

    .doc-audience-list li strong {
        white-space: normal;
    }
}

/* ==========================================================================
   Who Is It For — Icon Card Grid
   ========================================================================== */

.doc-who-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 24px 0 40px;
}

/* Desktop card: icon on top, text below */
.doc-who-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 20px;
    background: #ffffff;
    border: 1px solid var(--docs-border);
    border-radius: var(--radius-md);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.18s;
}

.doc-who-card:hover {
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.07);
    transform: translateY(-3px);
}

.doc-who-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--docs-brand-light);
    border-radius: var(--radius-sm);
    color: var(--docs-brand);
    flex-shrink: 0;
}

.doc-who-icon i {
    font-size: 1.15rem;
    line-height: 1;
}

.doc-who-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.doc-who-text h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--docs-text-primary);
    margin: 0;
    line-height: 1.3;
}

.doc-who-text p {
    font-size: 0.875rem;
    color: var(--docs-text-secondary);
    line-height: 1.65;
    margin: 0;
}

/* Feature icon — Phosphor thin icons */
.doc-feature-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--docs-brand-light);
    border-radius: var(--radius-sm);
    color: var(--docs-brand);
    margin-bottom: 14px;
    flex-shrink: 0;
}

.doc-feature-icon i {
    font-size: 1.1rem;
    line-height: 1;
}

/* Tablet: 2 columns */
@media (max-width: 1024px) {
    .doc-who-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 1 column, horizontal card (icon left + text right) */
@media (max-width: 640px) {
    .doc-who-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .doc-who-card {
        flex-direction: row;
        align-items: flex-start;
        gap: 14px;
        padding: 18px 16px;
    }

    .doc-who-icon {
        flex-shrink: 0;
        margin-top: 2px;
    }

    .doc-who-text {
        flex: 1;
        gap: 4px;
    }

    .doc-who-text h3 {
        font-size: 0.9rem;
    }

    .doc-who-text p {
        font-size: 0.84rem;
        line-height: 1.6;
    }
}

