/* === FONT & GLOBAL STYLES === */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Poppins:wght@300;400;500;600&display=swap');

:root {
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;

    /* NEW VIBRANT PALETTE */
    --color-primary: #0cc0df; /* Vibrant Blue */
    --color-secondary: #fefc39; /* Neon Yellow */

    --color-bg: #ffffff; /* Clean White */
    --color-text: #222222; /* Dark Charcoal */
    --color-text-soft: #444444;
    --color-card: #ffffff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.8;
    font-size: 16px;
    overflow-x: hidden;
    position: relative;
}

/* === ANIMATED GRADIENT BACKGROUND BLOBS === */
.gradient-blob {
    position: absolute;
    filter: blur(120px); /* Softer blur */
    opacity: 0.15; /* More subtle */
    border-radius: 50%;
    z-index: -1;
    animation: move 20s infinite alternate;
}
.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--color-primary);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}
.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--color-secondary);
    top: 30vh;
    right: 5vw;
    animation-delay: -10s;
}
.blob-3 {
    width: 300px;
    height: 300px;
    background: var(--color-primary);
    opacity: 0.1;
    bottom: 0;
    left: 20vw;
    animation-delay: -5s;
}

@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }
    to {
        transform: translate(50px, 100px) scale(1.2);
    }
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 30px;
    z-index: 2;
    position: relative;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-text); /* Dark text */
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
}

p {
    margin-bottom: 20px;
    color: var(--color-text-soft);
    font-weight: 300;
}

a {
    color: var(--color-primary); /* Blue links */
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}
a:hover {
    filter: brightness(85%);
}

img {
    max-width: 100%;
    border-radius: 12px;
}

/* === HEADER / NAVIGATION (NEW NEON YELLOW GLASS) === */
.navbar {
    width: 100%;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background: rgba(254, 252, 57, 0.7); /* Neon Yellow Glass */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

.navbar .logo {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    color: var(--color-text); /* Dark text */
    z-index: 1002;
    flex-shrink: 0;
}

.navbar .nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.navbar .nav-links li {
    margin-left: 12px; /* Tighter spacing */
}

/* Standard nav links */
.navbar .nav-links li a {
    color: var(--color-text-soft); /* Dark text */
    font-weight: 500;
    font-size: 14px; /* Reduced size */
    padding: 8px 10px;
    position: relative;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    white-space: nowrap; /* Prevents wrapping */
}

.navbar .nav-links li a:hover {
    background-color: rgba(0,0,0,0.05);
    color: var(--color-text);
}

/* === "GRAB IT NOW" GLOWING LINK (LEFT) - MODIFIED === */
.nav-link-cta-left a {
    background-color: var(--color-primary); /* CHANGED */
    color: #fff; /* CHANGED */
    font-weight: 600;
    font-size: 15px;
    border-radius: 50px;
    padding: 8px 18px;
    animation: glow-right 1.5s infinite alternate; /* CHANGED */
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.1);
}
.nav-link-cta-left a:hover {
    color: #fff; /* CHANGED */
    background-color: var(--color-primary); /* CHANGED */
    transform: scale(1.05);
}

/* === "INVITE NOW" GLOWING LINK (RIGHT) === */
.nav-link-glowing a {
    background-color: var(--color-primary);
    color: #fff;
    font-weight: 600;
    border-radius: 50px;
    padding: 8px 18px; /* Pill shape */
    font-size: 15px; /* Consistent size */
    animation: glow-right 1.5s infinite alternate;
}
.nav-link-glowing a:hover {
    background-color: var(--color-primary);
    color: #fff;
    transform: scale(1.05);
}

@keyframes glow-right {
    from {
        box-shadow: 0 0 5px var(--color-primary), 0 0 10px var(--color-primary);
    }
    to {
        box-shadow: 0 0 20px var(--color-primary), 0 0 30px var(--color-primary);
    }
}

/* === MOBILE NAV TOGGLE (Hamburger) === */
.mobile-nav-toggle {
    display: none;
    width: 30px;
    height: 25px;
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1002;
    flex-shrink: 0;
}
.mobile-nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--color-text); /* Dark bars */
    border-radius: 3px;
    position: absolute;
    left: 0;
    transition: all 0.3s ease-in-out;
}
.mobile-nav-toggle span:nth-child(1) { top: 0; }
.mobile-nav-toggle span:nth-child(2) { top: 11px; }
.mobile-nav-toggle span:nth-child(3) { top: 22px; }

