/* ════════════════════════════════════════════════════════
   HYMNXHORTATION — pages.css
   Page-specific layout and styles
   ════════════════════════════════════════════════════════ */

/* ── HOME: HERO ─────────────────────────────────────────── */
.hero {
  min-height: 92vh;
  width: 100%;
  max-width: 100vw;
  background: var(--navy-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: var(--s8) var(--s4) var(--s6);
  box-sizing: border-box;
}

.hero-score {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.04;
  overflow: hidden;  /* belt-and-braces: SVG cannot bleed outside */
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
}

.hero-eyebrow {
  font-family: var(--ui);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.eyebrow-line {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  font-weight: 900;
  color: var(--parchment);
  line-height: 1.08;
  margin-bottom: 1.4rem;
}

.hero-title em {
  font-style: italic;
  color: var(--gold-light);
}

.hero-subtitle {
  font-family: var(--body);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(245,237,214,0.62);
  max-width: 540px;
  margin: 0 auto 1.4rem;
  line-height: 1.75;
}

.hero-verse {
  font-family: var(--body);
  font-style: italic;
  font-size: 0.88rem;
  color: rgba(200,151,42,0.65);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  quotes: none;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.35;
  animation: fadeInUp 1s ease 1.5s both;
}

.hero-scroll span {
  font-family: var(--ui);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--parchment);
}

.scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 0.9; transform: scaleY(1.1); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 0.35; transform: translate(-50%, 0); }
}

/* ── HOME: DAILY HYMN ───────────────────────────────────── */
.daily-section {
  background: var(--navy);
  padding: var(--s7) var(--s4);
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  box-sizing: border-box;
}

.daily-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s6);
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Grid children MUST have min-width:0 to shrink below their content size */
.daily-inner > * {
  min-width: 0;
  overflow: hidden;
}

.daily-label {
  font-family: var(--ui);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.65rem;
}

.daily-date {
  font-family: var(--body);
  font-style: italic;
  font-size: 0.92rem;
  color: rgba(245,237,214,0.38);
  margin-bottom: 0.35rem;
}

.daily-hymn-title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  font-weight: 700;
  color: var(--parchment);
  line-height: 1.2;
  margin-bottom: 0.4rem;
}

.daily-author {
  font-family: var(--ui);
  font-size: 0.76rem;
  color: var(--gold);
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
}

.daily-lyric {
  font-family: var(--body);
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(245,237,214,0.67);
  line-height: 1.9;
  border-left: 2px solid var(--gold);
  padding-left: 1.1rem;
  margin-bottom: 1.75rem;
}

.daily-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(200,151,42,0.18);
  margin-bottom: 1.25rem;
}

.daily-tab {
  font-family: var(--ui);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245,237,214,0.38);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.55rem 0.85rem;
  margin-bottom: -1px;
  transition: color var(--ease), border-color var(--ease);
}

.daily-tab:hover { color: rgba(245,237,214,0.65); }
.daily-tab.active { color: var(--gold); border-bottom-color: var(--gold); }

.daily-content {
  font-family: var(--body);
  font-size: 0.97rem;
  color: rgba(245,237,214,0.62);
  line-height: 1.85;
  min-height: 90px;
}

/* ── HOME: QUOTE SECTION ────────────────────────────────── */
.quote-section {
  background: var(--parchment);
  padding: var(--s6) var(--s4);
  border-top: 1px solid var(--parchment-dk);
  border-bottom: 1px solid var(--parchment-dk);
}

/* ── HOME: RECENT SECTION ───────────────────────────────── */
.recent-section { background: var(--cream); }

/* ── HOME: CTA SECTION ──────────────────────────────────── */
.cta-section {
  background: var(--navy);
  padding: var(--s7) var(--s4);
  text-align: center;
}

.cta-title {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--parchment);
  margin-bottom: 0.75rem;
}

.cta-desc {
  font-family: var(--body);
  font-style: italic;
  font-size: 1rem;
  color: rgba(245,237,214,0.58);
  margin-bottom: 2rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

/* ── DEVOTIONAL PAGE ────────────────────────────────────── */
.devotional-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--s4);
  align-items: start;
}

.devotional-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
  background: var(--white);
  border: 1px solid var(--parchment-dk);
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-height: calc(100vh - var(--nav-h) - 2rem);
  overflow-y: auto;
}

