/* ============================================
   Glenbrae Community Council — Highland Theme
   Palette: Deep green, heather purple, warm gold, cream
   Fonts: Fraunces (serif headings) + Inter (body)
   ============================================ */

/* === CSS Custom Properties (Design Tokens) === */
:root {
    /* Palette */
    --green-deep: #1a4d3e;
    --green: #2d6a52;
    --green-light: #4a8a72;
    --green-pale: #e8f0ec;
    --heather: #7b3fa8;
    --heather-light: #9b5fb0;
    --gold: #c4a04a;
    --gold-light: #d9bb68;
    --gold-pale: #f5edd6;
    --cream: #faf7f0;
    --cream-warm: #f5efe2;
    --ink: #2a2a2a;
    --ink-light: #4a4a4a;
    --muted: #777;
    --white: #fff;
    --border: #e0dccf;
    --shadow: rgba(26, 77, 62, 0.08);
    --shadow-strong: rgba(26, 77, 62, 0.16);

    /* Typography */
    --font-heading: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Radii */
    --r-sm: 6px;
    --r-md: 12px;
    --r-lg: 20px;

    /* Shadows */
    --sh-card: 0 2px 8px var(--shadow);
    --sh-hover: 0 8px 24px var(--shadow-strong);

    /* Layout */
    --max-w: 1280px;
    --nav-h: 72px;
}

/* === Font Faces === */
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/fraunces-400-latin.woff2') format('woff2');
}
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/fraunces-600-latin.woff2') format('woff2');
}
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/fraunces-700-latin.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/inter-400-latin.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/inter-500-latin.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/inter-600-latin.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/inter-700-latin.woff2') format('woff2');
}

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--ink);
    background-color: var(--cream);
    line-height: 1.7;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#main-content {
    flex: 1;
    max-width: var(--max-w);
    width: 100%;
    margin: 0 auto;
    padding: 0 32px;
}

#main-content > h1 {
    text-align: center;
    margin: 48px 0;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2.6rem;
    color: var(--green-deep);
}

#main-content p img {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: var(--r-md);
}

#main-content > p,
#main-content > #explore > p {
    margin: 20px 0;
    max-width: 760px;
}

#main-content p {
    font-size: 1.05rem;
    color: var(--ink-light);
}

/* === Hero === */
.hero {
    position: relative;
    height: 92vh;
    text-align: center;
    color: var(--white);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, rgba(26, 77, 62, 0.35) 0%, rgba(26, 77, 62, 0.55) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 88%;
    max-width: 800px;
    padding: 48px 40px;
    background: rgba(26, 77, 62, 0.75);
    border-radius: var(--r-lg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(196, 160, 74, 0.3);
    animation: fadeIn 1.5s ease-out;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--white);
    letter-spacing: -0.02em;
    animation: fadeIn 2s ease-out;
}

.hero-subtitle {
    font-size: 1.4rem;
    font-weight: 400;
    margin: 0 0 32px;
    color: var(--gold-pale);
    animation: fadeIn 3s ease-out;
}

.cta-button {
    display: inline-block;
    background: var(--gold);
    color: var(--green-deep);
    padding: 12px 36px;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--r-md);
    transition: all 0.3s ease;
    animation: fadeIn 4s ease-out;
    border: 2px solid transparent;
}

.cta-button:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 160, 74, 0.4);
}

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

@media (max-width: 696px) {
    .hero-title { font-size: 2.6rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .hero-content { padding: 32px 24px; width: 92%; }
}

/* === Navigation === */
.navbar {
    background: var(--green-deep);
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px var(--shadow);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
}

.logo-section {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--white);
    gap: 12px;
}

.logo {
    height: 48px;
    width: auto;
    transition: transform 0.3s ease;
}

.text-section h3,
.text-section h5 {
    margin: 0;
    transition: font-size 0.3s ease;
}

.text-section h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--white);
}

.text-section h5 {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--gold-pale);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 4px;
}

.nav-menu li {
    transition: transform 0.2s ease;
}

