:root {
  --bg: #ffffff;
  --muted: #f8fafc;
  --text: #0f172a;
  --subtext: #475569;
  --border: rgba(15, 23, 42, 0.1);
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);

  --accent: #d72631;
  --accent-hover: #e63946;
  --secondary: #b51c1c;
  --secondary-hover: #c93b3b;
  --focus: #ffbf47;

  --radius: 14px;
  --radius-sm: 10px;
  --container: 1120px;

  /* Theme variables override */
  --card-bg: #ffffff;
  --input-bg: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.9);
  --btn-ghost-bg: transparent;
  --btn-ghost-border: rgba(15, 23, 42, 0.18);
  --btn-ghost-hover: rgba(2, 6, 23, 0.03);
  --pill-bg: rgba(181, 28, 28, 0.06);
  --pill-border: rgba(181, 28, 28, 0.12);
  --pill-color: var(--secondary-hover);
  
  --eyebrow-bg: rgba(215, 38, 49, 0.06);
  --eyebrow-border: rgba(215, 38, 49, 0.14);
  --eyebrow-color: var(--accent);
}

[data-theme="dark"] {
  --bg: #090f1d;
  --muted: #111827;
  --text: #f8fafc;
  --subtext: #94a3b8;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 10px 35px rgba(0, 0, 0, 0.4);

  --accent: #ff7a7a;
  --accent-hover: #ff9c9c;
  --secondary: #ff4c4c;
  --secondary-hover: #ff7a7a;

  --card-bg: #111827;
  --input-bg: #1f2937;
  --header-bg: rgba(9, 15, 29, 0.9);
  --btn-ghost-border: rgba(255, 255, 255, 0.18);
  --btn-ghost-hover: rgba(255, 255, 255, 0.04);
  --pill-bg: rgba(255, 76, 76, 0.12);
  --pill-border: rgba(255, 76, 76, 0.22);
  --pill-color: #ff7a7a;
  
  --eyebrow-bg: rgba(255, 122, 122, 0.12);
  --eyebrow-border: rgba(255, 122, 122, 0.22);
  --eyebrow-color: #ff9c9c;
}

*,
*::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;
  text-rendering: optimizeLegibility;
  transition: background 250ms ease, color 250ms ease;
}

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

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

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.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;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 9999;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  background: var(--focus);
  color: #111827;
  transform: translateY(-160%);
  transition: transform 180ms ease;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background 250ms ease, border-color 250ms ease;
}

.topbar {
  height: 6px;
  background: linear-gradient(90deg, var(--accent), var(--secondary));
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 8px 20px rgba(181, 28, 28, 0.18);
}

.brand-text {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
}

.brand-title {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.brand-subtitle {
  color: var(--subtext);
  font-size: 0.82rem;
  line-height: 1.2;
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nav-link {
  display: inline-flex;
  padding: 0.5rem 0.65rem;
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 180ms ease, color 180ms ease;
}

.nav-link:hover {
  background: var(--pill-bg);
  color: var(--pill-color);
  text-decoration: none;
}

.nav-cta {
  margin-left: 0.25rem;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  transition: background 180ms ease, border-color 180ms ease;
}

.nav-toggle:hover {
  cursor: pointer;
  background: var(--btn-ghost-hover);
}

.nav-toggle-lines {
  width: 20px;
  height: 2px;
  background: var(--text);
  position: relative;
  border-radius: 999px;
}

.nav-toggle-lines::before,
.nav-toggle-lines::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}

.nav-toggle-lines::before {
  top: -6px;
}
.nav-toggle-lines::after {
  top: 6px;
}

/* Theme Toggle Button */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 160ms, border-color 160ms, transform 160ms;
}

