/* ============================================================
   OPEN Global Portal — Visual Identity v3 (Modern)
   Glass header, gradient hero, floating stat cards, bento feature
   grid, soft green-tinted shadows. Green/white from official logo.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --green-900: #0F2E20;
    --green-800: #163A29;
    --green-700: #2F6B4E;
    --green-600: #37835C;
    --green-400: #5FAF83;
    --green-100: #EAF4EE;
    --green-50: #F5FAF7;
    --white: #FFFFFF;
    --ink: #16201A;
    --stone: #61705F;
    --line: #E4ECE7;

    --font-heading: 'Poppins', 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --radius-sm: 12px;
    --radius: 20px;
    --radius-lg: 28px;
    --radius-pill: 999px;
    --container: 1140px;

    --shadow-sm: 0 2px 8px rgba(15, 46, 32, 0.06);
    --shadow-md: 0 12px 32px rgba(15, 46, 32, 0.10);
    --shadow-lg: 0 24px 60px rgba(15, 46, 32, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; margin: 0 0 0.5em; color: var(--green-900); }
p { margin: 0 0 1em; color: var(--ink); }
a { color: var(--green-700); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 1.75rem; }
.full-bleed { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); width: 100vw; }

/* ---------- Header (glass) ---------- */
.site-header {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(228, 236, 231, 0.8);
    position: sticky; top: 0; z-index: 30;
}
.site-header nav { display: flex; justify-content: space-between; align-items: center; padding: 0.85rem 1.75rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand img { height: 60px; width: auto; display: block; object-fit: contain; }

/* Hamburger button — hidden on desktop, shown only below the mobile breakpoint */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--green-900);
    border-radius: 2px;
}
.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links a, .nav-links .link-button {
    text-decoration: none; color: var(--ink); font-size: 0.92rem; font-weight: 600;
    background: none; border: none; cursor: pointer; padding: 0.25rem 0; transition: color 0.15s ease;
}
.nav-links a:hover, .nav-links .link-button:hover { color: var(--green-700); }

/* ---------- Hero (gradient + glow blobs) ---------- */
.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, var(--green-900) 0%, var(--green-700) 100%);
    color: var(--white);
    text-align: center;
    padding: 6rem 1.75rem 9rem;
}
.hero::before, .hero::after {
    content: ""; position: absolute; border-radius: 50%; filter: blur(70px); z-index: 0;
}
.hero::before { width: 420px; height: 420px; background: rgba(95, 175, 131, 0.45); top: -160px; right: -80px; }
.hero::after { width: 320px; height: 320px; background: rgba(255, 255, 255, 0.10); bottom: -140px; left: -60px; }
.hero-eyebrow {
    position: relative; z-index: 1; display: inline-block;
    font-family: var(--font-heading); font-weight: 600; letter-spacing: 0.08em;
    font-size: 0.82rem; color: var(--green-900); background: var(--white);
    padding: 0.45rem 1.1rem; border-radius: var(--radius-pill); margin-bottom: 1.5rem;
}
.hero h1 {
    position: relative; z-index: 1; color: var(--white);
    font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 800;
    max-width: 42rem; margin: 0 auto 1.1rem;
}
.hero p { position: relative; z-index: 1; font-size: 1.12rem; color: #D7E9DE; max-width: 34rem; margin: 0 auto 2.25rem; }
.hero-actions { position: relative; z-index: 1; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Photo hero (real event photo as banner background) ---------- */
/* Used on Home/About/Contact/Board/Directory/News with:
   <section class="photo-hero full-bleed" style="background-image:url('...')"> */
.photo-hero.full-bleed {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
    text-align: center;
    padding: 6rem 1.75rem 5rem;
    overflow: hidden;
}
.photo-hero.full-bleed::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(15, 46, 32, 0.85), rgba(47, 107, 78, 0.72));
    z-index: 0;
}
.photo-hero.full-bleed h1 {
    position: relative;
    z-index: 1;
    color: var(--white);
    font-size: clamp(2.1rem, 5vw, 3.2rem);
    max-width: 42rem;
    margin: 0 auto 0.75rem;
}
.photo-hero.full-bleed p {
    position: relative;
    z-index: 1;
    color: #EAF4EE;
    max-width: 34rem;
    margin: 0 auto;
    font-size: 1.08rem;
}
@media (max-width: 480px) {
    .photo-hero.full-bleed { padding: 4rem 1.25rem 3.5rem; }
}