/* Mobile Nav Toggle 'X' animation */
.mobile-nav-toggle.active span {
    background: #fff; /* White 'X' on open menu */
}
.mobile-nav-toggle.active span:nth-child(1) { transform: rotate(45deg); top: 11px; }
.mobile-nav-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-nav-toggle.active span:nth-child(3) { transform: rotate(-45deg); top: 11px; }

/* === HERO SECTION === */
.hero {
    height: 100vh;
    min-height: 700px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
    margin-top: -80px;
    background: #333;
}

#hero-carousel-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    background-size: cover;
    background-position: center;
    animation: kenBurns 20s infinite alternate;
}

.hero-carousel-item.active { opacity: 1; }

@keyframes kenBurns {
    0% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* VIBRANT OVERLAY */
    background: linear-gradient(35deg, rgba(12, 192, 223, 0.7), rgba(254, 252, 57, 0.6));
    opacity: 0.9;
    z-index: 2;
}

.hero-content {
    z-index: 3;
    position: relative;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 5rem;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.3rem;
    color: #eee;
    margin-bottom: 30px;
    font-weight: 300;
}

/* === BUTTON STYLES (NEW BLUE/YELLOW GRADIENT) === */
.btn {
    display: inline-block;
    padding: 14px 35px;
    font-weight: 600;
    font-size: 16px;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    letter-spacing: 0.5px;
    color: var(--color-text); /* Dark text for readability */
    background-image: linear-gradient(to right, var(--color-primary) 0%, var(--color-secondary) 100%);
    background-size: 200% auto;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    text-align: center;
}
.btn:hover {
    background-position: right center;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(12, 192, 223, 0.4);
}

/* Secondary button (reverse gradient) */
.btn-secondary {
    background-image: linear-gradient(to right, var(--color-secondary) 0%, var(--color-primary) 100%);
    color: var(--color-text); /* Still dark text */
}
.btn-secondary:hover {
    background-position: right center;
    box-shadow: 0 8px 25px rgba(254, 252, 57, 0.4);
    color: #fff; /* Text becomes white on blue side */
}

/* === CONTENT SECTIONS === */
.page-header {
    text-align: center;
    padding: 120px 0 40px 0;
}
.page-header h1 {
    font-size: 3.5rem;
}

.content-section {
    padding: 40px 0;
    position: relative;
    z-index: 2;
}

/* === VIBRANT CARD === */
.content-card {
    background: var(--color-card);
    border-radius: 20px;
    padding: 40px;
    /* Simple Shadow */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    margin-bottom: 40px;
    transition: all 0.3s ease;
}
.content-card:hover {
    transform: translateY(-8px);
    /* Blue Glow Shadow on Hover */
    box-shadow: 0 15px 40px rgba(12, 192, 223, 0.2);
}

/* Grid for About Brief */
.about-brief-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: center;
}
/* ADDED: Font size fix for "Meet the Author" section */
.about-brief-grid p {
    font-size: 15px;
    line-height: 1.7;
}


/* === ABOUT PAGE === */
.about-full-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 50px;
    align-items: flex-start;
}

/* Circular Author Image */
.author-image-container {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    margin: 0 auto 30px auto;
    border: 8px solid #fff;
    outline: 4px solid var(--color-primary); /* Blue outline */
    transition: transform 0.3s ease;
}
.author-image-container:hover {
    transform: scale(1.03);
}
.author-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}
.about-full-grid > div:first-child {
    text-align: center;
}

.social-links {
    margin-top: 30px;
    display: flex;
    gap: 20px;
    justify-content: center;
}
.social-links a {
    font-size: 1.8rem;
    color: var(--color-text-soft);
    transition: color 0.3s ease, transform 0.3s ease;
}
.social-links a:hover {
    color: var(--color-primary);
    transform: translateY(-3px);
}

/* === TESTIMONIALS SECTION === */
.testimonials-grid {
    display: grid;
    /* UPDATED: Changed from minmax(300px, 1fr) to allow for 6 reviews */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
/* UPDATED: Reduced default p font size for reviews */
.testimonial-card p {
    font-size: 0.95rem;
    font-style: italic;
    color: #333;
    margin-bottom: 15px;
    font-weight: 300;
}
.testimonial-author {
    font-weight: 600;
    color: var(--color-primary);
    font-family: var(--font-body);
    font-size: 1rem;
}

/* === WORKSHEETS PAGE === */
.worksheet-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px auto;
}
.worksheet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
}