.theme-toggle:hover {
  background: var(--btn-ghost-hover);
  border-color: var(--text);
  transform: scale(1.05);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section-muted {
  background: var(--muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 250ms ease, border-color 250ms ease;
}

.section-header {
  margin-bottom: 2rem;
  text-align: center;
}

.section-title {
  margin: 0;
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.2rem);
  letter-spacing: -0.04em;
  font-weight: 800;
}

.section-subtitle {
  margin: 0.6rem auto 0;
  color: var(--subtext);
  max-width: 65ch;
  font-size: 1.05rem;
}

/* Hero */
.hero {
  padding-top: 3rem;
  padding-bottom: 2.5rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  background: var(--eyebrow-bg);
  color: var(--eyebrow-color);
  border: 1px solid var(--eyebrow-border);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  margin: 0 0 0.85rem;
  letter-spacing: 0.02em;
}

.hero-title {
  margin: 0;
  font-size: clamp(1.8rem, 1.3rem + 2.5vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.05em;
  font-weight: 900;
}

.hero-lead {
  margin: 1.1rem 0 0;
  color: var(--subtext);
  font-size: 1.1rem;
  max-width: 65ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.8rem 0 0;
  padding: 0;
}

.stat {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  padding: 0.85rem 1.1rem;
  box-shadow: var(--shadow);
  transition: background 250ms, border-color 250ms;
}

.stat dt {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}

.stat dd {
  margin: 0.15rem 0 0;
  color: var(--subtext);
  font-size: 0.9rem;
}

.hero-media .media-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0b1220;
  box-shadow: var(--shadow);
  position: relative;
  aspect-ratio: 16 / 10;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-caption {
  margin: 0.7rem 0 0;
  color: var(--subtext);
  font-size: 0.88rem;
  text-align: center;
}

/* Countdown Regressivo */
.countdown-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  background: linear-gradient(135deg, rgba(181, 28, 28, 0.05), rgba(215, 38, 49, 0.05));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  margin-top: 1.8rem;
  max-width: 480px;
}

.countdown-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.25rem;
  box-shadow: var(--shadow);
  transition: background 250ms;
}

.countdown-val {
  font-size: clamp(1.3rem, 1rem + 1.8vw, 2.1rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.countdown-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--subtext);
  margin-top: 0.25rem;
  letter-spacing: 0.05em;
}

/* Cards / Layout */
.grid {
  display: grid;
  gap: 1.25rem;
}

.cards-2 { grid-template-columns: 1fr; }
.cards-3 { grid-template-columns: 1fr; }
.cards-4 { grid-template-columns: 1fr; }

.cards-4 > .card {
  height: 100%;
}

.about-flow {
  display: grid;
  gap: 1.25rem;
}

.about-presentation {
  width: 100%;
}

.about-cards {
  grid-template-columns: 1fr;
}

.about-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 1rem;
  align-items: start;
}

.two-col {
  display: grid;
  gap: 1.25rem;
}

.stack {
  display: grid;
  gap: 1.25rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: background 250ms, border-color 250ms, transform 200ms ease, box-shadow 200ms ease;
  display: flex;
  flex-direction: column;
}

.card-elevated {
  box-shadow: var(--shadow);
}

.card-title {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.card-text {
  margin: 0.75rem 0 0;
  color: var(--subtext);
  font-size: 0.95rem;
  flex-grow: 1;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  flex: 0 0 auto;
}

.card-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
}

.list {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  color: var(--subtext);
  font-size: 0.95rem;
}

.list li + li {
  margin-top: 0.4rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--pill-color);
  font-weight: 800;
  font-size: 0.78rem;
  border: 1px solid var(--pill-border);
  width: fit-content;
}

.course-head {
  display: grid;
  gap: 0.4rem;
}

.checklist {
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--subtext);
  font-size: 0.92rem;
}

.checklist li {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
}

.checklist li::before {
  content: "✓";
  color: var(--accent-hover);
  font-weight: 900;
  line-height: 1.2;
  margin-top: 0.1rem;
}

.mini-card {
  transition: transform 220ms ease, box-shadow 220ms ease, background 250ms, border-color 250ms;
}

.mini-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--blue-2);
}

