/* ==========================================================================
   Variáveis e base
   ========================================================================== */
:root {
  --primary: #2F2F2F;
  --accent: #975B39;
  --accent-dark: #7a4829;
  --bg: #F2EFEB;
  --surface: #fff;
  --section-bg: #f9f9f9;
  --text: #2F2F2F;
  --muted: #666;
  --border: #ddd;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.12);
  --max-width: 1200px;
  --header-height: 72px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-padding-top: var(--header-height);
}

body {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  padding-left: 1.25rem;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.muted {
  color: var(--muted);
}

.accent {
  color: var(--accent);
}

.text-center {
  text-align: center;
}

.actions {
  text-align: center;
  margin: 30px 0;
}

/* ==========================================================================
   Botões
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--accent);
  color: var(--bg);
}

.btn-solid {
  background: var(--accent);
  color: #fff;
}

.btn-solid:hover,
.btn-solid:focus-visible {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(242, 239, 235, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand img {
  height: 48px;
  width: auto;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-desktop a {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 15px;
  white-space: nowrap;
  color: var(--primary);
  transition: background 0.3s ease, color 0.3s ease;
}

.nav-desktop a:hover,
.nav-desktop a:focus-visible {
  background: var(--accent);
  color: var(--bg);
}

.nav-desktop a[aria-current="page"],
.mobile-menu a[aria-current="page"] {
  color: var(--accent);
  font-weight: 700;
}

.nav-desktop a[aria-current="page"]:hover {
  color: var(--bg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-login {
  padding: 8px 16px;
  font-size: 15px;
}

.hamburger {
  display: none;
  background: none;
  border: 0;
  font-size: 26px;
  line-height: 1;
  padding: 10px;
  cursor: pointer;
  color: var(--primary);
}

/* Menu mobile */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  justify-content: flex-end;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu .panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 85%;
  max-width: 320px;
  height: 100%;
  overflow-y: auto;
  padding: 20px;
  background: var(--bg);
  border-radius: var(--radius) 0 0 var(--radius);
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.active .panel {
  transform: translateX(0);
}

.mobile-close {
  align-self: flex-end;
  background: none;
  border: 0;
  font-size: 22px;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--primary);
}

.mobile-menu a {
  display: block;
  padding: 12px 8px;
  border-radius: 8px;
  font-weight: 600;
  color: var(--primary);
  transition: background 0.3s ease, color 0.3s ease;
}

.mobile-menu a:hover {
  background: var(--accent);
  color: var(--bg);
}

.mobile-menu a.btn {
  margin-top: 16px;
  text-align: center;
  color: #fff;
}

/* ==========================================================================
   Seções genéricas
   ========================================================================== */
section {
  padding: 60px 20px;
  background: var(--section-bg);
}

section + section {
  margin-top: 40px;
}

section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 24px;
  color: #333;
}

section h3 {
  margin: 24px 0 8px;
}

section p + p {
  margin-top: 12px;
}

blockquote {
  margin: 20px 0;
  font-style: italic;
  color: #555;
}

/* ==========================================================================
   Home
   ========================================================================== */
.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 1920 / 400;
  overflow: hidden;
  background: #000;
  margin: 20px auto 0;
  border-radius: var(--radius);
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease;
}

.carousel-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-button {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 42px;
  height: 42px;
  transform: translateY(-50%);
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: #222;
  font-size: 22px;
  cursor: pointer;
  opacity: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  transition: opacity 0.25s ease, background 0.2s ease;
  user-select: none;
}

.carousel-button:hover {
  background: #fff;
}

.carousel:hover .carousel-button,
.carousel-button:focus-visible {
  opacity: 1;
}

.carousel-button.prev { left: 10px; }
.carousel-button.next { right: 10px; }

#welcome {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#welcome .text-block {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

#welcome h2 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  margin-bottom: 12px;
}

.video-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.video-block iframe {
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: var(--radius);
  background: #000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.8s ease forwards;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  opacity: 0;
  transform: translateX(-50px);
  transition: transform 0.6s ease, opacity 0.6s ease, box-shadow 0.4s ease;
}

.card.show,
.lideres-grid.reveal .card {
  opacity: 1;
  transform: translateX(0);
}

.card:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.card img {
  width: 80px;
  height: 80px;
  margin-bottom: 10px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  object-fit: cover;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  color: var(--primary);
}

.card h4 {
  margin: 12px 0 4px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
}

.card p {
  margin: 0;
  color: var(--muted);
}

.lideres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
  padding: 0 10px;
}

/* ==========================================================================
   Células
   ========================================================================== */
.mapa-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 20px 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.mapa-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================================
   Contato
   ========================================================================== */
.contato-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.contato-card {
  padding: 30px 20px;
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contato-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.contato-card img {
  max-width: 60px;
  margin: 0 auto 10px;
}

.contato-card h3 {
  margin: 0;
}

/* ==========================================================================
   Programação
   ========================================================================== */
.schedule {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.event {
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  border-left: 5px solid var(--accent);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.event h3 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  color: var(--primary);
}

.event p {
  margin: 0 0 4px;
  line-height: 1.5;
}

.event p.muted {
  font-size: 0.9rem;
}

/* ==========================================================================
   Login / Cadastro
   ========================================================================== */
.auth {
  display: flex;
  justify-content: center;
  background: transparent;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 32px 28px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-card h2 {
  margin-bottom: 4px;
  text-align: center;
}

.auth-card > p {
  margin-bottom: 24px;
  text-align: center;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 24px;
  padding: 4px;
  background: var(--bg);
  border-radius: 10px;
}

.auth-tab {
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.auth-tab[aria-selected="true"] {
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form[hidden] {
  display: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 14px;
  font-weight: 600;
}

.field input {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(151, 91, 57, 0.2);
}

.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.form-row label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-row a,
.auth-switch button {
  color: var(--accent);
  font-weight: 600;
}

.auth-switch {
  margin-top: 4px;
  font-size: 14px;
  text-align: center;
}

.auth-switch button {
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.form-message {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
}

.form-message:empty {
  display: none;
}

.form-message.error {
  background: #fdecea;
  color: #a12a1a;
}

.form-message.success {
  background: #eaf6ec;
  color: #1e6b2c;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
  padding: 28px 20px;
  border-top: 1px solid #eee;
  text-align: center;
}

.site-footer img {
  height: 38px;
  width: auto;
  filter: grayscale(1);
  opacity: 0.9;
}

.site-footer strong {
  display: block;
}

.site-footer small {
  font-size: 13px;
}

/* ==========================================================================
   Animações e responsivo
   ========================================================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1100px) {
  .nav-desktop {
    display: none;
  }

  .hamburger {
    display: block;
  }
}

@media (max-width: 480px) {
  .brand img {
    height: 40px;
  }

  .brand-name {
    font-size: 16px;
  }

  .btn-login {
    padding: 6px 12px;
    font-size: 14px;
  }

  section {
    padding: 40px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .card {
    opacity: 1;
    transform: none;
  }
}
