/* =============================================
   Clarkston Ward — Main Stylesheet
   ============================================= */

:root {
  --blue-dark:  #002D62;
  --blue-mid:   #004B97;
  --blue-light: #E8EFF8;
  --gold:       #B8960C;
  --gold-light: #F5E9B0;
  --white:      #FFFFFF;
  --gray-100:   #F7F8FA;
  --gray-200:   #E9ECEF;
  --gray-500:   #6C757D;
  --gray-700:   #495057;
  --gray-900:   #212529;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.10);
  --shadow-md:  0 4px 12px rgba(0,0,0,.12);
  --radius:     8px;
  --nav-h:      68px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
}

a { color: var(--blue-mid); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* ── Utility ── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }
.section    { padding: 4rem 0; }
.section-sm { padding: 2.5rem 0; }
.text-center { text-align: center; }
.text-muted  { color: var(--gray-500); }

.btn {
  display: inline-block;
  padding: .6rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: background .2s, transform .1s;
  border: 2px solid transparent;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--blue-mid); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-outline { background: transparent; color: var(--blue-mid); border-color: var(--blue-mid); }
.btn-outline:hover { background: var(--blue-light); }
.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: #9a7a08; }

/* ── Top Banner ── */
.top-banner {
  background: var(--blue-dark);
  color: rgba(255,255,255,.8);
  font-size: .8rem;
  text-align: center;
  padding: .35rem 1rem;
  letter-spacing: .02em;
}
.top-banner a { color: rgba(255,255,255,.8); }
.top-banner a:hover { color: var(--white); }

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 3px solid var(--blue-mid);
  box-shadow: var(--shadow-sm);
  height: var(--nav-h);
  display: flex;
  align-items: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
}
.nav-brand-icon {
  width: 42px;
  height: 42px;
  background: var(--blue-mid);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-brand-icon svg { fill: var(--white); width: 24px; height: 24px; }
.nav-brand-text { line-height: 1.2; }
.nav-brand-text strong { display: block; font-size: 1rem; color: var(--blue-dark); }
.nav-brand-text span   { font-size: .75rem; color: var(--gray-500); letter-spacing: .04em; text-transform: uppercase; }

.nav-links {
  display: flex;
  align-items: center;
  gap: .15rem;
  list-style: none;
}

.nav-links > li { position: relative; }

.nav-links > li > a {
  display: block;
  padding: .5rem .75rem;
  font-size: .88rem;
  font-weight: 500;
  color: var(--gray-700);
  border-radius: 6px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav-links > li > a:hover,
.nav-links > li > a.active {
  background: var(--blue-light);
  color: var(--blue-dark);
  text-decoration: none;
}
.nav-links > li > a.active { font-weight: 700; }

/* Dropdown */
.has-dropdown > a::after {
  content: ' ▾';
  font-size: .7rem;
  opacity: .6;
}
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 180px;
  list-style: none;
  padding: .4rem 0;
  z-index: 200;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { display: block; }
.dropdown li a {
  display: block;
  padding: .5rem 1rem;
  font-size: .87rem;
  color: var(--gray-700);
  transition: background .15s;
}
.dropdown li a:hover { background: var(--gray-100); color: var(--blue-dark); text-decoration: none; }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-700);
  margin: 5px 0;
  border-radius: 2px;
  transition: all .25s;
}

/* Mobile nav */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    padding: .5rem 1rem 1rem;
  }
  .nav-links.open { display: flex; }
  .dropdown {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
  }
  .has-dropdown:hover .dropdown { display: none; }
  .has-dropdown.open .dropdown  { display: block; }
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 60%, #1a6fb0 100%);
  color: var(--white);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .75;
  margin-bottom: .75rem;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.15rem;
  opacity: .88;
  max-width: 560px;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-actions .btn-white {
  background: var(--white);
  color: var(--blue-dark);
  border-color: var(--white);
}
.hero-actions .btn-white:hover { background: var(--blue-light); }
.hero-actions .btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.6);
}
.hero-actions .btn-outline-white:hover { background: rgba(255,255,255,.1); }