.link {
  display: inline-flex;
  margin-top: 1rem;
  color: var(--secondary-hover);
  font-weight: 700;
}

.link:hover {
  text-decoration: underline;
}

.footnote {
  margin: 1.2rem 0 0;
  color: var(--subtext);
  font-size: 0.9rem;
  text-align: center;
}

/* Banner */
.banner {
  margin-top: 1.8rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--card-bg), rgba(11, 94, 59, 0.05));
  display: grid;
  transition: background 250ms, border-color 250ms;
}

.banner-media img {
  width: 100%;
  height: 100%;
  max-height: 260px;
  object-fit: cover;
}

.banner-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.banner-title {
  margin: 0;
  letter-spacing: -0.03em;
  font-weight: 800;
  font-size: 1.35rem;
}

.banner-text {
  margin: 0.75rem 0 1rem;
  color: var(--subtext);
  font-size: 0.98rem;
}

/* Programação com Abas e Filtros */
.tabs-container {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.tab-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.92rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
  transition: background 180ms, color 180ms, border-color 180ms, transform 150ms;
}

.tab-btn:hover {
  background: var(--btn-ghost-hover);
  border-color: var(--blue-2);
}

.tab-btn:active {
  transform: scale(0.97);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 15px rgba(181, 28, 28, 0.2);
}

.filter-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.filter-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--subtext);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 180ms, color 180ms, border-color 180ms;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--pill-bg);
  color: var(--pill-color);
  border-color: var(--pill-border);
}

.search-wrapper {
  max-width: 480px;
  margin: 0 auto 1.8rem;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.8rem;
  border-radius: 999px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
  box-shadow: var(--shadow);
  transition: background 250ms, border-color 250ms, box-shadow 180ms;
}

.search-input:focus {
  outline: none;
  border-color: var(--secondary-hover);
  box-shadow: 0 0 0 4px rgba(181, 28, 28, 0.12);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--subtext);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.search-icon svg {
  width: 18px;
  height: 18px;
}

.schedule-list {
  display: grid;
  gap: 1rem;
}

.schedule-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
  box-shadow: 0 4px 10px rgba(0,0,0,0.02);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.schedule-item:hover {
  transform: translateX(4px);
  border-color: var(--accent-hover);
  box-shadow: var(--shadow);
}

