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

html {
    scroll-behavior: smooth;
}

:root {
    color-scheme: dark;
    --bg: #050608;
    --surface: #0a1221;
    --surface-soft: #11182d;
    --surface-strong: #0c1422;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --accent: #d4af37;
    --accent-dark: #ad8f2d;
    --accent-soft: #f2d18b;
    --border: rgba(148, 163, 184, 0.16);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

body {
    font-family: 'Open Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    background-image:
        radial-gradient(circle at top right, rgba(212, 175, 55, 0.08), transparent 22%),
        radial-gradient(circle at bottom left, rgba(56, 189, 248, 0.07), transparent 20%);
}

.bg-white {
    background-color: var(--surface) !important;
}

.bg-gray-50 {
    background-color: #0f172a !important;
}

.bg-gray-100 {
    background-color: #111827 !important;
}

.bg-gray-200 {
    background-color: #111c33 !important;
}

.text-gray-900,
.text-gray-800 {
    color: #f8fafc !important;
}

.text-gray-700 {
    color: #cbd5e1 !important;
}

.text-gray-600 {
    color: #94a3b8 !important;
}

.text-gray-500 {
    color: #7c9abb !important;
}

.text-gray-400 {
    color: #64748b !important;
}

.border-gray-200,
.border-gray-100,
.border-gray-300 {
    border-color: rgba(148, 163, 184, 0.16) !important;
}

.bg-red-500 {
    background-color: #ef4444 !important;
}

.text-red-500 {
    color: #f59e0b !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

button, .modal-cta-btn {
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

button:hover, .modal-cta-btn:hover {
    transform: translateY(-1px);
}

h1, h2, h3, .hero-title {
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
}


/* Scroll-driven heading animation - pop up from bottom */
@keyframes popUp {
    from {
        transform: translateY(100px);
    }
    to {
        transform: translateY(0);
    }
}

/* Content fades in and slides up when scrolling */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero text pops up when page loads */
@keyframes heroPopUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.scroll-heading {
    animation: popUp linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
}

.scroll-reveal {
    animation: slideUp linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
}

.hero-pop {
    animation: heroPopUp 0.8s ease-out forwards;
}

.hero-pop-delay {
    animation: heroPopUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

section {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s ease, transform 0.9s ease;
    will-change: opacity, transform;
    scroll-margin-top: 110px;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    section {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* Fixed navbar at top */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 32px;
    background-color: rgba(5, 8, 14, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(22px);
    animation: headerFadeIn 0.65s ease-out both;
    will-change: transform, opacity;
}

.navbar.scrolled {
    background-color: rgba(8, 12, 20, 0.98);
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.38);
    transform: translateY(-2px);
}

.navbar .logo a {
    display: inline-flex;
    align-items: center;
    transition: transform 0.25s ease;
}

.navbar .logo a:hover {
    transform: translateY(-2px);
}

.nav-buttons {
    display: flex;
    gap: 28px;
    align-items: center;
}

.nav-btn {
    text-decoration: none;
    padding: 0.95rem 1.25rem;
    border-radius: 999px;
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    min-height: 48px;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.nav-btn:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
}

.nav-btn.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.18);
}

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

.anchor-menu {
    position: sticky;
    top: 72px;
    z-index: 999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    padding: 0.65rem 1rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
}

.anchor-menu-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.anchor-link {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: #f5f5f5;
    color: #1f2937;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
    font-size: 0.95rem;
}

.anchor-link:hover,
.anchor-link.active {
    background: #da9e55;
    color: white;
    transform: translateY(-1px);
}

/* Logo link styling */
.logo {
    display: flex;
    align-items: center;
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    transition: opacity 0.2s ease;
}

.nav-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #111827;
    border-radius: 999px;
    padding: 0.9rem 1.2rem;
    border: none;
    font-weight: 700;
    font-size: 0.95rem;
    min-height: 48px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.home-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.16);
}

.language-select {
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: white;
    color: #111827;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    min-height: 48px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.language-select:hover,
.language-select:focus {
    border-color: #da9e55;
    box-shadow: 0 0 0 4px rgba(218, 158, 85, 0.12);
}

/* Navigation button container */
.nav-buttons {
    display: flex;
    gap: 28px;
}

/* Individual nav buttons */
.nav-btn {
    text-decoration: none;
    padding: 0.95rem 1.25rem;
    border-radius: 999px;
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    min-height: 48px;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.nav-btn:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav-btn.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.12);
}

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

/* Three lines of the hamburger */
.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #da9e55;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}

.menu-toggle:hover span,
.menu-toggle:focus-visible span {
    background-color: #f59e0b;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Legal page accordion - works same as FAQ */
.legal-answer {
    max-height: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.3s ease, padding 0.4s ease;
}

.legal-answer.open {
    max-height: 2000px;
    opacity: 1;
    padding-top: 20px;
    padding-bottom: 20px;
}

button[aria-expanded="true"] svg {
    transform: rotate(180deg);
}


/* Phone and tablet styles */
@media (max-width: 768px) {
    .navbar {
        padding: 16px 24px;
    }

    /* Show hamburger on mobile */
    .menu-toggle {
        display: flex;
        padding: 12px;
    }

    /* Dropdown menu that appears when hamburger clicked */
    .nav-buttons {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
        padding: 0 16px;
        max-height: 0;
        overflow: hidden;
        background: rgba(5, 12, 25, 0.98);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 20px 45px rgba(0, 0, 0, 0.28);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        z-index: 1001;
        transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.3s ease, visibility 0.3s ease;
    }

    .nav-buttons.active {
        max-height: 620px;
        opacity: 1;
        padding: 12px 16px 16px;
        visibility: visible;
        pointer-events: auto;
    }

    /* Full-width nav buttons on mobile */
    .nav-btn {
        padding: 1rem 1.25rem;
        text-align: left;
        width: 100%;
        display: block;
        background: rgba(18, 28, 50, 0.92);
        color: #f8fafc;
        border: 1px solid rgba(218, 158, 85, 0.18);
        border-radius: 18px;
        margin-bottom: 0;
        min-height: 52px;
        transform: translateY(-10px);
        opacity: 0;
        transition: transform 0.3s ease 0.1s, opacity 0.3s ease 0.1s, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    }

    .nav-btn:hover,
    .nav-btn:focus-visible {
        background: rgba(218, 158, 85, 0.14);
        color: #ffffff;
        border-color: rgba(218, 158, 85, 0.4);
    }

    .nav-btn.active {
        background: rgba(218, 158, 85, 0.22);
        color: #ffffff;
        border-color: rgba(218, 158, 85, 0.45);
        box-shadow: 0 12px 24px rgba(218, 158, 85, 0.12);
    }

    .nav-buttons.active .nav-btn {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-btn:last-child {
        margin-bottom: 0;
    }

    .nav-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .nav-actions .home-btn {
        width: 100%;
        min-width: 0;
    }

    .nav-actions .language-select {
        display: none !important;
    }

    .language-select {
        padding: 0.85rem 1rem;
    }

    .language-select:hover,
    .language-select:focus {
        border-color: #da9e55;
        box-shadow: 0 0 0 4px rgba(218, 158, 85, 0.12);
    }

    .logo {
        font-size: 20px;
    }

    /* Slightly smaller logo text on phones */
    .logo {
        font-size: 20px;
    }
}

/* Book cover images for the cards */
.book-1-bg {
    background-image: url('trading-hub-2.0.jpg');
}

.book-2-bg {
    background-image: url('trading-hub-3.0.jpg');
}

.book-3-bg {
    background-image: url('secrets-revealed.jpg');
}

/* Darkens book covers on hover */
.book-hover-gradient {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
}

/* TradingView ticker widget at top of page */
.tradingview-widget-container {
    width: 100%;
    overflow: visible;
    height: 72px;
    min-height: 72px;
    position: relative;
    z-index: 500;
    margin-top: 80px;
    border-bottom: 2px solid #e2e8f0;
}

.tradingview-widget-container__widget {
    width: 100%;
    height: 100%;
}

.tradingview-widget-copyright {
    visibility: hidden;
    height: 0;
}

/* Staggered animation delays */
.scroll-delay-1 {
    animation-delay: 0.1s;
}

.scroll-delay-2 {
    animation-delay: 0.2s;
}

.scroll-delay-3 {
    animation-delay: 0.3s;
}

/* Hero section - full screen background image */
#home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(4, 8, 16, 0.88), rgba(8, 12, 24, 0.94)), url('hero-section-bg.jpeg') center center / cover no-repeat;
    background-attachment: fixed;
    color: white;
    text-align: center;
    padding: 104px 24px 40px;
    position: relative;
}

#home::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top center, rgba(212, 175, 55, 0.1), transparent 32%);
    pointer-events: none;
}

#home > div {
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    #home {
        background-attachment: scroll;
    }
}

