/* ==========================================================================
   Parish Church of St Mary the Virgin, Selling
   Modern, fully responsive stylesheet (Heritage Forest & Gold Logo Palette)
   ========================================================================== */

:root {
  --bg-page: #f5f3ec;
  --bg-surface: #ffffff;
  --bg-card: #fbfaf6;
  --bg-subtle: #ece8dc;
  --bg-callout: #f2f6f3;
  --text-primary: #1a2e22;
  --text-body: #334238;
  --text-muted: #5e6d63;
  --logo-green-light: #356849;
  --logo-green-dark: #1f422d;
  --logo-gold: #c59b5f;
  --logo-gold-soft: #f5ecdc;
  --logo-gold-border: #dfc69f;
  --accent-primary: #2b583d;
  --accent-hover: #1b3b28;
  --accent-soft: #e3eee7;
  --border-light: #e2ddd0;
  --border-medium: #cfc8b6;
  --shadow-sm: 0 2px 6px rgba(26, 46, 34, 0.06);
  --shadow-md: 0 10px 30px rgba(26, 46, 34, 0.08);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --container-max: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  color: var(--text-body);
  background-color: var(--bg-page);
  background-image: radial-gradient(circle at 50% 0%, rgba(53, 104, 73, 0.06) 0%, transparent 70%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--logo-green-dark);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--logo-gold);
  text-decoration: none;
  font-weight: 600;
  z-index: 1000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   Header & Navigation Bar
   ========================================================================== */

.site-header {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  border-top: 4px solid var(--logo-green-light);
  border-bottom: 2px solid var(--logo-gold);
  box-shadow: 0 2px 12px rgba(26, 46, 34, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.branding {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-link {
  display: inline-flex;
  flex-shrink: 0;
  border-radius: 12px;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.logo-link:hover {
  transform: translateY(-1px);
  filter: drop-shadow(0 4px 8px rgba(31, 66, 45, 0.22));
}

.site-logo {
  display: block;
  width: 54px;
  height: 54px;
}

.site-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--logo-green-dark);
  letter-spacing: -0.015em;
}

.site-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-title a:hover,
.site-title a:focus {
  color: var(--logo-green-light);
}

/* Top Navigation Bar */
.nav-card {
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
}

.nav-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.menu-list li {
  margin: 0;
}

.menu-list a {
  display: inline-block;
  padding: 8px 15px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 0.925rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.menu-list a:hover,
.menu-list a:focus {
  background-color: var(--accent-soft);
  border-color: rgba(53, 104, 73, 0.2);
  color: var(--logo-green-dark);
}

.menu-list a.active,
.menu-list a[aria-current="page"] {
  background: linear-gradient(135deg, var(--logo-green-light) 0%, var(--logo-green-dark) 100%);
  color: #ffffff;
  font-weight: 600;
  border-color: var(--logo-green-dark);
  box-shadow: inset 0 -2px 0 var(--logo-gold), 0 2px 6px rgba(31, 66, 45, 0.18);
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */

.layout-columns {
  flex: 1;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) 24px;
}

.main-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-top: 4px solid var(--logo-green-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(24px, 4vw, 48px);
}

.page-header {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}

.page-header::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 88px;
  height: 3px;
  background: linear-gradient(90deg, var(--logo-gold) 0%, var(--logo-green-light) 100%);
  border-radius: 2px;
}

.page-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--logo-green-dark);
  line-height: 1.25;
}

/* Body Typography & Links */
.content-body {
  font-size: 1.05rem;
}

.content-body p {
  margin: 0 0 1.15rem;
}

.content-body p:last-child {
  margin-bottom: 0;
}

.content-body strong {
  color: var(--logo-green-dark);
}

