@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Plus+Jakarta+Sans:wght@400;600;700;800&display=swap');

:root {
    --brand-red: #ea4335; /* Matched from the mockup */
    --dark-bg: #1a1a1a;
    --darker-bg: #111111;
    --light-gray: #f8f8f8;
    --border-color: #e5e5e5;
    --text-main: #333;
    --text-light: #777;
    --white: #fff;
    --font-heading: 'Libre Baskerville', serif; /* For section titles */
    --font-sans: 'Plus Jakarta Sans', sans-serif; /* For UI text */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-sans); color: var(--text-main); background: var(--white); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }
/* --- NAVBAR --- */
.top-nav { border-bottom: 1px solid var(--border-color); background: var(--white); }
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 80px; }
/* --- NAVBAR --- */
.top-nav { border-bottom: 1px solid var(--border-color); background: var(--white); }
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 80px; }

/* STYLISH LOGO TYPOGRAPHY */
.logo-area { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    text-decoration: none; 
    transition: opacity 0.2s;
}
.logo-area:hover { opacity: 0.8; }
.logo-mark {
    width: 4px;
    height: 38px;
    background-color: var(--brand-red);
    border-radius: 2px;
}
.logo-text { 
    display: flex; 
    flex-direction: column; 
}
.logo-title { 
    font-family: var(--font-heading); 
    font-size: 1.35rem; 
    font-weight: 700; 
    color: var(--dark-bg); 
    line-height: 1.1; 
    letter-spacing: -0.5px;
}
.logo-subtitle { 
    font-family: var(--font-sans); 
    font-size: 0.75rem; 
    font-weight: 700; 
    color: var(--text-light); 
    text-transform: uppercase; 
    letter-spacing: 1.5px; 
    margin-top: 2px;
}

.nav-links { display: flex; gap: 30px; list-style: none; font-size: 0.9rem; font-weight: 600; }
.nav-links a:hover { color: var(--brand-red); }

/* --- HERO GRID (70/30 Split) --- */
/* --- HERO GRID (70/30 Split) --- */
.hero-section { border-bottom: 1px solid var(--border-color); }
.hero-grid { 
    display: grid; 
    grid-template-columns: 7fr 3fr; 
    
    /* This calculates the exact screen height minus the 80px navbar */
    height: calc(100vh - 80px); 
    
    /* Ensures it doesn't get too squished on very short laptop screens */
    min-height: 550px; 
}

/* Hero Left */
/* Hero Left (With Slider Logic) */
.hero-left { display: flex; flex-direction: column; height: 100%; }

.hero-image-wrap { 
    flex-grow: 1; 
    position: relative; 
    overflow: hidden; /* Keeps slides contained */
    background: var(--dark-bg); /* Fallback color */
}

/* Individual Slides */
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0; /* Hidden by default */
    transition: opacity 1.5s ease-in-out; /* Smooth crossfade effect */
    z-index: 0;
}
.hero-slide.active { opacity: 1; /* Visible slide */ }

/* The dark gradient over the slides */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
    z-index: 1; /* Sits above images */
}

