:root {
    --primary-blue: #3b7298;
    --dark-navy: #1c2b3b;
    --bg-light: #f4f4f4;
    --text-gray: #666;
    --white: #ffffff;
    --font-heading: 'Roboto Condensed', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

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

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

/* HEADER & NAVBAR */
.site-header {
    background-color: #efefef;
    text-align: center;
    padding: 30px 20px 0;
    border-bottom: 1px solid #ddd;
}

.site-logo {
    max-width: 220px;
    display: block;
    margin: 0 auto 20px auto;
}

.main-nav {
    margin-top: 10px;
    position: relative;
}

.nav-list {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.nav-list > li > a {
    text-decoration: none;
    color: var(--dark-navy);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 15px 0;
    display: block;
}

.nav-list > li > a:hover {
    color: var(--primary-blue);
}

/* DROPDOWNS */
.dropdown, .dropdown-sub {
    position: relative;
}

.dropdown-menu, .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    min-width: 280px;
    z-index: 100;
    list-style: none;
    text-align: left;
    border-top: 3px solid var(--primary-blue);
}

.sub-menu {
    top: 0;
    left: 100%;
    border-top: 1px solid #eee;
}

.dropdown:hover > .dropdown-menu,
.dropdown-sub:hover > .sub-menu {
    display: block;
}

.dropdown-menu a, .sub-menu a {
    text-decoration: none;
    color: var(--primary-blue);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 12px 20px;
    display: block;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-menu a:hover, .sub-menu a:hover {
    background-color: #f9f9f9;
    color: var(--dark-navy);
}

/* PAGE HERO (Fixed Background for inner pages) */
.page-hero {
    height: 350px;
    background-image: url('../img/hero-books.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
}
.page-hero h1 {
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 3.5rem;
    z-index: 1;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* HERO CARDS (Homepage) */
.hero-cards {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 40px 20px;
    background: var(--white);
    max-width: 1200px;
    margin: 0 auto;
}

.hero-card {
    width: 33.33%;
    height: 300px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: relative;
    transition: transform 0.3s;
}

.hero-card:hover {
    transform: translateY(-5px);
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.2);
    transition: background 0.3s;
}

.hero-card:hover::before {
    background: rgba(0,0,0,0.4);
}

.hero-card span {
    position: relative;
    background: var(--white);
    color: var(--dark-navy);
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 12px 25px;
    font-size: 1.2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* MAIN CONTENT & SIDEBAR */
.content-wrapper {
    display: flex;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    gap: 40px;
}

.main-content {
    flex: 3;
}

.main-content h2 {
    font-family: var(--font-heading);
    color: #888;
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.main-content h3 {
    font-family: var(--font-heading);
    color: var(--primary-blue);
    margin: 20px 0 10px;
}

.main-content p {
    margin-bottom: 15px;
}

.content-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
}

.styled-hr {
    border: 0;
    border-top: 1px solid #ccc;
    margin: 30px 0;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.sidebar {
    flex: 1;
}

.widget {
    background: #f9f9f9;
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 4px;
}

.widget h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--dark-navy);
    border-bottom: 2px solid var(--dark-navy);
    padding-bottom: 5px;
    margin-bottom: 20px;
    display: inline-block;
}

.fb-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 1px solid #ccc;
    color: var(--dark-navy);
    text-decoration: none;
    transition: all 0.3s;
}

.fb-link:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

/* CALENDAR */
.calendar-container table {
    width: 100%;
    text-align: center;
    border-collapse: collapse;
}
.calendar-container th {
    font-weight: normal;
    color: #888;
    padding-bottom: 10px;
    font-size: 0.85rem;
}
.calendar-container td {
    padding: 8px 5px;
    font-size: 0.9rem;
    color: var(--text-gray);
}
.calendar-container .current-day {
    background-color: var(--primary-blue);
    color: var(--white);
    border-radius: 50%;
    font-weight: bold;
}
.calendar-header {
    text-align: right;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 10px;
}

/* PHOTO GRID */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.photo-grid a {
    display: block;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-grid a:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.photo-grid img {
    width: 100%;
    height: 200px; /* Reduced from 200px to 150px */
    object-fit: cover;
    display: block; /* Removes bottom gap */
}

/* FORMS */
.secure-form {
    background: #fafafa;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}
.secure-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--dark-navy);
    font-family: var(--font-heading);
}
.secure-form input, .secure-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
}
.secure-form input:focus, .secure-form textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 5px rgba(59, 114, 152, 0.3);
}
.secure-form button {
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 15px 30px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
    width: 100%;
}
.secure-form button:hover {
    background: var(--dark-navy);
}
.alert { padding: 15px; margin-bottom: 20px; border-radius: 4px; font-weight: bold; }
.alert.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* CTA BANNER (PARALLAX EFFECT) */
.cta-banner {
    background-color: var(--dark-navy);
    background-image: url('../img/hero-books.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    padding: 100px 20px;
    color: var(--white);
}
.cta-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(28, 43, 59, 0.85);
}
.cta-content {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
}
.cta-banner h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 300;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cta-banner h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
}

/* Link styling inside CTA Banner */
.cta-banner h3 a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}
.cta-banner h3 a:hover {
    color: #8cb4d1;
    text-decoration: underline;
}

/* FOOTER */
.site-footer {
    background: var(--white);
    text-align: center;
    padding: 40px 20px;
    position: relative;
}
#back-to-top {
    display: inline-block;
    background: var(--primary-blue);
    color: var(--white);
    width: 45px;
    height: 45px;
    line-height: 45px;
    border-radius: 50%;
    text-decoration: none;
    margin-bottom: 20px;
    font-size: 1.2rem;
}
.site-footer p {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    color: #999;
}

/* MOBILE MENU & RESPONSIVENESS */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    margin: 0 auto;
    width: 30px;
}
.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: var(--dark-navy);
    margin: 4px 0;
}

@media (max-width: 900px) {
    .page-hero { height: 250px; background-attachment: scroll; }
    .hero-cards { flex-direction: column; align-items: center; }
    .hero-card { width: 100%; max-width: 400px; }
    .content-wrapper { flex-direction: column; }

    .menu-toggle { display: flex; }
    .nav-list {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #fff;
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        z-index: 999;
    }
    .nav-list.active { display: flex; }
    .nav-list > li { border-bottom: 1px solid #eee; }
    .dropdown-menu, .sub-menu {
        position: static;
        box-shadow: none;
        display: none;
        padding-left: 20px;
        border-top: none;
    }
    .dropdown:hover > .dropdown-menu,
    .dropdown-sub:hover > .sub-menu { display: none; }
    .dropdown.active > .dropdown-menu,
    .dropdown-sub.active > .sub-menu { display: block; }
    .cta-banner { background-attachment: scroll; }
}
