:root {
  --max-width: 1140px;
  --accent: #8B0000;
  --accent-dark: #6e0000;
  --text-dark: #212529;
  --text-light: #6c757d;
  --bg-light: #ffffff;
  --bg-off-white: #f8f9fa;
  --border-color: #dee2e6;
  --radius: 8px;
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  --font-primary: 'Inter', sans-serif;
  --font-secondary: 'Merriweather', serif;
  --container-padding: 1.5rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-primary);
  color: var(--text-dark);
  background: var(--bg-off-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.7;
}

main,
footer {
    position: relative;
    z-index: 1;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

h1, h2, h3 {
  font-family: var(--font-secondary);
  line-height: 1.3;
  font-weight: 700;
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

/* --- Header --- */
.site-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
  height: 80px;
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand__img {
  height: 60px;
  width: auto;
  border-radius: var(--radius);
  object-fit: cover;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav__list {
  display: flex;
  gap: 0.5rem;
  list-style: none;
}

.nav__link {
  display: inline-block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--text-dark);
  border-radius: var(--radius);
  font-weight: 600;
  transition: background-color 0.2s, color 0.2s;
}

.nav__link .fas {
  display: none; /* Esconde os ícones no desktop */
}

.nav__link:hover {
  background: var(--bg-off-white);
  color: var(--accent);
}

.burger {
  display: none;
}

.nav__header {
  display: none;
}

/* --- Botões --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  font-weight: 700;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn--primary {
  background-color: var(--accent);
  color: white;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  background-color: var(--accent-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn--ghost, .btn-ler-mais {
  background-color: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn--ghost:hover, .btn-ler-mais:hover {
  background-color: var(--accent);
  color: white;
}

/* --- Seções --- */
.section {
  padding: 80px 0;
}
.section--light {
  background: var(--bg-light);
}
.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.section-subtitle {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 50px auto;
  color: var(--text-light);
}

/* --- Hero & Carousel --- */
.hero {
  position: relative;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../img/banner.jpg') center/cover no-repeat;
  color: white;
  padding: 60px 0 100px 0; /* Padding ajustado para o slider */
  min-height: 85vh; /* Aumentado para garantir espaço */
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-slider-container {
  position: relative;
  width: 100%;
}

.hero-wrapper {
  position: relative;
  width: 100%;
  min-height: 450px; /* Altura mínima para evitar pulos */
}

/* Estilo individual de cada Slide */
.hero-slide {
  display: none;
  width: 100%;
  animation: fadeInSlide 0.8s ease-in-out;
}
.hero-slide.active {
  display: block;
}

@keyframes fadeInSlide {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Caixa de vidro (Glass Effect) reutilizada dentro dos slides */
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  width: 100%;
  background: rgba(0, 0, 0, 0.5); /* Levemente mais escuro para leitura */
  border-radius: var(--radius);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 3rem;
  min-height: 400px;
}

/* Layouts específicos para slides diferentes */
.hero-slide--center .hero-inner {
  grid-template-columns: 1fr;
  text-align: center;
  justify-content: center;
}

.hero-text h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
}
.hero-text p {
  color: #e9ecef;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}
.hero-text h2.slide-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #fff;
}
.hero-text .slide-info {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--bg-off-white);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero-slide--center .hero-actions {
  justify-content: center;
}

.hero .btn--outline {
  border-color: white;
  color: white;
  background-color: transparent;
}
.hero .btn--outline:hover {
  background-color: white;
  color: var(--accent);
  border-color: var(--accent);
}

.player {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
}
.player iframe {
  width: 100%; height: 100%; border: 0; display: block;
}

/* --- Setas do Carrossel (PC) --- */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  font-size: 1.5rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.hero-prev { left: -70px; }
.hero-next { right: -70px; }

/* Indicadores (bolinhas) */
.hero-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}
.hero-dot {
  width: 12px;
  height: 12px;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
}
.hero-dot.active {
  background: var(--accent);
  transform: scale(1.2);
}

/* --- Outras Seções --- */
.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.about-text .btn {
  margin-top: 1.5rem;
}
.img-responsive { max-width: 100%; height: auto; }
.rounded { border-radius: var(--radius); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.cards {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}
.gallery a {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease;
}
.gallery a:hover {
  box-shadow: var(--shadow-lg);
}
.gallery img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery a:hover img {
  transform: scale(1.05);
}

/* --- Filtros e Posts --- */
.filtros {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.filtro-texto {
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-size: 1rem;
  min-width: 250px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.filtro-texto:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.2);
}
.filtros button {
  background: #e9ecef;
  color: var(--text-dark);
  border: none;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  border-radius: 50px;
  font-weight: 600;
  transition: background-color 0.2s, color 0.2s;
}
.filtros button.ativo, .filtros button:hover {
  background: var(--accent);
  color: white;
}

.lista-posts {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.post {
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-sm);
  overflow-wrap: break-word;
  word-wrap: break-word;
  display: flex;
  flex-direction: column;
}
.post h3 { margin: 0.5rem 0; color: var(--accent); }
.post .categoria {
  font-size: 0.8rem; font-weight: 700; color: var(--text-light); text-transform: uppercase;
}
.post p {
  flex-grow: 1;
  margin-bottom: 1rem;
}
.post .btn-ler-mais {
  align-self: flex-start;
  padding: 0.6rem 1.2rem;
}

/* --- Programação --- */
#programacao .programacao-lista {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 700px;
  background-color: var(--bg-light);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  overflow: hidden;
  text-align: center;
}
#programacao .programacao-lista li {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f0f0f0;
  font-size: 1.1rem;
  color: var(--text-dark);
  font-weight: 600;
  transition: all 0.3s ease;
  background-image: linear-gradient(to right, var(--accent) 0%, var(--accent-dark) 100%);
  background-size: 0% 100%;
  background-repeat: no-repeat;
}
#programacao .programacao-lista li:hover {
  background-size: 100% 100%;
  color: white;
  transform: translateX(5px);
}
#programacao .programacao-lista li:last-child {
  border-bottom: none;
}

