/* ============================================================
   Aliança Espírita Evangélica – Regional ABC
   style.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --navy:       #0A2463;
  --azul:       #1E6BA8;
  --sky:        #C8E6F5;
  --sky-light:  #EAF5FC;
  --gold:       #B89A5E;
  --white:      #FFFFFF;
  --off-white:  #F7F9FC;
  --text:       #1A1A2E;
  --muted:      #5A6680;
  --border:     #D4E4F0;
  --radius:     10px;
  --radius-lg:  14px;
  --transition: all 0.22s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: var(--text); background: var(--white); font-size: 15px; line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ── NAVBAR ── */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}
.navbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  height: 68px;
  gap: 2rem;
}
.navbar-brand { display: flex; flex-direction: row; align-items: center; gap: 10px; flex-shrink: 0; }
.navbar-brand-title { font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; font-weight: 600; color: var(--navy); letter-spacing: 0.02em; line-height: 1.1; }
.navbar-brand-sub { font-size: 0.60rem; font-weight: 500; color: var(--azul); letter-spacing: 0.14em; text-transform: uppercase; }
.navbar-divider { width: 1px; height: 30px; background: var(--border); flex-shrink: 0; }
.navbar-menu { display: flex; align-items: center; flex: 1; }
.nav-item { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 13px;
  font-size: 0.77rem; font-weight: 500;
  color: var(--muted); white-space: nowrap;
  transition: var(--transition);
  border: none; background: none;
  font-family: 'Inter', sans-serif;
  cursor: pointer; letter-spacing: 0.02em;
}
.nav-link:hover, .nav-link.active { color: var(--navy); }
.nav-link .arrow { width: 10px; height: 10px; transition: transform 0.22s; flex-shrink: 0; }
.nav-item:hover .nav-link .arrow { transform: rotate(180deg); }

/* dropdown */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 0;
  min-width: 210px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s, visibility 0.15s;
  box-shadow: 0 8px 32px rgba(10,36,99,0.10);
  z-index: 300;
  /* Sem transform para evitar gap entre botão e dropdown */
  margin-top: 0;
}
/* Área invisível que cobre o espaço entre navbar-link e dropdown */
.nav-item { padding-bottom: 0; }
.nav-link  { margin-bottom: 0; }

.dropdown.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.dropdown a {
  display: block; padding: 9px 18px;
  font-size: 0.78rem; color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.dropdown a:hover { background: var(--sky-light); color: var(--navy); }
.dropdown hr { border: none; border-top: 1px solid var(--border); margin: 5px 0; }

/* navbar actions */
.navbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.btn-search {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--border); background: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--muted); transition: var(--transition);
}
.btn-search:hover { border-color: var(--azul); color: var(--azul); }
.btn-nav-cta {
  padding: 8px 18px;
  background: var(--navy); color: var(--white);
  border: none; border-radius: 6px;
  font-size: 0.75rem; font-weight: 500;
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: background 0.2s; white-space: nowrap;
  letter-spacing: 0.03em;
}
.btn-nav-cta:hover { background: var(--azul); }

/* ── HERO ── */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--azul) 100%);
  padding: 88px 2rem 76px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='40' cy='40' r='32' fill='none' stroke='%23ffffff' stroke-width='0.4' stroke-opacity='0.06'/%3E%3C/svg%3E") repeat;
  pointer-events: none;
}
.hero-inner { max-width: 680px; margin: 0 auto; position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-block;
  font-size: 0.67rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--sky); margin-bottom: 20px;
  padding: 5px 14px; border: 1px solid rgba(200,230,245,0.35); border-radius: 20px;
}
.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300; color: var(--white);
  line-height: 1.15; margin-bottom: 18px; letter-spacing: -0.01em;
}
.hero h1 em { font-style: italic; font-weight: 400; }
.hero-sub {
  font-size: 0.94rem; color: rgba(255,255,255,0.72);
  max-width: 480px; margin: 0 auto 34px; line-height: 1.75;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-hero-primary {
  padding: 12px 30px; background: var(--white); color: var(--navy);
  border: none; border-radius: 7px;
  font-size: 0.82rem; font-weight: 600;
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: opacity 0.2s; letter-spacing: 0.02em;
}
.btn-hero-primary:hover { opacity: 0.9; }
.btn-hero-ghost {
  padding: 12px 30px; background: transparent; color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.45); border-radius: 7px;
  font-size: 0.82rem; font-weight: 500;
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
}
.btn-hero-ghost:hover { border-color: rgba(255,255,255,0.88); }

