/* ============================================================
   CRESTVIEW AREA SHELTER FOR THE HOMELESS
   Main Stylesheet
   ============================================================

   TO RETHEME: Change the values in the :root block below.
   Colors, fonts, and spacing are all controlled from there.

   FONT STRATEGY:
   - Mobile: system fonts (no network request, fast, legible)
   - Desktop (≥768px): Merriweather + Lato loaded from Google Fonts
     (the <link> tag in each HTML file uses media="screen and (min-width:768px)")
   ============================================================ */

/* ---- 1. CUSTOM PROPERTIES (easy to edit) ---- */
:root {
    /* Brand colors — drawn from the organization's sign */
    /*    --teal:       #3D8FA8;   /* hands logo color */
    --teal:       #25598F;   /* hands logo color */
    /*--teal-dark:  #2A6F82;   /* hover/active teal */
    --teal-alt:   #4D7AB3;   /* hover/active teal */
    --red:        #BF5440;   /* org name on sign */
    --navy:       #1C3A5E;   /* donor list, dark text */
    --light:      #F4F7FA;   /* page backgrounds */
    --white:      #FFFFFF;
    --text:       #2D3436;   /* body text */
    --muted:      #6B7C8D;   /* captions, secondary text */
    --border:     #D8E2EC;

    /* Typography — system fonts by default (mobile) */
    --font-head: system-ui, -apple-system, BlinkMacSystemFont,
        'Segoe UI', Arial, sans-serif;
    --font-body: system-ui, -apple-system, BlinkMacSystemFont,
        'Segoe UI', Arial, sans-serif;

    /* Spacing scale */
    --sp-xs: 0.5rem;
    --sp-sm: 1rem;
    --sp-md: 2rem;
    --sp-lg: 4rem;
    --sp-xl: 6rem;

    /* Layout */
    --max-w: 1080px;
    --radius: 8px;
    --shadow: 0 2px 12px;
    --shadow-color: rgba(0, 0, 0, 0.09);
}

/* Desktop: switch to web fonts (only if Google Fonts loaded) */
@media (min-width: 768px) {
    :root {
        --font-head: 'Merriweather', Georgia, 'Times New Roman', serif;
        --font-body: 'Lato', 'Segoe UI', Arial, sans-serif;
    }
}


/* ---- 2. RESET & BASE ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--white);
    line-height: 1.65;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Standard links are dark-on-light and underlined.
   Inside dark sections (hero, page hero, info bar, footer) links flip
   to light-on-dark via the scoped rule below (footer is handled in its
   own section). Buttons (.btn) manage their own colors. */
a {
    color: var(--teal);
}
a:hover {
    color: var(--navy);
}

/* Links on dark backgrounds render light (buttons keep their own colors) */
.hero a:not(.btn),
.page-hero a:not(.btn),
.info-bar a {
    color: var(--white);
}
.hero a:not(.btn):hover,
.page-hero a:not(.btn):hover,
.info-bar a:hover {
    color: var(--white);
}

h1, h2, h3, h4 {
    font-family: var(--font-head);
    line-height: 1.25;
    color: var(--navy);
}

p {
    max-width: 68ch;
}   /* keeps line length readable */

ul {
    list-style: none;
    text-align: left;
}


/* ---- 3. LAYOUT UTILITIES ---- */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin-inline: auto;
    padding-inline: var(--sp-md);
}

.container .section {
    padding-block: var(--sp-xs);
}

.section {
    padding-block: var(--sp-md);
}

.section--alt {
    background: var(--light);
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: var(--sp-sm);
    color: var(--navy);
}

.section-title::after {
    content: '';
    display: block;
    width: auto;
    height: 3px;
    background: var(--teal);
    margin-top: 0.4rem;
}

.section-lead {
    font-size: 1.1rem;
    /*color: var(--muted);*/
    margin-bottom: var(--sp-md);
    max-width: 60ch;
    margin-inline: auto;
}

.text-center {
    text-align: center;
}
.text-center p {
    margin-inline: auto;
    text-align:left
}

/* Grid helpers */
.grid-3 {
    display: grid;
    gap: var(--sp-md);
    grid-template-columns: 1fr;
}