.schedule-time-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.schedule-time {
  font-weight: 800;
  color: var(--secondary-hover);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.schedule-type {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* Category colors */
.badge-abertura { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.badge-palestra { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.badge-oficina { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.badge-cultural { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
.badge-livro { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.badge-mesa { background: rgba(236, 72, 153, 0.1); color: #ec4899; }
.badge-infantil { background: rgba(14, 165, 233, 0.1); color: #0ea5e9; }
.badge-sala { background: rgba(100, 116, 139, 0.1); color: #64748b; }

.schedule-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.schedule-speaker {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 0.2rem;
}

.schedule-local {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--subtext);
  margin-top: 0.25rem;
}

.schedule-local svg {
  width: 14px;
  height: 14px;
  fill: none;
}

.schedule-action {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

/* Oficinas Vagas e Estados */
.slots-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
  border-top: 1px dashed var(--border);
  padding-top: 0.75rem;
}

.slots-count {
  font-weight: 800;
  color: var(--accent);
}

.slots-count.limited {
  color: #d97706;
}

.slots-count.closed {
  color: #dc2626;
}

.closed-badge {
  display: inline-block;
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.18);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.btn-disabled {
  background: var(--muted) !important;
  color: var(--subtext) !important;
  border-color: var(--border) !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
  filter: none !important;
}

/* Palestrantes Bio & Modais */
.speaker-avatar-wrapper {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 0.75rem;
  border: 3px solid var(--accent);
  box-shadow: var(--shadow);
}

.speaker-avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.speaker-name {
  font-weight: 800;
  font-size: 1.15rem;
  margin: 0;
  letter-spacing: -0.02em;
}

.speaker-role {
  font-size: 0.82rem;
  color: var(--subtext);
  font-weight: 600;
  margin-top: 0.15rem;
}

.speaker-topic {
  font-size: 0.88rem;
  font-weight: 700;
  margin-top: 0.5rem;
  color: var(--blue-2);
  line-height: 1.3;
}

.speaker-socials {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.85rem 0;
}

.speaker-social-link {
  color: var(--subtext);
  padding: 0.35rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  transition: color 150ms, border-color 150ms, background 150ms;
}

.speaker-social-link:hover {
  color: var(--secondary-hover);
  border-color: var(--secondary-hover);
  background: var(--pill-bg);
}

.speaker-social-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Vitrine de Livros com Efeito 3D */
.book-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.book-card {
  perspective: 1000px;
}

.book-cover-wrapper {
  width: 135px;
  height: 190px;
  margin: 0 auto 1rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 300ms ease, box-shadow 300ms ease;
  transform-style: preserve-3d;
  background: #f1f5f9;
  border: 1px solid var(--border);
}

.book-cover-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-card:hover .book-cover-wrapper {
  transform: rotateY(-14deg) rotateX(4deg) scale(1.02);
  box-shadow: -6px 12px 25px rgba(0, 0, 0, 0.22);
}

.book-title {
  font-weight: 800;
  font-size: 1.05rem;
  margin: 0;
  text-align: center;
}

.book-author {
  font-size: 0.85rem;
  color: var(--subtext);
  font-weight: 600;
  text-align: center;
  margin-top: 0.15rem;
}

.book-publisher {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--green-2);
  text-align: center;
  margin-top: 0.35rem;
}

/* Gallery */
.gallery {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.2rem;
  grid-template-columns: 1fr;
}

.gallery-item {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card-bg);
  cursor: pointer;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 300ms ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(181, 28, 28, 0.4);
  opacity: 0;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 700;
  font-size: 1.5rem;
  transition: opacity 200ms ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Podcast e Vídeos */
.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.video-frame-container {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0b1220;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-frame-container video, 
.video-frame-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

/* Patrocinadores Marquee */
.sponsors-section {
  padding: 2.5rem 0;
  background: var(--muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  transition: background 250ms, border-color 250ms;
}

.sponsors-marquee-container {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.sponsors-track {
  display: flex;
  gap: 3.5rem;
  width: max-content;
  animation: scrollMarquee 25s linear infinite;
}

.sponsors-track:hover {
  animation-play-state: paused;
}

.sponsor-logo-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  color: var(--subtext);
  font-size: 1.1rem;
  opacity: 0.7;
  transition: opacity 200ms, color 200ms;
}

.sponsor-logo-box:hover {
  opacity: 1;
  color: var(--accent);
}

.sponsor-icon-mock {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 900;
}

.sponsor-type {
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 700;
  background: var(--border);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  display: inline-block;
  margin-left: 0.35rem;
}

@keyframes scrollMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Google Map */
.map-container {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  height: 300px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 1.25rem;
}

.form-card fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.field {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.8rem;
}

.label {
  font-weight: 700;
  font-size: 0.92rem;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  font: inherit;
  background: var(--input-bg);
  color: var(--text);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: background 250ms, border-color 250ms, box-shadow 150ms;
}

input::placeholder,
textarea::placeholder {
  color: var(--subtext);
  opacity: 0.7;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--blue-2);
  box-shadow: 0 0 0 4px rgba(13, 74, 160, 0.12);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1rem;
}

.form-hint {
  margin: 0;
  color: var(--subtext);
  font-size: 0.92rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0.9rem 0 0;
  display: grid;
  gap: 0.65rem;
}

.contact-key {
  display: block;
  color: var(--accent);
  font-weight: 800;
  font-size: 0.9rem;
}

.contact-val {
  display: block;
  color: var(--subtext);
}

.cta-card {
  background: linear-gradient(135deg, rgba(181, 28, 28, 0.04), rgba(215, 38, 49, 0.04));
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, background 160ms ease,
    border-color 160ms ease, box-shadow 160ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  color: #fff;
  box-shadow: 0 8px 20px rgba(181, 28, 28, 0.15);
}

.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 10px 22px rgba(181, 28, 28, 0.22);
}

.btn-secondary {
  background: var(--pill-bg);
  color: var(--pill-color);
  border-color: var(--pill-border);
}

.btn-secondary:hover {
  background: rgba(181, 28, 28, 0.14);
}

.btn-ghost {
  background: var(--btn-ghost-bg);
  border-color: var(--btn-ghost-border);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--btn-ghost-hover);
}

/* WhatsApp Flutuante */
.whatsapp-float {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 99;
  background: #25d366;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.whatsapp-float:hover {
  transform: scale(1.1) rotate(6deg);
  color: white;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.whatsapp-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.4);
  animation: pulse 2s infinite;
  z-index: -1;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* Modais Dinâmicos */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 540px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  transform: translateY(16px);
  transition: transform 220ms ease, background 250ms;
}

.modal-backdrop.is-open .modal-container {
  transform: translateY(0);
}

.modal-header {
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.modal-close {
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  transition: background 150ms;
}

.modal-close:hover {
  background: var(--btn-ghost-hover);
}

.modal-body {
  padding: 1.4rem;
  overflow-y: auto;
  font-size: 0.95rem;
  color: var(--subtext);
}

.modal-body-meta {
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  margin-bottom: 1rem;
  display: grid;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.modal-body-meta-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.modal-body-meta-row svg {
  width: 16px;
  height: 16px;
  color: var(--blue-2);
  fill: none;
}

.modal-body-desc {
  line-height: 1.6;
}

/* LightBox simples para Fotos */
.lightbox-img {
  width: 100%;
  border-radius: var(--radius-sm);
  max-height: 60vh;
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 0.85rem;
  text-align: center;
  font-weight: 700;
  color: var(--text);
}

/* Footer */
.site-footer {
  background: #0b1220;
  color: rgba(255, 255, 255, 0.92);
  padding: 2.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-inner {
  display: grid;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.footer-brand .brand-mark {
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.muted {
  margin: 0.15rem 0 0;
  color: rgba(255, 255, 255, 0.65);
}

.footer-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  font-size: 0.95rem;
  transition: color 150ms;
}

.footer-nav a:hover {
  color: var(--green);
  text-decoration: none;
}

.footer-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.88rem;
}

/* Back to top */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(11, 58, 120, 0.9);
  color: #fff;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  z-index: 99;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: opacity 180ms ease, transform 180ms ease, filter 180ms ease, background 180ms;
}

.back-to-top:hover {
  cursor: pointer;
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Motion (prefers-reduced-motion) */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn,
  .mini-card,
  .back-to-top,
  .skip-link,
  .schedule-item,
  .theme-toggle {
    transition: none !important;
  }
  .whatsapp-pulse {
    animation: none !important;
  }
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (min-width: 780px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.5rem;
  }

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .two-col {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.5rem;
    align-items: start;
  }

  .cards-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cards-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cards-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .about-card {
    grid-template-columns: 44px 1fr;
  }

  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .book-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }

  .banner {
    grid-template-columns: 0.55fr 0.45fr;
  }

  .banner-media img {
    max-height: unset;
    height: 100%;
  }

  .schedule-item {
    grid-template-columns: 170px 1fr 120px;
    align-items: center;
    gap: 1.5rem;
  }

  .schedule-action {
    justify-content: flex-end;
  }

  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

@media (max-width: 979px) {
  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 10px 15px rgba(0,0,0,0.05);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .site-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1rem 1rem;
  }

  .nav-link {
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
  }

  .nav-cta {
    margin-top: 0.5rem;
  }
}

@media (min-width: 980px) {
  .nav-toggle {
    display: none;
  }
}
