/* Basic Reset & Kalpvruksh AI Brand Colors */
:root {
    --primary-color: #0A4F64; /* Deep Teal from logo trunk */
    --secondary-color: #5A7A85; /* Muted teal for subtitles */
    --background-color: #ffffff; /* Clean white background */
    --primary-button-bg: #2471c9; /* Vibrant Cyan from logo background */
    --primary-button-hover: #1E94AD; /* Darker cyan for hover */
    --secondary-button-bg: #E0F7FA; /* Light cyan for secondary buttons/backgrounds */
    --secondary-button-text: #1E94AD;
    --accent-green: #4E8A8B; /* Muted Green from leaves */
    --border-color: #e2e8f0;
    --font-family: 'Inter', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--primary-color);
    line-height: 1.7;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    
}

/* Header & Navigation - Adjusted Height */
header {
    background: var(--background-color);
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: 64px; /* Reduced height to match ebook-store.html */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 64px; /* Reduced height to match ebook-store.html */
    height: 64px; /* Fixed height */
    padding: 0; /* Remove padding to reduce height */
}

.nav-links {
    display: flex;
    gap: 24px; 
    margin-left: auto;
    margin-right: 24px;
}

.nav-links a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 1rem;
    position: relative;
    white-space: nowrap; /* Prevent text wrapping */
    display: flex;
    align-items: center;
}

.nav-links a:hover {
    color: var(--primary-color);
    background: var(--secondary-button-bg);
}

.nav-links a.active {
    color: var(--primary-button-bg);
    background-color: var(--secondary-button-bg);
    font-weight: 700;
}

/* Login Button Enhancements */
.login-btn {
    font-weight: 600;
    color: var(--secondary-color);
    text-decoration: none;
    padding: 9px 18px; /* Increased padding */
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    border: 1px solid var(--border-color);
    background-color: white;
    display: inline-flex;
    align-items: center;
}

.login-btn:hover {
    background-color: var(--primary-button-bg);
    color: var(--primary-button-bg);
    border-color: transparent;
}

.login-btn svg, 
.login-btn img {
    margin-right: 6px;
    height: 16px;
    width: 16px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px; /* Increased gap */
    margin-right: 0; /* Removed right margin */
}

/* Logo with image and text */
.logo-with-whatsapp {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 40px;
    border-radius: 50%;
    background: #e0f7fa; /* subtle background for logo image */
    overflow: hidden;
}

.logo-img {
    height: 34px;
    width: 34px;
    object-fit: contain;
    display: block;
}

.logo-text {
    font-size: 1rem; /* Slightly smaller font */
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 1px;
}

/* Buttons */
.cta-button {
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.3s;
    width: fit-content;
}

.ebook-nav-btn {
    width: fit-content;
}

.cta-button.primary { background-color: var(--primary-button-bg); color: white; }
.cta-button.primary:hover { background-color: var(--primary-button-hover); }
.cta-button.secondary { background-color: var(--secondary-button-bg); color: var(--secondary-button-text); }
.cta-button.secondary:hover { background-color: #cbeef3; }

/* WhatsApp Button Style */
.cta-button.whatsapp-button {
    background-color: #25D366; /* WhatsApp brand color */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.cta-button.whatsapp-button:hover {
    background-color: #128C7E; /* Darker WhatsApp green on hover */
}

/* WhatsApp Button in Navigation */
.whatsapp-nav-link {
    color: #25D366 !important; /* WhatsApp brand color */
    border-top: 1px solid var(--border-color);
    margin-top: 8px !important;
    font-weight: 600;
}

.whatsapp-nav-link svg {
    margin-right: 10px;
}

.whatsapp-nav-link:hover {
    background-color: rgba(37, 211, 102, 0.1) !important; /* Lighter WhatsApp green on hover */
}

/* Hero Section */
#hero {
    text-align: center;
    padding: 100px 0;
}
#hero h1 {
    font-size: 4rem;
    font-weight: 800;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.2;
}
#hero .subtitle {
    font-size: 1.25rem;
    color: var(--secondary-color);
    max-width: 700px;
    margin: 24px auto 32px;
}
.hero-actions { display: flex; justify-content: center; gap: 16px; }

/* Features Section */
#features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    padding: 60px 0;
    text-align: center;
}
.feature-card { padding: 24px; }
.feature-card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.feature-card p { color: var(--secondary-color); }

