/* ---------------------------------------------------
   TYPOGRAPHY & GLOBAL
--------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Playfair+Display:wght@400;600&display=swap');

html, body {
    height: 100%;
    margin: 0;
}

/* Mobile-first base font size */
html {
    font-size: 16px;
}

body {
    font-family: Inter, sans-serif;
    background: #f5f5f5;
    color: #333;
}

/* ---------------------------------------------------
   PAGE LAYOUT
--------------------------------------------------- */

.page-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* ---------------------------------------------------
   HERO
--------------------------------------------------- */

.hero {
    background: url('/assets/img/header.png') center/cover no-repeat;
    height: 150px; /* mobile-first */
    position: relative;
    flex: 0 0 auto;
}

.hero-overlay {
    background: rgba(0,0,0,0.45);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
}

.hero-overlay h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem; /* mobile-first */
    margin: 0;
    padding: 0 10px;
}

/* ---------------------------------------------------
   NAVIGATION
--------------------------------------------------- */

.topnav {
    background: #2f4f4f;
    color: white;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center; /* centre everything */
    position: relative;
}

.nav-brand {
    font-weight: 600;
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.nav-links a:hover {
    text-decoration: underline;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

@media (max-width: 768px) {

    .nav-toggle {
        display: block;
        margin: 0 auto; /* centre the icon */
    }

    .nav-links {
        display: none;
        flex-direction: column;
        align-items: center; /* centre menu items */
        text-align: center;
        background: #2f4f4f;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 15px 0;
        border-top: 1px solid rgba(255,255,255,0.2);
    }

    .nav-links a {
        padding: 10px 20px;
        font-size: 1rem;
        display: block;
    }

    .nav-links.open {
        display: flex; /* shown when toggled */
    }
}


/* ---------------------------------------------------
   MAIN CONTENT
--------------------------------------------------- */

.main-content {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px 0;
}

/* Layout container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 12px; /* mobile-first */
}

/* ---------------------------------------------------
   CARDS
--------------------------------------------------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.committee-grid .card h3 .sub {
    font-size: 0.8em;
    font-weight: normal;
    opacity: 0.8;
}

.committee-card .headshot {
    width: 80%; /* mobile-first */
    height: auto;
    object-fit: cover;
    border-radius: 6px;
    margin: 0 auto 1rem;
    display: block;
}

.card {
    background: white;
    padding: 16px; /* mobile-first */
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    border: 1px solid #ddd;
    transition: transform .2s, box-shadow .2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ---------------------------------------------------
   FOOTER
--------------------------------------------------- */

footer {
    text-align: center;
    padding: 30px;
    color: #666;
    flex: 0 0 auto;
}

/* ---------------------------------------------------
   ANIMATION
--------------------------------------------------- */

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------
   RESPONSIVE BREAKPOINTS
--------------------------------------------------- */

/* Tablets */
@media (min-width: 481px) and (max-width: 768px) {

    .hero {
        height: 180px;
    }

    .hero-overlay h1 {
        font-size: 2.4rem;
    }

    .topnav a {
        margin: 0 10px;
        font-size: 1rem;
    }

    .container {
        padding: 0 16px;
    }

    .committee-card .headshot {
        width: 70%;
    }
}

/* Desktop */
@media (min-width: 768px) {

    html {
        font-size: 16px;
    }

    .hero {
        height: 220px;
    }

    .hero-overlay h1 {
        font-size: 3rem;
    }

    .topnav {
        padding: 12px;
    }

    .topnav a {
        margin: 0 15px;
        font-size: 1.05rem;
    }

    .container {
        padding: 0 20px;
    }

    .committee-card .headshot {
        width: 60%;
    }
}

/* Large desktop */
@media (min-width: 1200px) {

    html {
        font-size: 16.5px;
    }

    .hero {
        height: 260px;
    }

    .hero-overlay h1 {
        font-size: 3.4rem;
    }
}
