:root {
  --bg: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #b91c1c; /* tom rubi para destaque */
  --primary-600: #9f1616;
  --surface: #f8fafc;
  --ring: rgba(185, 28, 28, 0.25);
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid #e5e7eb;
}

/* Masthead (cabeçalho visual superior) */
.masthead {
  background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
  border-bottom: 1px solid #edf2f7;
}
.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem; /* aproxima título da logo */
  padding: 16px 0;
  position: relative; /* para posicionar o hamburger */
}
.masthead-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
}
.masthead-text {
  text-align: center;
}
.masthead-title {
  font-family: "Monotype Corsiva", "Great Vibes", "Playfair Display", Georgia, serif;
  font-size: clamp(2.4rem, 1.8rem + 4vw, 4rem);
  line-height: 1.1;
  margin: 0;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.2px;
}
.masthead-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
}
.brand-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 999px;
}
.brand-logo {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.9rem;
}
.brand-name {
  letter-spacing: 0.2px;
  font-weight: 800;
}

.site-nav ul {
  display: flex;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: nowrap;
  justify-content: center;
}
.site-nav a {
  display: inline-block;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: color 120ms ease;
  white-space: nowrap; /* evita quebra em 2 linhas */
}
.site-nav {
  overflow-x: auto;               /* permite rolar se não couber */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a:hover {
  background: var(--surface);
}
.site-nav a.active {
  background: var(--primary);
  color: #fff;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 6px;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}
.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.nav-toggle .bar {
  width: 24px;
  height: 2px;
  background: var(--text);
  display: block;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  transition: box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  border-bottom-color: transparent;
}
.site-header.scrolled .header-inner {
  height: 56px;
}
.site-header.scrolled .brand-img {
  width: 28px;
  height: 28px;
}

.section {
  padding: 72px 0;
}
.hero {
  background: linear-gradient(180deg, var(--surface), #fff);
  padding: 32px 0;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 1.2rem + 2.5vw, 3rem);
  line-height: 1.2;
  margin: 0 0 0.5rem;
}
.hero p {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

/* Carousel */
.carousel {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
  /* proporção ampla responsiva */
  aspect-ratio: var(--car-w, 16) / var(--car-h, 7);
  max-height: 70vh;
  /* Com max-height, a largura pode ficar menor que o container — centraliza como o menu */
  max-width: 100%;
  margin-inline: auto;
}
.carousel-viewport {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  width: 100%;
  height: 100%;
  transform: translateX(0);
  transition: transform 500ms ease;
  will-change: transform;
}
.carousel-slide {
  position: relative;
  margin: 0;        /* zera margem padrão do <figure> */
  padding: 0;
  flex: 0 0 100%;
  height: 100%;
  background: #000;
}
.carousel-slide-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.carousel-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}
.carousel-slide img.fit-contain {
  object-fit: contain;
  object-position: center center;
  background: #000; /* barras discretas quando necessário */
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  font-size: 24px;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.carousel-btn:hover {
  background: #fff;
}
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

.carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  gap: 6px;
  justify-content: center;
}
.carousel-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}
.carousel-dots .dot.is-active {
  background: #fff;
}

/* Altura mais confortável no mobile */
@media (max-width: 640px) {
  .carousel {
    max-height: 55vh;
  }
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  border: 0;
  box-shadow: var(--shadow);
}
.btn:hover {
  background: var(--primary-600);
}
.btn:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.grid {
  display: grid;
  gap: 1.25rem;
}
.grid.two {
  grid-template-columns: 1.2fr 1fr;
}
.grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.contact-form {
  display: grid;
  gap: 0.75rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font: inherit;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 3px solid var(--ring);
  border-color: var(--primary);
}

.map-placeholder {
  display: grid;
  place-items: center;
  min-height: 220px;
  background: #f1f5f9;
  color: var(--muted);
  border: 1px dashed #d1d5db;
  border-radius: 10px;
}

.cards .card {
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.semear-figure {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}
.semear-logo {
  width: min(360px, 75%);
  height: auto;
}

.ibuc-figure {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}
.ibuc-image {
  width: min(520px, 90%);
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.ibadac-figure {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}
.ibadac-image {
  width: min(640px, 95%);
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.coral-figure {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}
.coral-image {
  width: min(960px, 95%);
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.nossa-igreja-figure {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}
.nossa-igreja-image {
  width: min(960px, 95%);
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
  object-fit: contain;
}

.filiais-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.filial-card {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  background: #000;
}
.filial-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  transition: transform 200ms ease;
}
.filial-card:hover img { transform: scale(1.03); }
.filial-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 10px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.65) 80%);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}

.escola-figure {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}
.escola-image {
  width: min(1200px, 95%);
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
  object-fit: contain;
}

.agenda {
  padding-left: 1rem;
}
.agenda li {
  margin-bottom: 0.5rem;
}

/* Agenda: banners rotativos */
.agenda-banners {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}
.agenda-title{
  margin: 12px 0 6px;
  text-align: center;
  font-family: "Great Vibes", "Playfair Display", Georgia, serif;
  font-weight: 300;
  font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.6rem);
  letter-spacing: 0.4px;
  color: var(--primary);
}
/* Espaço extra entre a programação (ul.agenda) e o título do aniversário */
.agenda + .agenda-title {
  margin-top: 100px;
}
/* Mesmo tamanho para os dois banners da agenda (Cartaz e prog86anos) */
.agenda-banners img,
.agenda-banner-img {
  width: min(960px, 95%);
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: var(--shadow);
  object-fit: contain;
  background: #fff;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Texto da programação 86 anos */
.programacao-86 {
  margin-top: 16px;
}
.programacao-86 h3 {
  margin: 12px 0 8px;
  text-align: center;
}
.programacao-86-figure {
  display: flex;
  justify-content: center;
  margin-top: 14px;
  width: min(960px, 95%);
  margin-left: auto;
  margin-right: auto;
}
.programacao-86-figure .programacao-86-image {
  width: 100%;
}
.program-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 10px;
}
.program-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px;
}
.card-head h4 {
  margin: 0 0 8px;
}
.program-group + .program-group {
  margin-top: 10px;
}
.badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.badge-date {
  background: #0ea5e9;
  margin-right: 8px;
}
.program-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}
.program-list li {
  padding: 6px 0;
  border-bottom: 1px dashed #e5e7eb;
}
.program-list li:last-child {
  border-bottom: 0;
}
.program-list small {
  color: var(--muted);
}
.speaker-thumb{
  width: 120px;
  height: auto;
  display: block;
  margin: 6px 0 0 0;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
@media (max-width: 800px) {
  .program-cards {
    grid-template-columns: 1fr;
  }
}

.site-footer {
  border-top: 1px solid #e5e7eb;
  background: var(--surface);
  padding: 24px 0;
  color: var(--muted);
  text-align: center;
}

/* Responsividade */
@media (max-width: 1024px) {
  .grid.two {
    grid-template-columns: 1fr;
  }
  .grid.three {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 800px) {
  .nav-toggle {
    display: inline-flex;
  }
  /* ainda mais próximo no mobile */
  .masthead-inner { gap: 0.5rem; }
  .site-nav {
    position: absolute;
    inset: 64px 0 auto 0;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: var(--shadow);
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 160ms ease;
  }
  .site-nav.open {
    transform: scaleY(1);
  }
  .site-nav ul {
    flex-direction: column;
    padding: 0.75rem;
  }
  .site-nav a {
    border-radius: 6px;
  }
  .masthead-logo {
    width: 64px;
    height: 64px;
  }
  /* Oculta elementos redundantes da barra no mobile (mantém o nav) */
  .site-header .brand { display: none; }
  .site-header .nav-toggle { display: none; }
  /* Mostra o toggle no masthead no mobile e posiciona à direita */
  .masthead .nav-toggle {
    display: inline-flex;
    position: absolute;
    right: 16px;
    bottom: 8px;    /* encosta um pouco abaixo */
    top: auto;      /* desativa o alinhamento vertical pelo topo */
    transform: none;
    z-index: 2;
  }
}

/* Desktop: centraliza o menu e remove marca para ganhar espaço */
@media (min-width: 801px) {
  .brand { display: none; }
  .header-inner { justify-content: center; }
}