/* --- Contato --- */
.contact-grid { gap: 4rem; }
.contact-form label { font-weight: 600; margin-bottom: 0.25rem; display: block; }
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 0.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  margin-bottom: 1rem;
}
.form-row { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; }
.form-feedback { margin-top: 1rem; min-height: 20px; }
.contact-info p {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.contact-info .fas { color: var(--accent); width: 20px; text-align: center; }
.qr-code-container { max-width: 180px; margin-top: 1rem; }
.qr-code-container img { width: 100%; height: auto; }
.hidden { display: none !important; }

/* --- Mapa --- */
.map-container {
  position: relative;
  padding-bottom: 50%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.map-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.site-footer {
  background: var(--text-dark);
  color: #adb5bd;
  padding: 2rem 0;
  font-size: 0.9rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.socials a {
  color: white;
  text-decoration: none;
  margin-left: 1rem;
  font-size: 1.5rem;
  transition: color 0.2s;
}
.socials a:hover {
  color: var(--accent);
}

:root {
  --fc-border-color: #dee2e6;
  --fc-daygrid-event-dot-width: 8px;
  --fc-list-event-dot-width: 10px;
  --fc-event-bg-color: var(--accent);
  --fc-event-border-color: var(--accent);
  --fc-button-bg-color: var(--accent);
  --fc-button-border-color: var(--accent);
  --fc-button-hover-bg-color: var(--accent-dark);
  --fc-button-hover-border-color: var(--accent-dark);
  --fc-button-active-bg-color: var(--accent-dark);
  --fc-button-active-border-color: var(--accent-dark);
  --fc-today-bg-color: rgba(139, 0, 0, 0.08);
}
.fc .fc-toolbar-title {
  font-size: 1.75em;
  font-family: var(--font-secondary);
}

.carousel-wrapper {
  position: relative;
  padding: 0 40px;
  margin: 0 -40px;
}
.carousel-container {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 1rem;
  gap: 1.5rem;
}
.carousel-container::-webkit-scrollbar {
  display: none;
}
#lista-ministerios.carousel-container,
#lista-posts.carousel-container,
#sermons.carousel-container,
#lightgallery-container.carousel-container {
  display: flex;
  grid-template-columns: none;
}
#lista-ministerios.carousel-container .card,
#lista-posts.carousel-container .post,
#sermons.carousel-container .card {
  flex: 0 0 32%;
  min-width: 300px;
}
#lightgallery-container.carousel-container a {
  flex: 0 0 24%;
  min-width: 280px;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  opacity: 0;
  pointer-events: none;
}
.carousel-btn:hover {
  background-color: white;
  box-shadow: var(--shadow-md);
  transform: translateY(-50%) scale(1.05);
}
.carousel-wrapper.is-scrollable .carousel-btn {
  opacity: 1;
  pointer-events: auto;
}
.carousel-btn.prev { left: 5px; }
.carousel-btn.next { right: 5px; }

.modal-overlay {
  display: block;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s 0.3s;
}
.modal-overlay.visible {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}
.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 700px;
  position: relative;
  transform: translateY(-50px);
  transition: transform 0.4s ease-out;
}
.modal-overlay.visible .modal-content {
  transform: translateY(0);
}
.modal-close {
  color: var(--text-light);
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  background: none;
  border: none;
}
.modal-close:hover,
.modal-close:focus {
  color: var(--text-dark);
}
.modal-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}
.modal-header h2 {
  margin: 0;
  font-family: var(--font-secondary);
  color: var(--accent);
}
.modal-header p {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--text-light);
}
.modal-body p {
  margin-bottom: 1em;
  line-height: 1.8;
}

body.modal-open {
  overflow: hidden;
}
.modal-body {
  max-height: 60vh;
  overflow-y: auto;
  word-wrap: break-word;
}