/* Base Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #8e44ad;
    --accent-color: #3498db;
    --background-color: #f9f9f9;
    --text-color: #333;
    --light-text: #f9f9f9;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Merriweather', serif;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

h3 {
    font-size: 1.8rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

section {
    padding: 4rem 0;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background-color: var(--primary-color);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--box-shadow);
}

.logo a {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--light-text);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--light-text);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem;
}

.nav-links a:hover, .nav-links .active {
    color: var(--accent-color);
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--light-text);
    margin: 5px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/space-background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light-text);
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
    padding: 0 2rem;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.tagline {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-family: var(--font-heading);
    font-weight: 400;
}

/* Series Overview */
.series-overview {
    background-color: #fff;
    text-align: center;
}

.series-overview p {
    max-width: 800px;
    margin: 0 auto 2rem;
    font-size: 1.2rem;
}

/* Featured Books */
.featured-books {
    background-color: #f5f5f5;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.book-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition); /* This is already defined as all 0.3s ease */
    transform-origin: center center;
    transform: scale(1); /* Add this explicit starting scale */
}

.book-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transform: scale(1.05); /* Add this to scale up */
}

.book-cover {
    height: 300px;
    overflow: hidden;   
    display: flex;
    justify-content: center;
    align-items: center;  
}

.placeholder-cover {
    width: 300px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 1rem;
}

.book1 {
    background: linear-gradient(135deg, #3498db, #8e44ad);
}

.book2 {
    background: linear-gradient(135deg, #e74c3c, #f39c12);
}

.book3 {
    background: linear-gradient(135deg, #1abc9c, #3498db);
}

.book-info {
    padding: 1.5rem;
}

.book-info h3 {
    margin-bottom: 0.5rem;
}

.book-description {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.read-more {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--accent-color);
    color: white;
    border-radius: 5px;
    font-family: var(--font-heading);
    font-weight: 600;
    transition: var(--transition);
}

.read-more:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* CTA Section */
.cta {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('../images/stars-background.jpg');
    background-size: cover;
    background-position: center;
    color: var(--light-text);
    text-align: center;
}

.cta p {
    max-width: 700px;
    margin: 0 auto 2rem;
    font-size: 1.2rem;
}

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

.btn {
    margin-top: 10px;
    margin-bottom: 10px;
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    font-family: var(--font-heading);
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    color: white;
}

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

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

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.footer-logo h3 {
    margin-bottom: 0.5rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--light-text);
}

.footer-links a:hover {
    color: var(--accent-color);
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .nav-links {
        position: absolute;
        right: 0;
        height: 92vh;
        top: 8vh;
        background-color: var(--primary-color);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        z-index: 999;
    }
    
    .nav-links li {
        opacity: 0;
        margin: 1.5rem 0;
    }
    
    .burger {
        display: block;
    }
    
    .nav-active {
        transform: translateX(0%);
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
}

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

.encyclopedia-image {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    display: block;
}

.encyclopedia-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Encyclopedia Cards */
.encyclopedia-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    transform-origin: center center;
    transform: scale(1);
}

.encyclopedia-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

.encyclopedia-cover {
    height: 300px;
    overflow: hidden;   
    display: flex;
    justify-content: center;
    align-items: center;  
}