/* How It Works Section */
#how-it-works { text-align: center; padding: 100px 0; background-color: #f7fcfd; }
h2 { font-size: 2.75rem; font-weight: 800; margin-bottom: 60px; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.step .step-number {
    width: 48px; height: 48px; border-radius: 50%;
    background-color: var(--secondary-button-bg); color: var(--primary-button-hover);
    display: grid; place-items: center;
    font-size: 1.25rem; font-weight: 700;
    margin: 0 auto 24px;
}
.step h3 { font-size: 1.5rem; margin-bottom: 12px; }
.step p { color: var(--secondary-color); }

/* Reviews Section */
#reviews { text-align: center; padding: 100px 0; }
.review-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    text-align: left;
    margin-top: 60px;
}
.review-card {
    background-color: #f7fcfd;
    padding: 32px;
    border-radius: 12px;
    border: 1px solid #e0f7fa;
}
.review-card p { font-size: 1.1rem; margin-bottom: 24px; font-style: italic; }
.review-card strong { color: var(--primary-color); font-weight: 600; }

/* CTA Section */
#chatbot-cta { padding: 80px 0; }
.cta-box {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 60px;
    border-radius: 16px;
}
.cta-box h2 { color: white; }
.cta-box p { color: #d1e5ea; max-width: 500px; margin: 0 auto 32px; }

/* Footer */
footer { background-color: #f7fcfd; padding-top: 80px; color: var(--secondary-color); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 40px; padding-bottom: 60px; }
.footer-col h3, .footer-col h4 { color: var(--primary-color); font-size: 1rem; font-weight: 600; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col a { color: var(--secondary-color); text-decoration: none; transition: color 0.3s; }
.footer-col a:hover { color: var(--primary-button-bg); }
.social-icons { display: flex; gap: 16px; }
.footer-bottom { border-top: 1px solid #e0f7fa; padding: 24px 0; text-align: center; font-size: 0.9rem; }

/* Promotional Banner */
.promo-banner {
    background-color: var(--primary-button-bg);
    color: white;
    text-align: center;
    padding: 14px 15px;
    font-weight: 700;
    border-radius: 8px;
    margin: 40px auto 20px;
}

/* Featured Section */
#featured h2 {
    margin-bottom: 20px;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
    gap: 28px;
}

.book-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    padding: 20px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.book-card:hover, .book-card:focus {
    cursor: pointer;
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    outline: none;
}

.book-image-placeholder {
    height: 180px;
    width: 140px;
    background-color: #f0f0f0;
    margin-bottom: 18px;
    border-radius: 8px;
}

.book-card h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--primary-color);
    text-align: center;
}

.book-author {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 12px;
    text-align: center;
}

.book-price {
    font-size: 1.35rem;
    color: var(--primary-color);
    margin-bottom: 18px;
    font-weight: 700;
}

.cta-button {
    width: 100%;
    font-weight: 600;
}

.book-buttons {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
}

.book-buttons .cta-button {
    margin: 0;
}

.book-buttons .cta-button.secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
}