/* Form inputs */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--color-text);
}
.form-group input[type="email"],
.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 15px;
    background: #f9f7fd; /* Light bg for inputs */
    border: 1px solid #ddd;
}
.form-group input[type="email"]:focus,
.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 8px rgba(12, 192, 223, 0.3);
}

/* Locked State (Modern) */
.worksheet-card.locked {
    position: relative;
    cursor: pointer;
}
.worksheet-card.locked .worksheet-content {
    filter: blur(8px);
    user-select: none;
    opacity: 0.6;
}
.locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    color: var(--color-text);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.worksheet-card.locked:hover .locked-overlay {
    opacity: 1;
}
.locked-overlay .lock-icon {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 15px;
}
.locked-overlay p {
    font-weight: 700;
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin: 0;
}

/* === UNLOCKED WORKSHEET FORM === */
.unlocked-worksheet-form h3 {
    color: var(--color-primary);
}
.unlocked-worksheet-form p {
    font-size: 0.95rem;
    margin-bottom: 25px;
}
.unlocked-worksheet-form hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0;
}
.unlocked-worksheet-form .btn-secondary {
    width: 100%;
}


/* === SHOP PAGE === */
.shop-hero {
    text-align: center;
    padding: 120px 0 60px 0;
    color: var(--color-text);
}
.shop-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
}
.shop-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px auto;
}

/* 2D Book Image */
.book-2d-container {
    max-width: 400px;
    margin: 0 auto 60px auto;
    transition: transform 0.3s ease-out;
}
.book-2d-container:hover {
    transform: scale(1.03);
}
.book-2d-container img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* Shop buttons grid (and modal buttons) - FIXED SIZING */
.shop-buttons-grid,
.amazon-modal-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
    margin-top: 30px;
}

.shop-buttons-grid .btn,
.amazon-modal-buttons .btn {
    width: 100%;
    height: 100%; /* Force fill height */
    min-height: 54px; /* Ensure minimum touch target */
    display: flex; /* Use flexbox to center text vertically */
    align-items: center;
    justify-content: center;
    padding: 12px 15px; /* Adjusted padding */
    line-height: 1.3; /* Better for wrapping text */
    white-space: normal; /* Allow wrapping */
    text-align: center;
}

/* === NEWSLETTER PAGE === */
.newsletter-form-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}
.newsletter-form {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.newsletter-form .form-group {
    flex-grow: 1;
    margin-bottom: 0;
}
.newsletter-form input[type="email"] {
    width: 100%;
    padding: 15px; /* Taller input */
    font-size: 16px;
}
.newsletter-form .btn {
    flex-shrink: 0; /* Prevent button from shrinking */
    padding: 14px 30px;
}

/* === BLOG/ARTICLE LIST (ON NEWSLETTER PAGE) === */
.article-list {
    margin-top: 60px;
}
.article-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
}
.article-card h3 {
    color: var(--color-primary);
}
.article-card p {
    font-size: 0.95rem;
}

/* === EXCERPT & ARTICLE PAGES === */
.article-header {
    text-align: center;
    padding: 120px 0 40px 0;
}
.article-header h1 {
    font-size: 3.5rem;
}
.article-header p {
    font-size: 1.2rem;
    color: var(--color-primary);
    font-weight: 500;
}
.article-content {
    max-width: 750px;
    margin: 0 auto;
}
.article-content h3 {
    color: var(--color-primary);
    margin-top: 30px;
}
.article-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
}
.article-content li {
    color: #444;
    font-weight: 300;
    margin-bottom: 10px;
}

.excerpt-content {
    max-width: 750px;
    margin: 0 auto;
}
.excerpt-content h2,
.excerpt-content h3 {
    color: var(--color-primary);
    margin-top: 30px;
}
.excerpt-content p {
    font-size: 1.1rem;
    line-height: 1.9;
}

/* === CHALLENGES PAGE === */
.challenge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
}
.challenge-card h3 {
    color: var(--color-primary);
}
.challenge-card .challenge-meta {
    font-weight: 600;
    color: var(--color-text-soft);
    margin-bottom: 15px;
    display: block;
}
.challenge-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.challenge-actions .btn {
    width: 100%;
}


