/* SVdP St. Gerard — blues sampled from the Society's logo, gold accent; mobile-first */
:root {
    --navy: #1c3a92;
    --navy-dark: #152d73;
    --navy-deep: #0f2054;
    --periwinkle: #5868a8; /* the logo's lighter figure */
    /* Component form, for rgba() overlays — rgba() can't take a hex var. */
    --navy-rgb: 28, 58, 146;
    --navy-deep-rgb: 15, 32, 84;
    --gold: #d9a441;
    --gold-soft: #ecc978;
    --cream: #f8f6f1;
    --ink: #2b3140;
    --muted: #6b7280;
    --border: #e1e4ea;
}

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

body {
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--ink);
    background: var(--cream);
    line-height: 1.6;
    /* Sticky footer: main absorbs the slack so short pages still push it down. */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh; /* accounts for mobile browser chrome */
}

main { flex: 1 0 auto; }

/* Opt-in on short pages (404) to center content in the leftover space. */
main.main-centered { display: flex; align-items: center; justify-content: center; }
main.main-centered > .container { width: 100%; }

.container { max-width: 860px; margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--navy); }

/* Shown outside production while includes/config.php still has placeholders. */
.dev-warning {
    background: #fff3cd; color: #6b4e00; border-bottom: 1px solid #e8c56a;
    text-align: center; padding: 0.4rem 1rem; font-size: 0.9rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.dev-warning code { font-size: 0.85rem; }

/* Header */
.site-header { background: var(--navy); }
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.9rem 1.25rem; flex-wrap: wrap; gap: 0.5rem;
}
.brand {
    color: #fff; text-decoration: none; font-size: 1.3rem; font-weight: bold;
    display: flex; align-items: center; gap: 0.6rem;
}
/* The logo is wide and blue-on-transparent, so it sits on a white chip. */
.brand img { height: 2.6rem; width: auto; background: #fff; border-radius: 6px; padding: 0.2rem 0.4rem; }
.site-header nav { display: flex; gap: 1rem; align-items: center; }
.site-header nav a { color: #d9def2; text-decoration: none; }
.site-header nav a:hover { color: #fff; text-decoration: underline; }
.nav-cta {
    background: var(--gold); color: var(--navy-deep) !important;
    padding: 0.4rem 0.9rem; border-radius: 4px; font-weight: bold;
}
.nav-cta:hover { text-decoration: none !important; filter: brightness(1.05); }

/* Hero */
.hero {
    /* Plain gradient by default. index.php adds .has-photo only when
       image/hero-960.jpg exists, so a missing photo never leaves a broken
       background or a 404 in the log. */
    background-color: var(--navy-dark);
    background-image: linear-gradient(180deg, rgba(var(--navy-rgb), 1) 0%, rgba(var(--navy-deep-rgb), 1) 100%);
    color: #fff;
    text-align: center;
    padding: 3rem 1rem 3.5rem;
}
.hero.has-photo {
    /* The photo sits beneath the brand gradient, with a neutral scrim first so
       bright areas cannot wash out the white text. */
    background-image:
        linear-gradient(180deg, rgba(var(--navy-rgb), 0.78) 0%, rgba(var(--navy-deep-rgb), 0.9) 100%),
        linear-gradient(rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.22)),
        url('/image/hero-960.jpg');
    background-position: center 40%;
    background-size: cover;
    background-repeat: no-repeat;
}
/* Larger screens get the wider file; phones never download it. */
@media (min-width: 768px) {
    .hero.has-photo {
        background-image:
            linear-gradient(180deg, rgba(var(--navy-rgb), 0.78) 0%, rgba(var(--navy-deep-rgb), 0.9) 100%),
            linear-gradient(rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.22)),
            url('/image/hero-1920.jpg');
    }
}
.hero h1, .hero p.lead, .hero .scripture { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.hero .hero-logo { width: 15rem; max-width: 80%; height: auto; background: #fff; border-radius: 10px; padding: 0.75rem 1rem; margin-bottom: 1.5rem; box-shadow: 0 4px 18px rgba(0,0,0,0.18); }
.hero h1 { font-size: 2.2rem; line-height: 1.2; margin-bottom: 0.5rem; }
.hero .tagline { font-size: 1.15rem; color: var(--gold-soft); margin-bottom: 1rem; }
@media (max-width: 480px) { .hero h1 { font-size: 1.7rem; } .hero { padding: 2.25rem 1rem 2.75rem; } }
.hero p.lead { font-size: 1.2rem; max-width: 40rem; margin: 0 auto 1.5rem; color: #e6eef8; }
.hero p.lead strong { color: #fff; }
.hero .scripture { font-style: italic; color: var(--gold-soft); margin-bottom: 1.5rem; max-width: 36rem; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

.btn {
    display: inline-block; background: var(--gold); color: var(--navy-deep);
    font-weight: bold; text-decoration: none; padding: 0.75rem 1.75rem;
    border-radius: 4px; border: none; font-size: 1.05rem; font-family: inherit; cursor: pointer;
}
.btn:hover { filter: brightness(1.05); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, 0.85); padding: calc(0.75rem - 2px) calc(1.75rem - 2px); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.12); }

/* Sections */
section.page-section { padding: 2.5rem 0; }
section.page-section + section.page-section { border-top: 1px solid var(--border); }
section h2 { color: var(--navy-dark); margin-bottom: 0.75rem; font-size: 1.5rem; }
section p + p { margin-top: 0.75rem; }
.scripture-inline { font-style: italic; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.card { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 1.25rem; border-top: 3px solid var(--gold); }
.card h3 { color: var(--navy); margin-bottom: 0.4rem; font-size: 1.1rem; }
ul.check { list-style: none; margin-top: 0.75rem; }
ul.check li { padding-left: 1.6rem; position: relative; margin-bottom: 0.5rem; }
ul.check li::before { content: "✓"; position: absolute; left: 0; color: var(--navy); font-weight: bold; }
.center { text-align: center; }
.hint { font-size: 0.9rem; color: var(--muted); }
a.phone { font-size: 1.35rem; font-weight: bold; text-decoration: none; white-space: nowrap; }
a.phone:hover { text-decoration: underline; }
.address { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 1rem 1.25rem; margin-top: 0.75rem; display: inline-block; }

/* Contact details */
dl.contact { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 1.25rem; margin-top: 1.25rem; }
dl.contact dt { font-weight: bold; color: var(--navy-dark); margin-top: 1rem; }
dl.contact dt:first-child { margin-top: 0; }
dl.contact dd { margin-left: 0; }

/* Emphasised note: emergency numbers, tax statement. */
.callout { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: 6px; padding: 1rem 1.25rem; }

/* Footer */
.site-footer { background: var(--navy-deep); color: #c9d6e8; text-align: center; padding: 2rem 1rem; font-size: 0.95rem; flex-shrink: 0; }
.site-footer p + p { margin-top: 0.5rem; }
.site-footer a { color: var(--gold-soft); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* Header brand: the logo carries the name, so the text is for screen readers
   and for the no-logo fallback only. */
.brand .brand-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Inner-page title (food pantry): a heading where the hero would be. */
.page-title { color: var(--navy-dark); font-size: 1.9rem; line-height: 1.2; margin-bottom: 0.75rem; }
.lead-inline { font-size: 1.1rem; }
