:root {
    --black: #121212;
    --dark-black: #0a0a0a;
    --white: #f5f5f5;
    --light-white: #ffffff;
    --gold: #D4AF37;
    --light-gold: #f0e6c5;
    --dark-gold: #b38f2b;
    --gray: #888;
    --light-gray: #e0e0e0;
    --dark-gray: #333;
    --blue: #3498db;
    --green: #2ecc71;
    --red: #e74c3c;
    --purple: #9b59b6;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--white);
    color: var(--black);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.gold-accent {
    color: var(--gold);
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--black);
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: var(--gold);
}

.nav-link.active {
    color: var(--gold);
    font-weight: 500;
}

.nav-link.active:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gold);
}

.nav-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-icon {
    color: var(--black);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.nav-icon:hover {
    color: var(--gold);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--black);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Search Bar */
.search-bar {
    height: 0;
    overflow: hidden;
    background: var(--light-gray);
    transition: height 0.3s ease;
}

.search-bar.active {
    height: 70px;
    padding: 0 2rem;
}

.search-form {
    display: flex;
    align-items: center;
    height: 100%;
    position: relative;
}

.search-form input {
    width: 100%;
    background: var(--white);
    border: none;
    padding: 0.8rem 1.5rem;
    color: var(--black);
    font-family: inherit;
    border-radius: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.search-form input:focus {
    outline: none;
    box-shadow: 0 2px 5px rgba(212, 175, 55, 0.2);
}

.search-button {
    position: absolute;
    right: 1.5rem;
    color: var(--gray);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.search-button:hover {
    color: var(--gold);
}

/* Hero Section */
.secondary-hero {
    background: linear-gradient(rgba(255,255,255,0.9), rgba(255,255,255,0.9)), 
                url('https://images.unsplash.com/photo-1581726707445-75cbe4efc586?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80') no-repeat center center/cover;
    padding: 6rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.3rem;
    color: var(--dark-gray);
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.action-btn {
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    letter-spacing: 1px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.gold-btn {
    background: var(--gold);
    color: var(--black);
}

.gold-btn:hover {
    background: var(--dark-gold);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.transparent-btn {
    background: transparent;
    color: var(--black);
    border: 2px solid var(--black);
}

.transparent-btn:hover {
    background: rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

/* Grade Navigation */
.grade-navigation {
    background: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 70px;
    z-index: 90;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.grade-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
}

.grade-tab {
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    background: transparent;
    color: var(--black);
    border: 1px solid var(--light-gray);
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
}

.grade-tab:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.grade-tab.active {
    background: var(--gold);
    color: var(--black);
    border-color: var(--gold);
}

/* Subject Sections */
.subject-section {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.section-description {
    text-align: center;
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
}

.subject-filters {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.filter-group {
    margin: 0 1rem;
}

.filter-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--dark-gray);
    font-weight: 500;
}

.subject-filter {
    padding: 0.8rem 1.2rem;
    border-radius: 30px;
    border: 1px solid var(--light-gray);
    background: var(--white);
    color: var(--black);
    min-width: 200px;
    font-family: inherit;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.subject-filter:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 2px 5px rgba(212, 175, 55, 0.2);
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.book-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.book-cover {
    height: 250px;
    background: var(--light-gray);
    position: relative;
    overflow: hidden;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.book-card:hover .book-cover img {
    transform: scale(1.05);
}

.book-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gold);
    color: var(--black);
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
}

.book-info {
    padding: 1.5rem;
}

.book-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
}

.book-author {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.book-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--gray);
}

.book-grade {
    color: var(--gold);
    font-weight: 500;
}

.book-actions {
    display: flex;
    gap: 0.5rem;
}

.preview-btn {
    flex: 1;
    background: var(--light-gray);
    color: var(--black);
    padding: 0.6rem;
    text-align: center;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.preview-btn:hover {
    background: var(--gold);
}

.download-btn {
    flex: 1;
    background: var(--black);
    color: var(--white);
    padding: 0.6rem;
    text-align: center;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: var(--dark-gray);
}

/* Resources Section */
.resources-section {
    padding: 4rem 2rem;
    background: var(--light-gray);
    margin: 3rem 0;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 3rem auto 0;
}

.resource-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.resource-icon {
    width: 60px;
    height: 60px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    color: var(--gold);
    transition: all 0.3s ease;
}

.resource-card:hover .resource-icon {
    background: var(--gold);
    color: var(--black);
    transform: scale(1.1);
}

.resource-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--black);
}

.resource-card p {
    color: var(--gray);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.resource-link {
    color: var(--gold);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.resource-link:hover {
    color: var(--dark-gold);
    gap: 1rem;
}

/* Newsletter Section */
.newsletter-section {
    padding: 4rem 2rem;
    background: var(--dark-black);
    color: var(--white);
}

.newsletter-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.newsletter-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--gold);
}

.newsletter-content p {
    color: var(--light-gray);
    max-width: 400px;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    flex: 1;
    min-width: 300px;
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    border: none;
    font-family: inherit;
}

.newsletter-form input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--gold);
}

.subscribe-btn {
    background: var(--gold);
    color: var(--black);
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
}

.subscribe-btn:hover {
    background: var(--dark-gold);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: var(--black);
    color: var(--light-gray);
    padding: 4rem 2rem 2rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 1rem;
    display: block;
}

.footer-logo p {
    font-size: 0.95rem;
    color: var(--light-gray);
}

.footer-links {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.link-group {
    min-width: 150px;
}

.link-group h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--gold);
}

.footer-link {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--light-gray);
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-link:hover {
    color: var(--gold);
}

.footer-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--dark-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    font-size: 0.9rem;
    color: var(--gray);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--dark-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--gold);
    color: var(--black);
    transform: translateY(-3px);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
        display: none;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-actions {
        display: none;
        margin-top: 1rem;
    }
    
    .nav-actions.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
    
    .search-bar.active {
        height: 70px;
        padding: 0 1rem;
    }
    
    .grade-navigation {
        top: 60px;
    }
    
    .grade-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .newsletter-container {
        flex-direction: column;
        text-align: center;
    }
    
    .newsletter-form {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .subject-filters {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-group {
        margin: 0;
    }
    
    .book-actions {
        flex-direction: column;
    }
}