/* Reborn Church — site styles */
@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600&family=Source+Sans+3:ital,wght@0,400;0,600;0,700;1,400&display=swap");

:root {
  --navy: #001b4c;
  --navy-2: #0a2a66;
  --teal: #0f6e78;
  --teal-dark: #0a565e;
  --bg: #f0f4fb;
  --card: #ffffff;
  --text: #2f3a48;
  --muted: #5d6b7c;
  --line: #d8e0ec;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 27, 76, .06), 0 6px 20px rgba(0, 27, 76, .07);
  --head: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 18px/1.65 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--teal); text-underline-offset: 2px; }
a:hover { color: var(--teal-dark); }
h1, h2, h3, h4, h5 { font-family: var(--head); color: var(--navy); line-height: 1.2; font-weight: 600; margin: 1.4em 0 .5em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-top: .4em; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.12rem; }
h5 { font-size: 1rem; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }
.center { text-align: center; }
:focus-visible { outline: 3px solid #f2b84b; outline-offset: 2px; }

/* ---------- header & navigation ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, .18); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 86px; }
.logo { flex: none; display: block; }
.logo img { display: block; width: 200px; height: auto; }
.site-nav { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 20px; }
.menu, .menu ul { list-style: none; margin: 0; padding: 0; }
.menu { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.menu > li { position: relative; display: flex; align-items: center; }
.menu a, .menu .sub-heading { display: block; color: #fff; text-decoration: none; padding: 10px 12px; border-radius: 8px; font: 600 16px/1.2 var(--body); background: none; border: 0; cursor: pointer; white-space: nowrap; }
.menu > li > a:hover, .menu > li > .sub-heading:hover, .menu > li.current > a, .menu > li.current > .sub-heading { background: rgba(255, 255, 255, .12); color: #fff; }
.menu .sub-heading::after, .sub-toggle::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-3px) rotate(45deg); }
.sub-toggle { background: none; border: 0; color: #fff; padding: 10px 6px 10px 0; margin-left: -8px; cursor: pointer; }
.sub-toggle::after { margin-left: 0; }
.menu .sub { display: none; position: absolute; top: 100%; left: 0; min-width: 240px; background: #fff; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 27, 76, .22); padding: 8px; z-index: 5; }
.menu .sub .sub { position: static; box-shadow: none; padding: 0 0 0 12px; min-width: 0; display: block; }
.menu .sub a, .menu .sub .sub-heading { color: var(--navy); font-weight: 600; padding: 9px 12px; width: 100%; text-align: left; }
.menu .sub .sub-heading { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; cursor: default; }
.menu .sub .sub-heading::after { display: none; }
.menu .sub a:hover, .menu .sub li.current > a { background: var(--bg); color: var(--teal-dark); }
.menu > li:hover > .sub, .menu > li:focus-within > .sub, .menu > li.open > .sub { display: block; }
.social { display: flex; gap: 10px; }
.social a { color: #fff; opacity: .9; display: inline-flex; }
.social a:hover { opacity: 1; color: #fff; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 2px solid rgba(255, 255, 255, .5); border-radius: 8px; width: 48px; height: 42px; cursor: pointer; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 22px; height: 2px; background: #fff; margin: auto; position: relative; transition: .2s; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -7px; }
.nav-toggle .bars::after { top: 7px; }
.nav-open .nav-toggle .bars { background: transparent; }
.nav-open .nav-toggle .bars::before { top: 0; transform: rotate(45deg); }
.nav-open .nav-toggle .bars::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 1080px) {
  .header-inner { min-height: 70px; flex-wrap: wrap; gap: 0; }
  .logo img { width: 160px; }
  .nav-toggle { display: block; }
  .site-nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; padding: 8px 0 18px; max-height: calc(100vh - 70px); overflow-y: auto; }
  .nav-open .site-nav { display: flex; }
  .menu { flex-direction: column; align-items: stretch; }
  .menu > li { flex-wrap: wrap; }
  .menu > li > a, .menu > li > .sub-heading { flex: 1; text-align: left; font-size: 18px; padding: 12px; }
  .sub-toggle { padding: 12px 16px; margin: 0; }
  .menu > li:hover > .sub, .menu > li:focus-within > .sub { display: none; }
  .menu > li.open > .sub { display: block; }
  .menu .sub { position: static; flex-basis: 100%; box-shadow: none; background: rgba(255, 255, 255, .07); margin: 0 0 6px; }
  .menu .sub a { color: #fff; }
  .menu .sub .sub-heading { color: rgba(255, 255, 255, .65); }
  .menu .sub a:hover, .menu .sub li.current > a { background: rgba(255, 255, 255, .12); color: #fff; }
  .site-nav .social { padding: 12px; }
}

/* ---------- banner & main ---------- */
.banner img { display: block; width: 100%; height: auto; aspect-ratio: 1920 / 535; object-fit: cover; }
.content { padding: 28px 0 64px; min-height: 50vh; }
.home-title { text-align: center; font-size: clamp(1.5rem, 3.4vw, 2.2rem); margin: .6em 0 .9em; }
.lead { font-size: 1.15rem; color: var(--muted); }

/* ---------- cards ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.card-header { margin: 0; padding: 14px 20px; background: var(--navy); color: #fff; font-size: 1.25rem; text-align: center; }
.card-body { padding: 18px 22px 22px; flex: 1; }
.card-body > :first-child { margin-top: 0; }
.card-title { font-size: 1.2rem; margin: 0 0 .3em; }
.card-title a { color: var(--navy); text-decoration: none; }
.card-title a:hover { color: var(--teal); }
.meta { color: var(--muted); font-size: .95rem; margin: 0 0 .6em; }
.scripture { font-weight: 600; color: var(--teal-dark); margin: 0 0 .5em; }
.icon { width: 76px; height: 76px; object-fit: contain; display: block; margin: 4px auto 10px; }
.home-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.home-cards .card-body { display: flex; flex-direction: column; align-items: center; }
.verse { margin: 0; font-size: 1.08rem; font-style: italic; }
.verse p { margin: 0 0 .5em; }
.verse cite { font-style: normal; font-weight: 700; color: var(--navy); }
.home-latest { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 44px; align-items: start; }
.section-title { font-size: 1.35rem; margin: 0 0 12px; text-align: center; }
.event-list { list-style: none; margin: 0; padding: 6px 20px; }
.event-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.event-list li:last-child { border: 0; }
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .home-cards, .home-latest, .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .home-cards, .home-latest, .grid-3 { grid-template-columns: 1fr; } body { font-size: 17px; } }

/* ---------- buttons ---------- */
.btn { display: inline-block; background: var(--teal); color: #fff; text-decoration: none; padding: 9px 18px; border-radius: 999px; font-weight: 700; border: 2px solid var(--teal); cursor: pointer; font-size: 1rem; font-family: var(--body); }
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.btn-lg { padding: 12px 26px; font-size: 1.05rem; }
.btn-outline { background: transparent; color: var(--teal-dark); }
.btn-outline:hover { background: var(--teal); color: #fff; }
.sub-links { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }

/* ---------- video ---------- */
.yt { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.yt img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .2s; }
.yt:hover img { opacity: .85; }
.yt-play { position: absolute; inset: 0; margin: auto; width: 68px; height: 48px; background: #e00; border-radius: 12px; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.yt-play::after { content: ""; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.yt iframe, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 1em 0; }

/* ---------- pager ---------- */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 36px 0 0; }
.pager a, .pager span { min-width: 42px; padding: 8px 12px; text-align: center; border-radius: 8px; background: #fff; box-shadow: var(--shadow); text-decoration: none; font-weight: 600; }
.pager span[aria-current] { background: var(--navy); color: #fff; }
.pager .gap { background: none; box-shadow: none; }

/* ---------- blog ---------- */
.post-list { display: grid; gap: 26px; }
.post-list .card { flex-direction: row; }
.post-list .card-img { flex: 0 0 38%; }
.card-img img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; }
.home-latest .card-img img { aspect-ratio: 16 / 9; }
@media (max-width: 760px) { .post-list .card { flex-direction: column; } }
.post-full { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 5vw, 56px); max-width: 860px; margin: 0 auto; }
.post-full h1 { margin-top: 0; }
.post-hero { margin: 0 0 1.5em; }
.post-hero img { width: 100%; border-radius: 10px; display: block; }
.crumbs { margin: 0 0 .4em; font-size: .95rem; }
.post-nav { max-width: 860px; margin: 22px auto 0; display: flex; justify-content: space-between; gap: 16px; font-weight: 600; }

/* ---------- rich text (pages, posts, events) ---------- */
.page { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 4vw, 48px); }
.page > h1 { margin-top: 0; }
.rich::after { content: ""; display: table; clear: both; }
.rich img { border-radius: 8px; }
.rich .img-left { float: left; margin: 4px 22px 14px 0; }
.rich .img-right { float: right; margin: 4px 0 14px 22px; }
.rich .img-center { display: block; margin: 1em auto; }
.rich hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.rich hr.clear { clear: both; }
.rich blockquote { margin: 1.2em 0; padding: .6em 1.2em; border-left: 4px solid var(--teal); background: var(--bg); border-radius: 0 8px 8px 0; }
.rich table { border-collapse: collapse; width: 100%; }
.rich td, .rich th { border: 1px solid var(--line); padding: 8px 10px; }
@media (max-width: 640px) {
  .rich .img-left, .rich .img-right { float: none; display: block; margin: 0 auto 1em; width: auto !important; max-width: 100%; }
}

/* ---------- staff ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; margin-top: 20px; text-align: center; }
.person img { width: 200px; height: 200px; object-fit: cover; border-radius: 50%; box-shadow: var(--shadow); }
.person h2 { font-size: 1.3rem; margin: .6em 0 .1em; }
.person p { margin: 0; color: var(--muted); }

/* ---------- events ---------- */
.events { display: grid; gap: 26px; }
.event { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; }
.event-img { flex: 0 0 40%; width: 40%; object-fit: cover; }
.event-body { padding: 22px 28px; }
.event-body h2 { margin: 0 0 .2em; }
.event-when { font-weight: 700; color: var(--teal-dark); margin: 0 0 .4em; font-size: 1.1rem; }
.event-loc { color: var(--muted); margin: 0 0 .8em; }
@media (max-width: 760px) { .event { flex-direction: column; } .event-img { width: 100%; } }

/* ---------- forms ---------- */
.prayer-form { display: grid; gap: 16px; max-width: 640px; margin-top: 18px; }
.prayer-form label { display: grid; gap: 6px; font-weight: 600; color: var(--navy); }
.prayer-form label.check { display: flex; align-items: center; gap: 10px; font-weight: 400; color: var(--text); }
.prayer-form input:not([type=checkbox]), .prayer-form textarea { font: inherit; padding: 10px 12px; border: 1px solid #b9c5d6; border-radius: 8px; background: #fff; width: 100%; }
.prayer-form .hp { display: none; }
.prayer-form .btn { justify-self: start; }
.form-status { margin: 0; font-weight: 600; }
.form-status.ok { color: #1c7a3d; }
.form-status.err { color: #b3261e; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: #dfe7f5; padding: 36px 0 28px; text-align: center; font-size: 16px; }
.site-footer strong { color: #fff; }
.site-footer a { color: #fff; }
.site-footer .social { justify-content: center; margin: 14px 0; }
.site-footer .copy { opacity: .75; font-size: 14px; margin: 0; }
.to-top { position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; text-decoration: none; font-size: 20px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrolled .to-top { opacity: .9; pointer-events: auto; }
.to-top:hover { color: #fff; opacity: 1; }
