:root {
    --primary: #FF9A9E;
    --secondary: #FECFEF;
    --accent: #A1C4FD;
    --text: #2D3436;
    --white: #FFFFFF;
    --glass: rgba(255, 255, 255, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    color: var(--text);
    background-color: #FFF5F5;
    overflow-x: hidden;
}

h1,
h2,
h3,
.logo {
    font-family: 'Fredoka', cursive;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: #FF6B6B;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #FF6B6B;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    text-align: center;
}

.hero-content {
    background: rgba(255, 255, 255, 0.85);
    padding: 3rem;
    border-radius: 2rem;
    backdrop-filter: blur(5px);
    max-width: 800px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #2D3436;
}

.highlight {
    color: #FF6B6B;
    background: linear-gradient(120deg, #ffeaa7 0%, #ffeaa7 100%);
    background-repeat: no-repeat;
    background-size: 100% 30%;
    background-position: 0 88%;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #636e72;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: #FF6B6B;
    color: white;
    margin-right: 1rem;
}

.btn-secondary {
    background: white;
    color: #FF6B6B;
    border: 2px solid #FF6B6B;
}

.btn-amazon {
    background: #FF9900;
    color: white;
    font-size: 0.9rem;
    padding: 0.8rem 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-text {
    background: none;
    border: none;
    color: #636e72;
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
}

/* Sections */
.section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: #2D3436;
}

.section-subtitle {
    text-align: center;
    margin-bottom: 3rem;
    color: #636e72;
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    padding: 1rem;
}

.book-card {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    text-align: center;
    transition: transform 0.3s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.book-card:hover {
    transform: translateY(-10px);
}

.book-cover-wrapper {
    margin-bottom: 1.5rem;
    perspective: 1000px;
}

.book-cover-img {
    width: 200px;
    height: auto;
    /* Maintain aspect ratio */
    min-height: 250px;
    object-fit: contain;
    /* Ensure the whole cover is visible */
    border-radius: 5px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.5s;
    background: white;
    /* Fallback */
}

.book-card:hover .book-cover-img {
    transform: scale(1.05);
}

.book-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* Author Section */
.split-layout {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.author-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.placeholder-circle {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: #FF9A9E;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-family: 'Fredoka', cursive;
}

.author-text {
    flex: 1;
}

.author-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.signature {
    font-family: 'Fredoka', cursive;
    font-size: 1.5rem;
    color: #FF6B6B;
    margin-top: 1rem;
}

/* Resources */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.resource-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    border: 2px dashed #dfe6e9;
    transition: border-color 0.3s;
}

.resource-card:hover {
    border-color: #FF6B6B;
}

.resource-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.btn-download {
    background: #00cec9;
    color: white;
    padding: 0.5rem 1rem;
    margin-top: 1rem;
}

.footer {
    background: #2D3436;
    color: white;
    padding: 3rem;
    text-align: center;
    margin-top: 4rem;
}

.social-links {
    margin-top: 1rem;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    color: white;
    transition: opacity 0.3s;
}

.social-links a:hover {
    opacity: 0.7;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }



    /* Contact Section */
    .contact-container {
        max-width: 600px;
        margin: 0 auto;
        background: white;
        padding: 2rem;
        border-radius: 1.5rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    }

    .contact-form .form-group {
        margin-bottom: 1.5rem;
        text-align: left;
    }

    .contact-form label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 700;
        color: var(--text);
    }

    .contact-form input,
    .contact-form textarea {
        width: 100%;
        padding: 0.8rem;
        border: 2px solid #eee;
        border-radius: 10px;
        font-family: inherit;
        font-size: 1rem;
        transition: border-color 0.3s;
    }

    .contact-form input:focus,
    .contact-form textarea:focus {
        outline: none;
        border-color: #FF6B6B;
    }

    /* Hide hamburger on desktop */
    .menu-toggle {
        display: none;
    }

    @media (max-width: 768px) {
        .split-layout {
            flex-direction: column;
            text-align: center;
        }

        .hero h1 {
            font-size: 2.5rem;
        }

        /* Mobile Menu Styles */
        .menu-toggle {
            display: block;
            cursor: pointer;
        }

        .menu-toggle .bar {
            display: block;
            width: 25px;
            height: 3px;
            background-color: var(--text);
            margin: 5px auto;
            transition: all 0.3s ease-in-out;
        }

        .menu-toggle.is-active .bar:nth-child(2) {
            opacity: 0;
        }

        .menu-toggle.is-active .bar:nth-child(1) {
            transform: translateY(8px) rotate(45deg);
        }

        .menu-toggle.is-active .bar:nth-child(3) {
            transform: translateY(-8px) rotate(-45deg);
        }

        .nav-links {
            position: fixed;
            top: 70px;
            /* Adjust based on navbar height */
            left: -100%;
            width: 100%;
            height: calc(100vh - 70px);
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            flex-direction: column;
            align-items: center;
            justify-content: center;
            transition: 0.3s ease-in-out;
            gap: 3rem;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        .nav-links.active {
            left: 0;
        }

        .nav-links li {
            width: 100%;
            text-align: center;
        }

        .nav-links a {
            font-size: 1.5rem;
            display: block;
            padding: 1rem;
        }
    }

    /* Modal Styles */
    .modal {
        display: none;
        position: fixed;
        z-index: 2000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: auto;
        background-color: rgba(0, 0, 0, 0.8);
        animation: fadeIn 0.3s;
    }

    .modal-content {
        background-color: #fefefe;
        margin: 5% auto;
        padding: 20px;
        border-radius: 15px;
        width: 90%;
        max-width: 800px;
        position: relative;
        box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    }

    .close-modal {
        position: absolute;
        top: 10px;
        right: 20px;
        color: #aaa;
        font-size: 28px;
        font-weight: bold;
        cursor: pointer;
        transition: color 0.3s;
        z-index: 10;
    }

    .close-modal:hover,
    .close-modal:focus {
        color: #000;
        text-decoration: none;
        cursor: pointer;
    }

    /* Carousel Styles */
    .carousel-container {
        position: relative;
        height: 60vh;
        width: 100%;
        margin: 20px 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .carousel-track-container {
        height: 100%;
        width: 100%;
        overflow: hidden;
        position: relative;
        border-radius: 10px;
        background: #f0f0f0;
        /* Slight gray background to distinguish white pages */
    }

    .carousel-track {
        padding: 0;
        margin: 0;
        list-style: none;
        position: relative;
        height: 100%;
        transition: transform 250ms ease-in;
    }

    .carousel-slide {
        position: absolute;
        top: 0;
        bottom: 0;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .carousel-slide img {
        height: 100%;
        width: auto;
        object-fit: contain;
        background-color: white;
        /* Force white background for transparent PNGs */
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    }

    .carousel-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(255, 255, 255, 0.7);
        border: none;
        cursor: pointer;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        color: #333;
        z-index: 5;
        transition: background 0.3s;
    }

    .carousel-btn:hover {
        background: white;
    }

    .prev-btn {
        left: -50px;
    }

    .next-btn {
        right: -50px;
    }

    .carousel-nav {
        display: flex;
        justify-content: center;
        padding: 10px 0;
        gap: 10px;
    }

    .carousel-indicator {
        border: none;
        border-radius: 50%;
        width: 10px;
        height: 10px;
        background: #ccc;
        cursor: pointer;
    }

    .carousel-indicator.current-slide {
        background: #333;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    @media (max-width: 900px) {
        .prev-btn {
            left: 10px;
        }

        .next-btn {
            right: 10px;
        }

        .carousel-container {
            height: 50vh;
        }
    }