/* Base Reset & Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gold-bg: #F5D498;
    --cream-bg: #FFECC9;
    --gold-border: #A37216;
    --brown-bg: #AE8230;
    --light-btn-bg: #FFF6E6;
    --dark-text: #303030;
    --grey-header-btn: #444444;
    --hero-bg: #111111;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark-text);
}

/* Typography Classes */
.playfair-extrabold {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
    font-style: italic;
}

.poppins-light {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
}

h1, h2 {
    font-size: 52px;
    color: #ffffff;
    line-height: 1.2;
    text-align: center;
}

.dark-text, .dark-text span {
    color: var(--dark-text) !important;
}

/* Header */
header {
    background-color: var(--hero-bg);
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
    font-size: 24px;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 30px;
}

nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--gold-bg);
}

.btn-contact {
    background-color: var(--grey-header-btn);
    padding: 8px 24px;
    border-radius: 4px;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #fff;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background-color: var(--hero-bg);
    padding: 80px 5% 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.hero-content {
    max-width: 900px;
    margin-bottom: 60px;
}

.subheadline {
    color: #ffffff;
    font-size: 16px;
    font-weight: 400;
    margin: 20px 0 30px;
}

.btn-primary {
    display: inline-block;
    background-color: var(--gold-bg);
    color: var(--dark-text);
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    border-radius: 30px;
    transition: transform 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

/* Glass Reflection Effect for Hero Books */
.hero-books-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding-bottom: 80px; /* Extra padding so the lowered books and their reflections don't get cut off */
    flex-wrap: nowrap; /* Keep them in a single row for the staggered effect */
}

.hero-book:nth-child(even) {
    transform: translateY(40px);
}

.hero-book {
    width: 170px;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    -webkit-box-reflect: below 2px linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4));
    transition: transform 0.3s ease;
}

/* Author Section */
.author {
    background-color: var(--cream-bg);
    padding: 80px 5%;
}

.section-header {
    margin-bottom: 50px;
}

.author-card {
    display: flex;
    align-items: center; /* Centers the image and text vertically */
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--light-btn-bg); /* Uses the #FFF6E6 cream color */
    border: 2px solid var(--gold-border);
    border-radius: 30px; /* Large rounded corners for the card */
    padding: 30px; /* THIS creates the white space around the image and text */
    gap: 40px; /* Creates space between the image and the text */
}

.author-image {
    flex: 0 0 35%; /* Controls how wide the image column is */
}

.author-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px; /* Rounds the corners of the image itself */
    object-fit: cover;
}

.author-info {
    flex: 1; /* Takes up the remaining space */
    padding: 10px 20px 10px 0; /* Adjusts padding since the main card already has padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.author-info h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 28px; /* Slightly larger for emphasis */
    margin-bottom: 15px;
    color: var(--dark-text);
}

/* Books Section */
.books {
    background-color: var(--brown-bg);
    padding: 80px 5%;
}

.book-section-title {
    font-family: 'Poppins', serif;
    font-weight: 700;
    font-size: 38px; /* slightly bigger for emphasis */
    color: #ffffff;
    margin: 40px 0 20px;
    text-align: left; /* Align to left instead of center */
}

.book-subtitle {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 36px;
    margin-bottom: 50px;
    color: #ffffff;
    margin: 60px 0 50px; /* Reduce top margin for tighter spacing */
    text-align: center; /* Align to left instead of center */
    font-style: italic;
}

.book-card-horizontal {
    display: flex;
    flex: 0 0 calc(50% - 20px); /* 2 per row */
    background-color: rgba(255, 255, 255, 0.05); /* Subtle background for the card */
    padding: 25px;
    border-radius: 15px;
    align-items: flex-start;
    gap: 25px;
}

.books-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.book-image {
    flex: 0 0 140px; /* Fixed width for the book image column */
}

.book-image img {
    width: 100%;
    height: auto;
    box-shadow: 5px 15px 25px rgba(0,0,0,0.4);
    border-radius: 4px;
    transition: transform 0.3s;
}

.book-image img:hover {
    transform: scale(1.05);
}
.book-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.book-details h4 {
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 20px;
    margin-bottom: 8px;
}
.book-description {
    color: #f0f0f0;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    font-family: 'Poppins', sans-serif;
}