.nav-menu a {
    text-decoration: none;
    color: var(--gold-pale);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: var(--r-sm);
    transition: all 0.2s ease;
    display: block;
}

.nav-menu a:hover {
    background: rgba(196, 160, 74, 0.15);
    color: var(--white);
}

.burger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 8px;
}

.burger-line {
    width: 26px;
    height: 3px;
    background: var(--gold-pale);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* === Welcome Text Section === */
.welcome-text {
    padding: 48px 32px;
    background: var(--white);
    border-radius: var(--r-lg);
    margin: 40px 0;
    box-shadow: var(--sh-card);
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.welcome-text p {
    font-size: 1.08rem;
    color: var(--ink-light);
    line-height: 1.8;
}

.welcome-text ul,
.welcome-text ol {
    margin-left: 1.5rem;
    padding-left: 1rem;
    list-style-position: outside;
}

.welcome-text li {
    margin-bottom: 0.5rem;
}

/* === Home Category Buttons === */
.container-button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 32px auto;
    flex-wrap: wrap;
}

.category-button {
    padding: 14px 28px;
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 600;
    border: none;
    border-radius: var(--r-md);
    background: var(--green);
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
    text-align: center;
}

.category-button:hover {
    background: var(--green-deep);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow-strong);
}

/* === Latest Posts (Home) === */
.latest-posts {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 60px auto;
}

.latest-posts > h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    color: var(--green-deep);
    margin-bottom: 32px;
    position: relative;
    padding-bottom: 12px;
}

.latest-posts > h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gold);
    border-radius: 2px;
}

.news-row .col-md-4 {
    flex: 1 1 33.333%;
    max-width: 33.333%;
    padding: 15px;
}

/* === Single Article === */
.title-container {
    text-align: center;
    margin: 48px 0 32px;
}

.title-container h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2.4rem;
    color: var(--green-deep);
    margin: 0;
}

.date {
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 8px;
    font-weight: 400;
}

.content-container img {
    margin: 0 auto 32px;
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: var(--r-md);
    box-shadow: var(--sh-card);
}

.content-container p:last-of-type {
    margin-bottom: 40px;
}

.content-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 16px;
}

.content-container p {
    margin: 16px 0;
    color: var(--ink-light);
    line-height: 1.8;
}

.content-container h2,
.md-content h2 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--green-deep);
    margin: 32px 0 12px;
}

.md-content {
    max-width: 760px;
    margin: 0 auto;
}

.md-content p {
    margin: 16px 0;
    line-height: 1.8;
}

/* === About Page === */
.about-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 48px;
}

.about-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2.4rem;
    color: var(--green-deep);
    text-align: center;
    margin: 0;
}

.about-content {
    max-width: 820px;
    margin: 24px auto 0;
}

.about-content p {
    font-size: 1.05rem;
    color: var(--ink-light);
    line-height: 1.8;
    margin: 16px 0;
}

/* === Gallery === */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 56px 0;
    max-width: 1100px;
    width: 100%;
}

.gallery-item {
    overflow: hidden;
    border-radius: var(--r-md);
    box-shadow: var(--sh-card);
    transition: box-shadow 0.3s ease;
}

.gallery-item:hover {
    box-shadow: var(--sh-hover);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    border-radius: var(--r-md);
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.06);
}

/* === Image Modal === */
#imageModal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 77, 62, 0.85);
    backdrop-filter: blur(4px);
    display: none;
    padding: 50px;
    margin: 0;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 85%;
    max-height: 85%;
    border-radius: var(--r-md);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.close {
    position: absolute;
    top: 20px;
    right: 32px;
    color: var(--white);
    font-size: 36px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover {
    color: var(--gold);
}

/* === Contacts === */
.contact-list {
    max-width: 1100px;
    margin: 48px auto;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 0 8px;
}

.contact {
    background: var(--white);
    padding: 28px;
    border-radius: var(--r-md);
    box-shadow: var(--sh-card);
    transition: all 0.3s ease;
    flex: 0 0 calc(33.333% - 24px);
    border-top: 4px solid var(--green);
}

.contact:hover {
    transform: translateY(-4px);
    box-shadow: var(--sh-hover);
    border-top-color: var(--gold);
}

.function {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--green);
    letter-spacing: 0.06em;
}

