/* ==========================================================================
   CULTURA TRINACIONAL — Sistema de Design Base
   Baseado nos layouts aprovados: Home, Agenda, Mapa, Cidades
   Paleta: azul-marinho escuro + azul elétrico/cyan + glow premium
   ========================================================================== */

:root {
  /* Fundo */
  --bg-deep: #05070f;
  --bg-base: #0a0e1c;
  --bg-elevated: #0f1526;
  --bg-card: #10182b;
  --bg-card-hover: #141d34;

  /* Azul elétrico / cyan (cor de marca) */
  --brand-cyan: #22d3ee;
  --brand-blue: #2563eb;
  --brand-gradient: linear-gradient(135deg, #2563eb 0%, #22d3ee 100%);

  /* Cores fixas por país (NUNCA mudar — regra do Prompt Mestre) */
  --country-argentina: #38bdf8;   /* azul claro */
  --country-brasil: #22c55e;      /* verde */
  --country-paraguai: #ef4444;    /* vermelho — fixo e obrigatório */

  /* Texto */
  --text-primary: #f5f7fb;
  --text-secondary: #a8b3c7;
  --text-muted: #6b7690;

  /* Bordas e sombras */
  --border-subtle: rgba(148, 178, 255, 0.14);
  --border-glow: rgba(34, 211, 238, 0.45);
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.45);
  --shadow-glow-cyan: 0 0 24px rgba(34, 211, 238, 0.35);
  --shadow-glow-blue: 0 0 30px rgba(37, 99, 235, 0.35);

  /* Espaçamento e forma */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Tipografia */
  --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Navegação mobile fixa */
  --mobile-nav-height: 68px;
  --header-height: 76px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-base);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--mobile-nav-height) + 12px);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   Cabeçalho
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-height);
  padding: 0 20px;
  background: rgba(5, 7, 15, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img.logo { height: 40px; width: auto; }

.brand-text .name {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.brand-text .tagline {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
}

.lang-switch button {
  padding: 8px 14px;
  color: var(--text-secondary);
  transition: background 0.2s, color 0.2s;
}

.lang-switch button[aria-pressed="true"] {
  background: var(--brand-gradient);
  color: #04121c;
  border-radius: var(--radius-pill);
}

.menu-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  background:
    linear-gradient(180deg, rgba(5,7,15,0.25) 0%, rgba(5,7,15,0.65) 60%, var(--bg-base) 100%),
    var(--hero-image, linear-gradient(135deg, #0b1a3a, #06101f));
  background-size: cover;
  background-position: center;
}
/* Substituir var(--hero-image) por foto real via style inline ou classe utilitária quando o material fotográfico oficial chegar */

.hero-content { padding: 48px 20px 40px; width: 100%; }

.hero h1 {
  font-size: clamp(28px, 7vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  max-width: 640px;
  margin-bottom: 14px;
}

.hero .slogan {
  font-size: clamp(16px, 3.4vw, 20px);
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.country-bar {
  height: 4px;
  width: 220px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg,
    var(--country-argentina) 0%, var(--country-argentina) 33%,
    var(--country-brasil) 33%, var(--country-brasil) 66%,
    var(--country-paraguai) 66%, var(--country-paraguai) 100%);
  margin-bottom: 24px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--brand-gradient);
  color: #04121c;
  box-shadow: var(--shadow-glow-blue);
}

.btn-outline {
  border: 1px solid var(--border-glow);
  color: var(--text-primary);
  background: rgba(34, 211, 238, 0.06);
}

/* ==========================================================================
   Seções
   ========================================================================== */

.section { padding: 40px 0 8px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-head h2 { font-size: 22px; font-weight: 800; }

.section-head .see-all {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-cyan);
  white-space: nowrap;
}

.hscroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 20px 12px;
  margin: 0 -20px;
  scroll-snap-type: x proximity;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.hscroll::-webkit-scrollbar { display: none; }

/* ==========================================================================
   Card de Cidade
   ========================================================================== */

.city-card {
  position: relative;
  flex: 0 0 150px;
  scroll-snap-align: start;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
}

.city-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}

.city-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5,7,15,0.92) 100%);
}

.city-card .info {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px;
  z-index: 2;
}

.city-card .name { font-weight: 800; font-size: 15px; line-height: 1.15; }
.city-card .country { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }

.country-tag {
  display: inline-flex;
  height: 3px;
  width: 34px;
  border-radius: var(--radius-pill);
}
.country-tag[data-country="AR"] { background: var(--country-argentina); }
.country-tag[data-country="BR"] { background: var(--country-brasil); }
.country-tag[data-country="PY"] { background: var(--country-paraguai); }

/* ==========================================================================
   Card de Evento
   ========================================================================== */

.event-card {
  position: relative;
  flex: 0 0 220px;
  scroll-snap-align: start;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
}

.event-card .cover {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-elevated);
}
.event-card .cover img { width: 100%; height: 100%; object-fit: cover; }

.event-card .category-tag {
  position: absolute; top: 10px; left: 10px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: var(--brand-gradient);
  color: #04121c;
}

.event-card .fav-btn {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(5,7,15,0.55);
  backdrop-filter: blur(4px);
  color: #fff;
}
.event-card .fav-btn[aria-pressed="true"] { color: #ef4444; }

.sponsored-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: linear-gradient(135deg,#d97706,#facc15);
  color: #1c1204;
  margin-bottom: 6px;
}

.event-card .body { padding: 12px 14px 16px; }
.event-card .title {
  font-weight: 700; font-size: 14.5px; line-height: 1.3;
  margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.event-card .meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--text-secondary);
  margin-bottom: 3px;
}

/* Cores de categoria (aplicadas via data-attribute no JS) */
.category-tag[data-cat="musica"] { background: linear-gradient(135deg,#2563eb,#22d3ee); color:#04121c; }
.category-tag[data-cat="cultura"] { background: linear-gradient(135deg,#16a34a,#4ade80); color:#04160b; }
.category-tag[data-cat="artes-cenicas"] { background: linear-gradient(135deg,#dc2626,#f87171); color:#1c0505; }
.category-tag[data-cat="gastronomia"] { background: linear-gradient(135deg,#d97706,#facc15); color:#1c1204; }

/* ==========================================================================
   Estados vazio / carregando / erro
   ========================================================================== */

.state-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
  padding: 32px 20px;
  color: var(--text-muted);
  text-align: center;
  font-size: 14px;
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 37%, var(--bg-card) 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: var(--radius-md);
}
@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ==========================================================================
   Rodapé
   ========================================================================== */

.site-footer {
  margin-top: 48px;
  padding: 32px 20px 24px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}
.site-footer a { color: var(--brand-cyan); }

/* ==========================================================================
   Navegação mobile fixa
   ========================================================================== */

.mobile-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: var(--mobile-nav-height);
  background: rgba(5, 7, 15, 0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
}

.mobile-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.mobile-nav a svg { width: 22px; height: 22px; }

.mobile-nav a[aria-current="page"] { color: var(--brand-cyan); }

/* ==========================================================================
   Responsivo — desktop
   ========================================================================== */

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .mobile-nav { display: none; }
  .hero { min-height: 620px; }
  .city-card { flex-basis: 200px; }
  .event-card { flex-basis: 280px; }
}