/* Taller variant used on the Home hero */
.photo-hero.photo-hero-tall { padding-top: 8rem; padding-bottom: 9rem; }
@media (max-width: 480px) {
    .photo-hero.photo-hero-tall { padding-top: 5rem; padding-bottom: 6rem; }
}

/* ---------- Chapter strip (Home page) ---------- */
.chapter-strip {
    text-align: center;
    padding: 3rem 1.75rem;
}
.chapter-strip-label {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--green-700);
    margin-bottom: 1rem;
}
.chapter-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}
.chapter-chip {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-pill);
    background: var(--green-50);
    border: 1px solid var(--line);
    color: var(--green-900);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.chapter-chip:hover {
    background: var(--green-100);
    border-color: var(--green-600);
    transform: translateY(-2px);
}

/* ---------- Home news-preview cards (plain text, no thumbnail) ---------- */
.home-news-card {
    padding: 1.6rem 1.7rem;
}
.announcement-date {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--green-700);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.4rem;
}
.home-news-card h3 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
}
.home-news-card p {
    font-size: 0.92rem;
    color: var(--stone);
}

/* ---------- Directory / Board search & filter bar ---------- */
/* These inputs sit in a plain <div>, not a <form>, so the general
   "form input, form select" rules never reached them — styled directly here. */
.directory-filters,
.board-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
}
.directory-filters input,
.directory-filters select,
.board-filters input,
.board-filters select {
    padding: 0.65rem 0.9rem;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    font: inherit;
    color: var(--ink);
    background: var(--green-50);
}
.directory-filters input:focus,
.directory-filters select:focus,
.board-filters input:focus,
.board-filters select:focus {
    outline: none;
    border-color: var(--green-600);
    background: var(--white);
}
.directory-filters input,
.board-filters input {
    flex: 1 1 220px;
}
.directory-filters select,
.board-filters select {
    flex: 1 1 160px;
}
@media (max-width: 720px) {
    .directory-filters, .board-filters {
        flex-direction: column;
    }
    .directory-filters input, .directory-filters select,
    .board-filters input, .board-filters select {
        width: 100%;
    }
}

