/* Mablethorpe & Sutton Group of Parishes — shared stylesheet
   Palette carried over from the church's own site: primary dark green #336633,
   mid green #477547, light green #D6E0D6, near-white green #F4F7F4, warm tan accent #8C603C / #FFDABA.
   Headings: Playfair Display (serif). Body: Source Sans 3 (sans). */

*, *::before, *::after { box-sizing: border-box; }
:root {
  --navy: #336633;
  --navy-dark: #244d24;
  --mid-green: #477547;
  --gold: #8C603C;
  --gold-dark: #6b4a2d;
  --tan-light: #FFDABA;
  --ink: #20242b;
  --body-text: #4a4f58;
  --white: #ffffff;
  --cream: #F4F7F4;
  --light-green: #D6E0D6;
  --line: #dfe6df;
  --shadow: 0 1px 5px 0 rgba(51,102,51,0.16);
  --radius: 14px;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Source Sans 3', Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65em;
  color: var(--body-text);
  background-color: var(--white);
}

h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; color: var(--navy); line-height: 1.25em; margin: 0 0 0.6em; }
p { margin: 0 0 1rem; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--gold); color: #fff;
  padding: 10px 16px; z-index: 999; border-radius: 0 0 8px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ── HEADER / NAV ── */
.site-header { background: var(--navy); box-shadow: 0 2px 10px rgba(0,0,0,0.18); position: relative; z-index: 50; }
.header-inner { max-width: 1120px; margin: 0 auto; padding: 16px 16px 18px; }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand-mark { width: 32px; height: 32px; flex-shrink: 0; color: var(--tan-light); }
.brand-text { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; line-height: 1.1; }
.brand-text .l1 { display: block; font-size: 1.2rem; letter-spacing: 0.01em; }
.brand-text .l2 { display: block; font-size: 0.78rem; letter-spacing: 0.10em; color: var(--tan-light); text-transform: uppercase; }

.nav-toggle {
  display: none; background: rgba(255,255,255,0.12); border: none; border-radius: 8px;
  width: 42px; height: 38px; cursor: pointer; position: relative;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: ''; position: absolute; left: 9px; right: 9px; height: 3px; background: #fff; border-radius: 2px;
}
.nav-toggle::before { top: 11px; }
.nav-toggle span { top: 18px; }
.nav-toggle::after { top: 25px; }