/* === GENERAL MODAL STYLES === */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0, 0, 0, 0.7); /* Darker overlay */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.modal-content {
    background: var(--color-card);
    margin: 10% auto;
    padding: 40px;
    width: 90%;
    max-width: 550px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    text-align: center;
}
.modal-content h2 {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 20px;
}
.modal-content p {
    color: #333;
    margin-bottom: 30px;
}
.close-btn {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 32px;
    font-weight: bold;
}
.close-btn:hover,
.close-btn:focus {
    color: var(--color-text);
    cursor: pointer;
}


/* ADDED: Styles for new Worksheet Modal steps */
.modal-question-buttons {
    display: flex;
    gap: 15px;
}
.modal-question-buttons .btn {
    width: 100%;
}
@media(max-width: 600px) {
    .modal-question-buttons {
        flex-direction: column;
    }
}

/* REMOVED: Offer popup customizations */

/* Invite popup customization */
#invite-popup .modal-content h2 {
    color: var(--color-primary); /* Blue */
}
#invite-popup .modal-content .btn {
    background-image: linear-gradient(to right, var(--color-secondary) 0%, #e6e435 51%, var(--color-secondary) 100%);
    color: var(--color-text);
}
#invite-popup .modal-content .btn:hover {
    box-shadow: 0 8px 25px rgba(254, 252, 57, 0.4);
}


/* Video popup customization */
#video-popup .modal-content {
    max-width: 600px;
    padding: 40px 20px 20px 20px;
}
#video-popup .modal-content h2 {
    color: var(--color-primary);
}
.video-embed-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}
.video-embed-container blockquote {
    margin: 0 !important;
}


/* === ANIMATION: FADE-IN ON SCROLL === */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === RESPONSIVE STYLES === */
@media(max-width: 1024px) {
    /* Hide desktop nav and show mobile toggle earlier */
    .navbar-container {
        padding: 0 20px; /* Tighter padding */
    }
    .navbar .nav-links {
        display: none; /* Hide desktop links */
    }
    .mobile-nav-toggle {
        display: block; /* Show hamburger */
    }

    /* Style mobile menu to be the full-screen version */
    .navbar .nav-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 25px;

        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;

        background: var(--color-primary); /* Opaque solid purple */

        transform: translateY(-100%);
        transition: transform 0.4s ease-in-out;

        z-index: 1001;
    }

    .navbar .nav-links.active {
        transform: translateY(0);
    }

    .navbar .nav-links li {
        margin: 10px 0; /* Vertical spacing */
    }

    .navbar .nav-links a {
        font-size: 1.5rem;
        font-weight: 600;
        color: #fff;
    }

    .navbar .nav-links a:hover {
        background: none;
    }

    /* Mobile glowing links - MODIFIED */
    .nav-link-glowing a,
    .nav-link-cta-left a {
        background: none;
        color: var(--color-primary); /* CHANGED */
        animation: glow-mobile-blue 1.5s infinite alternate; /* CHANGED */
        font-size: 1.8rem; /* Make them bigger */
        padding: 8px 18px;
        border: none;
    }

    .nav-link-glowing a:hover,
    .nav-link-cta-left a:hover {
        background: none;
        color: #fff;
    }

    /* REMOVED: @keyframes glow-mobile */

    @keyframes glow-mobile-blue {
        from {
            text-shadow: 0 0 5px var(--color-primary), 0 0 10px var(--color-primary);
        }
        to {
            text-shadow: 0 0 20px var(--color-primary), 0 0 30px var(--color-primary);
        }
    }

    /* Other responsive styles */
    .hero-content h1 { font-size: 3rem; }
    .about-brief-grid, .about-full-grid { grid-template-columns: 1fr; }
    .about-full-grid { text-align: center; }
    .author-image-container { margin: 0 auto 20px auto; width: 250px; height: 250px; }
    .social-links { justify-content: center; }
    .gradient-blob { display: none; }
    .page-header h1 { font-size: 2.5rem; }
    .modal-content { margin: 20% auto; padding: 25px; }
    .hero { min-height: 500px; }
    .hero-content p { font-size: 1.1rem; }
    .article-header { padding-top: 100px; }
    .article-header h1 { font-size: 2.5rem; }
    .newsletter-form {
        flex-direction: column;
    }
    .challenge-actions {
        flex-direction: column;
    }
    /* Responsive style for modal buttons */
    .modal-question-buttons {
        flex-direction: column;
    }
}