/* =========================================================================
   THOAN OS - GLOBAL STYLES
   ========================================================================= */

:root {
    /* BẢNG MÀU MỚI BẮT BUỘC */
    --primary: #073B6F;
    --primary-dark: #052E57;
    --primary-light: #E9F0F7;

    --accent: #FF9800;
    --accent-hover: #E88900;
    --accent-light: #FFF3E0;

    --background: #F3F6FA;
    --surface: #FFFFFF;
    --surface-soft: #EAF0F6;

    --text: #12375D;
    --text-dark: #082B50;
    --text-muted: #66758A;

    --border: #DCE4ED;
    --white: #FFFFFF;

    /* ÁNH XẠ BIẾN CŨ (Để giữ nguyên HTML) */
    --navy: var(--primary-dark);
    --navy-light: #031F3D; /* Dùng cho footer tối hơn */
    --blue: var(--primary);
    --blue-light: #2E6EA8;
    --turquoise: var(--accent);
    --yellow: var(--accent);
    --yellow-hover: var(--accent-hover);
    --light: var(--surface-soft);
    --gray: var(--text-muted);
    --gray-light: var(--border);
    
    /* Cập nhật bóng đổ nhẹ, mềm, không dùng bóng đen đậm */
    --shadow: 0 4px 12px rgba(7, 59, 111, 0.04), 0 2px 4px rgba(7, 59, 111, 0.02);
    --shadow-lg: 0 12px 24px rgba(7, 59, 111, 0.08), 0 4px 8px rgba(7, 59, 111, 0.04);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--background);
    overflow-x: hidden;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

.bg-light { background-color: var(--surface-soft); }
.bg-dark { background-color: var(--primary-dark); }
.text-white { color: var(--white); }
.text-gray { color: var(--text-muted); }
.text-turquoise { color: var(--accent); }
.text-yellow { color: var(--accent); }
.text-blue { color: var(--primary); }
.text-center { text-align: center; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }
.mt-5 { margin-top: 40px; }
.border-light { border: 1px solid rgba(220, 228, 237, 0.15); }

/* =========================================================================
   BUTTONS & BADGES
   ========================================================================= */

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 999px; /* Bo góc lớn dạng pill */
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    border: none;
    transition: var(--transition);
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--primary-dark);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* Nút viền trắng riêng cho khu vực Hero */
.hero .btn-outline {
    border-color: var(--white);
    color: var(--white);
}

.hero .btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-dark);
}

.status-badge {
    display: inline-block;
    background-color: var(--accent-light);
    color: var(--accent);
    border: 1px solid rgba(255, 152, 0, 0.2);
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 999px;
    font-weight: 600;
}

.bg-navy .status-badge {
    background-color: rgba(255,255,255,0.1);
    color: var(--accent);
    border-color: rgba(255, 152, 0, 0.3);
}

/* =========================================================================
   GRID & LAYOUT
   ========================================================================= */

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.flex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.items-center {
    align-items: center;
}

.col-half {
    flex: 1;
    min-width: 300px;
}

.card {
    background: var(--surface);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.card.center {
    text-align: center;
}

/* =========================================================================
   TOPBAR & HEADER
   ========================================================================= */

.topbar {
    background-color: var(--primary-dark);
    color: var(--white);
    text-align: center;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid var(--accent);
}

header {
    background-color: var(--surface);
    box-shadow: 0 2px 4px rgba(7, 59, 111, 0.02);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.logo span {
    color: var(--accent);
}

.nav-menu ul {
    display: flex;
    gap: 25px;
}

.nav-menu a {
    color: var(--primary-dark);
    font-weight: 600;
}

.nav-menu a:hover {
    color: var(--accent);
}

/* Gạch chân màu cam cho liên kết Trang chủ */
.nav-menu a[href="#hero"] {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 4px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-dark);
    transition: var(--transition);
}

/* =========================================================================
   MODAL (WIP ALERT)
   ========================================================================= */

.modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 46, 87, 0.7);
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--surface);
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
}

.close-btn:hover { color: var(--primary-dark); }
.modal-icon { font-size: 48px; margin-bottom: 15px; }
.modal-content h3 { color: var(--primary-dark); margin-bottom: 10px; }
.modal-content p { margin-bottom: 25px; color: var(--text); }

/* =========================================================================
   HERO SECTION
   ========================================================================= */