.sidebar-title {
  font-family: var(--ui);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 1rem 1.1rem 0.6rem;
  border-bottom: 1px solid var(--parchment-dk);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  transition: background var(--ease);
  border-bottom: 1px solid rgba(0,0,0,0.03);
}

.sidebar-item:hover { background: var(--parchment); }
.sidebar-item.active { background: rgba(200,151,42,0.08); }

.sidebar-day {
  font-family: var(--ui);
  font-size: 0.62rem;
  color: var(--gold);
  min-width: 28px;
}

.sidebar-hymn-name {
  font-family: var(--body);
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.devotional-entry {
  background: var(--white);
  border: 1px solid var(--parchment-dk);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.entry-header {
  background: var(--navy);
  padding: 2rem 2.25rem;
}

.entry-day-label {
  font-family: var(--ui);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.entry-title {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--parchment);
  margin-bottom: 0.3rem;
}

.entry-meta {
  font-family: var(--ui);
  font-size: 0.75rem;
  color: rgba(245,237,214,0.42);
}

.entry-body { padding: 2.25rem; }

.entry-section { margin-bottom: 2rem; }

.entry-section-label {
  font-family: var(--ui);
  font-size: 0.63rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--parchment-dk);
}

.entry-lyric {
  font-family: var(--body);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--navy);
  line-height: 1.9;
  background: var(--parchment);
  padding: 1rem 1.35rem;
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 0.6rem;
}

.entry-text {
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.87;
}

.entry-reflection {
  font-family: var(--body);
  font-style: italic;
  font-size: 1.03rem;
  color: var(--navy);
  text-align: center;
  padding: 1.4rem;
  background: var(--parchment);
  border-radius: var(--radius-sm);
}

.entry-prayer {
  font-family: var(--body);
  font-style: italic;
  font-size: 1rem;
  color: var(--navy);
  line-height: 1.9;
  background: rgba(200,151,42,0.05);
  padding: 1.5rem;
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.entry-event {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 0.65rem;
}

.entry-event-dot {
  width: 6px; height: 6px;
  min-width: 6px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 0.6rem;
}

.entry-event-text {
  font-family: var(--body);
  font-size: 0.96rem;
  color: var(--stone);
  line-height: 1.7;
}

.entry-nav {
  display: flex;
  justify-content: space-between;
  padding: 1.25rem 2.25rem;
  border-top: 1px solid var(--parchment-dk);
  background: var(--parchment);
}

.entry-nav-btn {
  font-family: var(--ui);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  background: none;
  border: 1px solid var(--parchment-dk);
  border-radius: var(--radius-sm);
  padding: 0.55rem 1rem;
  transition: all var(--ease);
}
.entry-nav-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ── PODCAST PAGE ───────────────────────────────────────── */
.podcast-header {
  background: var(--navy-deep);
  padding: var(--s7) var(--s4);
  border-bottom: 1px solid rgba(200,151,42,0.1);
}

.podcast-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s6);
  align-items: center;
}

.podcast-hero-title {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--parchment);
  margin-bottom: 0.9rem;
}

.podcast-hero-desc {
  font-family: var(--body);
  font-size: 1rem;
  color: rgba(245,237,214,0.58);
  line-height: 1.85;
  margin-bottom: 1.75rem;
}

.podcast-platforms {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.platform-btn {
  font-family: var(--ui);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--parchment);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(200,151,42,0.2);
  border-radius: var(--radius-sm);
  padding: 0.55rem 1rem;
  text-decoration: none;
  transition: all var(--ease);
}
.platform-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(200,151,42,0.4);
}

.podcast-player-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(200,151,42,0.18);
  border-radius: var(--radius-sm);
  padding: 2rem;
}

/* ── CONCERT PAGE ───────────────────────────────────────── */
.concert-hero-section {
  background: var(--navy-deep);
  padding: var(--s7) var(--s4);
}

.concert-hero-card {
  background: linear-gradient(135deg, rgba(200,151,42,0.08), rgba(13,27,62,0.8));
  border: 1px solid rgba(200,151,42,0.2);
  border-radius: var(--radius);
  padding: var(--s6) var(--s7);
  position: relative;
  overflow: hidden;
}

