/* ===== CSS Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #2c5f8d;
    --primary-gold: #d4a747;
    --light-cream: #fef9f0;
    --warm-white: #ffffff;
    --text-dark: #2d3748;
    --text-gray: #4a5568;
    --border-light: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
    --gradient-start: #4a7ba7;
    --gradient-end: #2c5f8d;
}

body {
    font-family: 'Quicksand', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--warm-white);
}

h1, h2, h3, h4 {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    color: var(--primary-blue);
}

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

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

/* ===== Navigation ===== */
.navbar {
    background: var(--warm-white);
    box-shadow: 0 2px 8px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

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

.nav-cta {
    margin-left: 1rem;
}

.btn-nav-buy {
    background: #ff9900;
    color: var(--warm-white);
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Quicksand', sans-serif;
}

.btn-nav-buy:hover {
    background: #ff8800;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.4);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary-blue);
    transition: all 0.3s ease;
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: var(--warm-white);
    padding: 5rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-logo {
    max-width: 400px;
    margin: 0 auto 2rem;
}

.hero h1 {
    font-size: 3rem;
    color: var(--warm-white);
    margin-bottom: 1rem;
}

.tagline {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-gold);
    color: var(--primary-blue);
}

.btn-primary:hover {
    background: #e5b657;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 167, 71, 0.4);
}

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

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

.btn-buy {
    background: #ff9900;
    color: var(--warm-white);
    border: none;
}

.btn-buy:hover {
    background: #ff8800;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.4);
}

.btn-series-buy {
    background: var(--primary-blue);
    color: var(--warm-white);
    margin-top: 1.5rem;
    border: none;
    cursor: pointer;
}

.btn-series-buy:hover {
    background: var(--gradient-start);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 95, 141, 0.4);
}

/* ===== About Section ===== */
.about {
    padding: 4rem 0;
    background: var(--light-cream);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.about p {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
}

/* ===== Section Titles ===== */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-blue);
}

.section-intro {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-gray);
}

/* ===== Series Section ===== */
.series {
    padding: 5rem 0;
    background: var(--warm-white);
}

.series-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
    align-items: center;
}

.series-item.reverse {
    direction: rtl;
}

.series-item.reverse > * {
    direction: ltr;
}

.series-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 8px 24px var(--shadow);
}

.series-caption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-gray);
    font-style: italic;
    margin-top: 0.75rem;
    opacity: 0.8;
}

.placeholder-cover {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-gold));
    aspect-ratio: 1;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--warm-white);
    padding: 2rem;
    text-align: center;
}

.placeholder-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.series-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.series-promise {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.series-focus {
    background: var(--light-cream);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.series-focus h4 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--primary-blue);
}

.series-focus ul {
    list-style: none;
    padding-left: 0;
}