.hero-title {
    font-size: clamp(2.75rem, 6vw, 5rem);
    margin-bottom: 20px;
    max-width: 11ch;
    text-shadow: 1px 1px 18px rgba(0, 0, 0, 0.45);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.hero-pop-delay {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    opacity: 0.95;
    max-width: 44rem;
    margin: 0 auto;
    text-shadow: 1px 1px 18px rgba(0, 0, 0, 0.25);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), #f1ca6b);
    color: #090b10;
    border-radius: 999px;
    padding: 0.95rem 1.6rem;
    min-height: 48px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    box-shadow: 0 18px 48px rgba(212, 175, 55, 0.2);
    transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #f2d26f, #d4af37);
    transform: translateY(-2px);
    box-shadow: 0 22px 56px rgba(212, 175, 55, 0.25);
}

.btn-gold {
    background: linear-gradient(135deg, #f6d87f, #d4af37);
    color: #050608;
    border-radius: 999px;
    box-shadow: 0 18px 42px rgba(212, 175, 55, 0.22);
}

.btn-gold:hover {
    background: linear-gradient(135deg, #f7dd99, #b58b2f);
}

/* Service detail popups */

/* Dark overlay behind modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-backdrop:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

/* White card that holds modal content */
.modal-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-backdrop:not(.hidden) .modal-container {
    transform: scale(1) translateY(0);
}

#syllabusModal,
#pdf-modal-1,
#pdf-modal-2 {
    opacity: 0;
    transition: opacity 0.25s ease;
}

#syllabusModal.flex,
#pdf-modal-1.flex,
#pdf-modal-2.flex {
    opacity: 1;
}

