/* ===== UNIVERSO EM DESENCANTO ===== */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Lato:wght@300;400;700&display=swap');

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

:root {
  --roxo:    #c084fc;
  --roxo2:   #a855f7;
  --branco:  #f0e6ff;
  --fundo:   #0d0d1a;
  --fundo2:  #12122a;
  --fundo3:  #1a1a35;
  --borda:   #3b2f6e;
  --cinza:   #8b7db0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', sans-serif;
  background: var(--fundo);
  color: var(--branco);
  min-height: 100vh;
}

/* ===== NAVBAR ===== */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,26,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--borda);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  height: 64px;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--roxo);
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
  margin-left: auto;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--branco);
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a.ativo {
  color: var(--roxo);
  background: rgba(168,85,247,0.1);
}

/* Dropdown Caravanas */
.dropdown { position: relative; }
.dropdown > a::after { content: ' ▾'; font-size: 0.7rem; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--fundo2);
  border: 1px solid var(--borda);
  border-radius: 6px;
  min-width: 180px;
  padding: 0.4rem 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 200;
  columns: 2;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  break-inside: avoid;
}

/* Hamburger mobile */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  margin-left: auto;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  width: 24px; height: 2px;
  background: var(--branco);
  border-radius: 2px;
  transition: 0.3s;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  background: radial-gradient(ellipse at center top, #1e0a3c 0%, var(--fundo) 70%);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.3;
  pointer-events: none;
}
.hero h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.6rem, 4vw, 3rem);
  color: var(--roxo);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.hero h1 span { color: var(--branco); }
.hero p {
  color: var(--cinza);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  max-width: 600px;
}
.hero-link {
  display: inline-block;
  color: var(--roxo2);
  font-size: 1rem;
  text-decoration: underline;
  text-decoration-color: var(--roxo);
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}
.hero-link:hover { color: var(--branco); }

/* ===== SEÇÕES ===== */
section { padding: 3rem 2rem; max-width: 1100px; margin: 0 auto; }

.section-titulo {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  color: var(--roxo);
  margin-bottom: 1.2rem;
  text-align: center;
}

/* ===== COLUNAS ===== */
.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 700px) { .cols-2 { grid-template-columns: 1fr; } }

/* ===== BOTÕES ===== */
.btn {
  display: block;
  width: 100%;
  margin-bottom: 0.8rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: 1px solid var(--roxo2);
  border-radius: 6px;
  color: var(--branco);
  font-size: 1rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn:hover {
  background: var(--roxo2);
  color: #fff;
}
.btn-destaque {
  background: var(--roxo2);
  color: #fff;
  font-weight: 700;
}

/* ===== CARD ===== */
.card {
  background: var(--fundo2);
  border: 1px solid var(--borda);
  border-radius: 10px;
  padding: 1.5rem;
}

/* ===== TEXTO CORRIDO ===== */
.texto p {
  margin-bottom: 1rem;
  line-height: 1.8;
  color: #d0c4f0;
}
.texto strong { color: var(--roxo); }

/* ===== ALERT BOX ===== */
.alerta {
  background: rgba(168,85,247,0.1);
  border-left: 3px solid var(--roxo2);
  border-radius: 4px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
  font-weight: 700;
  color: var(--roxo);
  line-height: 1.5;
}

/* ===== GRADE DE LIVROS ===== */
.grade-livros {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.5rem;
  margin: 1.5rem 0;
}
.livro-item {
  background: var(--fundo3);
  border: 1px solid var(--borda);
  border-radius: 6px;
  padding: 0.6rem 0.4rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--cinza);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.livro-item:hover { border-color: var(--roxo2); color: var(--roxo); }
.livro-item strong { display: block; font-size: 1.1rem; color: var(--roxo); }

/* ===== ESTADOS CARAVANAS ===== */
.estados-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.2rem;
}
.estado-card {
  background: var(--fundo2);
  border: 1px solid var(--borda);
  border-radius: 10px;
  overflow: hidden;
}
.estado-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.estado-card .estado-info {
  padding: 1rem;
}
.estado-card h3 {
  font-family: 'Cinzel', serif;
  color: var(--roxo);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}
.estado-card p {
  font-size: 0.85rem;
  color: var(--cinza);
  line-height: 1.6;
}

/* ===== RODAPÉ ===== */
footer {
  margin-top: 4rem;
  border-top: 1px solid var(--borda);
  text-align: center;
  padding: 2rem;
  color: var(--cinza);
  font-size: 0.85rem;
}
footer a { color: var(--roxo); text-decoration: none; }

/* ===== DIVISOR ===== */
hr.div { border: none; border-top: 1px solid var(--borda); margin: 2rem 0; }

/* ===== MOBILE NAV ===== */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--fundo2);
    border-bottom: 1px solid var(--borda);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    gap: 0.2rem;
  }
  .nav-links.aberto { display: flex; }
  .dropdown-menu { position: static; display: block; box-shadow: none; border: none; columns: 1; padding-left: 1rem; }
  .dropdown > a::after { content: ''; }
}