/* ── Info Bar (meeting times) ── */
.info-bar {
  background: var(--gold);
  color: var(--white);
  padding: 1rem 0;
}
.info-bar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
}
.info-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  font-weight: 500;
}
.info-item svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Section Headings ── */
.section-heading {
  text-align: center;
  margin-bottom: 3rem;
}
.section-heading .eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue-mid);
  margin-bottom: .5rem;
}
.section-heading h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: var(--blue-dark);
  margin-bottom: .6rem;
}
.section-heading p {
  color: var(--gray-500);
  max-width: 560px;
  margin: 0 auto;
}
.divider {
  width: 48px; height: 4px;
  background: var(--gold);
  border-radius: 2px;
  margin: .75rem auto 0;
}

/* ── Cards ── */
.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-icon {
  width: 48px; height: 48px;
  background: var(--blue-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.card-icon svg { width: 26px; height: 26px; fill: var(--blue-mid); }
.card-body { padding: 1.5rem; }
.card-body h3 { font-size: 1.05rem; font-weight: 700; color: var(--blue-dark); margin-bottom: .4rem; }
.card-body p  { font-size: .9rem; color: var(--gray-500); }

/* ── Leader Cards ── */
.leaders-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.leader-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 1rem;
  text-align: center;
}
.leader-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  border: 3px solid var(--blue-mid);
}
.leader-avatar svg { width: 36px; height: 36px; fill: var(--blue-mid); }
.leader-card h3 { font-size: .98rem; font-weight: 700; color: var(--blue-dark); }
.leader-card .leader-title { font-size: .82rem; color: var(--gold); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-top: .2rem; }
.leader-card .leader-contact { font-size: .82rem; color: var(--gray-500); margin-top: .5rem; }

/* ── Org Section Headers ── */
.org-header {
  background: var(--blue-dark);
  color: var(--white);
  padding: .75rem 1.25rem;
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: 2.5rem;
}
.org-group {
  border: 1px solid var(--gray-200);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 1.5rem;
}

/* ── Announcement Cards ── */
.announcement-list { display: flex; flex-direction: column; gap: 1.25rem; }
.announcement-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--blue-mid);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.announcement-card .ann-date {
  font-size: .78rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .3rem;
}
.announcement-card h3 { font-size: 1.05rem; color: var(--blue-dark); margin-bottom: .4rem; }
.announcement-card p  { font-size: .9rem; color: var(--gray-600); }

/* ── Calendar ── */
.calendar-table { width: 100%; border-collapse: collapse; }
.calendar-table th {
  background: var(--blue-dark);
  color: var(--white);
  padding: .75rem 1rem;
  text-align: left;
  font-size: .85rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.calendar-table td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  font-size: .9rem;
  vertical-align: top;
}
.calendar-table tr:last-child td { border-bottom: none; }
.calendar-table tr:hover td { background: var(--gray-100); }
.cal-date { font-weight: 700; color: var(--blue-dark); white-space: nowrap; }
.cal-badge {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.badge-ward    { background: var(--blue-light); color: var(--blue-dark); }
.badge-youth   { background: #E8F5E9; color: #2E7D32; }
.badge-rs      { background: #FCE4EC; color: #C62828; }
.badge-primary { background: #FFF8E1; color: #F57F17; }
.badge-elders  { background: #E3F2FD; color: #1565C0; }
.badge-other   { background: var(--gray-200); color: var(--gray-700); }

/* ── Page Hero (inner pages) ── */
.page-hero {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-mid));
  color: var(--white);
  padding: 3rem 0 2.5rem;
}
.page-hero .eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .7; margin-bottom: .5rem; }
.page-hero h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 800; }
.page-hero p  { opacity: .85; margin-top: .6rem; max-width: 560px; font-size: 1rem; }

/* ── Breadcrumb ── */
.breadcrumb {
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
  padding: .6rem 0;
  font-size: .82rem;
  color: var(--gray-500);
}
.breadcrumb a { color: var(--blue-mid); }
.breadcrumb span { margin: 0 .4rem; }

/* ── Content Blocks ── */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.5rem; color: var(--blue-dark); margin: 2rem 0 .7rem; }
.prose h3 { font-size: 1.15rem; color: var(--blue-dark); margin: 1.5rem 0 .5rem; }
.prose p  { margin-bottom: 1rem; color: var(--gray-700); }
.prose ul { padding-left: 1.4rem; margin-bottom: 1rem; color: var(--gray-700); }
.prose ul li { margin-bottom: .4rem; }
.prose .highlight-box {
  background: var(--blue-light);
  border-left: 4px solid var(--blue-mid);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
}