#syllabusModal > div,
#pdf-modal-1 > div,
#pdf-modal-2 > div {
    transform: translateY(12px) scale(0.96);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

#syllabusModal.flex > div,
#pdf-modal-1.flex > div,
#pdf-modal-2.flex > div {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* X button in top-right of modal */
.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 10;
    transition: background 0.2s ease, transform 0.2s ease;
}

.modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Top image area of modal (180px tall) */
.modal-header-banner {
    width: 100%;
    height: 180px;
    position: relative;
    overflow: hidden;
}

/* Text content area of modal */
.modal-content {
    padding: 28px 32px 32px;
    text-align: center;
}

/* Red heading in modal */
.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #dc2626;
    text-transform: uppercase;
    margin-bottom: 16px;
    letter-spacing: 0.025em;
}

/* Body text in modal */
.modal-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 24px;
}

.modal-description strong {
    font-weight: 600;
    color: #111827;
}

/* Green "Join Now" button in modal */
.modal-cta-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: #10b981;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    text-align: center;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.modal-cta-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

/* Modal adjustments for small screens */
@media (max-width: 640px) {
    .modal-container {
        max-width: 100%;
        border-radius: 20px;
    }
    
    .modal-header-banner {
        height: 150px;
    }
    
    .modal-content {
        padding: 22px 20px 24px;
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
    
    .modal-description {
        font-size: 0.9rem;
    }
}

/* Inter font for stat numbers */
.font-inter {
    font-family: 'Inter', 'Open Sans', sans-serif;
}

/* Pushes content down so it doesn't hide under fixed navbar */
.section-padding-top {
    padding-top: 104px;
}

/* Gold "Read Online" buttons on book cards */
.btn-gold {
    background-color: #da9e55;
    transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-gold:hover {
    background-color: #c48d4a;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(218, 158, 85, 0.22);
}

/* Gold grid lines background */
.grid-pattern {
    background-image: linear-gradient(rgba(218,158,85,0.3) 1px, transparent 1px), linear-gradient(90deg, rgba(218,158,85,0.3) 1px, transparent 1px);
    background-size: 40px 40px;
}