@media (min-width: 600px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.grid-2 {
    display: grid;
    gap: var(--sp-md);
    grid-template-columns: 1fr;
}

@media (min-width: 700px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Bulleted content list (re-enables the markers the reset removes) */
.list-bullets {
    list-style: disc;
    padding-left: 1.5rem;
    margin-top: 0.5rem;
    display: grid;
    gap: 0.4rem;
}

/* Urgent attention bar (e.g. "Need shelter?") */
.callout-urgent {
    background: var(--red);
    color: var(--white);
    text-align: center;
    padding: var(--sp-sm) var(--sp-md);
}

.callout-urgent a {
    color: var(--white);
    font-weight: 700;
}


/* ---- 4. BUTTONS ---- */
.btn {
    display: inline-block;
    padding: 0.7rem 1.6rem;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--teal);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--navy);
    color: var(--white);
}

.btn-donate {
    background: var(--red);
    color: var(--white);
}

.btn-donate:hover {
    background: #a3432e;
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--navy);
}

/* Outline button for light backgrounds (dark border/text) */
.btn-outline-dark {
    background: transparent;
    color: var(--navy);
    border: 2px solid var(--navy);
}

.btn-outline-dark:hover {
    background: var(--navy);
    color: var(--white);
}


/* ---- 5. NAVIGATION ---- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem var(--sp-md);
    max-width: var(--max-w);
    margin-inline: auto;
}

/* Brand (logo + name) */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo {
    height: 52px;
    width: auto;
}

/* Fallback when no logo image: show a styled text mark */
.nav-logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: var(--teal);
    border-radius: 50%;
    color: var(--white);
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.nav-title {
    font-family: var(--font-head);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.2;
    max-width: 220px;
}

/* CSS-only hamburger toggle */
.nav-toggle {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.nav-toggle-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
}

.nav-toggle-label span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}

/* Hamburger → X animation */
.nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) {
    opacity: 0;
}
.nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Nav links */
.nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: var(--sp-xs) 0 var(--sp-sm);
    margin-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.nav-toggle:checked ~ .nav-links {
    display: flex;
}

.nav-links a {
    display: block;
    padding: 0.65rem 0.5rem;
    color: var(--navy);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius);
    transition: background 0.15s, color 0.15s;
}

.nav-links a:hover {
    background: var(--light);
    color: var(--teal);
}

/* Current page: teal text with a bold underline accent (distinct from hover) */
.nav-links a.active {
    color: var(--teal);
    font-weight: 700;
    box-shadow: inset 0 -2px 0 var(--teal);
}

.nav-links .nav-donate a {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.6rem 1.4rem;
    background: var(--red);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 700;
}

.nav-links .nav-donate a:hover {
    background: #a3432e;
    color: var(--white);
}

/* Desktop nav */
@media (min-width: 768px) {
    .nav-toggle-label {
        display: none;
    }

    .nav-links {
        display: flex !important;
        flex-direction: row;
        align-items: center;
        width: auto;
        padding: 0;
        margin-top: 0;
        border-top: none;
        gap: 0.25rem;
    }

    .nav-links a {
        padding: 0.45rem 0.85rem;
    }

    .nav-links .nav-donate a {
        margin-top: 0;
        padding: 0.45rem 1.1rem;
    }
}


/* ---- 6. HOME: HERO ---- */
.hero {
    position: relative;
    min-height: 480px;
    display: flex;
    align-items: center;
    background-image: url('images/building.png');
    background-size: cover;
    background-position: center 40%;
    color: var(--white);
}

/* Dark overlay for text legibility */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(28, 58, 94, 0.78) 0%,
        rgba(28, 58, 94, 0.55) 60%,
        rgba(28, 58, 94, 0.3) 100%
        );
}

.hero-content {
    position: relative;
    padding: var(--sp-lg) var(--sp-md);
    max-width: var(--max-w);
    margin-inline: auto;
    width: 100%;
}

.hero-tagline {
    display: inline-block;
    background: var(--teal);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius);
    margin-bottom: var(--sp-sm);
}