/* ── FAIXA INFO ── */
.info-strip {
  background: var(--sky-light);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 2rem;
}
.info-strip-inner {
  max-width: 1120px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
.info-item { display: flex; align-items: flex-start; gap: 10px; padding: 4px 0; }
.info-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--azul); flex-shrink: 0; margin-top: 4px; }
.info-text strong { display: block; color: var(--navy); font-weight: 600; font-size: 0.78rem; }
.info-text span { font-size: 0.73rem; color: var(--muted); }

/* ── SEÇÕES ── */
.section { padding: 68px 2rem; }
.section-inner { max-width: 1120px; margin: 0 auto; }
.section-bg { background: var(--off-white); }

.section-label { font-size: 0.64rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--azul); margin-bottom: 10px; }
.section-rule { width: 42px; height: 2px; background: var(--gold); border-radius: 2px; margin-bottom: 16px; }
.section-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(1.55rem, 3vw, 2.15rem); font-weight: 400; color: var(--navy); line-height: 1.2; margin-bottom: 10px; }
.section-sub { font-size: 0.86rem; color: var(--muted); max-width: 480px; line-height: 1.75; margin-bottom: 28px; }

/* ── BOTÕES GERAIS ── */
.btn-primary {
  display: inline-block;
  padding: 11px 26px; background: var(--navy); color: var(--white);
  border: none; border-radius: 7px;
  font-size: 0.80rem; font-weight: 500;
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: background 0.2s; letter-spacing: 0.03em;
}
.btn-primary:hover { background: var(--azul); }
.btn-outline {
  display: inline-block;
  padding: 10px 24px;
  border: 1.5px solid var(--navy); color: var(--navy);
  border-radius: 7px; background: transparent;
  font-size: 0.80rem; font-weight: 500;
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: var(--transition); letter-spacing: 0.03em;
}
.btn-outline:hover { background: var(--navy); color: var(--white); }

/* ── CARDS CENTROS ── */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: box-shadow 0.22s, transform 0.22s;
}
.card:hover { box-shadow: 0 6px 28px rgba(10,36,99,0.10); transform: translateY(-3px); }
.card-icon {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--sky-light);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.card-icon svg { width: 20px; height: 20px; stroke: var(--azul); }
.card h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.08rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.card p { font-size: 0.77rem; color: var(--muted); line-height: 1.65; margin-bottom: 14px; }
.card-tag { font-size: 0.63rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--azul); padding: 3px 8px; background: var(--sky-light); border-radius: 4px; display: inline-block; }
.card-city { font-size: 0.71rem; color: var(--muted); margin-top: 6px; }

/* ── NÚMEROS ── */
.nums-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.num-item { text-align: center; padding: 32px 16px; border-right: 1px solid var(--border); }
.num-item:last-child { border-right: none; }
.num-val { font-family: 'Cormorant Garamond', serif; font-size: 3rem; font-weight: 300; color: var(--navy); line-height: 1; }
.num-lbl { font-size: 0.70rem; color: var(--muted); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.10em; }

/* ── AGENDA ── */
.agenda-list { display: flex; flex-direction: column; gap: 12px; }
.agenda-item {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.agenda-item:hover { border-color: var(--azul); }
.agenda-date {
  text-align: center; background: var(--sky-light);
  border-radius: 8px; padding: 8px 12px;
  min-width: 52px; flex-shrink: 0;
}
.agenda-date .day { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; font-weight: 600; color: var(--navy); line-height: 1; }
.agenda-date .mon { font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--azul); font-weight: 600; }
.agenda-info h4 { font-size: 0.87rem; font-weight: 600; color: var(--navy); margin-bottom: 3px; line-height: 1.3; }
.agenda-info p { font-size: 0.74rem; color: var(--muted); }
.agenda-badge {
  font-size: 0.59rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; padding: 2px 7px; border-radius: 3px;
  background: var(--sky-light); color: var(--azul);
  margin-top: 5px; display: inline-block;
}

/* ── BANNER ASSISTÊNCIA ── */
.banner-esp {
  background: linear-gradient(135deg, var(--navy), var(--azul));
  padding: 60px 2rem; text-align: center; color: var(--white);
}
.banner-esp-inner { max-width: 580px; margin: 0 auto; }
.banner-esp h2 { font-family: 'Cormorant Garamond', serif; font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 300; margin-bottom: 12px; line-height: 1.3; }
.banner-esp p { font-size: 0.87rem; opacity: 0.78; margin-bottom: 28px; line-height: 1.75; }