.content-body a {
  color: var(--logo-green-light);
  text-decoration: underline;
  text-decoration-color: var(--logo-gold);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  font-weight: 600;
  word-break: break-word;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.content-body a:hover,
.content-body a:focus {
  color: var(--logo-green-dark);
  text-decoration-color: var(--logo-green-dark);
}

.content-body ul {
  margin: 0 0 1.5rem;
  padding-left: 1.5rem;
}

.content-body li {
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

.content-body li::marker {
  color: var(--logo-gold);
}

/* ==========================================================================
   Page-Specific Components
   ========================================================================== */

/* Home / Welcome Grid */
.welcome-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
}

.featured-image-wrapper {
  margin: 0;
  text-align: center;
}

.featured-image {
  display: block;
  width: 100%;
  max-width: 450px;
  height: auto;
  margin: 0 auto;
  padding: 5px;
  background: linear-gradient(135deg, var(--logo-green-light) 0%, var(--logo-green-dark) 100%);
  border-radius: var(--radius-md);
  border: 2px solid var(--logo-gold);
  box-shadow: 0 12px 28px rgba(31, 66, 45, 0.16);
}

/* Church Fees Grid */
.fees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.fees-group {
  padding: 22px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--logo-gold);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fees-group > p {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--logo-green-dark);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.fees-subitems {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 12px;
  border-left: 2px solid var(--accent-soft);
}

.fees-subitems p {
  margin: 0;
  font-size: 0.96rem;
  color: var(--text-body);
}

.fees-note {
  margin-top: 8px;
  padding: 16px 20px;
  background: var(--bg-callout);
  border: 1px solid var(--accent-soft);
  border-left: 4px solid var(--logo-green-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.95rem;
  color: var(--text-body);
}

/* Find Us Map Section */
.field-section {
  margin-bottom: 24px;
}

.field-section:last-child {
  margin-bottom: 0;
}

.address-box {
  padding: 18px 22px;
  background: linear-gradient(135deg, var(--logo-green-light) 0%, var(--logo-green-dark) 100%);
  border: 1px solid var(--logo-gold);
  border-left: 5px solid var(--logo-gold);
  border-radius: var(--radius-md);
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-sm);
}

.map-container {
  width: 100%;
  height: 440px;
  border: 2px solid var(--logo-gold);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-subtle);
  box-shadow: var(--shadow-md);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Safeguarding Policy Statement */
.policy-heading {
  text-align: center;
  margin-bottom: 24px;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--logo-green-light) 0%, var(--logo-green-dark) 100%);
  border: 1px solid var(--logo-gold);
  border-bottom: 3px solid var(--logo-gold);
  border-radius: var(--radius-md);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.policy-heading p {
  margin: 4px 0;
  color: #ffffff;
}

.policy-heading strong {
  color: #ffffff;
  letter-spacing: 0.03em;
}

.policy-helplines {
  margin-top: 24px;
  padding: 20px 24px;
  background: var(--bg-callout);
  border: 1px solid var(--accent-soft);
  border-left: 4px solid var(--logo-gold);
  border-radius: var(--radius-sm);
}

/* Contact Us Cards */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.contact-card {
  padding: 22px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--logo-green-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.contact-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(31, 66, 45, 0.1);
  border-top-color: var(--logo-gold);
}

.contact-card p {
  margin: 0 0 0.6rem;
  font-size: 0.98rem;
}

.contact-card p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: linear-gradient(135deg, var(--logo-green-light) 0%, var(--logo-green-dark) 100%);
  border-top: 3px solid var(--logo-gold);
  color: #e6efe9;
  padding: 44px 24px 28px;
  font-size: 0.92rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(197, 155, 95, 0.35);
  text-align: left;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.footer-logo {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.footer-heading {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.01em;
}

.footer-brand .footer-heading {
  margin: 0;
}

.footer-col p {
  margin: 0 0 8px;
  color: #d8e6dc;
  line-height: 1.55;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 6px;
}

.footer-links a {
  color: #e6efe9;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.footer-links a:hover,
.footer-links a:focus {
  color: var(--logo-gold-soft);
  text-decoration: underline;
  text-decoration-color: var(--logo-gold);
}

.footer-bottom {
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  color: #cfe0d4;
}

.footer-bottom p {
  margin: 0;
}

.site-footer a {
  color: var(--logo-gold-soft);
  text-decoration: underline;
  text-decoration-color: var(--logo-gold);
  text-underline-offset: 3px;
  font-weight: 600;
}

.site-footer a:hover,
.site-footer a:focus {
  color: #ffffff;
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */

@media (max-width: 820px) {
  .welcome-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 14px 16px;
    gap: 12px;
  }

  .site-logo {
    width: 44px;
    height: 44px;
  }

  .menu-list {
    gap: 4px;
  }

  .menu-list a {
    padding: 7px 11px;
    font-size: 0.86rem;
  }

  .layout-columns {
    padding: 16px 12px;
  }

  .main-content {
    padding: 22px 18px;
    border-radius: var(--radius-md);
  }

  .fees-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .map-container {
    height: 320px;
  }
}