.hero {
    background: var(--primary);
    padding: 100px 0;
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.hero-content {
    flex: 1;
}

.tagline {
    background-color: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.4);
    color: var(--accent);
    border-radius: 999px;
    padding: 6px 16px;
    display: inline-block;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--border);
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-graphic {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

/* Viền đứt nét mờ bên ngoài dashboard */
.hero-graphic::before {
    content: '';
    position: absolute;
    top: -15px;
    bottom: -15px;
    left: -5px;
    right: -5px;
    border: 2px dashed rgba(255, 152, 0, 0.4);
    border-radius: 30px;
    z-index: 0;
    pointer-events: none;
}

/* CSS Dashboard Mockup */
.css-dashboard {
    width: 100%;
    max-width: 500px;
    background: var(--surface);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.dash-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-dots {
    display: flex;
    gap: 6px;
}

.dash-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
}

.dash-dots span:nth-child(1) { background: #ef4444; }
.dash-dots span:nth-child(2) { background: #eab308; }
.dash-dots span:nth-child(3) { background: #22c55e; }

.dash-title {
    background: var(--surface-soft);
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 4px;
    flex: 1;
    text-align: center;
    color: var(--text-muted);
}

.dash-body {
    display: flex;
    height: 300px;
}

.dash-sidebar {
    width: 60px;
    background: var(--primary-dark);
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.menu-item {
    width: 100%;
    height: 30px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
}

.menu-item.active { background: var(--accent); }
.mt-auto { margin-top: auto; }

.dash-main {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: var(--background);
}

.dash-card-row {
    display: flex;
    gap: 15px;
    height: 120px;
}

.dash-card {
    flex: 1;
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(7, 59, 111, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.dash-card.wide {
    height: 100px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-around;
}

.chart-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 8px solid var(--primary-light);
    border-top-color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--primary-dark);
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 100%;
    width: 100%;
}

.bar-chart .bar {
    flex: 1;
    border-radius: 4px 4px 0 0;
}

.bar-chart .bar:nth-child(1) { background: var(--primary-dark); }
.bar-chart .bar:nth-child(2) { background: var(--primary); }
.bar-chart .bar:nth-child(3) { background: var(--primary-light); }
.bar-chart .bar:nth-child(4) { background: var(--accent); }

.dash-card.wide .line {
    height: 10px;
    background: var(--border);
    border-radius: 5px;
    width: 100%;
}

.dash-card.wide .w-75 { width: 75%; }
.dash-card.wide .w-50 { width: 50%; }

/* =========================================================================
   ICONS & CARDS (Spaces / Tools)
   ========================================================================= */

.icon-large {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.space-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.space-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: var(--accent-light);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
}

.space-card h3 {
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.space-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    flex: 1;
}

/* =========================================================================
   JOURNEY FLOW
   ========================================================================= */

.journey-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background: var(--surface);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.journey-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.step-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 10px;
    border: 2px solid var(--primary-light);
    color: var(--primary-dark);
}

.step-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.journey-arrow {
    color: var(--accent);
    font-weight: bold;
}

.journey-step.highlight .step-icon {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
}

/* =========================================================================
   TOOLS GRID
   ========================================================================= */

.tools-grid {
    gap: 15px;
}

.tool-item {
    background: var(--surface);
    padding: 20px;
    border-radius: 16px;
    font-weight: 600;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.tool-item:hover {
    background: var(--surface);
    border-color: var(--accent);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.tool-icon {
    font-size: 1.5rem;
    background: var(--accent-light);
    padding: 8px;
    border-radius: 12px;
    display: inline-flex;
}

/* =========================================================================
   PARENTS AREA (MOCKUP)
   ========================================================================= */

.feature-list {
    margin-bottom: 30px;
}

.feature-list li {
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
    font-size: 1.2rem;
}

.parent-mockup {
    background: var(--surface);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    padding: 30px;
    border: 1px solid var(--border);
}

.mockup-header {
    font-weight: bold;
    color: var(--primary-dark);
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.mockup-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.stat-box {
    flex: 1;
    background: var(--surface-soft);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-box span {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: normal;
}

.mockup-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mockup-bar {
    background: var(--primary-dark);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.mockup-bar:nth-child(2) { background: var(--primary); }
.mockup-bar:nth-child(3) { background: var(--accent); color: var(--primary-dark); font-weight: 600; }

/* =========================================================================
   AI ASSISTANTS
   ========================================================================= */

#ai-assistants .card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(220, 228, 237, 0.15);
}

#ai-assistants h3 {
    color: var(--white);
}

#ai-assistants p {
    color: var(--border);
}

#ai-assistants .icon-large {
    color: var(--accent) !important;
}

/* =========================================================================
   HALL OF FAME
   ========================================================================= */

.fame-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.fame-card::before {
    content: '🏆';
    position: absolute;
    top: -15px;
    right: 20px;
    font-size: 30px;
}

.fame-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary-dark);
    color: var(--accent);
    font-size: 36px;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.fame-school {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.fame-score {
    background: var(--accent-light);
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 15px;
    display: inline-block;
}

.fame-quote {
    font-style: italic;
    color: var(--text);
    font-size: 0.95rem;
}

/* =========================================================================
   PHILOSOPHY & CTA
   ========================================================================= */

.philosophy-section {
    background-color: var(--primary-dark);
    color: var(--white);
    position: relative;
}

.philosophy-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.quote-mark {
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
    font-family: serif;
    line-height: 1;
}

.philosophy-content h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.philosophy-content p {
    font-size: 1.2rem;
    color: var(--border);
}

.cta-section {
    background: var(--primary);
    color: var(--white);
}

.cta-section h2 {
    color: var(--white);
    font-size: 2.5rem;
}

/* =========================================================================
   NEWS CARDS
   ========================================================================= */

.news-card {
    background: var(--surface);
    border-radius: 20px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

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

.news-img-placeholder {
    height: 160px;
    background: var(--surface-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.news-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.news-content h3 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-content p {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 15px;
    flex: 1;
}

.read-more {
    font-weight: 600;
    color: var(--primary);
}

/* =========================================================================
   FOOTER
   ========================================================================= */

.footer {
    background-color: var(--navy-light);
    color: var(--border);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-col p {
    margin-bottom: 10px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--border);
}

.footer-links a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
}

/* =========================================================================
   RESPONSIVE (TABLET & MOBILE)
   ========================================================================= */

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 2.8rem; }
    .journey-arrow { display: none; }
    .journey-flow { flex-direction: column; gap: 20px; }
    .journey-step { width: 100%; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
    .journey-step:last-child { border-bottom: none; }
}

@media (max-width: 768px) {
    .grid-3 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: 1fr; }
    .tools-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    
    .hero-container { flex-direction: column; text-align: center; }
    .hero p { max-width: 100%; margin-left: auto; margin-right: auto; }
    .hero-buttons { justify-content: center; }
    
    .col-half { min-width: 100%; }
    
    /* Hamburger Menu Logic */
    .hamburger { display: flex; }
    
    .nav-menu {
        position: fixed;
        top: 80px; /* Below header */
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--surface);
        flex-direction: column;
        align-items: center;
        padding-top: 40px;
        transition: var(--transition);
        box-shadow: inset 0 10px 10px -10px rgba(7, 59, 111, 0.1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        align-items: center;
        gap: 30px;
        width: 100%;
    }
    
    .nav-menu a {
        font-size: 1.2rem;
        display: block;
        width: 100%;
        text-align: center;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .header-actions .btn-outline {
        display: none; /* Ẩn nút đăng nhập trên mobile để nhường chỗ cho hamburger */
    }
}
/* =========================================================================
   BẢN VÁ LỖI HIỂN THỊ (BỔ SUNG CUỐI FILE)
   ========================================================================= */

/* 2. Cấp bù khoảng cách cho Header Sticky để không che tiêu đề section */
section[id] {
    scroll-margin-top: 100px;
}

/* 1 & 5. Đồng bộ màu chữ trắng/sáng cho TẤT CẢ các section nền tối (Ba Trợ thủ AI, Triết lý, CTA) */
/* Cú pháp section.class giúp tăng độ ưu tiên (specificity) để ghi đè thuộc tính mặc định mà không cần dùng !important */
section.bg-dark .section-header h2,
section.philosophy-section h2,
section.cta-section h2,
footer.footer h3 {
    color: var(--white);
}

section.bg-dark .section-header p,
section.philosophy-section p,
section.cta-section p,
footer.footer p,
.footer-col p {
    color: var(--border); /* Màu xám xanh nhạt #DCE4ED */
}

/* Nhấn mạnh chữ trên nền tối */
section.bg-dark strong, 
section.philosophy-section strong, 
section.cta-section strong {
    color: var(--accent);
}

/* Đảm bảo liên kết footer không bị tối màu */
.footer-links a {
    color: var(--border);
}
.footer-links a:hover {
    color: var(--accent);
}

/* 4. Giảm vùng xám trống quá lớn giữa Bảng vàng (Hall of Fame) và Triết lý (Philosophy) */
#hall-of-fame {
    padding-bottom: 30px; 
}

section.philosophy-section {
    padding-top: 60px;
    margin-top: 0;
}

/* 3. Đảm bảo CTA không bị cắt tiêu đề và có khoảng đệm chuẩn */
section.cta-section {
    padding: 100px 0; /* Đệm cân đối trên - dưới */
    position: relative;
    z-index: 10;
    overflow: hidden; /* Không cho tràn ra ngoài */
    min-height: auto;
}

section.cta-section h2 {
    margin-top: 0;
    line-height: 1.4;
}
/* =========================================================================
   TÀI KHOẢN & ĐĂNG NHẬP TRÊN TRANG CHỦ - v0.4.0
   ========================================================================= */

.account-area {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    white-space: nowrap;
}

.btn-login,
.account-link,
.account-logout {
    border: 0;
    background: transparent;
    color: var(--primary-dark);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
}

.btn-login,
.account-link {
    padding: 9px 14px;
    border-radius: 999px;
}

.btn-login:hover,
.account-link:hover {
    background: var(--accent-light);
    color: var(--accent-hover);
}

.account-greeting {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-muted);
    font-size: .92rem;
}

.account-greeting strong {
    color: var(--primary-dark);
}

.account-logout {
    color: #b42318;
    padding: 9px 0;
}

.account-logout:hover {
    color: #7a271a;
    text-decoration: underline;
}

.auth-modal {
    padding: 20px;
    background: rgba(5, 46, 87, .78);
    backdrop-filter: blur(5px);
}

.auth-modal-content {
    width: min(440px, 100%);
    max-width: 440px;
    padding: 34px;
    text-align: left;
}

.auth-close {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: var(--surface-soft);
    color: var(--text-muted);
    font-size: 1.55rem;
    line-height: 1;
    cursor: pointer;
}

.auth-close:hover {
    background: var(--accent-light);
    color: var(--primary-dark);
}

.auth-brand {
    margin-bottom: 10px;
    color: var(--primary-dark);
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: .02em;
}

.auth-brand span {
    color: var(--accent);
}

.auth-modal-content h3 {
    margin: 0 0 8px;
    font-size: 1.55rem;
}

.auth-intro {
    margin: 0 0 18px !important;
    color: var(--text-muted) !important;
    line-height: 1.55;
}

#home-login-form label {
    display: block;
    margin: 14px 0 7px;
    color: var(--primary-dark);
    font-weight: 800;
}

#home-login-form input:not([type="hidden"]) {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text-dark);
    font: inherit;
}

#home-login-form input:focus {
    outline: 3px solid rgba(255, 152, 0, .18);
    border-color: var(--accent);
}

.auth-submit {
    width: 100%;
    margin-top: 20px;
}

.auth-submit[disabled] {
    opacity: .65;
    cursor: wait;
    transform: none;
}

.auth-error {
    margin: 12px 0 4px;
    padding: 11px 13px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: #fff1f2;
    color: #9f1239;
    font-weight: 700;
}

.auth-fallback {
    display: block;
    margin-top: 16px;
    text-align: center;
    color: var(--primary);
    font-weight: 700;
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 1050px) {
    .account-greeting {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-container {
        gap: 10px;
    }

    .account-area {
        margin-left: auto;
        gap: 6px;
    }

    .btn-login,
    .account-link,
    .account-logout {
        padding: 7px 8px;
        font-size: .85rem;
    }

    .auth-modal-content {
        padding: 30px 22px 24px;
    }
}

@media (max-width: 460px) {
    .account-link {
        display: none;
    }
}

/* =========================================================================
   HEADER GỌN - v0.4.2
   Không đặt nút “Phòng học” cạnh tài khoản; tránh logo và menu bị xuống dòng.
   ========================================================================= */

.logo {
    white-space: nowrap;
    flex: 0 0 auto;
}

.nav-menu {
    min-width: 0;
    margin-left: auto;
    margin-right: 18px;
}

.nav-menu ul {
    gap: clamp(13px, 1.35vw, 24px);
}

.nav-menu a {
    white-space: nowrap;
}

.header-actions,
.account-area {
    flex: 0 0 auto;
}

.account-area {
    gap: 10px;
}

.account-greeting {
    max-width: 190px;
}

.account-logout {
    padding: 8px 12px;
    border: 1px solid rgba(180, 35, 24, .22);
    border-radius: 999px;
    line-height: 1;
}

.account-logout:hover {
    background: #fff1f0;
    text-decoration: none;
}

@media (max-width: 1180px) {
    .nav-menu ul {
        gap: 13px;
    }

    .account-greeting {
        display: none;
    }
}