.concert-hero-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--gold), transparent);
}

.concert-hero-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--parchment);
  margin-bottom: 1rem;
  max-width: 680px;
}

.concert-hero-desc {
  font-family: var(--body);
  font-size: 1.05rem;
  color: rgba(245,237,214,0.62);
  line-height: 1.85;
  max-width: 580px;
  margin-bottom: 2rem;
}

/* ── ABOUT PAGE ─────────────────────────────────────────── */
.about-header {
  background: var(--navy);
  padding: var(--s7) var(--s4);
}

.about-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s6);
  align-items: center;
}

.about-hero-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.8vw, 2.9rem);
  font-weight: 700;
  color: var(--parchment);
  margin-bottom: 1.1rem;
}

.about-body-text {
  font-family: var(--body);
  font-size: 1rem;
  color: rgba(245,237,214,0.6);
  line-height: 1.87;
  margin-bottom: 1.1rem;
}

/* ── COMMUNITY PAGE ─────────────────────────────────────── */
.community-hero {
  background: var(--navy-deep);
  padding: var(--s8) var(--s4) var(--s7);
}

.community-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--parchment);
  margin-bottom: 0.9rem;
}

.community-desc {
  font-family: var(--body);
  font-style: italic;
  font-size: 1rem;
  color: rgba(245,237,214,0.58);
  margin-bottom: 2rem;
  line-height: 1.8;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .daily-inner,
  .podcast-hero-grid,
  .about-hero-grid { grid-template-columns: 1fr; }

  .devotional-layout { grid-template-columns: 1fr; }
  .devotional-sidebar { position: static; max-height: none; }
}

@media (max-width: 640px) {
  .hero-title { font-size: 2.2rem; }
  .concert-hero-card { padding: var(--s4); }
  .entry-body, .entry-header { padding: 1.5rem; }
}

/* ════════════════════════════════════════════════════════
   MOBILE RESPONSIVENESS — COMPREHENSIVE FIX v2
   ════════════════════════════════════════════════════════ */

/* ── FIX 1: HERO — stop hero-scroll overlapping buttons ─── */
/* Give hero enough bottom padding so absolute scroll
   indicator never overlaps the hero-actions buttons      */
@media (max-width: 768px) {
  .hero {
    padding-bottom: 7rem;   /* room for scroll indicator   */
    min-height: auto;       /* don't force 92vh on mobile  */
    padding-top: var(--s6);
  }

  /* Move scroll indicator so it can't overlap content     */
  .hero-scroll {
    bottom: 1.25rem;
  }

  /* Stack hero buttons vertically on mobile               */
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* Tighten hero verse and subtitle on mobile             */
  .hero-subtitle { font-size: 1rem; margin-bottom: 1rem; }
  .hero-verse    { font-size: 0.82rem; margin-bottom: 1.75rem; }
  .hero-eyebrow  { margin-bottom: 1rem; }
}

@media (max-width: 480px) {
  /* On very small screens hide the scroll indicator
     entirely — it serves no purpose on touch devices     */
  .hero-scroll { display: none; }

  .hero {
    padding-bottom: var(--s5);
    padding-left: var(--s2);
    padding-right: var(--s2);
  }

  .hero-title { font-size: clamp(1.9rem, 8vw, 2.4rem); }
}


/* ── FIX 3: HYMNAL CARD ──────────────────────────────────── */
@media (max-width: 900px) {
  .hymnal-card    { padding: 1.5rem; }
  .hymnal-number  { font-size: 3.5rem; }
}
@media (max-width: 480px) {
  .hymnal-card    { padding: 1.25rem; }
  .hymnal-line    { font-size: 0.9rem; }
}

/* ── FIX 4: PODCAST PAGE ─────────────────────────────────── */
@media (max-width: 900px) {
  .podcast-header      { padding: var(--s5) var(--s3); }
  .podcast-hero-grid   { grid-template-columns: 1fr; gap: var(--s4); }
  .podcast-player-card { padding: 1.5rem; }
}

@media (max-width: 480px) {
  .podcast-header        { padding: var(--s4) var(--s2); }
  .podcast-hero-title    { font-size: 1.6rem; }
  .podcast-platforms     { gap: 0.5rem; }
  .platform-btn          { font-size: 0.72rem; padding: 0.45rem 0.75rem; }
}