.book-card {
    width: calc(33.333% - 40px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.center-card {
    margin: 0 auto;
}

.book-card img {
    width: 220px;
    box-shadow: 5px 15px 25px rgba(0,0,0,0.4);
    margin-bottom: 20px;
    border-radius: 4px;
    transition: transform 0.3s;
}

.book-card img:hover {
    transform: scale(1.05);
}

.book-card h4 {
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 20px;
    margin-bottom: 15px;
}

.btn-book {
    align-self: flex-start; /* Keeps the button on the left */
    background-color: var(--light-btn-bg);
    color: var(--dark-text);
    border: 1px solid var(--gold-bg);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn-book:hover {
    background-color: var(--gold-bg);
}

/* Responsiveness */
@media (max-width: 1024px) {
    .book-card-horizontal {
        flex: 0 0 100%; /* Stacks 1 per row on tablets/mobile */
        max-width: 600px;
    }
}

@media (max-width: 480px) {
    .book-card-horizontal {
        flex-direction: column; /* Stacks image on top of text on very small screens */
        align-items: center;
        text-align: center;
    }
    .book-details {
        align-items: center;
        text-align: center;
    }
    .btn-book {
        align-self: center;
    }
}
/* Contact Section */
.contact {
    background-color: var(--cream-bg);
    padding: 80px 5%;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--gold-border);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
}

/* Footer */
footer {
    background-color: var(--hero-bg);
    color: #ffffff;
    text-align: center;
    padding: 30px 5%;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    h1, h2 { font-size: 36px; }
    
    .author-card {
        flex-direction: column;
    }
    
    .author-image img {
        height: 300px;
    }
    
    .book-card {
        width: calc(50% - 40px);
    }

    .author-card {
        flex-direction: column;
        padding: 25px; /* Slightly less padding on mobile */
        text-align: center;
        gap: 20px;
    }
    
    .author-image {
        width: 100%;
        max-width: 300px; /* Prevents the image from getting too huge on tablets */
    }
    
    .author-info {
        padding: 0;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px;
        left: 0;
        background-color: var(--hero-bg);
        padding: 20px 0;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .book-card {
        width: 100%;
    }
    
    .hero-book {
        width: 90px;
    }
}

@media (max-width: 768px) {
    /* ... your existing mobile styles ... */
    
    .hero-books-container {
        overflow-x: auto; /* Allows horizontal scrolling */
        justify-content: flex-start; /* Aligns items to the left so scrolling starts at book 1 */
        padding: 10px 5% 80px 5%; /* Adds side padding so it looks nice while scrolling */
        scrollbar-width: none; /* Hides scrollbar in Firefox */
    }

    /* Hides scrollbar for Chrome, Safari and Opera */
    .hero-books-container::-webkit-scrollbar {
        display: none;
    }
    
    .hero-book {
        flex: 0 0 100px; /* Forces books to stay 100px wide and prevents shrinking */
    }
}

/* Featured Section */
/* Featured Blog Section */
.featured {
    background-color: #fff;
    padding: 80px 5%;
}

/* Featured Blog Section - Stacked */
.featured-blog.stacked {
    display: flex;
    flex-direction: column; /* stack image on top, text below */
    align-items: center;
    gap: 25px; /* space between image and text */
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--light-btn-bg);
    border: 2px solid var(--gold-border);
    border-radius: 20px;
    padding: 30px;
    text-align: center; /* center content */
}

.featured-blog.stacked .featured-image img {
    width: 100%;
    max-width: 500px; /* optional: limits large image width */
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    object-fit: cover;
}

.featured-blog.stacked .featured-text {
    font-family: 'Poppins', sans-serif;
    color: var(--dark-text);
    line-height: 1.7;
}

.featured-blog.stacked .featured-text p {
    margin-bottom: 15px;
    font-size: 16px;
}

.featured-blog.stacked .featured-btn {
    margin-top: 15px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .featured-blog.stacked {
        padding: 20px;
        gap: 20px;
    }

    .featured-blog.stacked .featured-text {
        font-size: 15px;
    }

    .featured-blog.stacked .featured-image img {
        max-width: 100%; /* full width on small screens */
    }
}


/* Media / Video Section */
.media {
    background-color: var(--hero-bg); /* Dark background for cinematic feel */
    padding: 80px 5%;
}

.media .section-header h2 {
    color: #ffffff;
}

.video-container {
    max-width: 900px; /* Matches your other centered containers */
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden; /* Ensures the iframe respects the rounded corners */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    background-color: #000; /* Placeholder color before load */
    aspect-ratio: 16 / 9; /* Keeps the perfect 16:9 YouTube ratio natively */
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}