/* ── Two-col layout ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.two-col.flip { direction: rtl; }
.two-col.flip > * { direction: ltr; }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }

/* ── Contact Form ── */
.contact-form { max-width: 600px; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .4rem; color: var(--gray-700); }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: .65rem .9rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: inherit;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(0,75,151,.12);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-success {
  display: none;
  background: #E8F5E9;
  border: 1px solid #A5D6A7;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: #2E7D32;
  font-weight: 600;
  margin-top: 1rem;
}

/* ── Resource Links ── */
.resource-list { display: flex; flex-direction: column; gap: .75rem; }
.resource-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s, transform .15s;
}
.resource-item:hover { box-shadow: var(--shadow-md); transform: translateX(3px); text-decoration: none; }
.resource-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.resource-icon svg { width: 22px; height: 22px; fill: var(--blue-mid); }
.resource-item h4 { font-size: .95rem; font-weight: 700; color: var(--blue-dark); margin-bottom: .15rem; }
.resource-item p  { font-size: .82rem; color: var(--gray-500); margin: 0; }

/* ── Footer ── */
footer {
  background: var(--blue-dark);
  color: rgba(255,255,255,.75);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
}
@media (max-width: 680px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand strong { display: block; font-size: 1.05rem; color: var(--white); margin-bottom: .3rem; }
.footer-brand p { font-size: .85rem; line-height: 1.6; margin-top: .5rem; }
footer h4 { color: var(--white); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .8rem; }
footer ul { list-style: none; }
footer ul li { margin-bottom: .45rem; }
footer ul li a { color: rgba(255,255,255,.65); font-size: .88rem; transition: color .15s; }
footer ul li a:hover { color: var(--white); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 1.2rem;
  text-align: center;
  font-size: .8rem;
  color: rgba(255,255,255,.45);
}

/* ── Auxiliary pages ── */
.aux-hero-strip {
  height: 6px;
  background: var(--gold);
}
.org-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}
.org-card-header {
  padding: 1.25rem 1.5rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--white);
}
.org-card-header.rs      { background: #B71C1C; }
.org-card-header.ym      { background: #1A237E; }
.org-card-header.yw      { background: #880E4F; }
.org-card-header.primary { background: #E65100; }
.org-card-header.ss      { background: #1B5E20; }
.org-card-body { padding: 1.5rem; }

/* ── Ministering ── */
.ministering-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.ministering-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.ministering-card h3 { font-size: 1rem; font-weight: 700; color: var(--blue-dark); margin-bottom: .5rem; }
.ministering-card p  { font-size: .88rem; color: var(--gray-600); }

/* ── Responsive tweaks ── */
@media (max-width: 600px) {
  .section    { padding: 2.5rem 0; }
  .card-grid  { grid-template-columns: 1fr; }
  .leaders-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .info-bar-inner { flex-direction: column; gap: .75rem; }
  .hero { padding: 3rem 0 2.5rem; }
}
