/* ============================================================
   ICG v3 — INNER PAGES SKIN
   Loads after main/components/forms/responsive. Re-themes every inner
   page (About, I'm New, Sermons, Ministries, Events, Membership, Give,
   Contact, Prayer, Join a Unit, legal, blog) to match the v3 homepage:
   black → crimson gradients, #FFD200 accents, pill buttons, soft cards.
   Everything is scoped to body.v3-body so the WP admin is untouched.
   ============================================================ */

/* ── 1. Design tokens: remap the old variables ───────────────── */
body.v3-body {
  --red-deep: #6B0F1A;
  --red-core: #D01F2E;
  --red-bright: #F0424F;
  --gold: #FFD200;
  --gold-dim: #E6BC00;
  --charcoal: #0B0708;
  --charcoal-2: #170E10;
  --charcoal-3: #2A1A1D;
  --charcoal-4: #3E2A2E;
  --cream: #FBF8F3;
  --off-white: #FBF8F3;
  --gray-light: #EDE3E1;
  --text-primary: #1C1416;
  --text-secondary: #5F5457;
  --text-light: #968A8D;
  --grad-red: linear-gradient(135deg, #D01F2E 0%, #7A1019 60%, #0B0708 130%);
  --grad-dark: linear-gradient(160deg, #0B0708 0%, #220A0E 100%);
  --grad-overlay: linear-gradient(155deg, rgba(11,7,8,.88) 0%, rgba(58,12,18,.86) 60%, rgba(143,20,32,.8) 130%);
  --grad-hero: var(--grad-overlay);
  --shadow-red: 0 10px 30px rgba(208,31,46,.28);
  --shadow-gold: 0 10px 30px rgba(255,210,0,.25);
  --radius-md: 14px;
  --radius-lg: 20px;
  --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --header-h: 68px;
  --section-py: 84px;
  font-family: var(--font-body);
  background: #FBF8F3;
}
@media (max-width: 760px) { body.v3-body { --section-py: 56px; } }

/* ── 2. Typography ───────────────────────────────────────────── */
body.v3-body :is(h1,h2,h3,h4,h5) { font-family: var(--font-heading); letter-spacing: -.02em; }
body.v3-body :is(h1,h2) { font-weight: 800; }
body.v3-body :is(h3,h4) { font-weight: 700; }
body.v3-body :is(h1,h2,h3,h4) em {
  font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-style: italic; letter-spacing: -.01em;
}
body.v3-body a { transition: color .15s; }

/* Section header: eyebrow + title + gold bar */
body.v3-body .icg-section-label {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; color: var(--red-core);
}
body.v3-body .icg-section-label--light { color: var(--gold); }
body.v3-body .icg-section-title { font-weight: 800; letter-spacing: -.025em; }
body.v3-body .icg-title-accent { height: 4px; width: 44px; border-radius: 4px; background: var(--gold); }
body.v3-body .icg-section-subtitle { color: var(--text-secondary); }

/* ── 3. Buttons: pills ───────────────────────────────────────── */
body.v3-body .icg-btn {
  border-radius: 999px; font-weight: 700; letter-spacing: 0; min-height: 46px;
  transition: transform .2s, background .2s, box-shadow .2s, border-color .2s, color .2s;
}
body.v3-body .icg-btn-primary { background: linear-gradient(135deg, #D01F2E, #8F1420); color: #fff; border: 0; }
body.v3-body .icg-btn-primary:hover { background: linear-gradient(135deg, #E42537, #A11624); color: #fff; opacity: 1; }
body.v3-body .icg-btn-gold { background: var(--gold); color: #0B0708; border: 0; }
body.v3-body .icg-btn-gold:hover { background: #FFDD33; color: #0B0708; }
body.v3-body .icg-btn-ghost { border: 1.5px solid #EDE3E1; background: #fff; color: var(--text-primary); }
body.v3-body .icg-btn-ghost:hover { border-color: var(--red-core); color: var(--red-core); background: #FDECEC; }
body.v3-body .icg-btn-ghost-light,
body.v3-body .icg-btn-outline-light { border: 1.5px solid rgba(255,255,255,.35); color: #fff; background: transparent; }
body.v3-body .icg-btn-ghost-light:hover,
body.v3-body .icg-btn-outline-light:hover { border-color: #fff; background: rgba(255,255,255,.1); color: #fff; }
body.v3-body .icg-btn-outline { border: 1.5px solid var(--red-core); color: var(--red-core); background: transparent; }
body.v3-body .icg-btn-outline:hover { background: var(--red-core); color: #fff; }

/* ── 4. Interior hero: one consistent black → crimson banner ─── */
body.v3-body .icg-interior-hero {
  min-height: 0; padding: 88px 0 72px; align-items: flex-end;
  background-color: #0B0708;
  background-image: linear-gradient(155deg, #0B0708 12%, #2B0A10 55%, #8F1420 135%);
  background-size: cover; background-position: center;
}
body.v3-body .icg-interior-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(55% 60% at 88% 10%, rgba(208,31,46,.5), transparent 70%),
              radial-gradient(35% 45% at 0% 100%, rgba(255,210,0,.14), transparent 70%);
}
body.v3-body .icg-interior-hero-overlay {
  background: linear-gradient(160deg, rgba(11,7,8,.72) 0%, rgba(43,10,16,.66) 60%, rgba(143,20,32,.5) 130%);
}
body.v3-body .icg-interior-hero-content { max-width: 760px; }
body.v3-body .icg-interior-hero-label {
  color: var(--gold); font-weight: 800; letter-spacing: .14em; background: rgba(255,210,0,.1);
  border: 1px solid rgba(255,210,0,.28); padding: 7px 14px; border-radius: 999px;
}
body.v3-body .icg-interior-hero-title {
  font-family: var(--font-heading); font-weight: 800; letter-spacing: -.035em; line-height: 1.05;
  font-size: clamp(36px, 6vw, 68px); color: #fff;
}
body.v3-body .icg-interior-hero-title em {
  font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-style: italic; letter-spacing: -.01em;
  background: none; -webkit-text-fill-color: var(--gold); color: var(--gold);
}
body.v3-body .icg-interior-hero-sub { color: #dccfd0; font-size: clamp(16px, 2vw, 18px); max-width: 560px; }
body.v3-body .icg-interior-hero-scroll { display: none; }
@media (min-width: 900px) { body.v3-body .icg-interior-hero { padding: 120px 0 96px; } }

/* ── 5. Cards ────────────────────────────────────────────────── */
body.v3-body :is(
  .icg-about-mv-card, .icg-about-name-card, .icg-archive-card, .icg-blog-card, .icg-contact-card,
  .icg-contact-form-card, .icg-contact-info-card, .icg-contact-prayer-card, .icg-cq-card, .icg-event-card,
  .icg-events-cs-card, .icg-events-reg-card, .icg-faith-card, .icg-give-card, .icg-jau-card,
  .icg-leader-card, .icg-legal-contact-card, .icg-min-unit-card, .icg-min-values-card,
  .icg-ministry-card, .icg-form-panel, .icg-covenant-box
) {
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(28,8,12,.05), 0 12px 32px -14px rgba(28,8,12,.18);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
body.v3-body :is(.icg-archive-card, .icg-blog-card, .icg-event-card, .icg-jau-card, .icg-leader-card,
  .icg-min-unit-card, .icg-ministry-card, .icg-give-card, .icg-cq-card, .icg-contact-card):hover {
  transform: translateY(-4px);
  box-shadow: 0 2px 4px rgba(28,8,12,.06), 0 22px 44px -16px rgba(28,8,12,.28);
}
body.v3-body :is(.icg-archive-card, .icg-blog-card, .icg-event-card, .icg-ministry-card, .icg-leader-card) img,
body.v3-body :is(.icg-archive-card, .icg-blog-card, .icg-event-card, .icg-ministry-card) [class*="-image"],
body.v3-body :is(.icg-archive-card, .icg-blog-card, .icg-event-card, .icg-ministry-card) [class*="-thumb"] {
  border-radius: 0;
}

/* ── 6. Forms ────────────────────────────────────────────────── */
body.v3-body .icg-field-label { font-weight: 700; color: var(--text-primary); }
body.v3-body :is(.icg-input, .icg-select, .icg-textarea) {
  border: 1.5px solid #E4D8D6; border-radius: 12px; background: #fff; font-family: var(--font-body);
  transition: border-color .15s, box-shadow .15s;
}
body.v3-body :is(.icg-input, .icg-select, .icg-textarea):focus {
  outline: none; border-color: var(--red-core); box-shadow: 0 0 0 4px rgba(208,31,46,.12);
}
body.v3-body .icg-checkbox-card-inner, body.v3-body .icg-unit-select-card-inner { border-radius: 14px; }

/* ── 7. Misc polish ──────────────────────────────────────────── */
body.v3-body .icg-breadcrumbs a:hover { color: var(--red-core); }
body.v3-body ::selection { background: var(--gold); color: #0B0708; }
body.v3-body :focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
body.v3-body .icg-video-modal-close { border-radius: 999px; }

/* ── About: Ministry Pillars, modern card redesign ───────────── */
body.v3-body .icg-about-pillars-section {
  background: linear-gradient(180deg, #0B0708 0%, #1B090D 60%, #2B0A10 100%);
}
body.v3-body .icg-about-pillars-bg {
  background: radial-gradient(50% 45% at 90% 0%, rgba(208,31,46,.35), transparent 70%),
              radial-gradient(35% 35% at 0% 100%, rgba(255,210,0,.08), transparent 70%);
}
body.v3-body .icg-about-pillars-grid { gap: 18px; }
body.v3-body .icg-pillar-card {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px 26px 24px;
  background: linear-gradient(160deg, rgba(255,255,255,.07) 0%, rgba(255,255,255,.025) 100%);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 22px;
  backdrop-filter: blur(6px);
  transition: transform .3s ease, border-color .3s ease, background .3s ease, box-shadow .3s ease;
}
body.v3-body .icg-pillar-card::before {           /* gold top edge that grows on hover */
  content: ''; position: absolute; left: 26px; top: 0; height: 3px; width: 44px;
  background: #FFD200; border-radius: 0 0 4px 4px; transition: width .35s ease;
}
body.v3-body .icg-pillar-card:hover {
  transform: translateY(-5px);
  background: linear-gradient(160deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.04) 100%);
  border-color: rgba(255,210,0,.45);
  box-shadow: 0 24px 50px -24px rgba(0,0,0,.7), 0 0 0 1px rgba(255,210,0,.12);
}
body.v3-body .icg-pillar-card:hover::before { width: calc(100% - 52px); }
body.v3-body .icg-pillar-card-top { margin: 6px 0 4px; align-items: flex-start; }
body.v3-body .icg-pillar-num {
  font-family: var(--font-heading); font-size: 46px; font-weight: 800; line-height: 1; letter-spacing: -.04em;
  color: #FFD200; -webkit-text-fill-color: #FFD200; background: none; filter: none; opacity: 1;
  font-variant-numeric: tabular-nums;
}
body.v3-body .icg-pillar-icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  color: #FFD200; background: rgba(255,210,0,.10); border: 1px solid rgba(255,210,0,.22);
}
body.v3-body .icg-pillar-icon svg { width: 22px; height: 22px; }
body.v3-body .icg-pillar-title { font-size: 19px; font-weight: 700; letter-spacing: -.015em; color: #fff; }
body.v3-body .icg-pillar-desc { font-size: 14.5px; line-height: 1.7; color: rgba(255,255,255,.68); }
body.v3-body .icg-pillar-verse {
  align-self: flex-start; margin-top: auto; padding: 6px 12px; border: 1px solid rgba(255,210,0,.3);
  border-radius: 999px; background: rgba(255,210,0,.07); color: #FFD200;
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
}
@media (max-width: 640px) {
  body.v3-body .icg-pillar-card { padding: 24px 20px 20px; }
  body.v3-body .icg-pillar-num { font-size: 38px; }
}
body.v3-body .icg-pillar-icon svg { stroke: #FFD200; color: #FFD200; }

/* ── Join a Unit: modern list rows (no icon, no description) ─── */
body.v3-body .icg-jau-units-section { background: transparent; }
body.v3-body .icg-jau-list { display: flex; flex-direction: column; gap: 10px; max-width: 820px; margin: 0 auto 28px; }
body.v3-body .icg-jau-list .icg-jau-card {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 16px;
  padding: 16px 20px; background: #fff; border: 1.5px solid #EDE3E1; border-radius: 18px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(28,8,12,.04); transition: border-color .2s, box-shadow .2s, transform .2s, background .2s;
}
body.v3-body .icg-jau-list .icg-jau-card:hover { border-color: #D01F2E; transform: translateX(4px); box-shadow: 0 14px 30px -18px rgba(28,8,12,.3); }
body.v3-body .icg-jau-list .icg-jau-card.selected { border-color: #D01F2E; background: #FFF6F6; box-shadow: 0 0 0 4px rgba(208,31,46,.12); }
body.v3-body .icg-jau-num { font-size: 15px; font-weight: 800; letter-spacing: .04em; color: #B89600; font-variant-numeric: tabular-nums; }
body.v3-body .icg-jau-main { min-width: 0; }
body.v3-body .icg-jau-list .icg-jau-title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin: 0; color: var(--text-primary); }
body.v3-body .icg-jau-list .icg-jau-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 12.5px; color: var(--text-secondary); }
body.v3-body .icg-jau-side { display: flex; align-items: center; gap: 12px; }
body.v3-body .icg-jau-check {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid #E4D8D6; display: grid; place-items: center; color: transparent; transition: .2s;
}
body.v3-body .icg-jau-card.selected .icg-jau-check { background: #FFD200; border-color: #FFD200; color: #0B0708; }
body.v3-body .icg-jau-card:not(.icg-jau-card--full):hover .icg-jau-check { border-color: #D01F2E; }
body.v3-body .icg-jau-card--full { opacity: .55; cursor: not-allowed; }
/* the "Good pick" bar must stay hidden until a unit is chosen */
body.v3-body .icg-jau-selected-bar[hidden] { display: none; }
body.v3-body .icg-jau-selected-bar { border-radius: 18px; background: #FFF6F6; border-color: rgba(208,31,46,.25); }
@media (max-width: 520px) {
  body.v3-body .icg-jau-list .icg-jau-card { grid-template-columns: 34px 1fr auto; gap: 12px; padding: 14px 16px; }
  body.v3-body .icg-jau-side .icg-jau-badge { display: none; }
}

/* ── Link hover colours ──────────────────────────────────────────
   The old theme turned every link dark red (#780000) on hover, which is invisible on black
   and crimson sections. Links now go to a bright red on light backgrounds and to gold on dark ones. */
:where(body.v3-body) a:hover { color: #E63946; }
body.v3-body :is(
  .icg-interior-hero, .icg-welcome-hero, .icg-about-pillars-section, .icg-about-stats-strip, .icg-about-faith,
  .icg-about-join-cta, .icg-about-mv-card--mission, .icg-sfeatured-layout, .icg-events-spotlight-inner,
  .icg-events-newsletter-cta, .icg-class-notice, .icg-jau-member-notice, .icg-jau-reassure-strip,
  .icg-new-final-cta, .icg-new-service-card, .icg-testimonials--dark, .icg-prayer-verses,
  .icg-contact-prayer-card, .icg-contact-info-card, .icg-give-card--primary, .icg-event-card--dark,
  .icg-footer, .v3-footer, .v3-serve, .v3-hero, .v3-give, .v3-strip, .v3-drawer
) a:not(.icg-btn):not(.v3-btn):not(.v3-u):not(.v3-m):hover { color: #FFD200; }
/* on-card text links that sit inside dark cards inside light sections */
body.v3-body .icg-pillar-card a:hover, body.v3-body .icg-sfeatured-info a:hover, body.v3-body .icg-events-spotlight-info a:hover { color: #FFD200; }

/* ============================================================
   MOBILE / RESPONSIVE PASS
   Tested widths: 320, 360, 375, 414 (phones) and 768 (tablet).
   ============================================================ */
body.v3-body { overflow-x: hidden; }
body.v3-body img, body.v3-body video, body.v3-body iframe, body.v3-body svg { max-width: 100%; }
body.v3-body :is(.icg-input, .icg-select, .icg-textarea) { font-size: 16px; }   /* 16px stops iOS zooming into fields */
.v3-drawer { height: 100vh; height: 100dvh; }
.v3-dock { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }

@media (max-width: 900px) {
  body.v3-body .icg-container { padding-left: 20px; padding-right: 20px; }
  body.v3-body .icg-about-pillars-grid, body.v3-body .icg-about-values-grid, body.v3-body .icg-about-name-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  /* heroes */
  body.v3-body .icg-interior-hero { padding: 52px 0 44px; }
  body.v3-body .icg-welcome-hero { padding: 52px 0 44px; }
  body.v3-body .icg-interior-hero-title, body.v3-body .icg-welcome-hero-title { font-size: clamp(32px, 9.5vw, 44px); }
  body.v3-body .icg-interior-hero-sub, body.v3-body .icg-welcome-hero-sub { font-size: 16px; }
  body.v3-body .icg-interior-hero-actions { flex-direction: column; align-items: stretch; }
  body.v3-body .icg-interior-hero-actions .icg-btn { width: 100%; }
  body.v3-body .icg-wh-cue { width: 100%; }
  body.v3-body .icg-section-header { margin-bottom: 32px; }
  body.v3-body .icg-section-title { font-size: clamp(26px, 7.5vw, 34px); }

  /* buttons are easy to tap */
  body.v3-body .icg-btn { min-height: 48px; }
  body.v3-body .icg-btn-lg { padding-left: 24px; padding-right: 24px; }

  /* about */
  body.v3-body .icg-about-stats-strip .icg-container > div, body.v3-body .icg-about-stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* sermons */
  body.v3-body .icg-sfeatured { padding-top: 36px; }
  body.v3-body .icg-sfeatured-layout, body.v3-body .icg-events-spotlight-inner { border-radius: 22px; }
  body.v3-body .icg-sfeatured-media { min-height: 0; aspect-ratio: 16 / 10; }
  body.v3-body .icg-sfeatured-play { width: 64px; height: 64px; box-shadow: 0 0 0 8px rgba(255,210,0,.25); }
  body.v3-body .icg-sfeatured-info, body.v3-body .icg-events-spotlight-info { padding: 24px 20px 26px; }
  body.v3-body .icg-sfeatured-actions, body.v3-body .icg-events-spotlight-info > div[style] { flex-direction: column; }
  body.v3-body .icg-sfeatured-actions .icg-btn, body.v3-body .icg-events-spotlight-info .icg-btn { width: 100%; }
  body.v3-body .icg-slibrary { padding: 44px 0 28px; }
  body.v3-body .icg-sc-grid, body.v3-body .icg-events-grid { grid-template-columns: 1fr; gap: 18px; }
  body.v3-body .icg-sfilters-inner { padding: 10px; }
  body.v3-body .icg-sfilter-group { flex: 1 1 100%; }

  /* events */
  body.v3-body .icg-events-spotlight { padding-top: 36px; }
  body.v3-body .icg-events-spotlight-media { min-height: 0; aspect-ratio: 16 / 10; }
  body.v3-body .icg-events-header-row { flex-direction: column; align-items: flex-start; }
  body.v3-body .icg-events-filter { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; width: 100%; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  body.v3-body .icg-events-filter::-webkit-scrollbar { display: none; }
  body.v3-body .icg-filter-pill { flex: none; }
  body.v3-body .icg-events-newsletter-cta { margin: 0 12px 48px; border-radius: 26px; }
  body.v3-body .icg-events-newsletter-cta-inner { padding: 40px 20px; }
  body.v3-body .icg-events-newsletter-cta-actions .icg-btn { width: 100%; }
  body.v3-body .icg-sermons-empty-hero, body.v3-body .icg-events-empty-inner { padding: 32px 18px; border-radius: 22px; }
  body.v3-body .icg-events-empty-actions .icg-btn { width: 100%; }

  /* forms */
  body.v3-body .icg-form-wrap { padding: 24px 18px; border-radius: 22px; }
  body.v3-body .icg-form-header { flex-direction: column; gap: 12px; }
  body.v3-body .icg-field-row { grid-template-columns: 1fr; }
  body.v3-body .icg-form-nav { flex-direction: column-reverse; }
  body.v3-body .icg-form-nav .icg-btn, body.v3-body .icg-form-wrap .icg-btn-lg { width: 100%; }
  body.v3-body .icg-form-steps { padding: 10px 12px; }
  body.v3-body .icg-class-notice { flex-direction: column; }
  body.v3-body .icg-membership-page { padding: 36px 0 64px; }
  body.v3-body .icg-prayer-page { padding: 44px 0 64px; }
  body.v3-body .icg-jau-selected-bar { flex-direction: column; align-items: stretch; text-align: center; }
  body.v3-body .icg-jau-selected-bar .icg-btn { width: 100%; }
}

@media (max-width: 380px) {
  body.v3-body .icg-container { padding-left: 16px; padding-right: 16px; }
  body.v3-body .icg-interior-hero-title { font-size: 30px; }
  body.v3-body .icg-radio-grid { grid-template-columns: 1fr 1fr; }
}

/* subtitles on dark sections must stay readable (the base subtitle colour was overriding the "light" variant) */
body.v3-body .icg-section-subtitle.icg-section-subtitle--light,
body.v3-body :is(.icg-about-pillars-section, .icg-about-faith, .icg-about-join-cta, .icg-min-final-cta, .icg-events-newsletter-cta, .icg-sseries-strip--dark) .icg-section-subtitle {
  color: rgba(255,255,255,.82);
}
body.v3-body :is(.icg-about-pillars-section, .icg-about-faith) .icg-section-header p { color: rgba(255,255,255,.82); }
