/* ==========================================================================
   HARBORLIGHT CHURCH — PAGE COMPONENTS
   Component styles shared across specific page templates. Organized by
   the page(s) that introduce each component; components are reused
   wherever it makes sense (e.g. .card-cta appears on the home, prayer,
   and giving pages).
   ========================================================================== */

/* ---------------- Home: service times / stat chips ---------------- */
.service-times-list { display: grid; gap: 1rem; }
.service-time-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.4rem; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid var(--border);
}
.service-time-row .day { font-weight: 700; }
.service-time-row .time { color: var(--accent-2); font-weight: 700; }

/* ---------------- Home: testimonials ---------------- */
.testimonial-card { max-width: 640px; margin-inline: auto; text-align: center; }
.testimonial-card blockquote { font-family: var(--font-display); font-size: var(--step-2); font-weight: 500; font-style: italic; color: var(--text); }
.testimonial-card .avatar,
.testimonial-card .avatar-initials { width: 56px; height: 56px; margin-inline: auto; margin-top: 1.5rem; }
.testimonial-card cite { display: block; margin-top: 0.75rem; font-style: normal; font-weight: 700; }
.testimonial-card .role { font-size: 0.85rem; color: var(--text-muted); }

/* ---------------- Home: Instagram-style gallery ---------------- */
.insta-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.6rem; }
.insta-grid a { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; display: block; }
.insta-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.insta-grid a:hover img { transform: scale(1.08); }
.insta-grid a::after {
  content: "\2764"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(18,21,28,0.45); color: #fff; opacity: 0; transition: opacity var(--transition); font-size: 1.4rem;
}
.insta-grid a:hover::after { opacity: 1; }

/* ---------------- CTA banners (prayer / giving / live) ---------------- */
.cta-banner {
  position: relative;
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 5vw, 4rem);
  background: var(--gradient-hero-light);
  color: #fff;
  overflow: hidden;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255,255,255,0.8); }
.cta-banner .hero-arc { bottom: -90%; opacity: 0.5; }

/* ---------------- Pastor / Staff cards ---------------- */
.staff-card { text-align: center; }
.staff-card .card-img { aspect-ratio: 1; margin-bottom: 1.1rem; }
.staff-card h4 { margin-bottom: 0.15rem; }
.staff-card .role { color: var(--accent-2); font-weight: 700; font-size: 0.85rem; margin-bottom: 0.75rem; }
.staff-card .social-row { justify-content: center; margin-top: 1rem; }
.staff-card .social-row a { width: 34px; height: 34px; border: 1px solid var(--border); }
.staff-card .social-row a:hover { background: var(--gradient-horizon); }

/* ---------------- About: Timeline ---------------- */
.timeline { position: relative; padding-left: 2.5rem; border-left: 2px solid var(--border); display: grid; gap: 2.5rem; }
.timeline-item { position: relative; }
.timeline-item::before {
  content: ""; position: absolute; left: -2.6rem; top: 4px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--gradient-horizon); box-shadow: 0 0 0 4px var(--bg);
}
.timeline-item .year { font-family: var(--font-display); font-size: var(--step-1); color: var(--accent-2); font-weight: 600; }

/* ---------------- About: What to Expect steps ---------------- */
.step-list { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); }
.step-item { display: flex; gap: 1rem; }
.step-num {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-alt); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-display);
}

/* ---------------- Beliefs / Ministries grids ---------------- */
.belief-card, .ministry-card { height: 100%; }
.ministry-card .card-img { margin-bottom: 1.1rem; }
.ministry-card .tag { margin-bottom: 0.75rem; }

/* ---------------- FAQ accordion ---------------- */
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 0; background: none; border: none; text-align: left; font-weight: 700; font-size: var(--step-0); color: var(--text);
}
.accordion-panel-inner { padding-bottom: 1.25rem; color: var(--text-muted); max-width: 68ch; }

/* ---------------- Sermons library ---------------- */
.sermon-toolbar { display: grid; gap: 1rem; grid-template-columns: 1.4fr repeat(4, 1fr); margin-bottom: 2.5rem; }
.sermon-toolbar input[type="search"] { padding: 0.85rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.sermon-toolbar select { padding: 0.85rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); }

.sermon-card { display: flex; flex-direction: column; }
.sermon-card .card-img { position: relative; margin-bottom: 1.1rem; }
.sermon-card .play-btn {
  position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%;
  background: rgba(255,255,255,0.85); display: flex; align-items: center; justify-content: center;
}
.sermon-card .series-tag { position: absolute; top: 0.75rem; left: 0.75rem; }
.sermon-card .meta { display: flex; gap: 0.75rem; font-size: 0.82rem; color: var(--text-muted); margin-top: 0.5rem; }
.sermon-empty { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }

/* ---------------- Sermon single / split layout ---------------- */
.split-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; align-items: start; }
.video-embed { aspect-ratio: 16/9; border-radius: var(--radius-md); overflow: hidden; background: var(--ink); }
.video-embed iframe, .video-embed img { width: 100%; height: 100%; object-fit: cover; }
.audio-player-block { margin-top: 1.5rem; padding: 1.25rem; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); }
.audio-player-block audio { width: 100%; margin-top: 0.75rem; }
.share-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.5rem; }
.share-row button { display: flex; align-items: center; gap: 0.5rem; }
.sidebar-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.5rem; margin-bottom: 1.5rem; }
.sidebar-card h4 { margin-bottom: 1rem; }
.sidebar-card ul li { margin-bottom: 0.65rem; }
.sidebar-card ul a { color: var(--text-muted); font-weight: 600; }
.sidebar-card ul a:hover { color: var(--accent-2); }