/* Book Cover Image Styles */
.book-cover-container {
    height: 180px;
    width: 140px;
    overflow: hidden;
    margin-bottom: 18px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book-card:hover .book-cover-image {
    transform: scale(1.05);
}

/* Filters Section */
.filters-section {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 30px 0 50px;
}

.filters-section input,
.filters-section select {
    padding: 12px 18px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    font-family: var(--font-family);
}

/* Newsletter Signup */
.newsletter {
    background-color: #f7fcfd;
    padding: 60px 20px 50px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 80px;
}

.newsletter h3 {
    margin-bottom: 18px;
    font-weight: 700;
}

.newsletter form {
    display: flex;
    justify-content: center;
    gap: 12px;
    max-width: 420px;
    margin: 0 auto;
}

.newsletter input[type="email"] {
    flex: 1;
    padding: 14px 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    font-family: var(--font-family);
}

.newsletter button {
    padding: 14px 28px;
}

/* FAQ */
.faq-section {
    max-width: 800px;
    margin: 0 auto 80px;
}

.faq-item {
    margin-bottom: 16px;
}

.faq-question {
    background-color: var(--secondary-button-bg);
    border: none;
    width: 100%;
    text-align: left;
    padding: 16px 20px;
    font-weight: 600;
    border-radius: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.faq-question:hover, .faq-question[aria-expanded="true"] {
    background-color: var(--primary-button-bg);
    color: white;
}

.faq-answer {
    padding: 12px 20px 20px 20px;
    border-left: 3px solid var(--primary-button-bg);
    background-color: #e0f7fa;
    font-size: 1rem;
    line-height: 1.5rem;
    border-radius: 0 12px 12px 12px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw; /* Changed to full viewport width */
    height: 100vh; /* Changed to full viewport height */
    background: rgba(10, 79, 100, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px; /* Added padding around modal */
    overflow-y: auto;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 70vw; /* Maximum width constraint */
    max-height: 85vh; /* Maximum height constraint */
    margin: auto; /* Center in available space */
    padding: 40px;
    position: relative;
    box-shadow: 0 12px 28px rgba(0,0,0,0.18);
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
    align-items: flex-start; /* Align items to top */
    overflow-y: auto; /* Allow scrolling if content overflows */
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 32px;
    font-size: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
    z-index: 2;
}

.modal-image-placeholder {
    width: 220px;
    height: 220px;
    background-color: #f0f0f0;
    margin-bottom: 24px;
    border-radius: 12px;
    flex: 1 1 220px;
    align-self: flex-start; /* Align to top */
    max-width: 220px; /* Limit maximum width */
}

.modal-content > div:not(.modal-image-placeholder) {
    flex: 2 1 280px;
    min-width: 280px;
    max-width: calc(100% - 260px); /* Leave space for image */
    align-self: flex-start; /* Align to top */
}

.modal-description {
    color: var(--secondary-color);
    margin-bottom: 26px;
    font-size: 1.1rem;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* PDF Preview Modal */
#pdf-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 79, 100, 0.85);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

#pdf-preview-modal > div {
    background: #fff;
    border-radius: 16px;
    max-width: 70vw; /* Changed from 80vw to 70vw */
    width: 70vw;     /* Changed from 80vw to 70vw */
    margin: auto;
    padding: 24px 0 0 0;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    align-items: center;
}

#pdf-preview-frame {
    width: 100%;
    height: 70vh;
    min-height: 300px;
    border: none;
    border-radius: 8px;
    background: #f7fcfd;
    margin-bottom: 24px;
    max-width: 900px;
}

#close-pdf-preview {
    position: absolute;
    top: 24px;
    right: 32px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
    z-index: 2;
}

/* Login Page Styles - Improved spacing */
.login-section {
    padding: 80px 0;
    min-height: calc(100vh - 72px - 300px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.login-container h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    text-align: center;
    color: var(--primary-color);
}

.login-subtitle {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 36px;
    font-size: 1.05rem;
}

.form-group {
    margin-bottom: 28px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-family);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
    border-color: var(--primary-button-bg);
    outline: none;
    box-shadow: 0 0 0 2px rgba(36, 113, 201, 0.2);
}

.password-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    font-size: 0.95rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-password {
    color: var(--primary-button-bg);
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-password:hover {
    text-decoration: underline;
    color: var(--primary-button-hover);
}

.login-button {
    width: 100%;
    margin: 8px 0 28px;
    font-weight: 600;
    padding: 14px;
    font-size: 1.05rem;
}

.login-divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

.login-divider::before, .login-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    height: 1px;
    width: calc(50% - 24px);
    background-color: var(--border-color);
}

.login-divider::before {
    left: 0;
}

.login-divider::after {
    right: 0;
}

.login-divider span {
    display: inline-block;
    padding: 0 12px;
    background-color: #fff;
    position: relative;
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.social-login-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.social-login-button img {
    width: 20px;
    height: 20px;
}

.social-login-button:hover {
    background-color: #f7f9fc;
    border-color: #c4c4c4;
}

.signup-prompt {
    text-align: center;
    margin-top: 28px;
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.signup-link {
    color: var(--primary-button-bg);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.signup-link:hover {
    text-decoration: underline;
    color: var(--primary-button-hover);
}

.login-message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    display: none;
    font-size: 0.95rem;
}

.login-message.success {
    display: block;
    background-color: #e6f7e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.login-message.error {
    display: block;
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.login-btn.active, .nav-links a.active {
    color: var(--primary-button-bg);
    font-weight: 700;
}

.login-btn.logged-in {
    background-color: var(--secondary-button-bg);
    color: var(--primary-button-bg);
    font-weight: 600;
}

/* Updated pricing display with original and sale price */
.book-price-container {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    gap: 15px;
}

.price-block {
    display: flex;
    align-items: center;
    gap: 10px;
}

.original-price {
    font-size: 1.4rem;
    color: var(--secondary-color);
    text-decoration: line-through;
    position: relative;
}

.original-price::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: #ff4c4c;
    top: 50%;
    left: 0;
    transform: rotate(-10deg);
}

.sale-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #e53935; /* Sale red color */
}

.discount-badge {
    background-color: #e53935;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-block;
}

@media (max-width: 768px) {
    .book-price-container {
        justify-content: center;
    }
}

/* Enhanced Responsive Styles */
/* Mobile Navigation */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 8px;
}

/* Mobile visible login button */
.mobile-visible-login {
    display: none; /* Hidden by default on desktop */
    font-weight: 600;
    color: var(--secondary-color);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    border: 1px solid var(--border-color);
    background-color: white;
    align-items: center;
}

.mobile-visible-login:hover {
    background-color: var(--secondary-button-bg);
    color: var(--primary-button-bg);
}

/* Make PDF preview more responsive */
#pdf-preview-modal > div {
    max-width: min(900px, 90vw);
    width: 90vw;
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
}