.contact hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 12px 0;
}

.contact strong {
    font-size: 1.2rem;
    color: var(--ink);
    font-family: var(--font-heading);
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.contact span {
    display: block;
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

/* === News/Board List === */
.news-container {
    max-width: 1200px;
    margin: 48px auto;
}

.news-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    flex-wrap: wrap;
    width: 100%;
}

.news-box {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 24px;
    background: var(--white);
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: var(--sh-card);
}

.news-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--sh-hover);
    border-color: var(--green-light);
}

.news-box:hover h2,
.news-box:hover p,
.news-box:hover a {
    color: var(--green-deep);
}

.news-box p img {
    max-height: 280px;
    border-radius: var(--r-sm);
}

.news-date {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.news-box hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 12px 0;
}

.news-title {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 600;
}

.news-title a {
    text-decoration: none;
    color: var(--green-deep);
    font-size: 1.2rem;
    transition: color 0.2s;
}

.news-title a:hover {
    color: var(--gold);
}

.news-content {
    margin: 0;
    color: var(--ink-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* === Footer === */
.footer {
    background: var(--green-deep);
    color: var(--gold-pale);
    padding: 40px 32px 0;
    margin-top: auto;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: var(--max-w);
    margin: 0 auto;
    gap: 32px;
}

.footer-column {
    flex: 1;
    min-width: 240px;
}

.footer-column h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 16px;
    position: relative;
    padding-bottom: 8px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--gold);
    border-radius: 1px;
}

.footer-column p {
    margin: 8px 0;
    font-size: 0.95rem;
    color: var(--gold-pale);
}

.office-hours {
    width: 100%;
    border-collapse: collapse;
}

.office-hours td {
    padding: 8px 4px;
    font-size: 0.95rem;
    color: var(--gold-pale);
}

.office-hours tr {
    border-bottom: 1px solid rgba(196, 160, 74, 0.2);
}

.office-hours tr:last-child {
    border-bottom: none;
}

.copyright {
    text-align: center;
    margin: 32px 0 0;
    padding: 20px 0;
    border-top: 1px solid rgba(196, 160, 74, 0.2);
    font-size: 0.88rem;
    color: rgba(245, 237, 214, 0.6);
}

/* === Responsive === */
@media (max-width: 1200px) {
    .footer-container {
        flex-direction: column;
        align-items: center;
    }

    .footer-column {
        width: 100%;
        text-align: center;
    }

    .footer-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .news-row .col-md-4 {
        flex: 1 1 50%;
        max-width: 50%;
    }

    .contact {
        flex: 0 0 calc(50% - 24px);
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 800px) {
    body { font-size: 16px; }
    #main-content { padding: 0 20px; }

    .news-row { flex-direction: column; }

    .news-row .col-md-4 {
        flex: 1 1 100%;
        max-width: 100%;
        margin: 10px 0;
    }

    .container-button {
        flex-direction: column;
        align-items: stretch;
    }

    .category-button {
        width: 100%;
    }

    .contact {
        flex: 1 1 100%;
    }

    .contact-list { padding: 0; }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--nav-h);
        left: 0;
        background: var(--green-deep);
        width: 100%;
        z-index: 999;
        padding: 16px 0;
        box-shadow: 0 4px 12px var(--shadow-strong);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        margin: 0;
        padding: 0;
        text-align: center;
    }

    .nav-menu a {
        padding: 14px 20px;
        font-size: 1.1rem;
    }

    .burger-menu { display: flex; }

    .about-content { grid-template-columns: 1fr; }

    .gallery { grid-template-columns: 1fr; }

    #imageModal { padding-top: 80px; }

    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-content { padding: 28px 20px; }
}
