/* Rumworth Community Alliance — brand colours from the Rumworth Together logo */
:root {
  --navy: #1c3564;
  --navy-dark: #14264a;
  --gold: #d9a520;
  --green: #2e8b3a;
  --ink: #22293a;
  --muted: #5a6274;
  --bg: #ffffff;
  --bg-alt: #f4f6fa;
  --border: #dfe4ee;
  --radius: 12px;
  --font-head: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/assets/fonts/playfair-latin-var.woff2') format('woff2');
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}
img { max-width: 100%; height: auto; }
a { color: var(--navy); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); line-height: 1.2; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: 8px 16px; z-index: 100;
}
.skip-link:focus { left: 0; }

/* header */
.site-header {
  background: var(--navy);
  border-bottom: 4px solid var(--gold);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 8px 0; }
.brand img { border-radius: 50%; background: #fff; }
.brand-text {
  color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; line-height: 1.15;
  max-width: 220px;
}
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; align-items: center; flex-wrap: wrap; }
.site-nav a, .nav-drop-btn {
  display: block; color: #fff; text-decoration: none; padding: 10px 14px; border-radius: 8px;
  font-size: 0.98rem; background: none; border: 0; cursor: pointer; font-family: var(--font-body);
}
.site-nav a:hover, .nav-drop-btn:hover { background: rgba(255, 255, 255, 0.12); }
.site-nav a[aria-current="page"] { background: rgba(217, 165, 32, 0.25); color: #ffd977; }
.has-dropdown { position: relative; }
.site-nav ul.dropdown {
  display: none; position: absolute; right: 0; top: 100%; background: #fff; min-width: 210px;
  border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(16, 24, 48, 0.18);
  padding: 6px; flex-direction: column; gap: 0;
}
.dropdown a { color: var(--ink); padding: 9px 12px; }
.dropdown a:hover { background: var(--bg-alt); }
.site-nav .has-dropdown.open ul.dropdown { display: flex; }
.caret { font-size: 0.7em; }

.nav-toggle { display: none; margin-left: auto; background: none; border: 0; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: #fff; margin: 5px 0; border-radius: 2px; transition: 0.2s; }

/* hero */
.hero {
  background: linear-gradient(180deg, var(--navy) 0%, #24437e 100%);
  color: #fff; text-align: center; padding: 56px 0 64px;
}
.hero-logo { border-radius: 50%; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35); width: 240px; height: 240px; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 24px 0 8px; }
.hero-sub { font-size: 1.15rem; color: #dbe4f5; max-width: 640px; margin: 0 auto 24px; }

.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px; text-decoration: none; font-weight: 600;
  border: 2px solid transparent; cursor: pointer; font-size: 1rem;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: #257030; }
.btn-gold { background: var(--gold); color: #241a02; }
.btn-gold:hover { background: #c1920e; }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: #fff; }

/* sections */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { text-align: center; font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin: 0 0 36px; }
.page-hero {
  background: linear-gradient(180deg, var(--navy) 0%, #24437e 100%);
  color: #fff; padding: 44px 0; border-bottom: 4px solid var(--gold);
}
.page-hero h1 { color: #fff; margin: 0; font-size: clamp(1.9rem, 4vw, 2.8rem); }
.page-hero .news-date { color: #dbe4f5; margin: 8px 0 0; }

/* prose (CMS content) */
.prose { max-width: 780px; }
.prose h2 { margin-top: 2.2em; font-size: 1.7rem; }
.prose h2:first-child { margin-top: 0; }
.prose figure { margin: 2em 0; }
.prose figure img { border-radius: var(--radius); width: 100%; object-fit: cover; }
.prose img { border-radius: var(--radius); }
.prose blockquote {
  border-left: 4px solid var(--gold); margin: 1.5em 0; padding: 0.5em 1.2em; background: var(--bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* home cards — also available inside CMS content */
.prose-home { max-width: 1080px; }
.prose-home > h2 { text-align: center; font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; margin-top: 36px; }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 6px 18px rgba(16, 24, 48, 0.06); display: flex; flex-direction: column;
}
.card img { width: 100%; aspect-ratio: 1.25; object-fit: cover; border-radius: 0; }
.card h3 { margin: 18px 20px 8px; font-size: 1.35rem; }
.card p { margin: 0 20px 22px; color: var(--muted); }

/* carousel */
.carousel { position: relative; overflow: hidden; border-radius: var(--radius); }
.carousel-track {
  list-style: none; display: flex; margin: 0; padding: 0; transition: transform 0.45s ease;
}
.carousel-slide { min-width: 100%; position: relative; }
.carousel-slide img { width: 100%; height: 480px; object-fit: cover; display: block; }
.slide-caption {
  position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(12, 20, 40, 0.75));
  color: #fff; padding: 28px 20px 14px; font-size: 0.98rem;
}
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  background: rgba(255, 255, 255, 0.9); border: 0; width: 44px; height: 44px; border-radius: 50%;
  font-size: 1.1rem; cursor: pointer; color: var(--navy); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.carousel-btn:hover { background: #fff; }
.carousel-btn.prev { left: 14px; }
.carousel-btn.next { right: 14px; }

/* gallery grid */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.gallery-item { margin: 0; }
.gallery-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); }
.gallery-item figcaption { font-size: 0.9rem; color: var(--muted); padding: 6px 4px 0; }

/* news */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.news-card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 6px 18px rgba(16, 24, 48, 0.06); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.news-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(16, 24, 48, 0.12); }
.news-card img { width: 100%; aspect-ratio: 1.9; object-fit: cover; }
.news-card-body { padding: 16px 18px 20px; }
.news-card h3 { margin: 0 0 6px; font-size: 1.2rem; }
.news-date { color: var(--gold); font-weight: 600; font-size: 0.88rem; margin: 0 0 8px; }
.news-card p:last-child { margin: 0; color: var(--muted); font-size: 0.95rem; }

.contact-line { margin: 0.4em 0; }

/* footer */
.site-footer { background: var(--navy); color: #cdd8ec; margin-top: 40px; border-top: 4px solid var(--gold); }
.footer-inner { text-align: center; padding: 34px 20px; }
.footer-logo { border-radius: 50%; background: #fff; }
.site-footer a { color: #ffd977; }
.site-footer p { margin: 8px 0; }

/* responsive nav */
@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .brand-text { font-size: 1rem; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--navy); border-bottom: 4px solid var(--gold); padding: 8px 12px 16px;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .dropdown { position: static; box-shadow: none; border: 0; background: rgba(255, 255, 255, 0.07); }
  .dropdown a { color: #fff; }
  .dropdown a:hover { background: rgba(255, 255, 255, 0.12); }
  .carousel-slide img { height: 320px; }
}