/* ── FIX 5: EPISODE CARDS ────────────────────────────────── */
@media (max-width: 480px) {
  .episode-card { padding: 1.1rem 1rem; padding-right: 3.5rem; }
  .ep-title     { font-size: 0.95rem; }
  .ep-play-btn  { right: 0.75rem; width: 34px; height: 34px; font-size: 0.78rem; }
}

/* ── FIX 6: CONCERT PAGE ─────────────────────────────────── */
@media (max-width: 768px) {
  .concert-hero-section { padding: var(--s5) var(--s3); }
  .concert-hero-card    { padding: var(--s4); }
  .concert-hero-title   { font-size: clamp(1.5rem, 5vw, 2.2rem); }
}

@media (max-width: 480px) {
  .concert-hero-section { padding: var(--s4) var(--s2); }
  .concert-hero-card    { padding: var(--s3); }
  .concert-hero-desc    { font-size: 0.97rem; }
  .event-cards          { grid-template-columns: 1fr; }
}

/* ── FIX 7: ABOUT PAGE ───────────────────────────────────── */
@media (max-width: 900px) {
  .about-header      { padding: var(--s5) var(--s3); }
  .about-hero-grid   { grid-template-columns: 1fr; gap: var(--s4); }
}
@media (max-width: 480px) {
  .about-header      { padding: var(--s4) var(--s2); }
  .about-hero-title  { font-size: clamp(1.5rem, 6vw, 2rem); }
  .stats-grid        { grid-template-columns: 1fr 1fr; }
  .founder-card      { padding: 1.5rem; }
  .founder-initial   { width: 56px; height: 56px; font-size: 1.4rem; }
}

/* ── FIX 8: COMMUNITY PAGE ───────────────────────────────── */
@media (max-width: 768px) {
  .community-hero  { padding: var(--s6) var(--s3) var(--s5); }
  .community-title { font-size: clamp(1.6rem, 5vw, 2.2rem); }
}
@media (max-width: 480px) {
  .community-hero  { padding: var(--s5) var(--s2) var(--s4); }
  .social-grid     { grid-template-columns: 1fr 1fr; }
  .contact-grid    { grid-template-columns: 1fr; }
}

/* ── FIX 9: DEVOTIONAL PAGE ──────────────────────────────── */
@media (max-width: 900px) {
  .devotional-layout  { grid-template-columns: 1fr; }
  .devotional-sidebar { position: static; max-height: 180px; overflow-y: auto; }
  .sidebar-item       { padding: 0.5rem 1rem; }
}
@media (max-width: 480px) {
  .devotional-sidebar { max-height: 140px; }
  .entry-header       { padding: 1.25rem; }
  .entry-body         { padding: 1.25rem; }
  .entry-nav          { padding: 1rem 1.25rem; flex-direction: column; gap: 0.5rem; }
  .entry-nav-btn      { width: 100%; text-align: center; }
}

/* ── FIX 10: PAGE HEADER ─────────────────────────────────── */
@media (max-width: 768px) {
  .page-header  { padding: var(--s5) var(--s3); }
  .page-title   { font-size: clamp(1.6rem, 6vw, 2.4rem); }
}
@media (max-width: 480px) {
  .page-header  { padding: var(--s4) var(--s2); }
}

/* ── FIX 11: LIBRARY CONTROLS ────────────────────────────── */
@media (max-width: 480px) {
  .filter-row    { flex-direction: column; align-items: stretch; }
  .filter-select { width: 100%; }
  .result-count  { margin-left: 0; }
  .search-input  { font-size: 0.95rem; }
}

/* ── FIX 12: HYMN GRID minimum ───────────────────────────── */
@media (max-width: 480px) {
  .hymn-grid { grid-template-columns: 1fr; }
}

/* ── FIX 13: FEATURES GRID minimum ──────────────────────── */
@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
}

/* ── FIX 14: SOCIAL GRID ─────────────────────────────────── */
@media (max-width: 480px) {
  .social-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .social-card { padding: 1.1rem 0.85rem; }
}