/* Ensure the H2 sits on top of everything */
.hero-image-wrap h2 { 
    position: absolute; 
    bottom: 30px; 
    left: max(20px, calc((100vw - 1400px) / 2)); 
    color: var(--white); 
    z-index: 2; /* Sits above overlay */
    font-size: 3.5rem; 
    font-weight: 800; 
    line-height: 1.1; 
    font-family: var(--font-sans); 
}
/* Search Bar - Fixed Height */
.hero-search { 
    background: var(--dark-bg); 
    height: 110px; /* Locked height */
    display: flex; 
    align-items: center; 
    padding: 0 40px; 
}
.hero-search input { width: 100%; background: transparent; border: none; border-bottom: 1px solid #555; color: var(--white); padding: 10px 0; font-size: 1.1rem; outline: none; }
.hero-search input::placeholder { color: #888; } /* Better contrast */

/* Hero Right */
.hero-sidebar { display: flex; flex-direction: column; height: 100%; border-left: 1px solid var(--border-color); }
.sidebar-links { 
    flex-grow: 1; /* Stretches to fill space above the red box */
    padding: 30px 40px; 
    background: var(--white); 
    display: flex;
    flex-direction: column;
    justify-content: space-evenly; /* Spreads links out beautifully */
}
.sidebar-links .link-item { border-bottom: 1px solid var(--border-color); padding: 15px 0; font-weight: 700; font-size: 1rem; display: flex; justify-content: space-between; align-items: center; }
.sidebar-links .link-item span:last-child { color: var(--brand-red); font-size: 1.5rem; font-weight: 400; line-height: 0; padding-bottom: 4px; } /* Makes the arrows look like the mockup */

/* Red Box - Fixed Height */
.open-status { 
    background: var(--brand-red); 
    color: var(--white); 
    height: 110px; /* EXACTLY matches the search bar height */
    padding: 0 40px; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
}
.open-status .small { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; opacity: 0.9; }
.open-status h3 { font-size: 1.6rem; font-weight: 800; }
.open-status h3 { font-size: 1.6rem; font-weight: 800; }

/* --- MAIN CONTENT (70/30 Split) --- */
.main-content { padding: 80px 0; }
.main-grid { display: grid; grid-template-columns: 7fr 3fr; gap: 60px; }
.section-heading { font-family: var(--font-heading); font-style: italic; font-size: 1.3rem; margin-bottom: 30px; color: var(--text-main); font-weight: 700; }

/* New Arrivals (Masonry-style Grid) */
.arrivals-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.arrival-card { background: var(--light-gray); min-height: 250px; padding: 30px; display: flex; flex-direction: column; justify-content: center; }
.arrival-card.dark { background: var(--dark-bg); color: var(--white); }
.arrival-card.dark h3 { font-size: 2rem; margin: 10px 0; line-height: 1.2; font-family: var(--font-sans); }
.arrival-card.dark .tag { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: #aaa; }
.arrival-card.dark a { color: var(--brand-red); margin-top: 20px; font-weight: bold; }
.arrival-card.img-bg { padding: 0; background-size: cover; background-position: center; }

/* Library News & Hours */
.news-list { margin-bottom: 50px; }
.news-item { border-bottom: 1px solid var(--border-color); padding: 15px 0; }
.news-item h4 { font-size: 1rem; margin-bottom: 5px; font-weight: 700; }
.news-item p { font-size: 0.85rem; color: var(--text-light); }

.hours-box { background: var(--dark-bg); color: var(--white); padding: 40px; }
.hours-box h3 { font-size: 1.5rem; border-bottom: 2px solid var(--brand-red); display: inline-block; padding-bottom: 5px; margin-bottom: 20px; font-family: var(--font-sans); }
.hours-row { display: flex; justify-content: space-between; border-bottom: 1px solid #333; padding: 12px 0; font-size: 0.9rem; }
.hours-row:last-child { border-bottom: none; }

/* --- RED BANNER (Resources) --- */
.resources-banner { 
    background: var(--brand-red) !important; /* Forces the red background to stay */
    padding: 80px 20px; 
    text-align: center; 
}

.resources-banner .section-heading { 
    color: var(--white); 
    font-style: normal; 
    font-family: var(--font-sans); 
    margin-bottom: 50px; 
    font-size: 1.8rem; 
    font-weight: 700;
}

.logos-flex { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 30px; 
    max-width: 1200px;
    margin: 0 auto;
}

.resource-logo {
    text-decoration: none;
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    gap: 14px; 
    opacity: 0.95; 
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* FROSTED GLASS EFFECT */
    background: rgba(255, 255, 255, 0.15); 
    backdrop-filter: blur(12px);             
    -webkit-backdrop-filter: blur(12px);     
    border: 1px solid rgba(255, 255, 255, 0.3); 
    
    padding: 25px 20px;
    border-radius: 16px;                     
    width: 210px; /* Fixed width prevents 100% stretching */
    height: 160px; /* Fixed height for uniform cards */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15); 
}

.resource-logo img { 
    height: 45px; /* Proportional size to fit inside the fixed card */
    width: auto;
    max-width: 140px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Forces logos to white */
}

.resource-title {
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Glass Hover Effect */
.resource-logo:hover { 
    opacity: 1; 
    transform: translateY(-6px); 
    background: rgba(255, 255, 255, 0.25); 
    border-color: rgba(255, 255, 255, 0.6); 
    box-shadow: 0 15px 35px 0 rgba(0, 0, 0, 0.25);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .logos-flex { gap: 20px; }
    .resource-logo { width: 100%; max-width: 280px; height: auto; padding: 20px; }
}
/* --- NEWS & EVENTS (3 Cards) --- */
.news-events-section { background: var(--light-gray); padding: 80px 0; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.event-card { height: 350px; position: relative; background-size: cover; background-position: center; display: flex; align-items: flex-end; }
.event-card::before { content:''; position:absolute; inset:0; background: linear-gradient(transparent 20%, rgba(0,0,0,0.9)); }
.event-content { position: relative; z-index: 2; padding: 30px; color: var(--white); width: 100%; }
.event-content h4 { font-size: 1.1rem; border-bottom: 2px solid var(--brand-red); padding-bottom: 10px; margin-bottom: 10px; font-weight: 700; }

/* --- BOOK COVERS ROW --- */
.book-covers-section { padding: 80px 0; }
.books-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.books-grid img { width: 100%; height: auto; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

/* --- PLACES TO STUDY (CTA) --- */
.study-cta { height: 400px; position: relative; background: url('https://images.unsplash.com/photo-1521587760476-6c12a4b040da?auto=format&fit=crop&w=1200&q=80') center/cover; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--white); }
.study-cta::before { content:''; position:absolute; inset:0; background: rgba(0,0,0,0.5); }
.study-content { position: relative; z-index: 2; }
.study-content h2 { font-size: 3rem; font-weight: 800; margin-bottom: 20px; }
.btn-outline { border: 2px solid var(--brand-red); background: var(--brand-red); color: var(--white); padding: 12px 35px; border-radius: 30px; font-weight: 700; cursor: pointer; }

.support-strip { background: var(--brand-red); padding: 30px 0; color: var(--white); }
.support-strip .container { display: flex; justify-content: space-between; align-items: center; }
.btn-white { background: var(--white); color: var(--brand-red); padding: 12px 35px; border-radius: 30px; font-weight: 700; border: none; }

/* --- FOOTER --- */
.site-footer { padding: 60px 0; background: var(--white); border-top: 1px solid var(--border-color); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; font-size: 0.9rem; color: var(--text-light); }
.footer-grid h4 { font-size: 1rem; color: var(--text-main); margin-bottom: 20px; text-transform: uppercase; font-family: var(--font-sans); }
.footer-grid ul { list-style: none; }
.footer-grid ul li { margin-bottom: 12px; }

@media (max-width: 1024px) {
    /* Let the height adjust naturally when columns stack on phones */
    .hero-grid { grid-template-columns: 1fr; height: auto; }
    
    /* Ensure the hero image stays visible on mobile */
    .hero-image-wrap { min-height: 400px; } 
    
    .hero-search, .hero-sidebar { border: none; border-top: 1px solid var(--border-color); }
    .main-grid, .cards-3, .books-grid, .footer-grid { grid-template-columns: 1fr; }
    
    .hamburger { display: block; }
    .nav-links { 
        display: none; 
        flex-direction: column; 
        position: absolute; 
        top: 80px; 
        left: 0; 
        width: 100%; 
        background: var(--white); 
        padding: 20px 0; 
        box-shadow: 0 10px 15px rgba(0,0,0,0.1); 
        z-index: 1000; 
    }
    .nav-links.active { display: flex; }
    .nav-links li { margin: 10px 0; text-align: center; }
}
/* --- MOBILE NAVIGATION --- */
.hamburger { display: none; background: none; border: none; font-size: 1.8rem; color: var(--dark-bg); cursor: pointer; }

@media (max-width: 1024px) {
    .hamburger { display: block; }
    .nav-links { 
        display: none; /* Hidden by default on mobile */
        flex-direction: column; 
        position: absolute; 
        top: 80px; 
        left: 0; 
        width: 100%; 
        background: var(--white); 
        padding: 20px 0; 
        box-shadow: 0 10px 15px rgba(0,0,0,0.1); 
        z-index: 1000; 
    }
    .nav-links.active { display: flex; }
    .nav-links li { margin: 10px 0; text-align: center; }
}
/* =========================================================
   INTERIOR PAGES STYLING
   ========================================================= */
/* =========================================================
   INTERIOR PAGES STYLING
   ========================================================= */
/* =========================================================
   INTERIOR PAGES STYLING
   ========================================================= */
.interior-hero { 
    position: relative;
    /* NEW WORKING IMAGE LINK */
    background: url('https://images.unsplash.com/photo-1481627834876-b7833e8f5570?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    padding: 100px 0 80px; 
    text-align: center; 
    border-bottom: 5px solid var(--brand-red); 
    z-index: 1;
}

/* This adds a dark overlay so the white text stays readable over the image */
.interior-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8); 
    z-index: -1;
}

.interior-hero h1 { font-family: var(--font-heading); font-size: 3rem; font-style: italic; color: var(--white); margin-bottom: 15px; }
.interior-hero p { color: #ccc; font-size: 1.1rem; max-width: 600px; margin: 0 auto; }
/* Text & Content Boxes */
.text-box { background: var(--light-gray); padding: 40px; border-left: 5px solid var(--brand-red); margin-bottom: 40px; font-size: 1.1rem; color: var(--text-main); }
.content-card { border: 1px solid var(--border-color); padding: 30px; transition: box-shadow 0.3s, transform 0.2s; background: var(--white); height: 100%; display: flex; flex-direction: column; }
.content-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.08); transform: translateY(-3px); }
.content-card h3 { font-family: var(--font-sans); color: var(--brand-red); margin-bottom: 15px; font-size: 1.25rem; font-weight: 700; }

/* Dynamic Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }

/* Modern Tables */
.table-modern { width: 100%; border-collapse: collapse; margin-top: 20px; box-shadow: 0 0 20px rgba(0,0,0,0.05); }
.table-modern th { background: var(--dark-bg); color: var(--white); padding: 18px 20px; text-align: left; font-family: var(--font-sans); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem; }
.table-modern td { padding: 18px 20px; border-bottom: 1px solid var(--border-color); color: var(--text-main); }
.table-modern tr:nth-child(even) { background-color: var(--light-gray); }
.table-modern tr:hover td { background-color: #f1f1f1; }

@media (max-width: 768px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .interior-hero h1 { font-size: 2.2rem; }
}