/* ===== CORE VARIABLES ===== */
:root {
    --brand-primary: #f97316;
    --brand-hover: #ea580c;
    --brand-light: #fff7ed;
    --brand-border: #ffedd5;
    
    --text-dark: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --divider: #e2e8f0;
    
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 20px;
    
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

/* ===== APP LAYOUT (FULL SCREEN RESPONSIVE) ===== */
.app-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== NAVIGATION ===== */
.main-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 5%;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--divider);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-soft);
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-wrapper img {
    width: 42px;
    height: 42px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
}

.brand-name {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

/* Desktop Nav Links */
.nav-dropdown {
    display: flex;
    gap: 24px;
    background: none;
    position: static;
    border: none;
    box-shadow: none;
    width: auto;
}

.nav-dropdown a {
    color: var(--text-body);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
    border-bottom: none;
}

.nav-dropdown a:hover {
    background-color: var(--brand-light);
    color: var(--brand-primary);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 4px;
    transition: 0.3s;
}

/* Mobile Nav Logic */
@media (max-width: 768px) {
    .nav-dropdown {
        display: none;
        position: absolute;
        top: 74px;
        left: 0;
        width: 100%;
        background-color: var(--bg-card);
        flex-direction: column;
        gap: 0;
        border-bottom: 1px solid var(--divider);
        box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
        padding: 10px 0;
    }
    
    .nav-dropdown.is-active {
        display: flex;
        animation: slideDown 0.3s ease forwards;
    }

    .nav-dropdown a {
        padding: 16px 5%;
        border-bottom: 1px solid var(--divider);
        border-radius: 0;
    }

    .mobile-toggle {
        display: flex;
    }
}

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

/* ===== SCROLLABLE AREA ===== */
.scroll-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 60px;
}

/* Constrain content for readability */
.content-container {
    width: 100%;
    max-width: 800px; /* Perfect reading width for desktop */
    padding: 0 20px;
}

/* ===== HERO SECTION ===== */
.hero-section {
    width: 100%;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: linear-gradient(to bottom, #ffffff, #fff7ed);
    border-bottom: 1px solid var(--brand-border);
    margin-bottom: 40px;
}

.hero-icon {
    width: 100px;
    height: 100px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 24px;
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.2);
    object-fit: cover;
    background-color: var(--bg-card);
}

.hero-section h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.hero-section p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 35px;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    width: 100%;
    max-width: 600px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--border-radius);
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    gap: 10px;
    min-width: 180px;
}

.action-btn.primary {
    background-color: var(--brand-primary);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3);
}

.action-btn.primary:hover {
    background-color: var(--brand-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(249, 115, 22, 0.4);
}

.action-btn.outline {
    background-color: var(--bg-card);
    color: var(--brand-primary);
    border: 2px solid var(--brand-primary);
}

.action-btn.outline:hover {
    background-color: var(--brand-light);
    transform: translateY(-3px);
}

.action-btn.secondary {
    background-color: #0f172a;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
    width: 100%;
    margin-top: 8px;
}

.action-btn.secondary:hover {
    background-color: #1e293b;
    transform: translateY(-3px);
}

@media (max-width: 600px) {
    .action-row {
        flex-direction: column;
    }
    .action-btn {
        width: 100%;
    }
    .hero-section h1 {
        font-size: 2.2rem;
    }
    .hero-section p {
        font-size: 1rem;
    }
}

/* ===== CONTENT BLOCKS ===== */
.content-box {
    margin-bottom: 40px;
    background-color: var(--bg-card);
    border: 1px solid var(--divider);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-soft);
    transition: box-shadow 0.3s ease;
    scroll-margin-top: 100px;
}

.content-box:hover {
    box-shadow: var(--shadow-hover);
}

@media (max-width: 600px) {
    .content-box {
        padding: 24px;
        margin-bottom: 24px;
        border-radius: var(--border-radius);
    }
}

.content-box h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--brand-light);
    display: flex;
    align-items: center;
}

.content-box h2::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 24px;
    background-color: var(--brand-primary);
    margin-right: 12px;
    border-radius: 4px;
}

.content-box h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 32px 0 16px;
}

.content-box p {
    font-size: 1.05rem;
    color: var(--text-body);
    line-height: 1.8;
    margin-bottom: 18px;
}