#pdf-preview-frame {
    width: 100%;
    height: 70vh;
    min-height: 300px;
}

/* Make modal more responsive */
.modal-content {
    max-width: min(1000px, 90vw);
    width: 90vw;
    padding: clamp(20px, 5vw, 40px);
}

/* Thank you page responsive fixes */
.download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Enhanced Responsive Navigation */
@media (max-width: 768px) {
    /* Navigation for mobile - improved */
    nav.container {
        position: relative;
        flex-wrap: wrap;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 70px 0 20px 0;
        z-index: 1100;
        transition: left 0.3s ease;
        box-shadow: none;
        overflow-y: auto;
    }
    
    .nav-links.active {
        left: 0;
        box-shadow: 0 0 20px rgba(0,0,0,0.2);
    }
    
    .nav-links a {
        width: 100%;
        padding: 16px 24px;
        text-align: left;
        border-radius: 0;
        border-bottom: 1px solid var(--border-color);
        margin: 0;
    }
    
    .nav-links a:last-child {
        border-bottom: none;
    }
    
    /* Enhanced mobile toggle */
    .mobile-nav-toggle {
        display: block;
        z-index: 1200;
        margin-left: auto;
        margin-right: 16px;
    }
    
    /* Ensure nav actions are properly aligned */
    .nav-actions {
        margin-left: 0;
    }
}

@media (max-width: 500px) {
    /* Very small screens need additional adjustments */
    .logo-text {
        font-size: 1.2rem;
    }
    
    .logo-img-wrapper {
        width: 36px;
        height: 36px;
    }
    
    .logo-img {
        width: 32px;
        height: 32px;
    }
    
    .nav-actions {
        gap: 5px;
    }
    
    .login-btn {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .cta-button.primary {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    /* Hide cart text on very small screens */
    #cart-count {
        margin-right: 0 !important;
    }
    
    #cart-count::before {
        content: "🛒 ";
    }
}

/* Fix duplicate media queries */
@media (max-width: 600px) {
    /* Consolidated styles */
    .modal-content {
        padding: 16px 12px;
        max-width: 95vw;
    }
    
    .download-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .download-buttons button {
        width: 100%;
    }
}

/* Fix mobile sidebar issues */
@media (max-width: 767px) {
    /* Improved navigation styling */
    .nav-links {
        margin-left: 0; /* Remove margin that might push links offscreen */
        gap: 0; /* Remove gap in mobile view */
        transition: left 0.3s ease; /* Smooth transition */
    }
    
    .nav-links a {
        padding: 16px 24px;
        margin: 0;
        border-radius: 0;
    }
    
    .nav-links a.active {
        background-color: var(--secondary-button-bg);
        color: var(--primary-button-bg);
    }
    
    .nav-links a:hover {
        background-color: var(--secondary-button-bg);
    }
    
    /* Ensure mobile toggle is visible and clickable */
    .mobile-nav-toggle {
        display: block;
        cursor: pointer;
        margin-left: 15px;
        z-index: 1200;
        transition: all 0.3s;
        padding: 8px 12px;
        border-radius: 4px;
    }
    
    .mobile-nav-toggle:hover {
        background-color: rgba(0,0,0,0.05);
    }
    
    .mobile-nav-toggle:focus {
        outline: 2px solid var(--primary-button-bg);
    }
}

/* Download Page Styles */
.download-card {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .download-info {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    /* PDF preview adjustments */
    #pdf-preview-frame {
        height: 400px;
    }


@media (max-width: 400px) {
    .logo-text {
        font-size: 1.2rem;
    }
    
    /* PDF preview adjustments */
    #pdf-preview-frame {
        height: 300px;
    }
    
    /* Very small devices fixes */
    .modal-content {
        padding: 16px 12px;
    }
    
    .modal-image-placeholder {
        width: 140px;
        height: 140px;
    }
    
    #modalPdfDetails ul {
        padding-left: 16px;
    }
}