.hero h1 {
    font-family: var(--font-head);
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: var(--white);
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    max-width: 16ch;
}

.hero p {
    font-size: 1.15rem;
    margin-bottom: var(--sp-md);
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
    max-width: 44ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-sm);
}


/* ---- 7. HOME: QUICK INFO BAR ---- */
.info-bar {
    background: var(--navy);
    color: var(--white);
    padding: var(--sp-sm) var(--sp-md);
}

.info-bar .container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-sm) var(--sp-md);
    justify-content: center;
}

.info-bar-item {
    display: flex;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.info-bar-item .icon {
    font-size: 1.1rem;
}


/* ---- 8. HOME: MISSION CARD TRIO ---- */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow) var(--shadow-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-icon-bar {
    background: var(--teal);
    padding: var(--sp-md);
    font-size: 2.2rem;
    text-align: center;
    line-height: 1;
}

.card-header-bar {
    font-family: var(--font-head);
    background: var(--teal);
    color: white;
    padding: var(--sp-md);
    font-size: 1.5rem;
    text-align: center;
    line-height: 1;
}

.card-body {
    padding: var(--sp-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-body h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.card-body p {
    color: var(--muted);
    font-size: 0.95rem;
    flex: 1;
    margin-bottom: var(--sp-sm);
}


/* ---- 9. HOME: IMPACT STATS ---- */
.stats-bar {
    background: var(--teal);
    color: var(--white);
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

@media (min-width: 600px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-item {
    padding: var(--sp-md) var(--sp-sm);
    border-right: 1px solid rgba(255,255,255,0.2);
}

.stat-item:last-child {
    border-right: none;
}

.stat-item:nth-child(2n) {
    border-right: none;
}

@media (min-width: 600px) {
    .stat-item:nth-child(2n) {
        border-right: 1px solid rgba(255,255,255,0.2);
    }
    .stat-item:last-child    {
        border-right: none;
    }
}

.stat-number {
    font-family: var(--font-head);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    color: var(--white);
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    font-weight:bold;
    opacity: 0.85;
    margin-top: 0.3rem;
}


/* ---- 10. INNER PAGE HERO ---- */
.page-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--teal-alt) 100%);
    color: var(--white);
    padding: var(--sp-lg) var(--sp-md);
    text-align: center;
}

.page-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    color: var(--white);
    margin-bottom: 0.5rem;
}

.page-hero p {
    font-size: 1.05rem;
    opacity: 0.9;
    margin-inline: auto;
    max-width: 50ch;
}


/* ---- 11. SERVICES PAGE ---- */
.service-item {
    display: flex;
    gap: var(--sp-md);
    align-items: flex-start;
    padding: var(--sp-md);
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow) var(--shadow-color);
}

.service-icon {
    font-size: 2rem;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light);
    border-radius: 50%;
}

.service-item h3 {
    margin-bottom: 0.35rem;
    font-size: 1.1rem;
}

.service-item p {
    color: var(--muted);
    font-size: 0.95rem;
}


/* ---- 12. STAFF PAGE ---- */
.bio-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow) var(--shadow-color);
    overflow: hidden;
    text-align: center;
}

.bio-card-photo {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: top center;
}

/* Placeholder when no photo */
.bio-card-photo-placeholder {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--teal) 0%, var(--navy) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: rgba(255,255,255,0.5);
}

.bio-card-body {
    padding: var(--sp-md);
}

.bio-card-body h3 {
    margin-bottom: 0.2rem;
    font-size: 1.1rem;
}

.bio-card-body .title {
    color: var(--teal);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.bio-card-body p {
    color: var(--muted);
    font-size: 0.9rem;
    margin-inline: auto;
}


/* ---- 13. DONATE PAGE ---- */
.donate-hero {
    background: linear-gradient(135deg, var(--red) 0%, var(--navy) 100%);
}

.donate-method {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow) var(--shadow-color);
    padding: var(--sp-md);
    border-top: 4px solid var(--teal);
    display: flex;
    flex-direction: column;
}

.donate-method h3 {
    margin-bottom: 0.5rem;
}