.content-box ul, .content-box ol {
    padding-left: 24px;
    margin-top: 16px;
    margin-bottom: 24px;
}

.content-box li {
    font-size: 1.05rem;
    color: var(--text-body);
    line-height: 1.8;
    margin-bottom: 12px;
}

.content-box a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 700;
}

.content-box a:hover {
    text-decoration: underline;
}

.feature-image {
    width: 100%;
    max-width: 100%;
    border-radius: var(--border-radius);
    margin: 24px 0;
    border: 1px solid var(--divider);
    box-shadow: var(--shadow-soft);
    display: block;
}

/* ===== INDEX / TOC ===== */
.index-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.index-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background-color: var(--bg-main);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--divider);
    transition: all 0.2s ease;
}

.index-list li:hover {
    background-color: var(--brand-light);
    border-color: var(--brand-border);
    transform: translateX(5px);
}

.index-list a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
}

.index-list a:hover {
    color: var(--brand-primary);
    text-decoration: none;
}

@media (max-width: 600px) {
    .index-list {
        grid-template-columns: 1fr;
    }
}

/* ===== DATA TABLES ===== */
.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 24px 0;
}

.info-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 1rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--divider);
    min-width: 500px; /* Forces scrolling on small screens instead of shrinking too much */
}

.info-table th {
    background-color: var(--brand-primary);
    color: #ffffff;
    padding: 16px;
    text-align: left;
    font-weight: 700;
}

.info-table td {
    padding: 16px;
    border-bottom: 1px solid var(--divider);
    color: var(--text-body);
    font-weight: 500;
}

.info-table tr:last-child td {
    border-bottom: none;
}

.info-table tr:nth-child(even) td {
    background-color: var(--bg-main);
}

/* ===== ALERTS & MESSAGES ===== */
.alert-box {
    background-color: var(--brand-light);
    border-left: 4px solid var(--brand-primary);
    padding: 20px;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    font-size: 1.05rem;
    color: var(--text-dark);
    margin: 24px 0;
    line-height: 1.7;
    font-weight: 500;
}

.alert-warning {
    background-color: #fef2f2;
    border-left: 4px solid #ef4444;
    padding: 20px;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    font-size: 1.05rem;
    color: #991b1b;
    margin: 24px 0;
    line-height: 1.7;
    font-weight: 600;
}

/* ===== TAGS ===== */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 24px;
}

.tag-item {
    background-color: var(--bg-main);
    color: var(--text-body);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid var(--divider);
    transition: all 0.2s ease;
}

.tag-item:hover {
    background-color: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
}

/* ===== ACCORDION FAQ ===== */
.accordion-btn {
    width: 100%;
    text-align: left;
    padding: 20px;
    background-color: var(--bg-main);
    border: 1px solid var(--divider);
    border-radius: var(--border-radius);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.accordion-btn:hover {
    border-color: var(--brand-primary);
}

.accordion-btn i {
    color: var(--brand-primary);
    transition: transform 0.3s ease;
}

.accordion-btn.is-open {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    border-bottom: none;
    margin-bottom: 0;
    background-color: var(--brand-light);
}

.accordion-btn.is-open i {
    transform: rotate(180deg);
}

.accordion-panel {
    display: none;
    padding: 0 20px 20px;
    font-size: 1.05rem;
    color: var(--text-body);
    line-height: 1.8;
    background-color: var(--brand-light);
    border: 1px solid var(--brand-primary);
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    margin-bottom: 10px;
}

/* ===== APP FOOTER ===== */
.app-footer {
    width: 100%;
    background-color: var(--text-dark);
    color: #cbd5e1;
    text-align: center;
    padding: 40px 20px;
    margin-top: auto;
}

.app-footer a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    margin: 0 12px;
    transition: color 0.2s;
}

.app-footer a:hover {
    color: var(--brand-primary);
}

.footer-links {
    margin-bottom: 20px;
}

.footer-disclaimer {
    max-width: 800px;
    margin: 0 auto 20px;
    font-size: 0.9rem;
    color: #94a3b8;
    background-color: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: left;
    line-height: 1.6;
}

.footer-disclaimer strong {
    color: #fca5a5;
}