/* ---------------- Watch Live ---------------- */
.live-badge { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(217,108,78,0.15); color: var(--coral); padding: 0.4rem 0.9rem; border-radius: 999px; font-weight: 700; font-size: 0.8rem; }
.chat-placeholder { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.5rem; height: 100%; min-height: 340px; display: flex; flex-direction: column; }
.chat-placeholder .chat-messages { flex: 1; overflow-y: auto; display: grid; gap: 0.9rem; margin-bottom: 1rem; }
.chat-msg { font-size: 0.88rem; }
.chat-msg strong { color: var(--accent-2); }

/* ---------------- Events ---------------- */
.event-card { display: grid; grid-template-columns: auto 1fr auto; gap: 1.25rem; align-items: center; padding: 1.25rem; }
.event-date-badge {
  width: 64px; text-align: center; background: var(--gradient-horizon); color: #171308;
  border-radius: var(--radius-sm); padding: 0.6rem 0.4rem; flex-shrink: 0;
}
.event-date-badge .month { display: block; font-size: 0.7rem; text-transform: uppercase; font-weight: 700; }
.event-date-badge .day { display: block; font-size: 1.4rem; font-weight: 800; font-family: var(--font-display); }
.event-card .meta { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.85rem; color: var(--text-muted); margin-top: 0.35rem; }
.map-embed { border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 16/9; border: 1px solid var(--border); }
.map-embed iframe { width: 100%; height: 100%; border: 0; }

/* ---------------- Giving ---------------- */
.fund-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 1rem; }
.fund-option { position: relative; }
.fund-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.fund-option label {
  display: block; padding: 1.25rem; border-radius: var(--radius-md); border: 2px solid var(--border);
  background: var(--surface); cursor: pointer; font-weight: 700; text-align: center; transition: border-color var(--transition), background var(--transition);
}
.fund-option input:checked + label { border-color: var(--accent-2); background: rgba(28,107,90,0.08); }
.amount-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px,1fr)); gap: 0.75rem; }
.amount-grid .fund-option label { padding: 0.85rem; }
.giving-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 4px; gap: 4px; margin-bottom: 1.5rem; }
.giving-toggle button { padding: 0.6rem 1.5rem; border-radius: 999px; font-weight: 700; color: var(--text-muted); }
.giving-toggle button.active { background: var(--gradient-horizon); color: #171308; }
.secure-note { display: flex; align-items: center; gap: 0.6rem; font-size: 0.82rem; color: var(--text-muted); margin-top: 1rem; }

/* ---------------- Connect / Volunteer next steps ---------------- */
.next-step-card { text-align: center; }
.next-step-card .card-icon { margin-inline: auto; }

/* ---------------- Prayer wall ---------------- */
.prayer-wall { columns: 3; column-gap: 1.5rem; }
.prayer-note { break-inside: avoid; margin-bottom: 1.5rem; padding: 1.5rem; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); }
.prayer-note .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; font-size: 0.8rem; color: var(--text-muted); }
.prayer-note button.pray-btn { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--accent-2); font-weight: 700; }
.prayer-note.is-praised button.pray-btn { color: var(--gold); }
.prayer-note.praise { border-color: var(--gold); background: rgba(229,167,54,0.08); }

/* ---------------- Kids / Youth ---------------- */
.age-group-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 1.25rem; }
.age-group-card { text-align: center; padding: 1.75rem 1.25rem; }
.age-group-card .age-range { font-family: var(--font-display); font-size: var(--step-2); color: var(--accent-2); }
.safety-list li { display: flex; gap: 0.75rem; margin-bottom: 1rem; }
.safety-list svg { flex-shrink: 0; color: var(--teal); margin-top: 0.2rem; }
.schedule-table th, .schedule-table td { padding: 0.9rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 1rem; }
.gallery-grid .card-img { aspect-ratio: 1; }

/* ---------------- Missions ---------------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 1.5rem; text-align: center; }
.stat-row .stat-num { font-family: var(--font-display); font-size: var(--step-4); color: var(--accent-2); display: block; }
.stat-row .stat-label { font-size: 0.85rem; color: var(--text-muted); }
.missionary-card { text-align: center; }

/* ---------------- Blog ---------------- */
.blog-layout { display: grid; grid-template-columns: 2.2fr 1fr; gap: 3rem; align-items: start; }
.blog-card .card-img { margin-bottom: 1.1rem; }
.blog-card .tag { margin-bottom: 0.75rem; }
.blog-card .meta { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.75rem; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.post-body { max-width: 68ch; }
.post-body p { color: var(--text); margin-bottom: 1.25rem; }
.post-body h2, .post-body h3 { margin-top: 2rem; margin-bottom: 1rem; }
.post-hero-img { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 21/9; margin-bottom: 2rem; }

/* ---------------- Contact ---------------- */
.contact-info-list { display: grid; gap: 1.25rem; }
.contact-info-row { display: flex; gap: 1rem; align-items: flex-start; }
.contact-info-row .card-icon { margin-bottom: 0; width: 44px; height: 44px; }
.contact-info-row svg { width: 20px; height: 20px; }

/* ---------------- Legal pages ---------------- */
.legal-content { max-width: 72ch; margin-inline: auto; }
.legal-content h2 { margin-top: 2.5rem; margin-bottom: 1rem; }
.legal-content p, .legal-content li { color: var(--text-muted); margin-bottom: 1rem; }
.legal-content ul { padding-left: 1.4rem; list-style: disc; }

/* ---------------- Breadcrumb ---------------- */
.breadcrumb { display: flex; gap: 0.5rem; align-items: center; font-size: 0.85rem; color: rgba(255,255,255,0.7); margin-bottom: 1.25rem; }
.breadcrumb a { color: rgba(255,255,255,0.7); }
.breadcrumb a:hover { color: #fff; }