.donate-method p {
    color: var(--muted);
    font-size: 0.95rem;
    flex: 1;
    margin-bottom: var(--sp-sm);
}

.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--sp-sm);
}

.wishlist-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem var(--sp-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.wishlist-item .check {
    color: var(--teal);
    font-weight: 700;
}


/* ---- 14. ABOUT PAGE ---- */
.about-story {
    display: grid;
    gap: var(--sp-md);
}

@media (min-width: 700px) {
    .about-story {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
}

.about-story img {
    border-radius: var(--radius);
    box-shadow: var(--shadow) var(--shadow-color);
}

.about-story h2 {
    margin-bottom: var(--sp-sm);
}

.about-story p + p {
    margin-top: 0.75rem;
}

.value-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: var(--sp-md);
    box-shadow: var(--shadow) var(--shadow-color);
    border-left: 4px solid var(--teal);
}

.value-card h3 {
    margin-bottom: 0.4rem;
    font-size: 1rem;
}

.value-card p {
    font-size: 0.9rem;
    color: var(--muted);
}


/* ---- 15. DONORS SECTION ---- */
.donors-list {
    /*
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-sm);
    justify-content: center;
    */
    display:grid;
    gap: var(--sp-sm);
    grid-template-columns: auto auto auto;
    align-items: center;
    justify-items: center;
}

.donors-list a img{
    object-fit:scale-down;
}

.donor-badge {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--navy);
}


/* ---- 16. FOOTER ---- */
.site-footer {
    background: var(--navy);
    color: rgba(255,255,255,0.8);
    padding: var(--sp-lg) var(--sp-md) var(--sp-md);
}

.footer-grid {
    display: grid;
    gap: var(--sp-md);
    grid-template-columns: 1fr;
    margin-bottom: var(--sp-md);
}

@media (min-width: 600px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer-brand .nav-title {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: var(--sp-xs);
}

.footer-tagline {
    font-style: italic;
    opacity: 0.7;
    font-size: 0.9rem;
    margin-bottom: var(--sp-sm);
}

.footer-col h4 {
    color: var(--white);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    font-family: var(--font-body);
}

.footer-col ul li {
    margin-bottom: 0.4rem;
}

/* All footer links render light-on-dark */
.site-footer a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: color 0.15s;
}

.site-footer a:hover {
    color: var(--white);
}

.footer-col ul li a {
    font-size: 0.9rem;
}

.footer-contact-item {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    display:flex;
}
.footer-contact-item span {
    margin-right: 0.2rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: var(--sp-sm);
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-xs);
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    opacity: 0.6;
}


/* ---- 17. UNITED WAY PARTNERSHIP ---- */
.uw-section {
    background: var(--white);
    border-top: 5px solid #E2231A;
    border-bottom: 1px solid var(--border);
}

.uw-band {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-md);
    padding: var(--sp-lg) 0;
}

/* Logo link — no underline, slight opacity on hover */
.uw-logo-wrap {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    text-decoration: none;
    opacity: 1;
    transition: opacity 0.2s;
}

.uw-logo-wrap:hover {
    opacity: 0.85;
}

.uw-logo {
    max-width: 200px;
    height: auto;
}

/* Shown when images/united-way-partner.png hasn't been added yet */
.uw-logo-placeholder {
    width: 200px;
    min-height: 90px;
    border: 2px dashed #E2231A;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #E2231A;
    text-align: center;
    line-height: 1.4;
    padding: var(--sp-sm);
}

/* Vertical rule between logo and text on wider screens */
.uw-divider {
    display: none;
    width: 1px;
    height: 90px;
    background: var(--border);
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .uw-divider {
        display: block;
    }
}

.uw-content {
    flex: 1;
    min-width: 260px;
}

.uw-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #E2231A;
    margin-bottom: 0.35rem;
}

.uw-content h2 {
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.uw-content p {
    color: var(--muted);
    font-size: 0.95rem;
    max-width: 58ch;
    margin-bottom: var(--sp-sm);
}

.btn-uw {
    background: #E2231A;
    color: var(--white);
}

.btn-uw:hover {
    background: #b81912;
    color: var(--white);
}