/* ---------- Floating stat cards (overlap hero bottom edge) ---------- */
.stat-band {
    position: relative; z-index: 2;
    display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 1.25rem; max-width: 860px; margin: -4.5rem auto 4rem; padding: 0 1.75rem;
}
.stat-card {
    background: var(--white); border-radius: var(--radius); padding: 1.75rem 1.25rem;
    text-align: center; box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.stat-number { font-family: var(--font-heading); font-size: 2.25rem; font-weight: 800; color: var(--green-700); }
.stat-label { font-size: 0.85rem; color: var(--stone); font-weight: 600; margin-top: 0.2rem; }

/* ---------- Bento feature grid ---------- */
.feature-section { padding: 2rem 0 4.5rem; }
.feature-section h2 { text-align: center; font-size: 2.1rem; max-width: 36rem; margin: 0 auto 0.75rem; }
.feature-section .section-lead { text-align: center; color: var(--stone); max-width: 34rem; margin: 0 auto 3rem; }
.feature-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; gap: 1.25rem;
}
.feature-card {
    background: var(--green-50); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.9rem; box-shadow: var(--shadow-sm); transition: transform 0.18s ease, box-shadow 0.18s ease;
    grid-column: span 2;
}
.feature-card:first-child { grid-column: span 4; background: linear-gradient(135deg, var(--green-700), var(--green-900)); color: var(--white); display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.feature-card:first-child h3, .feature-card:first-child p { color: var(--white); }
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.feature-card .icon {
    width: 46px; height: 46px; border-radius: 14px; background: var(--green-700); color: var(--white);
    display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 1.1rem; font-family: var(--font-heading);
    box-shadow: var(--shadow-sm); flex-shrink: 0;
}
.feature-card:first-child .icon { background: rgba(255,255,255,0.18); }
.feature-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.feature-card p { color: var(--stone); font-size: 0.92rem; margin: 0; }

/* ---------- CTA banner ---------- */
.cta-banner {
    background: linear-gradient(135deg, var(--green-600), var(--green-900));
    border-radius: var(--radius-lg); padding: 3.5rem 2rem; text-align: center; color: var(--white);
    box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.cta-banner::before { content: ""; position: absolute; width: 300px; height: 300px; background: rgba(255,255,255,0.08); border-radius: 50%; top: -120px; right: -60px; }
.cta-banner h2 { color: var(--white); position: relative; z-index: 1; }
.cta-banner p { color: #D7E9DE; position: relative; z-index: 1; max-width: 30rem; margin: 0 auto 1.75rem; }
.cta-banner .btn-primary { position: relative; z-index: 1; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block; padding: 0.8rem 1.9rem; border-radius: var(--radius-pill);
    text-decoration: none; font-weight: 700; font-size: 0.92rem; border: 2px solid transparent; cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    font-family: var(--font-heading);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary { background: var(--white); color: var(--green-800); box-shadow: var(--shadow-md); }
.btn-primary:hover { box-shadow: var(--shadow-lg); }
/* .btn-secondary is used almost everywhere on LIGHT backgrounds (admin tables,
   forms, cancel links) — styled for that by default. */
.btn-secondary {
    background: var(--green-50);
    border-color: var(--line);
    color: var(--green-800);
}
.btn-secondary:hover {
    background: var(--green-100);
    border-color: var(--green-600);
}

/* .btn-on-dark is for the rare case a secondary button sits on a dark/photo
   background (e.g. the hero's "Learn More") — white text, translucent border. */
.btn-on-dark {
    border-color: rgba(255, 255, 255, 0.55);
    color: var(--white);
}
.btn-on-dark:hover {
    background: rgba(255, 255, 255, 0.12);
}
.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 0.6rem;
    border: 2px solid var(--line); color: var(--ink); background: var(--white); margin-bottom: 1rem;
    border-radius: var(--radius-pill); box-shadow: var(--shadow-sm);
}
.btn-google:hover { border-color: var(--green-700); box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ---------- Login ---------- */
.login-box {
    max-width: 400px; margin: 4rem auto; padding: 2.5rem 2rem;
    background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.login-box h1 { font-size: 1.6rem; text-align: center; margin-bottom: 1.75rem; }
.divider { text-align: center; color: var(--stone); font-size: 0.85rem; margin: 1.25rem 0; }
form label { display: block; font-size: 0.85rem; font-weight: 600; margin: 1.1rem 0 0.35rem; color: var(--ink); }
form input, form select, form textarea {
    width: 100%; padding: 0.7rem 0.9rem; border: 2px solid var(--line); border-radius: var(--radius-sm);
    font: inherit; color: var(--ink); background: var(--green-50);
}
form input:focus, form select:focus, form textarea:focus { outline: none; border-color: var(--green-600); background: var(--white); }
.hint { color: var(--stone); font-size: 0.82rem; }

/* ---------- Flash messages ---------- */
.flash { padding: 0.75rem 1.75rem; text-align: center; font-size: 0.9rem; font-weight: 600; }
.flash-info { background: var(--green-100); color: var(--green-900); }
.flash-error { background: #FBEAEA; color: #8A2A2A; }

/* ---------- Board / team grid ---------- */
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.5rem; margin-top: 2.5rem; }
.board-card {
    text-align: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.25rem; box-shadow: var(--shadow-sm); transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.board-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.board-card img {
    width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 1rem;
    background: var(--green-100);
}
.board-card .name { font-family: var(--font-heading); font-size: 1.05rem; font-weight: 700; margin: 0 0 0.15rem; }
.board-card .title { font-size: 0.85rem; color: var(--green-700); font-weight: 600; margin: 0; }
.board-card .chapter { font-size: 0.78rem; color: var(--stone); margin-top: 0.3rem; }

main.container { padding-top: 3rem; padding-bottom: 4.5rem; }
main.container h1 { font-size: 2.1rem; }

/* ---------- Admin ---------- */
.admin-layout { display: flex; gap: 2.5rem; margin-top: 2rem; align-items: flex-start; }
.admin-nav { width: 200px; flex-shrink: 0; background: var(--green-50); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; }
.admin-nav a { display: block; padding: 0.55rem 0.7rem; border-radius: var(--radius-sm); text-decoration: none; color: var(--green-900); font-size: 0.88rem; font-weight: 600; transition: background 0.15s ease; }
.admin-nav a:hover { background: var(--white); box-shadow: var(--shadow-sm); }
.admin-nav-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--stone); margin: 0 0 0.6rem 0.6rem; font-weight: 700; }
.admin-content { flex: 1; min-width: 0; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 1.25rem; font-size: 0.9rem; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.admin-table th { text-align: left; padding: 0.75rem 0.9rem; background: var(--green-50); color: var(--green-900); font-weight: 700; }
.admin-table td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); }
.admin-table tr:hover td { background: var(--green-50); }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; font-weight: normal; margin: 0.4rem 0; font-size: 0.88rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-900); color: #CFE0D6; margin-top: 5rem; padding: 3.5rem 0 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.5rem; }
.footer-brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }
.footer-brand img { height: 34px; filter: brightness(0) invert(1); }
.site-footer p { color: #A9C4B3; font-size: 0.9rem; }
.footer-social { display: flex; gap: 0.75rem; margin-top: 1rem; }
.footer-social a {
    width: 38px; height: 38px; border-radius: 50%; border: 1px solid #2A5541; color: var(--white);
    display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: 0.8rem; font-weight: 700;
    transition: background 0.15s ease, transform 0.15s ease;
}
.footer-social a:hover { background: var(--green-700); transform: translateY(-2px); }
.footer-col h4 { color: var(--white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 1rem; font-family: var(--font-heading); font-weight: 700; }
.footer-col a { display: block; color: #CFE0D6; text-decoration: none; font-size: 0.9rem; margin-bottom: 0.6rem; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid #2A5541; padding: 1.25rem 0; font-size: 0.82rem; color: #8FAF9C; text-align: center; }

@media (max-width: 860px) {
    .feature-grid { grid-template-columns: 1fr 1fr; }
    .feature-card { grid-column: span 2 !important; }
}
@media (max-width: 720px) {
    .footer-grid { grid-template-columns: 1fr; }
    .admin-layout { flex-direction: column; }
    .admin-nav { width: 100%; }
    .hero { padding: 4.5rem 1.5rem 8rem; }
    .stat-band { grid-template-columns: 1fr; margin-top: -3.5rem; }
    .feature-grid { grid-template-columns: 1fr; }
    .feature-card { grid-column: span 1 !important; }
    .nav-links { gap: 1rem; flex-wrap: wrap; }
}

@media (max-width: 860px) {
    .site-header nav { position: relative; }
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background: var(--white);
        border-top: 1px solid var(--line);
        box-shadow: var(--shadow-md);
        padding: 0.5rem 1.75rem 1rem;
        z-index: 40;
    }
    .nav-links.nav-open { display: flex; }
    .nav-links a, .nav-links .link-button {
        width: 100%;
        padding: 0.7rem 0;
        border-bottom: 1px solid var(--line);
    }
    .nav-links form { width: 100%; }
}

/* ============================================================
   News & Events — added for the /news page and admin management
   ============================================================ */

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.75rem;
    margin: 2rem 0 3rem;
}

.news-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--line);
    transition: transform .18s ease, box-shadow .18s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.news-card-thumb {
    aspect-ratio: 16 / 10;
    background: var(--green-100);
    overflow: hidden;
}

.news-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-card-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--green-700), var(--green-900));
}