/* ── RODAPÉ ── */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.58);
  padding: 54px 2rem 26px;
}
.footer-inner { max-width: 1120px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 40px; }
.footer-brand-name { font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; font-weight: 600; color: var(--white); margin-bottom: 3px; line-height: 1.2; }
.footer-brand-sub { font-size: 0.60rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.35); margin-bottom: 14px; }
.footer-brand p { font-size: 0.78rem; line-height: 1.72; max-width: 255px; }
.footer-col h5 { font-size: 0.64rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.35); margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { font-size: 0.79rem; color: rgba(255,255,255,0.55); transition: color 0.2s; }
.footer-col a:hover { color: var(--white); }
.footer-hr { height: 1px; background: rgba(255,255,255,0.09); margin-bottom: 22px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; }
.footer-copy { font-size: 0.71rem; color: rgba(255,255,255,0.28); }
.footer-gold { color: var(--gold); font-size: 0.71rem; letter-spacing: 0.04em; }

/* ── PÁGINAS INTERNAS ── */
.breadcrumb { background: var(--sky-light); border-bottom: 1px solid var(--border); padding: 10px 2rem; }
.breadcrumb-inner { max-width: 1120px; margin: 0 auto; font-size: 0.76rem; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.breadcrumb-inner a { color: var(--azul); }
.breadcrumb-sep { opacity: 0.4; }

.page-header { background: linear-gradient(135deg, var(--navy), var(--azul)); padding: 44px 2rem; color: var(--white); }
.page-header-inner { max-width: 1120px; margin: 0 auto; }
.page-header h1 { font-family: 'Cormorant Garamond', serif; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 300; margin: 0 0 6px; }
.page-header p { font-size: 0.86rem; color: rgba(255,255,255,0.68); margin: 0; }

.page-content { font-size: 0.94rem; line-height: 1.85; color: #2c2c3a; }
.page-content h1,.page-content h2,.page-content h3 { font-family: 'Cormorant Garamond', serif; color: var(--navy); margin: 1.4em 0 0.5em; }
.page-content h2 { font-size: 1.5rem; font-weight: 400; }
.page-content h3 { font-size: 1.2rem; font-weight: 400; }
.page-content p { margin-bottom: 1em; }
.page-content img { border-radius: var(--radius); margin: 16px 0; }
.page-content a { color: var(--azul); text-decoration: underline; }
.page-content blockquote { border-left: 3px solid var(--gold); padding: 10px 18px; background: var(--sky-light); margin: 18px 0; border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; color: var(--muted); }
.page-content ul,.page-content ol { padding-left: 1.4rem; margin-bottom: 1em; }
.page-content li { margin-bottom: 4px; }

/* ── BUSCA ── */
.search-overlay { display: none; position: fixed; inset: 0; background: rgba(5,15,50,0.88); backdrop-filter: blur(6px); z-index: 500; align-items: flex-start; justify-content: center; padding-top: 80px; }
.search-overlay.open { display: flex; }
.search-box-wrap { background: transparent; border-radius: var(--radius-lg); padding: 0; width: 100%; max-width: 560px; }
.search-box-wrap input { background: rgba(255,255,255,0.12) !important; border: 1.5px solid rgba(255,255,255,0.25) !important; border-radius: 10px !important; padding: 12px 16px 12px 40px !important; font-size: 1rem !important; font-family: 'Inter', sans-serif; outline: none; color: #fff !important; transition: border-color 0.2s; }
.search-box-wrap input:focus { border-color: rgba(255,255,255,0.6) !important; }
.search-box-wrap input::placeholder { color: rgba(255,255,255,0.45); }
.search-hint { font-size: 0.73rem; color: var(--muted); margin-top: 10px; }

/* ── SCROLL TOP ── */
#scrollTop {
  position: fixed; bottom: 26px; right: 26px;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--navy); color: var(--white);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: var(--transition); z-index: 400;
  box-shadow: 0 3px 12px rgba(10,36,99,0.22);
}
#scrollTop.visible { opacity: 1; pointer-events: auto; }
#scrollTop:hover { background: var(--azul); }

/* ── RESPONSIVO ── */
/* ── TABLET (900px) ── */
@media (max-width: 900px) {
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .nums-grid { grid-template-columns: 1fr 1fr; }
  .nums-grid .num-item:nth-child(2) { border-right: none; }
  .nums-grid .num-item:nth-child(3) { border-right: 1px solid var(--border); border-top: 1px solid var(--border); }
  .nums-grid .num-item:nth-child(4) { border-top: 1px solid var(--border); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .info-strip-inner { grid-template-columns: 1fr 1fr; }
  /* Navbar */
  .navbar-menu  { display: none !important; }
  .btn-nav-cta  { display: none !important; }
  .font-controls { display: none !important; }
  .navbar-toggler { display: flex !important; }
  .navbar-divider { display: none; }
}

/* ── MOBILE (680px) ── */
@media (max-width: 680px) {
  /* Navbar — só logo + lupa + hamburguer */
  .navbar { position: relative; }
  .navbar-inner { padding: 0 12px; height: 56px; }
  .navbar-brand-sub { display: none; }
  .navbar-menu   { display: none !important; }
  .btn-nav-cta   { display: none !important; }
  .font-controls { display: none !important; }
  .navbar-actions { gap: 4px; margin-left: auto; }
  .navbar-toggler { display: flex !important; }
  .navbar-divider { display: none; }

  /* Grids */
  .cards-grid { grid-template-columns: 1fr; }
  .nums-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .info-strip-inner { grid-template-columns: 1fr; }

  /* Seções */
  .hero { padding: 48px 1.2rem 44px; }
  .section { padding: 40px 1.2rem; }

  /* Home — seções inline */
  div[style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: 1fr !important;
  }
  div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  div[style*="grid-template-columns:1fr 320px"],
  div[style*="grid-template-columns:1fr 340px"],
  div[style*="grid-template-columns:260px 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Programas — menu lateral vira horizontal */
  #prog-nav {
    display: flex !important;
    flex-wrap: wrap;
    gap: 4px;
    border-right: none !important;
    padding-right: 0 !important;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
  }
  .prog-nav-item {
    border-left: none !important;
    border-radius: 50px !important;
    border: 1.5px solid var(--border) !important;
    padding: 5px 12px !important;
    font-size: 0.72rem !important;
  }
  .prog-nav-item.ativo {
    background: var(--navy) !important;
    color: #fff !important;
    border-color: var(--navy) !important;
  }

  /* Casas — filtros */
  div[style*="grid-template-columns:240px 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Banner carrossel */
  #banner-carousel { max-height: 280px !important; }
  #banner-carousel img { height: 280px !important; }

  /* Agenda 2 colunas → 1 */
  div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Botões CTA */
  .btn-nav-cta { font-size: 0.78rem; padding: 8px 12px; }

  /* Texto hero menor */
  .hero h1 { font-size: clamp(1.6rem, 6vw, 2.4rem); }

  /* Breadcrumb compacto */
  .breadcrumb-inner { font-size: 0.70rem; flex-wrap: wrap; }

  /* Footer */
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
}


/* ── PÁGINA CASA DETALHE — RESPONSIVO ── */
@media (max-width: 900px) {
  .casa-main-grid {
    grid-template-columns: 1fr !important;
  }
  .casa-main-grid > div:last-child {
    order: -1;
    width: 100% !important;
    min-width: 0 !important;
    position: static !important;
  }
  #mapa-casa {
    width: 100% !important;
    height: 260px !important;
    border-radius: 10px;
    overflow: hidden;
  }
}

/* ── PÁGINA CASAS — RESPONSIVO ── */
@media (max-width: 900px) {
  .casas-main-grid {
    grid-template-columns: 1fr !important;
  }
  /* Mapa fica em cima, lista embaixo */
  .casas-main-grid > div:last-child {
    order: -1;
    width: 100% !important;
    min-width: 0 !important;
    position: static !important;
  }
  .mapa-container {
    height: 320px !important;
    width: 100% !important;
    border-radius: 10px;
    overflow: hidden;
    display: block;
  }
  #mapa-centros {
    width: 100% !important;
    max-width: 100% !important;
  }
  .filtros-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .filtros-grid > *:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .filtros-grid {
    grid-template-columns: 1fr !important;
  }
  .mapa-container {
    height: 260px !important;
  }
}


/* ── AGENDA REGIONAL — RESPONSIVO ── */
@media (max-width: 900px) {
  .agenda-row {
    grid-template-columns: 100px 1fr !important;
    grid-template-rows: auto auto;
    gap: 4px 0 !important;
    padding: 12px 0 !important;
  }
  /* Dia + dia semana — coluna 1 */
  .agenda-row > div:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }
  /* Evento + local — coluna 2 */
  .agenda-row > div:nth-child(3) {
    grid-column: 2;
    grid-row: 1;
  }
  /* Horário — abaixo do dia */
  .agenda-row > div:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    font-size: 0.68rem !important;
  }
  /* Equipe — abaixo do evento */
  .agenda-row > div:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
    font-size: 0.68rem !important;
  }
}