.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 12px 0 0; padding: 0; flex-wrap: wrap; }
.site-nav a {
  display: block; font-weight: 600; font-size: 0.9rem;
  text-decoration: none; color: #fff; background: rgba(255,255,255,0.1);
  padding: 8px 13px; border-radius: 100px; transition: background 0.2s, color 0.2s;
}
.site-nav a:hover { background: var(--gold); color: #fff; }
.site-nav a[aria-current="page"] { background: var(--tan-light); color: var(--navy-dark); }

.header-contact {
  display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px;
  font-size: 0.85rem; font-weight: 600; color: rgba(255,255,255,0.85);
}
.header-contact a { text-decoration: none; color: rgba(255,255,255,0.85); }
.header-contact a:hover { color: var(--tan-light); }
.header-contact span { display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .site-nav { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
  .site-nav.is-open { max-height: 34rem; }
  .site-nav ul { flex-direction: column; margin-top: 10px; gap: 4px; }
  .site-nav a { text-align: center; }
}

/* ── MAIN ── */
main { max-width: 1120px; margin: 26px auto 0; padding: 0 16px 10px; }
.card { background: var(--cream); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 20px; }
@media (min-width: 640px) { .card { padding: 38px 44px; } }

.page-title { text-align: center; font-size: 2rem; margin-bottom: 1.1rem; }
.lead { font-size: 1.05rem; text-align: center; max-width: 44rem; margin: 0 auto 1.75rem; color: var(--body-text); }
.eyebrow { display: block; text-align: center; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 0.6rem; }

.two-col { display: grid; grid-template-columns: 1fr; gap: 1.75rem; align-items: center; margin: 1.75rem 0; }
@media (min-width: 680px) { .two-col { grid-template-columns: 1fr 1fr; } }
.two-col figure { margin: 0; }
.two-col figcaption { text-align: center; font-size: 0.85rem; font-style: italic; margin-top: 0.5rem; }

.section-heading { text-align: center; font-size: 1.5rem; margin: 2.2rem 0 1rem; }
h2.section-heading:first-child, h1 + h2.section-heading { margin-top: 0; }

a.text-link { font-weight: 700; border-bottom: 3px solid var(--gold); text-decoration: none; }
a.text-link:hover { border-color: var(--navy); }

.btn {
  display: inline-block; font-family: 'Playfair Display', Georgia, serif; font-weight: 700;
  padding: 13px 28px; border-radius: 100px; text-decoration: none; text-align: center;
  border: none; cursor: pointer; font-size: 1rem; transition: transform 0.15s, filter 0.2s;
}
.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { background: var(--navy); color: #fff; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--navy); border: 2px solid var(--gold); }
.btn-outline:hover { border-color: var(--navy); color: var(--navy); background: var(--light-green); }

/* Info / contact-detail tables */
table.info-table { width: 100%; border-collapse: collapse; margin: 1.5rem auto; }
table.info-table th, table.info-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 0.95rem; }
table.info-table th { font-family: 'Playfair Display', Georgia, serif; background: var(--light-green); }

.note-box { background: var(--tan-light); border: 1px solid var(--gold); border-radius: 10px; padding: 14px 18px; margin: 1.25rem 0; font-size: 0.95rem; }
.safeguard-box { background: var(--light-green); border-left: 4px solid var(--navy); border-radius: 10px; padding: 18px 20px; margin: 1.75rem 0; font-size: 0.93rem; }
.safeguard-box h2, .safeguard-box h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.safeguard-box ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.safeguard-box li { margin-bottom: 0.3rem; }

/* Map / video unlock (cookie-friendly third-party embeds) */
.embed-wrap { margin: 1.75rem 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #eef1ee; }
.embed-locked {
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px;
  padding: 2.75rem 1rem; background: #eef1ee; text-align: center; cursor: pointer; border: none; width: 100%;
  font-family: 'Source Sans 3', Arial, sans-serif; font-size: 0.95rem; color: var(--body-text);
}
.embed-locked strong { font-family: 'Playfair Display', Georgia, serif; color: var(--navy); font-size: 1.05rem; }
.embed-frame iframe { width: 100%; height: 340px; border: 0; display: block; aspect-ratio: 16/9; }
.embed-frame.video iframe { height: auto; }
.embed-frame.calendar iframe { height: 600px; aspect-ratio: auto; }

/* Section hub cards */
.hub-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin: 1.75rem 0; }
@media (min-width: 640px) { .hub-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .hub-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.hub-card {
  display: block; text-decoration: none; color: var(--ink); background: var(--white);
  border: 1px solid var(--line); border-radius: 12px; padding: 20px; transition: border-color 0.2s, transform 0.15s;
  overflow: hidden;
}
.hub-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.hub-card img { border-radius: 8px; margin-bottom: 12px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.hub-card h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.hub-card p { font-size: 0.92rem; margin: 0; color: var(--body-text); }

/* Documents list (notices, policies, guides) */
.doc-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; margin: 1.5rem 0; }
.doc-list a {
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; font-weight: 700;
  font-family: 'Playfair Display', Georgia, serif; transition: border-color 0.2s, background 0.2s;
}
.doc-list a:hover { border-color: var(--gold); background: var(--light-green); }
.doc-list svg { flex-shrink: 0; color: var(--gold-dark); }
.doc-list .doc-note { font-family: 'Source Sans 3', Arial, sans-serif; font-weight: 400; font-size: 0.8rem; color: var(--body-text); display: block; margin-top: 2px; }
.doc-list .doc-missing {
  display: flex; align-items: center; gap: 12px; color: #8a8a85;
  background: #f4f2ec; border: 1px dashed var(--line); border-radius: 10px; padding: 14px 18px; font-weight: 700;
  font-family: 'Playfair Display', Georgia, serif;
}
.doc-list .doc-missing svg { flex-shrink: 0; color: #b8b3a2; }
.doc-list .doc-missing .doc-note { font-family: 'Source Sans 3', Arial, sans-serif; font-weight: 400; font-size: 0.8rem; color: #9a9690; display: block; margin-top: 2px; }

/* what3words tag */
.w3w-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 700; color: var(--gold-dark); background: var(--tan-light); border-radius: 100px; padding: 4px 12px; text-decoration: none; margin: 0.3rem 0 1rem; }
.w3w-tag:hover { background: var(--gold); color: #fff; }

/* Prayer text blocks */
.prayer-block { background: var(--light-green); border-left: 4px solid var(--gold); border-radius: 10px; padding: 1.5rem 1.75rem; margin: 1.75rem 0; font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-size: 1.1rem; color: var(--ink); line-height: 1.7; }

/* Bible gallery grid */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1.5rem 0; }
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
.gallery-grid figure { margin: 0; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.18); background: #fff; }
.gallery-grid img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.gallery-grid figcaption { padding: 8px 10px; font-size: 0.82rem; text-align: center; }

/* Contact links list */
.contact-list { list-style: none; padding: 0; margin: 1rem 0; }
.contact-list li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: none; }
.contact-list strong { color: var(--navy); }

/* ── CONTACT / ENQUIRY FORM ── */
.book-section { background: var(--navy-dark); border-radius: var(--radius); padding: 2.25rem 1.25rem; margin: 2.5rem 0 0; color: #fff; }
@media (min-width: 640px) { .book-section { padding: 3rem; } }
.book-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 780px) { .book-grid { grid-template-columns: 1fr 1.2fr; } }
.book-section h2 { color: #fff; text-align: left; }
.book-section .lead2 { text-align: left; color: rgba(255,255,255,0.75); margin: 0 0 1.5rem; }
.book-contact { display: flex; flex-direction: column; gap: 0.9rem; margin-top: 1.5rem; }
.book-contact a { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 600; }
.book-contact a:hover { color: var(--tan-light); }
.book-contact svg { color: var(--tan-light); flex-shrink: 0; }

.cf-field { margin-bottom: 1rem; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.cf-label { display: block; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; color: rgba(255,255,255,0.7); }
.cf-input, .cf-select, .cf-textarea {
  width: 100%; padding: 11px 13px; border-radius: 8px; border: 1.5px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08); color: #fff; font-family: 'Source Sans 3', Arial, sans-serif; font-size: 0.95rem;
}
.cf-input::placeholder, .cf-textarea::placeholder { color: rgba(255,255,255,0.4); }
.cf-input:focus, .cf-select:focus, .cf-textarea:focus { outline: none; border-color: var(--tan-light); background: rgba(255,255,255,0.14); }
.cf-textarea { resize: vertical; min-height: 6rem; }
.cf-submit {
  width: 100%; background: var(--gold); color: #fff; font-family: 'Playfair Display', Georgia, serif; font-weight: 700;
  padding: 13px; border-radius: 100px; border: none; cursor: pointer; font-size: 1rem; margin-top: 0.25rem;
  transition: background 0.2s, transform 0.15s;
}
.cf-submit:hover { background: var(--tan-light); color: var(--navy-dark); transform: translateY(-2px); }
.cf-note { font-size: 0.8rem; color: rgba(255,255,255,0.5); text-align: center; margin-top: 0.75rem; }
.cf-honeypot { position: absolute; left: -9999px; }

/* ── FOOTER (also serves as the full site map) ── */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,0.85); margin-top: 3rem; padding: 2.5rem 16px 2rem; }
.footer-inner { max-width: 1120px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; margin-bottom: 2rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-col h4 { color: var(--tan-light); font-family: 'Playfair Display', Georgia, serif; font-size: 0.95rem; margin-bottom: 0.6rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a { color: rgba(255,255,255,0.75); text-decoration: none; font-size: 0.88rem; }
.footer-col a:hover { color: var(--tan-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 1.25rem; text-align: center; font-size: 0.82rem; color: rgba(255,255,255,0.6); }
.footer-bottom a { color: var(--tan-light); text-decoration: none; }
.footer-bottom a:hover { text-decoration: underline; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; margin-top: 10px; }

/* ── LEGAL PAGES ── */
.legal-header { text-align: center; padding: 1rem 0 0.5rem; }
.legal-content section { margin-bottom: 2rem; }
.legal-content h2 { font-size: 1.25rem; margin-bottom: 0.6rem; }
.legal-content h3 { font-size: 1.05rem; margin: 1rem 0 0.5rem; }
.legal-content p, .legal-content li { font-size: 0.95rem; }
.legal-content a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
.legal-content a:hover { color: var(--gold-dark); }
.legal-note { background: var(--tan-light); border-left: 4px solid var(--gold); border-radius: 8px; padding: 0.9rem 1.1rem; margin: 1rem 0; font-size: 0.92rem; }
.legal-note strong { color: var(--ink); }

/* ── UTILITY PAGES (thank-you / 404) ── */
.utility-main { display: flex; align-items: center; justify-content: center; min-height: 50vh; padding: 2rem 0; }
.utility-card { max-width: 32rem; text-align: center; }
.utility-card .code { font-family: 'Playfair Display', Georgia, serif; font-weight: 900; font-size: 3.5rem; color: var(--gold); line-height: 1; margin-bottom: 0.5rem; }
.utility-links { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.utility-links a { font-size: 0.85rem; font-weight: 600; text-decoration: none; color: var(--ink); background: var(--light-green); padding: 8px 16px; border-radius: 100px; }
.utility-links a:hover { background: var(--gold); color: #fff; }
