:root {
    /* Color Palette - ACFAB Brand */
    --primary: #9364AC;
    --primary-light: #e7d1f8;
    --secondary: #a571cd;
    --accent: #FFB539;
    --accent-light: #fff5e6;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --text-main: #24231D;
    --text-muted: #5c5b56;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    
    /* Variables */
    --sidebar-width: 280px;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar (Desktop Default) */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-card);
    border-right: 1px solid var(--border);
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 32px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-main);
    cursor: pointer;
}

.nav-menu {
    flex: 1;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-radius: var(--border-radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition);
    font-size: 16px;
}

.nav-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.nav-item:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.nav-item.active {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.sidebar-social {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-back-btn {
    display: none; /* Hidden on desktop */
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-main);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Fullscreen Menu */
.fullscreen-menu {
    position: fixed;
    inset: 0;
    background-color: var(--bg-main);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.fullscreen-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-header {
    padding: 24px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-close-btn {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
}

.menu-close-btn:hover {
    transform: rotate(90deg);
}

.menu-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.nav-menu-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.nav-menu-large .nav-item {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-main);
    transition: var(--transition);
}

.nav-menu-large .nav-item:hover,
.nav-menu-large .nav-item.active {
    color: var(--primary);
    transform: scale(1.05);
}

.menu-footer {
    padding: 48px;
    display: flex;
    justify-content: center;
}

.main-footer {
    padding: 32px 48px;
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.topbar {
    padding: 24px 48px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-mobile-logo-link {
    display: none;
}

.mobile-toggle-btn {
    display: none;
}

.topbar-mobile-logo {
    max-width: 140px;
    height: auto;
}

.topbar-desktop-title {
    font-size: 20px;
}

.topbar-branding {
    display: flex;
    align-items: center;
    gap: 24px;
}

.menu-toggle-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
}

.menu-toggle-btn:hover {
    color: var(--secondary);
}

.topbar-logo {
    max-width: 160px;
    height: auto;
}

.btn-outline {
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-outline:hover {
    background-color: var(--bg-main);
    border-color: var(--text-muted);
}

.btn-primary {
    background-color: transparent;
    color: var(--primary);
    padding: 10px 30px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    border: 2px solid var(--primary);
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.content-sections {
    padding: 48px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 32px;
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 18px;
}

/* Hero Card */
.hero-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--border-radius);
    padding: 48px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
}

.badge {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 16px;
}

.display-title {
    font-size: 42px;
    margin-bottom: 16px;
    color: white;
}

.lead-text {
    font-size: 18px;
    opacity: 0.9;
}

.hero-graphic {
    font-size: 160px;
    opacity: 0.1;
    position: absolute;
    right: -20px;
    bottom: -40px;
    z-index: 1;
    transform: rotate(-15deg);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.info-card {
    background-color: var(--bg-card);
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 24px;
}

.icon-wrapper.primary { background-color: var(--primary-light); color: var(--primary); }
.icon-wrapper.secondary { background-color: #e0f2fe; color: var(--secondary); }
.icon-wrapper.accent { background-color: var(--accent-light); color: var(--accent); }

.info-card h3 {
    margin-bottom: 12px;
    font-size: 20px;
}

.info-card p {
    color: var(--text-muted);
}

/* Content Card */
.content-card {
    background-color: var(--bg-card);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.family-tree-illustration {
    text-align: center;
    padding: 32px;
    background-color: var(--primary-light);
    border-radius: var(--border-radius-sm);
    margin-bottom: 32px;
}

.family-tree-illustration i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 16px;
}

.highlight-text {
    font-size: 18px;
    color: var(--primary);
}

.examples-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
}

.example-tag {
    background-color: var(--bg-main);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: 30px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.example-tag i {
    color: var(--accent);
}

/* Alerts */
.alert-box {
    display: flex;
    gap: 16px;
    padding: 24px;
    border-radius: var(--border-radius-sm);
}

.alert-box.info {
    background-color: var(--primary-light);
    border-left: 4px solid var(--primary);
}

.alert-box.info i { color: var(--primary); }

.alert-box.warning {
    background-color: var(--warning-light);
    border-left: 4px solid var(--warning);
}

.alert-box.warning i { color: var(--warning); }

.alert-box.action {
    background: linear-gradient(to right, var(--bg-card), var(--primary-light));
    border: 1px solid var(--primary);
    align-items: center;
    justify-content: space-between;
}

.alert-box i {
    font-size: 24px;
    margin-top: 2px;
}

.alert-box h4, .alert-box h3 {
    margin-bottom: 4px;
}

.alert-box p {
    color: var(--text-muted);
}

/* Accordion */
.accordion-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.accordion-header {
    width: 100%;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
}

.accordion-header:hover {
    background-color: var(--bg-main);
}

.accordion-header i {
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: var(--bg-card);
}

.accordion-item.active .accordion-content {
    padding: 0 24px 24px 24px;
    max-height: 1000px; /* arbitrary high value for transition */
}

.checklist {
    list-style: none;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.checklist li i {
    color: var(--accent);
    margin-top: 4px;
    font-size: 18px;
}

/* Tabs */
.tabs-header {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

/* Support Grid */
.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.support-card {
    background-color: var(--bg-card);
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.support-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.support-card i {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 20px;
}

.support-card h4 {
    margin-bottom: 12px;
    font-size: 18px;
}

.support-card p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Calculation Box */
.calculation-box {
    display: flex;
    align-items: center;
    background-color: var(--bg-main);
    padding: 24px;
    border-radius: var(--border-radius-sm);
    margin: 24px 0;
    border: 1px solid var(--border);
}

.calc-item {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.calc-label {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.calc-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
}

.calc-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.calc-divider {
    padding: 0 32px;
    color: var(--text-muted);
    font-size: 24px;
}

.calc-item.highlight .calc-value {
    color: var(--primary);
}

/* Labor Grid */
.labor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.labor-card {
    display: flex;
    gap: 24px;
    background-color: var(--bg-card);
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.labor-card:hover {
    box-shadow: var(--shadow-md);
}

.labor-card.full-width {
    grid-column: 1 / -1;
}

.labor-icon {
    width: 56px;
    height: 56px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.labor-content h4 {
    margin-bottom: 8px;
    font-size: 18px;
}

.labor-content p {
    color: var(--text-muted);
    margin-bottom: 12px;
}

.badge.sm {
    padding: 4px 8px;
    font-size: 10px;
    background-color: var(--bg-main);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* Forms Grid */
.forms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.form-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
}

.form-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.form-icon {
    background-color: #f1f5f9;
    padding: 32px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.form-icon i {
    font-size: 48px;
    color: #ef4444; /* PDF Red */
}

.doc-id {
    position: absolute;
    top: 16px;
    right: 16px;
    background-color: var(--bg-card);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.form-details {
    padding: 24px;
}

.form-details h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.form-details p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
    height: 42px;
}

.btn-download {
    width: 100%;
    padding: 12px;
    background-color: white;
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-download:hover {
    background-color: var(--bg-main);
    border-color: var(--primary);
    color: var(--primary);
}

/* Utilities */
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 40px; }
.mb-3 { margin-bottom: 12px; }

/* Responsive Design */
@media (max-width: 1024px) {
    /* Transform Sidebar into Fullscreen Menu */
    .sidebar {
        width: 100vw;
        background-color: var(--bg-main);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        border: none;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .sidebar-header {
        padding: 24px 32px;
    }

    .mobile-toggle {
        display: block;
        font-size: 32px;
        color: var(--primary);
    }

    .nav-menu {
        align-items: center;
        justify-content: center;
        gap: 16px;
    }

    .nav-item {
        font-size: 22px;
        font-weight: 600;
        padding: 8px;
        background: transparent !important;
        box-shadow: none !important;
        color: #6b7280; /* lighter gray */
    }

    .nav-item i {
        display: none;
    }

    .nav-item.active {
        color: var(--primary);
    }

    .sidebar-social {
        padding: 48px 24px;
        border: none;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .mobile-back-btn {
        display: inline-flex;
        margin-bottom: 48px;
    }

    .social-links {
        gap: 24px;
    }

    .social-links a {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }

    .main-content {
        margin-left: 0;
    }

    .topbar {
        padding: 16px 24px;
        justify-content: space-between;
    }

    .topbar-mobile-logo-link {
        display: block;
    }

    .topbar-actions {
        display: none;
    }

    .mobile-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: 2px solid var(--primary);
        color: var(--primary);
        background: transparent;
        font-size: 20px;
        cursor: pointer;
    }

    .topbar-desktop-title {
        display: none;
    }

    .content-sections {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .hero-card {
        padding: 32px 24px;
    }

    .display-title {
        font-size: 32px;
    }

    .hero-graphic {
        display: none;
    }

    .calculation-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .calc-divider {
        padding: 0;
        transform: rotate(90deg);
    }

    .labor-grid {
        grid-template-columns: 1fr;
    }

    .alert-box.action {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }
}