@media (max-width: 680px) {
  /* Filtros em coluna */
  .filtro-sep    { display: none !important; }
  .filtro-grupo  { width: 100%; }
  .filtro-export { margin-left: 0 !important; width: 100%; }
  .filtro-export a { width: 100%; justify-content: center; }

  /* Agenda row — 1 coluna */
  .agenda-row {
    grid-template-columns: 1fr !important;
    gap: 2px 0 !important;
  }
  .agenda-row > div:nth-child(1),
  .agenda-row > div:nth-child(2),
  .agenda-row > div:nth-child(3),
  .agenda-row > div:nth-child(4) {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
  /* Dia e horário inline */
  .agenda-row > div:nth-child(1) {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .agenda-row > div:nth-child(2) {
    display: none; /* horário já aparece junto ao dia via flex */
  }
}


/* ── ASSISTÊNCIA ESPIRITUAL — RESPONSIVO ── */
@media (max-width: 900px) {
  .ae-hero-grid {
    grid-template-columns: 1fr !important;
  }
  .ae-stats-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .ae-centros-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 680px) {
  .ae-hero-grid {
    grid-template-columns: 1fr !important;
  }
  .ae-stats-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .ae-centros-grid {
    grid-template-columns: 1fr !important;
  }
}


/* ── TABELA PROGRAMAÇÃO ASSISTÊNCIA — RESPONSIVO ── */
@media (max-width: 680px) {
  /* Esconde cabeçalho da tabela */
  .ae-thead { display: none; }

  /* Cada linha vira um card */
  .ae-prog-table,
  .ae-prog-table tbody,
  .ae-prog-table tr,
  .ae-prog-table td {
    display: block !important;
    width: 100% !important;
  }

  /* Separador de dia vira título de seção */
  .ae-prog-table tr td[colspan="5"] {
    background: var(--navy) !important;
    color: #CAF0F8 !important;
    padding: 8px 14px !important;
    font-size: 0.70rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    border-top: 2px solid var(--border) !important;
  }

  /* Card de cada sessão */
  .ae-prog-row {
    background: #fff !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    margin: 6px 12px !important;
    padding: 0 !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05) !important;
  }

  /* Cada célula com label */
  .ae-prog-row td {
    padding: 7px 14px !important;
    border-bottom: 1px solid #f5f5f5 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
  .ae-prog-row td:last-child {
    border-bottom: none !important;
  }
  /* Esconde coluna dia (já aparece no cabeçalho de seção) */
  .ae-prog-row td:first-child {
    display: none !important;
  }

  /* Label antes do valor */
  .ae-prog-row td[data-label]::before {
    content: attr(data-label);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    min-width: 56px;
    padding-top: 2px;
    flex-shrink: 0;
  }

  .ae-table-wrap {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    overflow: visible !important;
  }
}


/* ── PÁGINA PROGRAMAS — RESPONSIVO ── */
@media (max-width: 900px) {

  /* Layout principal vira coluna única */
  .prog-main-grid {
    grid-template-columns: 1fr !important;
    padding: 24px 1.2rem !important;
    gap: 0 !important;
  }

  /* Nav lateral vira menu horizontal pills */
  .prog-nav-wrap {
    position: static !important;
    top: auto !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 0 0 16px !important;
    margin-bottom: 24px !important;
  }

  #prog-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    padding: 0 !important;
  }

  .prog-nav-item {
    border-left: none !important;
    border-radius: 50px !important;
    border: 1.5px solid var(--border) !important;
    padding: 6px 12px !important;
    font-size: 0.74rem !important;
    white-space: nowrap !important;
  }

  .prog-nav-item.ativo {
    background: var(--navy) !important;
    color: #fff !important;
    border-color: var(--navy) !important;
  }

  /* Cards de objetivo/público/funcionamento */
  .prog-cards-grid {
    grid-template-columns: 1fr !important;
  }

  /* Cards extra EAE */
  .prog-extra-grid {
    grid-template-columns: 1fr !important;
  }

  /* Seções de programa com menos padding */
  .prog-section {
    padding-bottom: 32px !important;
    margin-bottom: 32px !important;
  }

  /* Cabeçalho do programa — imagem menor */
  .prog-section > div:first-child > div:first-child {
    width: 52px !important;
    height: 52px !important;
  }
}
