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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
}

.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: #000000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(18px);
}

.navbar.scrolled {
    background-color: rgba(0, 0, 0, 0.95);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.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;
}


/* 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-color: white;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
        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: 520px;
        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-color: #f8fafc;
        color: #da9e55;
        border-radius: 14px;
        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;
    }

    .nav-btn:hover,
    .nav-btn:focus-visible {
        background-color: #e2e8f0;
        color: #da9e55;
    }

    .nav-btn.active {
        background-color: #111827;
        color: #ffffff;
    }

    .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,
    .nav-actions .language-select {
        width: 100%;
        min-width: 0;
    }

    .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(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 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 > 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: 16px;
    max-width: 10ch;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
    line-height: 1.05;
}

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

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #da9e55;
    color: #111827;
    border-radius: 999px;
    padding: 0.95rem 1.6rem;
    min-height: 48px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: 0 16px 40px rgba(218, 158, 85, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-primary:hover {
    background: #c6883f;
    transform: translateY(-1px);
    box-shadow: 0 20px 44px rgba(218, 158, 85, 0.28);
}

.btn-gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #111827;
    border-radius: 999px;
    box-shadow: 0 16px 30px rgba(251, 191, 36, 0.22);
}

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

/* 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);
}

/* 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;
}