.series-focus li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.series-focus li:before {
    content: "•";
    color: var(--primary-gold);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.series-note {
    font-style: italic;
    color: var(--primary-blue);
    font-weight: 600;
    margin-top: 1rem;
}

.format-info {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.format-info::before {
    font-size: 1.2rem;
}

/* ===== Reading Levels Section ===== */
.reading-levels {
    padding: 5rem 0;
    background: var(--light-cream);
}

.section-cta {
    text-align: center;
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-light);
}

.cta-text {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.level-card {
    background: var(--warm-white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 12px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.level-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px var(--shadow);
}

.level-badge {
    margin-bottom: 1.5rem;
}

.level-badge img {
    width: 100%;
    border-radius: 10px;
}

.level-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.level-description {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.level-details h4 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--primary-blue);
}

.level-details ul {
    list-style: none;
    padding-left: 0;
}

.level-details li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.level-details li:before {
    content: "✓";
    color: var(--primary-gold);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* ===== Authors Section ===== */
.authors {
    padding: 5rem 0;
    background: var(--warm-white);
}

.author-intro {
    max-width: 900px;
    margin: 0 auto 4rem;
    text-align: center;
}

.author-intro h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.author-intro p {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.authors-grid {
    display: grid;
    gap: 3rem;
}

.author-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    padding: 2rem;
    background: var(--light-cream);
    border-radius: 15px;
    align-items: start;
}

.author-photo img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 4px 12px var(--shadow);
}

.author-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.author-info p {
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* ===== Footer ===== */
.footer {
    background: var(--primary-blue);
    color: var(--warm-white);
    padding: 3rem 0 2rem;
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-logo {
    max-width: 200px;
    margin: 0 auto 1rem;
}

.footer-tagline {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 1rem;
}

.footer-text {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ===== Floating Buy Now Button ===== */
.floating-buy-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #ff9900 0%, #ff8800 100%);
    color: var(--warm-white);
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    font-family: 'Quicksand', sans-serif;
    box-shadow: 0 8px 24px rgba(255, 153, 0, 0.4);
    z-index: 1500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    animation: pulseFloat 2s ease-in-out infinite;
    opacity: 0;
    pointer-events: none;
}

.floating-buy-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 32px rgba(255, 153, 0, 0.5);
    animation: none;
}

.floating-btn-icon {
    font-size: 1.25rem;
}

.floating-btn-text {
    font-weight: 700;
}

@keyframes pulseFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Hide floating button when modal is open */
.modal.active ~ .floating-buy-btn {
    display: none;
}

/* ===== Amazon Modal ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--warm-white);
    padding: 2.5rem;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-gray);
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    color: var(--primary-blue);
}

.modal-title {
    color: var(--primary-blue);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.modal-subtitle {
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.modal-formats {
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 2rem;
    padding: 0.75rem 1.5rem;
    background: var(--light-cream);
    border-radius: 8px;
    font-size: 0.95rem;
}

.modal-formats strong {
    color: var(--primary-blue);
    font-weight: 600;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-amazon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: #ff9900;
    color: var(--warm-white);
    padding: 1.25rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-amazon:hover {
    background: #ff8800;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 153, 0, 0.4);
}

.flag-emoji {
    font-size: 1.5rem;
}

.modal-divider {
    text-align: center;
    margin: 2rem 0 1.5rem;
    position: relative;
}

.modal-divider::before,
.modal-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border-light);
}

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

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

.modal-divider span {
    background: var(--warm-white);
    padding: 0 1rem;
    color: var(--text-gray);
    font-weight: 600;
}

.modal-other-countries {
    background: var(--light-cream);
    padding: 1.5rem;
    border-radius: 12px;
}

.modal-instructions {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-instructions strong {
    color: var(--primary-blue);
}

.copy-section {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.copy-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--warm-white);
    color: var(--text-dark);
    font-family: 'Quicksand', sans-serif;
}

.btn-copy {
    background: var(--primary-blue);
    color: var(--warm-white);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background: var(--gradient-start);
}

.btn-copy.copied {
    background: #10b981;
}

.popular-marketplaces {
    margin-top: 1.5rem;
}

.marketplace-list-title {
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.marketplace-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
}

.marketplace-links a {
    display: block;
    padding: 0.5rem;
    background: var(--warm-white);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-dark);
    text-align: center;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.marketplace-links a:hover {
    background: var(--primary-blue);
    color: var(--warm-white);
    border-color: var(--primary-blue);
    transform: translateY(-2px);
}

/* ===== Responsive Design ===== */
@media (max-width: 968px) {
    .series-item,
    .series-item.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .author-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .author-photo img {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--warm-white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 4px 12px var(--shadow);
        display: none;
        align-items: stretch;
    }
    
    .nav-menu li {
        text-align: center;
    }
    
    .nav-cta {
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .btn-nav-buy {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }

    .nav-menu.active {
        display: flex;
    }
    
    .floating-buy-btn {
        bottom: 20px;
        right: 20px;
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .floating-btn-text {
        display: none;
    }
    
    .floating-btn-icon {
        font-size: 1.5rem;
    }
    
    .floating-buy-btn {
        border-radius: 50%;
        width: 60px;
        height: 60px;
        padding: 0;
        justify-content: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .section-title {
        font-size: 2rem;
    }

    .levels-grid {
        grid-template-columns: 1fr;
    }

    .author-photo img {
        width: 150px;
        height: 150px;
    }
    
    .modal-content {
        padding: 2rem 1.5rem;
        width: 95%;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .copy-section {
        flex-direction: column;
    }
    
    .btn-copy {
        width: 100%;
    }
    
    .marketplace-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .series-content h3 {
        font-size: 1.5rem;
    }

    .level-card h3 {
        font-size: 1.25rem;
    }
}

/* ===== Smooth Scrolling ===== */
html {
    scroll-behavior: smooth;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.series-item,
.level-card,
.author-card {
    animation: fadeInUp 0.6s ease-out;
}
