/* Compact public footer (Nov 2026, v4). Loaded by layouts/partials/public-footer.
   Phones: one column, collapsed sections (one open at a time), compact Stay Connected form.
   Tablets and desktop: link columns side by side with the newsletter alongside. */
.fhf-footer { --sf-gold: #e3b45a; --sf-line: rgba(227, 180, 90, 0.28); --sf-soft: rgba(255, 255, 255, 0.78); background: var(--pal-900,#013b2e); background-image: radial-gradient(circle at 12px 12px, rgba(255, 255, 255, 0.03) 2px, transparent 2.5px); background-size: 26px 26px; color: #fff; --ff-control: 44px; }
.fhf-footer a { color: #fff; text-decoration: none; }
.fhf-footer a:hover { color: #f8e2b0; text-decoration: underline; }
.fhf-footer a:focus-visible, .fhf-footer button:focus-visible, .fhf-footer input:focus-visible, .fhf-footer select:focus-visible, .fhf-footer summary:focus-visible { outline: 3px solid #f1ca62; outline-offset: 2px; }
.fhf-footer .sf-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px 16px 8px; }

/* Brand: logo and name with social icons beside, mission and places on one line each */
.fhf-footer .sf-brand { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "logo social" "mission mission" "places places"; align-items: center; gap: 2px 10px; }
.fhf-footer .sf-logo { grid-area: logo; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; }
.fhf-footer .sf-mission { grid-area: mission; }
.fhf-footer .sf-places { grid-area: places; }
.fhf-footer .sf-social { grid-area: social; }
.fhf-footer .sf-logo img { width: 34px; height: 34px; flex-shrink: 0; border-radius: 999px; background: #fff; object-fit: contain; }
.fhf-footer .sf-logo .fhf-h3 { margin: 0; color: #fff; font-size: 0.95rem; font-weight: 800; letter-spacing: 0.01em; line-height: 1.15; }
.fhf-footer .sf-mission { margin: 0; color: rgba(255, 255, 255, 0.88); font-size: 0.86rem; line-height: 1.35; }
.fhf-footer .sf-places { margin: 0; color: var(--sf-soft); font-size: 0.8rem; line-height: 1.4; }
.fhf-footer .sf-places a { color: var(--sf-soft); white-space: nowrap; }
.fhf-footer .sf-social { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.fhf-footer .sf-social a { display: grid; place-items: center; width: 40px; height: 40px; border: 1.5px solid var(--sf-gold); border-radius: 50%; color: #fff; }
.fhf-footer .sf-social a:hover { background: rgba(227, 180, 90, 0.18); text-decoration: none; }

/* Link columns */
.fhf-footer .sf-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; padding-top: 10px; border-top: 1px solid var(--sf-line); }
.fhf-footer .sf-heading { margin: 0 0 2px; color: var(--sf-gold) !important; font-family: inherit; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; }
.fhf-footer .sf-links { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; font-size: 0.9rem; }
.fhf-footer .sf-links a { display: inline-flex; align-items: center; min-height: 40px; color: rgba(255, 255, 255, 0.92); }
.fhf-footer .sf-group > summary { display: none; }

/* Stay Connected */
.fhf-footer .sf-news { display: grid; gap: 3px; align-content: start; padding-top: 10px; border-top: 1px solid var(--sf-line); scroll-margin-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
.fhf-footer .sf-news-title { display: flex; align-items: center; gap: 8px; margin: 0; color: #fff !important; font-family: inherit; font-size: 0.98rem; font-weight: 800; line-height: 1.15; }
.fhf-footer .sf-news-title .fhf-icon { color: var(--sf-gold); flex-shrink: 0; }
.fhf-footer .sf-news-text { margin: 0; color: rgba(255, 255, 255, 0.82); font-size: 0.84rem; line-height: 1.35; }
.fhf-footer .sf-news-form { display: grid; gap: 8px; margin-top: 2px; }
.fhf-footer .sf-news-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.fhf-footer .sf-news-row input { width: 100%; min-height: 44px; height: 44px; padding: 0 12px; border: 2px solid transparent; border-radius: 10px; background: #fff; color: #14312b; font: inherit; font-size: 16px; }
.fhf-footer .sf-news-btn { min-height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: #c99a3e; color: #1b1405; font: inherit; font-size: 0.95rem; font-weight: 800; cursor: pointer; }
.fhf-footer .sf-news-btn:hover { background: #d8ab52; }
.fhf-footer .sf-news-btn:disabled { opacity: 0.7; cursor: progress; }
.fhf-footer .sf-news-options { display: grid; grid-template-columns: minmax(118px, 0.62fr) minmax(0, 1.38fr); align-items: center; gap: 10px; }
.fhf-footer .sf-news-options select { width: 100% !important; min-width: 0; min-height: 44px; height: 44px; margin: 0; padding: 0 6px 0 10px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 10px; background-color: #024a3a; color: #fff; font: inherit; font-size: 16px; }
.fhf-footer .sf-news-consent { display: flex !important; align-items: center; gap: 8px; min-height: 40px; margin: 0 !important; padding: 0 !important; color: var(--sf-soft); font-size: 0.74rem; font-weight: 500; line-height: 1.35; cursor: pointer; }
.fhf-footer .sf-news-consent input { width: 20px; height: 20px; min-height: 20px; margin: 0; flex-shrink: 0; accent-color: #c99a3e; }
.fhf-footer .sf-news-consent a { display: inline; text-decoration: underline; }
.fhf-footer [aria-invalid="true"] { border-color: #ffb4a3 !important; box-shadow: 0 0 0 2px rgba(255, 180, 163, 0.45); }
.fhf-footer .sf-news-consent input[aria-invalid="true"] { outline: 2px solid #ffb4a3; outline-offset: 2px; }
.fhf-footer .sf-news-feedback { padding: 8px 10px; border-left: 3px solid #ffb4a3; border-radius: 8px; background: rgba(255, 180, 163, 0.12); color: #ffe3dc; font-size: 0.82rem; }
.fhf-footer .sf-news-feedback p { margin: 0; }
.fhf-footer .sf-news-feedback p + p { margin-top: 2px; }
.fhf-footer .sf-news-feedback.is-busy { border-left-color: var(--sf-gold); background: rgba(227, 180, 90, 0.12); color: #fff; }
.fhf-footer .sf-news-feedback[hidden] { display: none; }

/* Bottom line: copyright and legal links on one row */
.fhf-footer .sf-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 14px; padding: 0 16px; border-top: 1px solid var(--sf-line); color: var(--sf-soft); font-size: 0.8rem; }
.fhf-footer .sf-meta p { margin: 0; padding: 10px 0; }
.fhf-footer .sf-legal { display: flex; flex-wrap: wrap; gap: 0; margin: 0; padding: 0; list-style: none; }
.fhf-footer .sf-legal li + li::before { content: "·"; margin: 0 8px; color: var(--sf-gold); }
.fhf-footer .sf-legal a { display: inline-flex; align-items: center; min-height: 40px; }
.fhf-footer-portal .sf-meta { border-top: 0; }

/* Phones: compact accordions, one open at a time (see the script in the footer partial). */
@media (max-width: 599px) {
    .fhf-footer .sf-rights { display: none; }
    .fhf-footer .sf-columns { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 0; }
    .fhf-footer .sf-group { border-bottom: 1px solid rgba(255, 255, 255, 0.09); }
    .fhf-footer .sf-group > summary { display: flex; align-items: center; justify-content: space-between; min-height: 40px; color: var(--sf-gold); font-size: 0.82rem; font-weight: 800; letter-spacing: 0.05em; cursor: pointer; list-style: none; }
    .fhf-footer .sf-group > summary::-webkit-details-marker { display: none; }
    .fhf-footer .sf-chevron { color: var(--sf-gold); transition: transform 0.18s ease; }
    .fhf-footer .sf-group[open] .sf-chevron { transform: rotate(180deg); }
    .fhf-footer .sf-group .sf-heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .fhf-footer .sf-group .sf-links { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; padding-bottom: 4px; font-size: 0.86rem; }
    .fhf-footer .sf-news { border-top: 0; padding-top: 4px; }
    .fhf-footer .sf-meta { justify-content: center; text-align: center; }
    .fhf-footer .sf-meta p { padding: 0; }
}
/* Very narrow phones: email and Subscribe stack, and so do Location and the consent box. */
@media (max-width: 339px) {
    .fhf-footer .sf-news-row, .fhf-footer .sf-news-options { grid-template-columns: minmax(0, 1fr); }
    .fhf-footer .sf-places a { white-space: normal; }
}
@media (min-width: 600px) {
    .fhf-footer .sf-grid, .fhf-footer .sf-meta { padding-inline: 24px; }
    .fhf-footer .sf-grid { padding-block: 18px 12px; }
    .fhf-footer .sf-columns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .fhf-footer .sf-meta p { padding: 0; }
}
@media (min-width: 900px) {
    .fhf-footer .sf-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; }
    .fhf-footer .sf-columns { grid-column: 1 / -1; grid-row: 2; }
    .fhf-footer .sf-news { grid-column: 2; grid-row: 1; padding-top: 0; border-top: 0; }
}
/* Desktop with a mouse: tighter link rows, since targets do not need to be finger-sized. */
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
    .fhf-footer .sf-links a { min-height: 28px; }
    .fhf-footer .sf-legal a { min-height: 30px; }
    .fhf-footer .sf-news-row input, .fhf-footer .sf-news-btn { min-height: 40px; height: 40px; }
    .fhf-footer .sf-news-options select { min-height: 38px; height: 38px; }
    .fhf-footer .sf-news-consent { min-height: 28px; }
    .fhf-footer .sf-news-options { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); }
}
@media (min-width: 1200px) {
    .fhf-footer .sf-grid { grid-template-columns: minmax(220px, 1.1fr) minmax(0, 2.5fr) minmax(320px, 1.5fr); column-gap: 0; max-width: 1440px; margin: 0 auto; padding: 22px 32px 14px; }
    .fhf-footer .sf-brand { grid-template-columns: minmax(0, 1fr); grid-template-areas: "logo" "mission" "places" "social"; gap: 6px; padding-right: 28px; }
    .fhf-footer .sf-logo img { width: 44px; height: 44px; }
    .fhf-footer .sf-columns { grid-column: 2; grid-row: 1; align-content: start; padding: 0 28px; border-top: 0; border-left: 1px solid var(--sf-line); border-right: 1px solid var(--sf-line); }
    .fhf-footer .sf-news { grid-column: 3; padding-left: 28px; }
    .fhf-footer .sf-meta { max-width: 1440px; margin: 0 auto; padding-inline: 32px; }
}
/* Desktop visitors who are signed out see a round Login button fixed in the bottom-right corner; keep footer text clear of it. */
@media (min-width: 1024px) {
    body:has(.fhf-float-login) .fhf-footer :is(.sf-grid, .sf-meta) { padding-right: 112px; }
}
/* Floating bottom bar (phones and tablets): the space under the footer matches the footer colour
   and is only as tall as the bar, so the last links stay reachable without a pale gap. */
@media (max-width: 1023px) {
    .fhf-footer :is(a, button, input, select, summary, label) { scroll-margin-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
    .fhf-footer ~ .fhf-bottom-spacer { height: calc(72px + env(safe-area-inset-bottom, 0px)) !important; background: var(--pal-900,#013b2e); }
}
/* The installed prayer app keeps its existing behaviour of a slim footer on phones and tablets. */
@media (display-mode: standalone) and (max-width: 1023px) {
    .fhf-footer .sf-grid { display: none; }
}
@media (prefers-reduced-motion: reduce) { .fhf-footer .sf-chevron { transition: none; } }