/* ── FIX 15: MODAL on mobile ─────────────────────────────── */
@media (max-width: 640px) {
  .modal-overlay {
    padding: calc(var(--nav-h) + 0.5rem) 0 0;
    align-items: flex-end;    /* slide up from bottom on mobile */
  }
  .modal {
    border-radius: var(--radius) var(--radius) 0 0;
    max-height: 92vh;
    overflow-y: auto;
    animation: modalSlideUp 0.35s var(--ease-out);
  }
  .modal-header { padding: 1.5rem 1.5rem 1.25rem; }
  .modal-title  { font-size: 1.35rem; }
  .modal-body   { padding: 1.5rem; }
  .modal-tabs   { padding: 0 1rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .modal-tab    { white-space: nowrap; flex-shrink: 0; }
}

@keyframes modalSlideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── FIX 16: QUOTE SECTION ───────────────────────────────── */
@media (max-width: 480px) {
  .pull-quote { font-size: 1.1rem; }
  .quote-section { padding: var(--s4) var(--s2); }
}

/* ── FIX 17: SCRIPTURE BLOCK ─────────────────────────────── */
@media (max-width: 480px) {
  .scripture-block  { padding: 1.25rem; }
  .scripture-text   { font-size: 1rem; }
}

/* ── FIX 18: NAV on mobile — prevent content shift ────────── */
@media (max-width: 768px) {
  .nav-inner { padding: 0 var(--s2); }
  .nav-brand { font-size: 1.05rem; }
}

/* ── FIX 19: CTA SECTION ─────────────────────────────────── */
@media (max-width: 480px) {
  .cta-section  { padding: var(--s5) var(--s2); }
  .cta-title    { font-size: 1.5rem; }
}

/* ── FIX 20: SECTION TITLES on mobile ───────────────────── */
@media (max-width: 480px) {
  .section-title { font-size: clamp(1.4rem, 6vw, 1.8rem); }
  .section-body  { font-size: 1rem; }
}

/* ── FIX 21: VISION LIST ─────────────────────────────────── */
@media (max-width: 480px) {
  .vision-item   { flex-direction: column; gap: 0.5rem; }
  .vision-num    { font-size: 1.1rem; }
}

/* ── FIX 22: PROGRAMME ITEM ──────────────────────────────── */
@media (max-width: 480px) {
  .programme-item { gap: 0.75rem; }
  .programme-icon { width: 28px; height: 28px; min-width: 28px; font-size: 0.85rem; }
}

/* ── FIX 23: CONCERT HERO BUTTONS ───────────────────────── */
@media (max-width: 480px) {
  .concert-hero-card .btn-gold {
    width: 100%;
    justify-content: center;
  }
}

/* ── FIX 24: FOOTER tighter on mobile ───────────────────── */
@media (max-width: 480px) {
  .site-footer  { padding: var(--s4) var(--s2) var(--s3); }
  .footer-top   { gap: var(--s3); }
  .footer-verse { font-size: 0.75rem; }
}


/* ── FIX 26: DESKTOP — ensure no 2-col grid at narrow desktop */
@media (min-width: 769px) and (max-width: 1023px) {
  .about-hero-grid   { gap: var(--s4); }
  .podcast-hero-grid { gap: var(--s4); }
}

/* ── FIX 27: PAGE safety net — no element can cause horz scroll */
.page { max-width: 100vw; }
.hero, .daily-section, .features, .quote-section,
.recent-section, .cta-section,
.podcast-header, .concert-hero-section,
.about-header, .community-hero, .site-footer {
  max-width: 100%;
}

/* ════════════════════════════════════════════════════════
   OVERFLOW CONTAINMENT — all full-bleed sections
   Belt-and-braces: every section is capped at 100vw
   so no child element can cause horizontal scroll
   ════════════════════════════════════════════════════════ */
.features,
.quote-section,
.recent-section,
.cta-section,
.podcast-header,
.podcast-header > *,
.concert-hero-section,
.about-header,
.about-vision,
.community-hero,
.community-hero > *,
.site-footer,
.page-header,
.library-section,
.devotional-layout,
.about-section {
  max-width: 100%;
  box-sizing: border-box;
}

/* Specific overflow:hidden on sections with absolute children */
.features        { overflow: hidden; }
.quote-section   { overflow: hidden; }
.cta-section     { overflow: hidden; }
.podcast-header  { overflow: hidden; }
.concert-hero-section { overflow: hidden; }
.about-header    { overflow: hidden; }
.community-hero  { overflow: hidden; }

/* ── MOBILE: hero actions — never let buttons overflow ─── */
.hero-content {
  width: 100%;
  max-width: 900px;
  box-sizing: border-box;
}

.hero-actions {
  width: 100%;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ── MOBILE: all grids use minmax safely ─────────────────── */
.hymn-grid,
.event-cards,
.features-grid,
.stats-grid,
.social-grid,
.contact-grid {
  width: 100%;
  box-sizing: border-box;
}


/* ── FIX: concert hero card — contained on all screens ───── */
.concert-hero-card {
  width: 100%;
  box-sizing: border-box;
}

/* ── FIX: podcast-hero-grid — same ──────────────────────── */
.podcast-hero-grid {
  width: 100%;
  box-sizing: border-box;
}

/* ── FIX: about-hero-grid — same ────────────────────────── */
.about-hero-grid {
  width: 100%;
  box-sizing: border-box;
}

/* ════════════════════════════════════════════════════════
   TODAY'S HYMN SECTION — AUTHORITATIVE MOBILE FIX
   Single consolidated block replacing all previous
   scattered daily-section responsive rules.
   ════════════════════════════════════════════════════════ */

/* ── Base: defensive resets on the section & grid ───────── */
.daily-section {
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  box-sizing: border-box;
}

.daily-inner {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* ── Text column: never overflows ───────────────────────── */
.daily-text-col,
#daily-text-block {
  min-width: 0;       /* crucial: grid children must allow shrinking */
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ── Hymnal card visual: never overflows ────────────────── */
.daily-visual {
  min-width: 0;
  overflow: hidden;
}

.hymnal-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* ── Author line: long text wraps cleanly ───────────────── */
.daily-author {
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

/* ── CTA row: horizontal on desktop, vertical on mobile ─── */
.daily-cta-row {
  margin-top: 2rem;
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ─────────────────────────────────────────────────────────
   TABLET (≤ 900px): collapse to single column
   ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .daily-section { padding: var(--s5) var(--s3); }

  /* Grid already collapsed by the 900px block above —
     just tighten the gap for single-column layout       */
  .daily-inner { gap: var(--s4); }

  .daily-hymn-title { font-size: clamp(1.4rem, 4vw, 1.9rem); }
  .hymnal-card      { padding: 1.75rem; }
}

/* ─────────────────────────────────────────────────────────
   MOBILE (≤ 640px): further reductions
   ───────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .daily-section { padding: var(--s4) var(--s3); }
  .daily-inner   { gap: var(--s3); }

  .daily-hymn-title  { font-size: 1.35rem; }
  .daily-author      { font-size: 0.72rem; line-height: 1.55; }
  .daily-lyric       { font-size: 0.97rem; }
  .daily-content     { font-size: 0.92rem; min-height: 70px; }

  /* Tabs scroll horizontally instead of wrapping          */
  .daily-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;     /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
  }
  .daily-tabs::-webkit-scrollbar { display: none; }
  .daily-tab {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.55rem 0.75rem;
    font-size: 0.65rem;
  }

  /* Hymnal card tightened */
  .hymnal-card  { padding: 1.25rem; }
  .hymnal-line  { font-size: 0.88rem; }
  .hymnal-number { font-size: 3rem; }

  /* CTA buttons: full-width stack */
  .daily-cta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }
  .daily-cta-row .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* ─────────────────────────────────────────────────────────
   SMALL MOBILE (≤ 480px): tightest layout
   ───────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .daily-section { padding: var(--s3) var(--s2); }
  .daily-inner   { gap: var(--s3); }

  .daily-label      { font-size: 0.6rem; }
  .daily-date       { font-size: 0.82rem; }
  .daily-hymn-title { font-size: 1.25rem; }
  .daily-author     { font-size: 0.68rem; }
  .daily-lyric      { font-size: 0.92rem; padding-left: 0.85rem; }
  .daily-content    { font-size: 0.9rem; min-height: 60px; }

  .hymnal-card   { padding: 1.1rem; }
  .hymnal-line   { font-size: 0.85rem; }
  .hymnal-number { font-size: 2.5rem; top: 0.5rem; right: 0.75rem; }
  .notation-bar  { height: 36px; }
  .note-bar      { width: 4px; }
}
