/* Comunidade da Graça — Redesign público v4.0
   Mantém toda a lógica existente e redefine somente apresentação e responsividade. */
:root {
  --bg: #0b0b0d;
  --bg-soft: #121216;
  --surface: #18181d;
  --surface-elevated: #202027;
  --text: #f7f5f5;
  --text-soft: #b7b3b6;
  --line: rgba(255,255,255,.09);
  --accent: #e11d48;
  --accent-strong: #be123c;
  --accent-soft: rgba(225,29,72,.13);
  --wine: #74142d;
  --success: #2ab47d;
  --shadow-sm: 0 16px 45px rgba(0,0,0,.22);
  --shadow-lg: 0 36px 110px rgba(0,0,0,.44);
  --radius-sm: 14px;
  --radius-md: 24px;
  --radius-lg: 36px;
  --header-height: 76px;
  --shell: 1220px;
}

html { background: var(--bg); }
body {
  background:
    radial-gradient(circle at 100% 0, rgba(116,20,45,.12), transparent 34rem),
    var(--bg);
  font-size: 16px;
  letter-spacing: -.008em;
}
::selection { background: rgba(225,29,72,.34); color: #fff; }

.shell { width: min(var(--shell), calc(100% - 48px)); }
.section { padding: 94px 0; }
.section-soft {
  background: linear-gradient(180deg, rgba(255,255,255,.018), rgba(255,255,255,.006));
  border-block: 1px solid rgba(255,255,255,.045);
}

.site-header {
  height: var(--header-height);
  background: rgba(9,9,11,.76);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-bottom: 1px solid rgba(255,255,255,.075);
  transition: background .25s ease, box-shadow .25s ease;
}
.header-inner { gap: 20px; }
.brand { min-width: 230px; gap: 11px; }
.brand img { width: 48px; height: 42px; }
.brand-copy strong { font-size: .88rem; letter-spacing: .025em; }
.brand-copy small { margin-top: 3px; font-size: .68rem; color: #8e8b91; }
.main-nav { gap: 2px; }
.main-nav a {
  padding: 10px 11px;
  font-size: .72rem;
  letter-spacing: .055em;
  border-radius: 10px;
}
.main-nav a:hover,
.main-nav a.active,
.main-nav a[aria-current="page"] { background: rgba(255,255,255,.065); }
.main-nav a.active::after { left: 14px; right: 14px; bottom: 3px; }
.header-actions { gap: 8px; }
.icon-button,
.menu-button { width: 40px; height: 40px; border-radius: 11px; }
.header-actions .button { min-height: 40px; padding-inline: 16px; }

.button {
  min-height: 50px;
  border-radius: 13px;
  font-size: .84rem;
  letter-spacing: .005em;
  box-shadow: none;
}
.button:hover { transform: translateY(-1px); }
.button-accent {
  background: linear-gradient(135deg, #e11d48, #b9133b);
  box-shadow: 0 14px 34px rgba(225,29,72,.20);
}
.button-accent:hover { box-shadow: 0 18px 42px rgba(225,29,72,.28); }
.button-ghost { background: rgba(255,255,255,.055); border-color: rgba(255,255,255,.16); }
.button-light { box-shadow: 0 14px 34px rgba(0,0,0,.16); }
.text-link { font-size: .88rem; }

.hero {
  min-height: 720px;
  padding: calc(var(--header-height) + 92px) 0 88px;
  background: #08080a;
}
.hero-backdrop {
  background:
    linear-gradient(90deg, rgba(5,5,7,.96) 0%, rgba(5,5,7,.78) 43%, rgba(5,5,7,.35) 100%),
    linear-gradient(0deg, rgba(5,5,7,.92), transparent 55%),
    url('images/inicio.webp') center 42%/cover no-repeat;
  transform: none;
}
.hero-backdrop::after {
  background:
    radial-gradient(circle at 73% 26%, rgba(225,29,72,.22), transparent 25%),
    linear-gradient(115deg, transparent 0 56%, rgba(225,29,72,.08) 56% 57%, transparent 57%);
}
.hero-grid {
  grid-template-columns: minmax(0,1.2fr) minmax(300px,.55fr);
  gap: clamp(44px,7vw,88px);
  align-items: center;
}
.hero-copy { max-width: 740px; }
.eyebrow {
  margin-bottom: 18px;
  font-size: .72rem;
  letter-spacing: .18em;
}
.hero h1 {
  max-width: 800px;
  font-size: clamp(3.65rem,7vw,6.45rem);
  line-height: .91;
  letter-spacing: -.06em;
  text-transform: none;
}
.hero h1 span { color: #fb7185; }
.hero-copy > p {
  max-width: 600px;
  margin: 27px 0 30px;
  color: #c9c6ca;
  font-size: clamp(1rem,1.5vw,1.18rem);
  line-height: 1.72;
}
.hero-actions { gap: 10px; }
.hero-meta { gap: 32px; margin-top: 38px; }
.hero-meta > div { gap: 9px; }
.meta-icon { color: #fb7185; }
.hero-meta strong { font-size: .84rem; }
.hero-meta small { font-size: .74rem; }
.next-service-card {
  padding: 30px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(30,30,35,.86), rgba(15,15,18,.78));
  box-shadow: 0 30px 90px rgba(0,0,0,.40);
}
.next-service-card h2 { font-size: 1.65rem; }
.next-service-day { margin-top: 25px; }
.next-service-time { margin-bottom: 23px; font-size: 1.18rem; }
.countdown div { padding: 12px 7px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.055); }
.countdown strong { font-size: 1.2rem; }

.quick-links { margin-top: -30px; }
.quick-links-grid {
  gap: 12px;
  overflow: visible;
  box-shadow: none;
  border-radius: 0;
}
.quick-card {
  min-height: 104px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(24,24,29,.94);
  box-shadow: var(--shadow-sm);
}
.quick-card:last-child { border-right: 1px solid var(--line); }
.quick-card:hover { background: var(--surface-elevated); transform: translateY(-3px); border-color: rgba(225,29,72,.28); }
.quick-icon { font-size: .67rem; color: #fb7185; }
.quick-card strong { font-size: .88rem; }
.quick-card small { font-size: .72rem; margin-top: 2px; }

.section-heading { max-width: 720px; }
.section-heading h2 {
  font-size: clamp(2.25rem,4vw,4rem);
  line-height: 1.03;
  letter-spacing: -.047em;
}
.section-heading p { max-width: 580px; font-size: .98rem; line-height: 1.75; }
.section-heading.horizontal { align-items: end; margin-bottom: 38px; }
.section-heading.centered { margin-bottom: 42px; }

.about-grid { gap: clamp(44px,7vw,90px); }
.values-grid { gap: 14px; }
.value-card {
  min-height: 215px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,.026), rgba(255,255,255,.01));
  box-shadow: none;
}
.value-card:hover { transform: translateY(-3px); border-color: rgba(225,29,72,.25); }
.value-card span { color: #fb7185; }
.value-card h3 { font-size: 1.12rem; }
.value-card p { font-size: .88rem; line-height: 1.7; }

.schedule-strip {
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.015);
}
.schedule-strip article { min-height: 96px; padding: 20px 22px; }
.schedule-strip article + article { border-left-color: var(--line); }
.schedule-day { color: #fb7185; }
.events-grid { gap: 16px; }
.event-card {
  min-height: 330px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  box-shadow: none;
}
.event-card::before { background: linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,.92)); }
.event-card:hover { border-color: rgba(225,29,72,.34); }
.event-date { background: rgba(225,29,72,.92); }
.event-card h3 { font-size: 1.3rem; }

.ministries-grid { gap: 16px; }
.ministry-card {
  min-height: 410px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: none;
}
.ministry-card::after { background: linear-gradient(180deg, transparent 20%, rgba(0,0,0,.94)); }
.ministry-card-copy { padding: 26px; }
.ministry-card-copy h3 { font-size: 1.45rem; }
.ministry-card:hover { transform: translateY(-4px); border-color: rgba(225,29,72,.30); }

.visit-section {
  padding: 96px 0;
  background:
    radial-gradient(circle at 10% 15%, rgba(225,29,72,.20), transparent 26rem),
    linear-gradient(145deg, #75162f, #3f0d1d 55%, #171014);
}
.visit-grid { gap: clamp(42px,7vw,90px); }
.visit-copy h2 { font-size: clamp(2.55rem,5vw,4.9rem); letter-spacing: -.052em; }
.visit-copy p { max-width: 580px; }
.visit-checklist span { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.045); }
.visit-card {
  padding: 34px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 24px;
  background: rgba(10,10,12,.55);
  backdrop-filter: blur(14px);
}

.site-footer {
  padding: 62px 0 22px;
  background: #08080a;
  border-top: 1px solid rgba(255,255,255,.06);
}
.footer-grid { gap: 48px; }
.footer-brand img { width: 50px; }
.footer-grid > div > strong { font-size: .77rem; letter-spacing: .09em; text-transform: uppercase; color: #f5f3f4; }
.footer-grid a, .footer-grid p { font-size: .82rem; color: #a7a3a8; }
.footer-bottom { margin-top: 44px; padding-top: 20px; font-size: .76rem; }

/* Páginas internas */
.page-hero {
  min-height: 500px;
  padding: calc(var(--header-height) + 102px) 0 84px;
  display: flex;
  align-items: end;
  background-position: center 40%;
}
.page-hero::before {
  background:
    linear-gradient(90deg, rgba(6,6,8,.94), rgba(6,6,8,.62) 55%, rgba(6,6,8,.35)),
    linear-gradient(0deg, rgba(6,6,8,.85), transparent 55%);
}
.page-hero::after { background: radial-gradient(circle at 75% 30%, rgba(225,29,72,.22), transparent 30%); }
.page-hero-copy { max-width: 800px; }
.page-hero h1 {
  max-width: 920px;
  margin: 12px 0 17px;
  font-size: clamp(2.8rem,6vw,5.3rem);
  line-height: .96;
  letter-spacing: -.052em;
}
.page-hero p { max-width: 650px; font-size: 1.02rem; line-height: 1.72; }

.cell-page-controls,
.info-panel,
.message-page-card,
.video-card,
.live-video-card,
.event-detail-card,
.event-registration-card,
.loading-card {
  border-color: var(--line);
  background: linear-gradient(145deg, rgba(255,255,255,.025), rgba(255,255,255,.008));
  box-shadow: none;
}
.cell-page-controls,
.info-panel { border-radius: 22px; }
.cells-page-grid { gap: 16px; }
.cell-page-card { border-radius: 21px; background: var(--surface); border-color: var(--line); }
.cell-page-card:hover { transform: translateY(-3px); border-color: rgba(225,29,72,.30); }
.messages-page-grid,
.videos-grid { gap: 16px; }
.message-page-card,
.video-card { border-radius: 21px; overflow: hidden; }
.message-page-card:hover,
.video-card:hover { transform: translateY(-3px); border-color: rgba(225,29,72,.28); }
.message-page-copy,
.video-card-copy { padding: 24px; }
.contact-page-grid { gap: 18px; }
.public-form input,
.public-form textarea,
.public-form select,
.cell-page-controls input,
.cell-page-controls select,
.registration-form input,
.registration-form textarea,
.registration-form select {
  border-radius: 12px;
  background: rgba(0,0,0,.22);
  border-color: rgba(255,255,255,.11);
}
.public-form input:focus,
.public-form textarea:focus,
.public-form select:focus,
.cell-page-controls input:focus,
.cell-page-controls select:focus,
.registration-form input:focus,
.registration-form textarea:focus,
.registration-form select:focus {
  border-color: rgba(225,29,72,.85);
  box-shadow: 0 0 0 3px rgba(225,29,72,.12);
}
.form-tab { border-radius: 11px; }
.form-tab.active { background: var(--accent-soft); color: #fb7185; }

.event-detail-page { padding: calc(var(--header-height) + 46px) 0 86px; }
.event-detail-grid { gap: 18px; }
.event-detail-card,
.event-registration-card { border-radius: 24px; }
.event-detail-copy { padding: clamp(25px,4vw,44px); }
.event-detail-copy h1 { font-size: clamp(2.35rem,5vw,4.5rem); }
.event-fact { background: rgba(255,255,255,.02); border-radius: 14px; }
.event-registration-card { position: sticky; top: calc(var(--header-height) + 22px); padding: 27px; }

/* Assistente mais discreto */
.comuna-assistant { right: 18px !important; bottom: 18px !important; }
.assistant-launcher { min-height: 52px !important; padding-inline: 17px !important; box-shadow: 0 18px 46px rgba(0,0,0,.35) !important; }
.assistant-panel { border-radius: 22px !important; }

@media (max-width: 1160px) {
  .brand { min-width: 190px; }
  .brand-copy small { display: none; }
  .main-nav a { padding-inline: 8px; font-size: .68rem; }
  .header-actions .button { display: none; }
  .hero-grid { gap: 42px; }
}

@media (max-width: 900px) {
  :root { --header-height: 70px; }
  .shell { width: min(100% - 34px, var(--shell)); }
  .section { padding: 76px 0; }
  .header-inner { gap: 10px; }
  .brand { min-width: 0; margin-right: auto; }
  .brand img { width: 43px; height: 38px; }
  .brand-copy strong { font-size: .78rem; }
  .menu-button { display: block; order: 3; }
  .header-actions { margin-left: auto; }
  .main-nav {
    position: fixed;
    inset: var(--header-height) 0 auto;
    display: grid;
    gap: 4px;
    max-height: 0;
    padding: 0 17px;
    overflow: hidden;
    background: rgba(9,9,11,.98);
    border-bottom: 1px solid transparent;
    opacity: 0;
    transform: translateY(-8px);
    transition: max-height .25s ease, padding .25s ease, opacity .2s ease, transform .2s ease;
  }
  .main-nav.open {
    max-height: calc(100vh - var(--header-height));
    padding: 16px 17px 22px;
    overflow-y: auto;
    border-bottom-color: rgba(255,255,255,.08);
    opacity: 1;
    transform: none;
  }
  .main-nav a { padding: 14px 13px; font-size: .76rem; border-radius: 11px; }
  .main-nav a.active::after { display: none; }
  .hero { min-height: auto; padding: calc(var(--header-height) + 72px) 0 72px; }
  .hero-grid { grid-template-columns: 1fr; align-items: start; }
  .hero-copy { max-width: 660px; }
  .hero h1 { font-size: clamp(3.25rem,11vw,5.4rem); }
  .next-service-card { max-width: 500px; }
  .quick-links { margin-top: -20px; }
  .quick-links-grid { grid-template-columns: repeat(2,1fr); }
  .about-grid, .visit-grid { gap: 48px; }
  .schedule-strip { grid-template-columns: 1fr; }
  .schedule-strip article + article { border-left: 0; border-top: 1px solid var(--line); }
  .events-grid, .ministries-grid { grid-template-columns: repeat(2,1fr); }
  .page-hero { min-height: 430px; padding-bottom: 64px; }
  .event-detail-grid, .contact-page-grid { grid-template-columns: 1fr; }
  .event-registration-card { position: static; }
}

@media (max-width: 640px) {
  .shell { width: min(100% - 26px, var(--shell)); }
  .section { padding: 64px 0; }
  .brand-copy strong { max-width: 150px; line-height: 1.12; }
  .icon-button { display: none; }
  .hero { padding-top: calc(var(--header-height) + 58px); }
  .hero-backdrop {
    background:
      linear-gradient(180deg, rgba(5,5,7,.52), rgba(5,5,7,.95) 76%),
      url('images/inicio-mobile.webp') center top/cover no-repeat;
  }
  .hero-grid { gap: 34px; }
  .hero h1 { font-size: clamp(3rem,15vw,4.5rem); line-height: .92; }
  .hero-copy > p { margin: 22px 0 25px; font-size: .98rem; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .button { width: 100%; }
  .hero-meta { display: grid; gap: 14px; margin-top: 30px; }
  .next-service-card { padding: 24px; border-radius: 21px; }
  .quick-links-grid { grid-template-columns: 1fr; gap: 9px; }
  .quick-card { min-height: 86px; padding: 17px; }
  .section-heading.horizontal { display: grid; gap: 13px; align-items: start; }
  .section-heading h2 { font-size: clamp(2.15rem,11vw,3.2rem); }
  .values-grid, .events-grid, .ministries-grid, .cells-page-grid, .messages-page-grid, .videos-grid { grid-template-columns: 1fr; }
  .value-card { min-height: 0; }
  .event-card { min-height: 310px; }
  .ministry-card { min-height: 350px; }
  .visit-section { padding: 70px 0; }
  .visit-card { padding: 25px; }
  .page-hero { min-height: 390px; padding: calc(var(--header-height) + 70px) 0 52px; }
  .page-hero h1 { font-size: clamp(2.55rem,12vw,3.7rem); }
  .page-hero p { font-size: .96rem; }
  .event-detail-page { padding-top: calc(var(--header-height) + 24px); }
  .event-detail-copy { padding: 23px; }
  .event-facts { grid-template-columns: 1fr; }
  .event-registration-card { padding: 23px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-brand, .footer-grid > div:last-child { grid-column: auto; }
  .footer-bottom { gap: 12px; }
  .comuna-assistant { right: 12px !important; bottom: 12px !important; }
  .assistant-launcher-label { display: none !important; }
  .assistant-launcher { width: 52px !important; padding: 0 !important; border-radius: 50% !important; }
}

/* Tema claro opcional, mantendo contraste e a identidade vermelha. */
[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f5f4;
  --bg-soft: #efedeb;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --text: #211c1e;
  --text-soft: #6d6568;
  --line: rgba(52,33,39,.11);
  --accent-soft: rgba(225,29,72,.09);
  --shadow-sm: 0 16px 42px rgba(65,42,49,.08);
  --shadow-lg: 0 32px 90px rgba(65,42,49,.14);
}
[data-theme="light"] body {
  background: radial-gradient(circle at 100% 0, rgba(225,29,72,.07), transparent 34rem), var(--bg);
}
[data-theme="light"] .section-soft { background: #f0eeec; border-block-color: rgba(52,33,39,.07); }
[data-theme="light"] .quick-card,
[data-theme="light"] .value-card,
[data-theme="light"] .cell-page-controls,
[data-theme="light"] .info-panel,
[data-theme="light"] .message-page-card,
[data-theme="light"] .video-card,
[data-theme="light"] .event-detail-card,
[data-theme="light"] .event-registration-card,
[data-theme="light"] .loading-card { background: #fff; }
[data-theme="light"] .quick-card:hover { background: #fff; }
[data-theme="light"] .schedule-strip { background: rgba(255,255,255,.65); }
[data-theme="light"] .public-form input,
[data-theme="light"] .public-form textarea,
[data-theme="light"] .public-form select,
[data-theme="light"] .cell-page-controls input,
[data-theme="light"] .cell-page-controls select,
[data-theme="light"] .registration-form input,
[data-theme="light"] .registration-form textarea,
[data-theme="light"] .registration-form select { background: #fff; color: var(--text); }
[data-theme="light"] .site-footer { background: #0a090b; }