/* Fix duplicate media queries */
@media (max-width: 600px) {
    /* Consolidated styles */
    .modal-content {
        padding: 16px 12px;
        max-width: 95vw;
    }
    
    .download-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .download-buttons button {
        width: 100%;
    }
}

/* Fixed nav overlay behavior */
.nav-overlay {
    display: none; /* Changed from 'contents' to 'none' */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
}

/* Critical fixed nav overlay styles */
.nav-overlay {
    display: none !important; /* Use !important to override any other styles */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    cursor: pointer;
}

/* Only show overlay when explicitly set by JavaScript */
.nav-overlay[style*="display: block"] {
    display: block !important;
}

/* Mobile Navigation Improvements */
@media (max-width: 767px) {
    /* ...existing media query styles... */

    /* Ensure sidebar appears correctly */
    .nav-links {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 70px 0 20px 0;
        z-index: 1100;
        transition: left 0.3s ease;
        box-shadow: none;
        overflow-y: auto;
    }
    
    /* Active state - bring sidebar in view */
    .nav-links.active {
        left: 0;
        box-shadow: 0 0 20px rgba(0,0,0,0.2);
    }

    /* ...existing code... */
}
@media (max-width: 768px) {
    .book-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .book-actions .cta-button {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Mobile Navigation Adjustments */
@media (max-width: 767px) {
    /* Mobile visible login button */
    .mobile-visible-login {
        display: inline-flex;
        margin-left: auto;
        margin-right: 10px;
    }

    /* Header layout for mobile */
    nav.container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px;
    }
    
    /* Logo takes less space */
    .logo-with-whatsapp {
        flex: 0 0 auto;
    }
    
    /* Mobile toggle button */
    .mobile-nav-toggle {
        z-index: 1200;
        display: block;
        order: 3;
    }
    
    /* Desktop elements hidden on mobile */
    .desktop-only {
        display: none !important;
    }
    
    /* Move header to fixed position */
    header {
        position: fixed;
        width: 100%;
    }
    
    /* Add padding to main content to account for fixed header */
    main {
        padding-top: 64px;
    }
    
    /* Sidebar navigation positioning */
    .nav-links {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding-top: 70px;
        transition: left 0.3s ease;
        box-shadow: 0 0 10px rgba(0,0,0,0.1);
        z-index: 1100;
    }
    
    .nav-links.active {
        left: 0;
    }

    /* Make the WhatsApp button in the sidebar more visible */
    .whatsapp-nav-link {
        background-color: rgba(37, 211, 102, 0.1);
        border-top: 1px solid var(--border-color);
        margin-top: 10px;
        font-weight: 600;
    }
    
    /* Keep WhatsApp button in book actions visible on mobile */
    .cta-button.whatsapp-button {
        display: flex;
        margin-top: 10px;
    }
    
    /* Fix book actions layout on mobile */
    .book-actions {
        flex-direction: column;
        width: 100%;
        margin-top: 20px;
    }
    
    .book-actions .cta-button {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Fix for Try Free button in navigation */
.try-free-btn {
    width: auto;
    white-space: nowrap;
    padding: 10px 20px;
    margin-left: 10px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.try-free-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Mobile try free button styling */
.try-free-mobile {
    background-color: var(--primary-button-bg) !important;
    color: white !important;
    font-weight: 700 !important;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
}

.try-free-mobile:hover {
    background-color: var(--primary-button-hover) !important;
}

/* Make sure nav-actions is properly displayed */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-right: 0;
}

/* Ensure try-free button is responsive */
@media (max-width: 767px) {
    .try-free-mobile {
        display: flex;
        justify-content: center;
        width: calc(100% - 48px) !important; /* Account for padding */
        margin-left: 24px !important;
        margin-right: 24px !important;
        text-align: center;
    }
    
    /* Make sure desktop-only items are properly hidden */
    .desktop-only {
        display: none !important;
    }
}

/* Phone Number Modal Styling */
#phoneNumberModal .modal-content {
    animation: fadeInScale 0.3s ease-out;
}

#userPhoneNumber:focus {
    border-color: var(--primary-button-bg);
    outline: none;
    box-shadow: 0 0 0 2px rgba(36, 113, 201, 0.2);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