.news-card-body {
    padding: 1.1rem 1.3rem 1.4rem;
}

.news-card-date {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--green-700);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .4rem;
}

.news-card-body h2 {
    font-size: 1.15rem;
    margin: 0 0 .5rem;
}

.news-card-body p {
    font-size: .92rem;
    color: var(--stone);
    margin: 0;
}

.news-body {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-top: 1rem;
}

@media (max-width: 480px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Profile, dashboard, messages & contact styles
   ============================================================ */

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.5rem; align-items: start; margin-top: 1rem; }
.map-embed { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.member-profile-header { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.member-profile-photo { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.conversation-row {
    display: flex; align-items: center; gap: 0.9rem; padding: 0.9rem 1rem; border-radius: var(--radius-sm);
    text-decoration: none; color: var(--ink); transition: background 0.15s ease;
}
.conversation-row:hover { background: var(--green-50); }
.conversation-row img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.unread-badge {
    background: var(--green-700); color: var(--white); font-size: 0.75rem; font-weight: 700;
    min-width: 20px; height: 20px; border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: center; padding: 0 0.4rem;
}
.thread-panel { margin-top: 1.5rem; display: flex; flex-direction: column; height: 60vh; }
.thread-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 0.75rem; padding-right: 0.25rem; }
.message-bubble { max-width: 70%; padding: 0.65rem 1rem; border-radius: var(--radius-sm); }
.message-bubble p { margin: 0; font-size: 0.92rem; }
.message-theirs { align-self: flex-start; background: var(--green-50); }
.message-mine { align-self: flex-end; background: var(--green-700); color: var(--white); }
.message-mine .message-time { color: rgba(255,255,255,0.7); }
.message-time { display: block; font-size: 0.7rem; color: var(--stone); margin-top: 0.3rem; }
.thread-form { display: flex; gap: 0.75rem; align-items: flex-end; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.thread-form textarea { flex: 1; resize: none; }
.request-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.request-row:last-child { border-bottom: none; }
.request-actions { display: flex; gap: 0.5rem; margin-left: auto; }
.request-actions button { padding: 0.4rem 0.9rem; font-size: 0.8rem; }
.welcome-banner {
    background: linear-gradient(135deg, var(--green-700), var(--green-900));
    border-radius: var(--radius-lg); padding: 2.5rem; margin-top: 1rem;
    display: flex; align-items: center; justify-content: space-between; color: var(--white);
    box-shadow: var(--shadow-md);
}
.welcome-eyebrow { color: #9FD6B8; font-weight: 600; font-size: 0.85rem; margin-bottom: 0.3rem; }
.welcome-banner h1 { color: var(--white); margin-bottom: 0.3rem; font-size: 1.9rem; }
.welcome-sub { color: #D7E9DE; margin: 0; }
.welcome-avatar { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,0.35); }
.welcome-avatar-placeholder {
    display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.15);
    color: var(--white); font-family: var(--font-heading); font-weight: 700; font-size: 1.6rem;
}
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; margin-top: 1.5rem; align-items: start; }
.dash-side { display: flex; flex-direction: column; gap: 1.5rem; }
.panel {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.5rem; box-shadow: var(--shadow-sm);
}
.panel h2 { font-size: 1.1rem; margin-bottom: 1rem; }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.panel-header h2 { margin: 0; }
.panel-link { font-size: 0.85rem; font-weight: 600; }
.progress-track { background: var(--green-100); border-radius: var(--radius-pill); height: 10px; overflow: hidden; margin-bottom: 0.5rem; }
.progress-fill { background: linear-gradient(90deg, var(--green-600), var(--green-400)); height: 100%; border-radius: var(--radius-pill); transition: width 0.3s ease; }
.btn-block { display: block; text-align: center; margin-top: 1rem; }
.quick-actions { display: flex; flex-direction: column; gap: 0.6rem; }
.quick-action {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0.9rem;
    background: var(--green-50); border-radius: var(--radius-sm); text-decoration: none;
    color: var(--ink); font-weight: 600; font-size: 0.9rem; transition: background 0.15s ease, transform 0.15s ease;
}
.quick-action:hover { background: var(--green-100); transform: translateX(3px); }
.quick-action-icon {
    width: 30px; height: 30px; border-radius: 9px; background: var(--green-700); color: var(--white);
    display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}
.announcement-list { display: flex; flex-direction: column; gap: 1.25rem; }
.announcement-item { padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.announcement-item:last-child { border-bottom: none; padding-bottom: 0; }
.announcement-item h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.announcement-author { font-size: 0.8rem; color: var(--stone); margin: 0; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.admin-stats .stat-card { box-shadow: var(--shadow-sm); }
.activity-feed { display: flex; flex-direction: column; gap: 1rem; }
.activity-item { display: flex; gap: 0.75rem; align-items: flex-start; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-600); margin-top: 0.4rem; flex-shrink: 0; }
.activity-item p { margin: 0; font-size: 0.88rem; }

/* ---------- Profile photos: one consistent size everywhere ---------- */
/* Uploaded photos are stored as 1080x1080 squares; these rules control how big they are SHOWN. */
.member-profile-photo,
.current-photo,
.welcome-avatar {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    flex-shrink: 0;
}
.member-profile-photo { width: 140px; height: 140px; }
.current-photo { width: 120px; height: 120px; margin: 0.5rem 0 1rem; }
.welcome-avatar { width: 68px; height: 68px; }
.member-profile-photo.welcome-avatar-placeholder { display: flex; align-items: center; justify-content: center; font-size: 3rem; }

/* Admin import results */
.import-errors { color: #8A2A2A; font-size: 0.88rem; }

/* Mobile layout for the dashboard / profile pages */
@media (max-width: 860px) {
    .dash-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .welcome-banner { flex-direction: column-reverse; align-items: flex-start; gap: 1rem; padding: 1.75rem; }
}
@media (max-width: 640px) {
    .member-profile-photo { width: 110px; height: 110px; }
}


/* ============================================================
   MEMBER AREA THEME  (logged-in pages: dashboard, admin, profile, directory, messages)
   Logo colours: deep green + white. Added at the END so it overrides earlier rules.
   ============================================================ */

/* Soft green-tinted page so white cards stand out */
body.is-member { background: #E9F3ED; }

/* Initial letter inside the round avatar placeholder: keep it centred */
.welcome-avatar.welcome-avatar-placeholder { display: flex; align-items: center; justify-content: center; }

/* ---- Buttons: the base .btn-primary is white (for dark banners). On light cards/forms it was white-on-white. ---- */
.panel .btn-primary,
.admin-content .btn-primary,
.login-box .btn-primary,
.thread-form .btn-primary,
.request-actions .btn-primary,
main form .btn-primary {
    background: linear-gradient(135deg, var(--green-600), var(--green-800));
    color: var(--white);
    border-color: var(--green-800);
    box-shadow: 0 6px 16px rgba(22, 58, 41, 0.28);
}
.panel .btn-primary:hover,
.admin-content .btn-primary:hover,
.login-box .btn-primary:hover,
.thread-form .btn-primary:hover,
.request-actions .btn-primary:hover,
main form .btn-primary:hover {
    background: linear-gradient(135deg, var(--green-700), var(--green-900));
    box-shadow: 0 10px 22px rgba(22, 58, 41, 0.36);
}
.btn-secondary { background: var(--white); border-color: #BFD8C9; color: var(--green-800); }
.btn-secondary:hover { background: var(--green-100); border-color: var(--green-600); }
.login-box .btn-primary { width: 100%; margin-top: 1.25rem; }

/* ---- Cards / panels ---- */
.panel {
    background: var(--white);
    border: 1px solid #D3E4DA;
    border-top: 4px solid var(--green-600);
    box-shadow: 0 6px 20px rgba(15, 46, 32, 0.08);
}
.panel h2 { color: var(--green-800); }

/* ---- Admin sidebar: solid deep green, light text ---- */
.admin-nav { background: linear-gradient(180deg, var(--green-800), var(--green-900)); border: none; box-shadow: var(--shadow-md); }
.admin-nav a { color: #D7E9DE; }
.admin-nav a:hover { background: rgba(255, 255, 255, 0.14); color: var(--white); box-shadow: none; }
.admin-nav-label { color: #9FD6B8; }

/* ---- Stat cards ---- */
.admin-stats .stat-card {
    background: linear-gradient(180deg, var(--white), var(--green-50));
    border: 1px solid #D3E4DA;
    border-left: 5px solid var(--green-600);
    box-shadow: 0 6px 18px rgba(15, 46, 32, 0.08);
    text-align: left;
}
.admin-stats .stat-number { color: var(--green-800); }

/* ---- Quick links: one arrow per link ---- */
.quick-actions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
.quick-action {
    background: var(--white); border: 1px solid #CFE2D6; border-left: 4px solid var(--green-600);
    color: var(--green-900);
}
.quick-action:hover { background: var(--green-100); border-color: var(--green-600); transform: translateX(3px); }
.quick-action-arrow { color: var(--green-700); flex-shrink: 0; transition: transform 0.15s ease; }
.quick-action:hover .quick-action-arrow { transform: translateX(3px); }

/* ---- Tables ---- */
.admin-table { border: 1px solid #D3E4DA; box-shadow: 0 6px 18px rgba(15, 46, 32, 0.08); }
.admin-table th { background: var(--green-800); color: var(--white); }
.admin-table td { border-bottom: 1px solid #E1ECE5; }
.admin-table tr:hover td { background: var(--green-100); }

/* ---- Form fields ---- */
body.is-member form input:not([type=checkbox]):not([type=radio]),
body.is-member form select,
body.is-member form textarea { background: var(--white); border-color: #BFD8C9; }
body.is-member form input:focus,
body.is-member form select:focus,
body.is-member form textarea:focus { border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(55, 131, 92, 0.18); }

/* ---- Checkboxes & radios: normal size (form input{width:100%} was stretching them) ---- */
input[type=checkbox], input[type=radio] { accent-color: var(--green-700); cursor: pointer; }
form input[type=checkbox], form input[type=radio] {
    width: 18px; height: 18px; padding: 0; margin: 0; flex: 0 0 18px; background: var(--white);
}
.checkbox-label {
    background: var(--white); border: 1px solid #CFE2D6; border-radius: var(--radius-sm);
    padding: 0.6rem 0.85rem; color: var(--green-900); font-weight: 600; cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.checkbox-label:hover { background: var(--green-100); border-color: var(--green-600); }

/* ---- Notices ---- */
.flash-info { background: var(--green-100); border-left: 4px solid var(--green-600); }
.admin-content > .flash-info { border: 1px solid #BFD8C9; border-left: 4px solid var(--green-600); }

/* ---- Footer social icons (SVG) ---- */
.footer-social a { border-color: #3B6B53; background: rgba(255, 255, 255, 0.06); }
.footer-social a svg { display: block; }
.footer-social a:hover { background: var(--green-600); border-color: var(--green-400); }

@media (max-width: 640px) {
    .quick-actions-grid { grid-template-columns: 1fr; }
    .admin-stats { grid-template-columns: 1fr 1fr; }
}

/* Space between stacked panels in the main dashboard column */
.dash-main { display: flex; flex-direction: column; gap: 1.5rem; }

/* Social icons on a light background (Contact page "Follow Us") */
.footer-social.on-light a { background: var(--white); border-color: #BFD8C9; color: var(--green-800); }
.footer-social.on-light a:hover { background: var(--green-700); border-color: var(--green-700); color: var(--white); }

/* Contact page blocks: a little breathing room between them */
.form-section { margin-bottom: 1.75rem; }

/* ============================================================
   PROFILE EDIT PAGE
   ============================================================ */
.profile-head { max-width: 860px; margin: 0 auto 1.5rem; }
.profile-head h1 { margin-bottom: 0.35rem; }
.profile-intro { color: var(--stone); margin: 0; }
.req { color: #C0392B; font-weight: 700; }

.profile-form { max-width: 860px; margin: 0 auto; }
.profile-form .form-section {
    background: var(--white); border: 1px solid #D3E4DA; border-left: 5px solid var(--green-600);
    border-radius: var(--radius); padding: 1.6rem 1.75rem 1.75rem; margin-bottom: 1.4rem;
    box-shadow: 0 6px 18px rgba(15, 46, 32, 0.07);
}
.profile-form .form-section h2 {
    display: flex; align-items: center; gap: 0.7rem; font-size: 1.15rem; color: var(--green-800); margin: 0 0 1rem;
}
.profile-form .form-section h2 .hint { font-family: var(--font-body); font-weight: 500; }
.profile-form .step {
    display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: 0 0 28px;
    border-radius: 50%; background: var(--green-700); color: var(--white); font-size: 0.85rem; font-family: var(--font-heading);
}
.section-note { color: var(--stone); font-size: 0.88rem; margin: -0.4rem 0 0.4rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.form-row > div { min-width: 0; }
.profile-form input.readonly { background: var(--green-100); color: var(--stone); cursor: not-allowed; }
.profile-form .hint { margin: 0.3rem 0 0; }

.photo-row { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.photo-row .current-photo { margin: 0; border: 3px solid var(--green-100); box-shadow: var(--shadow-sm); }
.photo-row > div { flex: 1; min-width: 220px; }

/* Required-field errors */
.has-error input, .has-error select, .has-error textarea { border-color: #C0392B !important; background: #FFF6F5 !important; }
.field-error { color: #B03024; font-size: 0.84rem; font-weight: 600; margin: 0.35rem 0 0; }

/* Work history rows */
.job-row {
    display: grid; grid-template-columns: 1.3fr 1.3fr 90px 90px auto 36px; gap: 0.6rem; align-items: center;
    padding: 0.75rem; margin-bottom: 0.6rem; background: var(--green-50); border: 1px solid #D3E4DA; border-radius: var(--radius-sm);
}
.job-row input { margin: 0; }
.job-row .checkbox-label { margin: 0; white-space: nowrap; padding: 0.45rem 0.7rem; }
.remove-job {
    width: 34px; height: 34px; border-radius: 50%; border: 1px solid #E3B7B2; background: var(--white); color: #B03024;
    font-size: 1.2rem; line-height: 1; cursor: pointer;
}
.remove-job:hover { background: #FBEAEA; }

.form-section-last { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.form-section-last .checkbox-label { margin: 0; }

@media (max-width: 760px) {
    .form-row { grid-template-columns: 1fr; }
    .job-row { grid-template-columns: 1fr 1fr; }
    .job-row .year-input { width: 100%; }
    .profile-form .form-section { padding: 1.25rem; }
    .form-section-last { flex-direction: column; align-items: flex-start; }
    .form-section-last .btn { width: 100%; }
}

/* ============================================================
   LOGIN PAGE: same photo as the home hero, with the green overlay
   ============================================================ */
.login-hero.full-bleed {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    min-height: 78vh;
    padding: 4rem 1.25rem;
    background-size: cover; background-position: center; background-repeat: no-repeat;
    overflow: hidden;
    /* pull the picture up to the header and down to the footer (main has padding, footer has a top margin) */
    margin-top: -3rem;
    margin-bottom: -9.5rem;
}
.login-hero.full-bleed::before {
    content: ""; position: absolute; inset: 0; z-index: 0;
    background: linear-gradient(160deg, rgba(15, 46, 32, 0.85), rgba(47, 107, 78, 0.72));
}
.login-hero .login-box {
    position: relative; z-index: 1; width: 100%; margin: 0;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); border: none;
}
@media (max-width: 480px) {
    .login-hero.full-bleed { padding: 2.5rem 1rem; min-height: 70vh; }
}

/* ============================================================
   CLIENT FEEDBACK (login page + header logo)
   ============================================================ */
/* Header logo: the file is trimmed to the artwork, so it can be shown much larger and crisp */
.brand img { height: 64px; width: auto; max-width: 240px; }
@media (max-width: 860px) { .brand img { height: 52px; } }

/* Login card: always centred, button full width, dark green fill, white text */
.login-hero .login-box { margin-left: auto; margin-right: auto; }
.login-hero .login-box form { width: 100%; }
.login-hero .login-box .btn-primary {
    display: block; width: 100%; box-sizing: border-box; margin-top: 1.25rem;
    background: linear-gradient(135deg, var(--green-700), var(--green-900));
    color: #FFFFFF; border: 2px solid var(--green-900); text-align: center;
}
.login-hero .login-box .btn-primary:hover { background: var(--green-900); color: #FFFFFF; }
.login-hero .login-box .btn-google { width: 100%; box-sizing: border-box; }
