/* ════════════ ANIMACIONES DE ENTRADA ════════════ */
@keyframes fadeUpExpo {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .expo-page-title {
    animation: fadeUpExpo 0.7s ease-out both;
  }
  .expo-search {
    animation: fadeUpExpo 0.6s ease-out 0.15s both;
  }
  .btn-download-dir {
    animation: fadeUpExpo 0.5s ease-out 0.25s both;
  }
  .map-section {
    animation: fadeUpExpo 0.6s ease-out 0.3s both;
  }
  .expo-card-pub {
    animation: fadeUpExpo 0.5s ease-out 0.4s both;
  }
}
:root {
  /* ── PALETA FILAH 37 ── */
  --verde: #dfd97c;
  --verde-light: #f3f0ce;
  --rojo: #d23930;
  --rojo-dark: #a82a23;
  --rojo-light: #fdf0ef;
  --azul: #284d98;
  --azul-dark: #1c3a73;
  --azul-light: #eaf0fc;
  --cafe: #5c3e35;
  --cafe-light: #f5efed;

  --primary: var(--rojo);
  --primary-light: var(--rojo-light);
  --text-dark: var(--cafe);
  --text-gray: #6b5c57;
  --border: #e8e0dc;
}

* {
  box-sizing: border-box;
}

.expo-main {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  /* ← AÑADIR: fuerza ancho completo dentro del page-layout */
  flex: 1;
  /* ← AÑADIR: si page-layout es flex, le dice al main que crezca */
  min-width: 0;
  /* ← AÑADIR: previene overflow en flex children */
}

/* ══ TÍTULO ══ */
.expo-page-title {
  text-align: center;
  margin-bottom: 40px;
}

.expo-page-title h1 {
  font-size: 2.8rem;
  color: var(--rojo);
  margin-bottom: 10px;
  font-weight: 700;
}

.expo-page-title p {
  color: var(--cafe);
  font-size: 1.1rem;
  font-weight: 400;
  opacity: 0.85;
}

/* ══ MAPA COLAPSABLE ══ */
.map-section {
  width: 100%;
  /* ← AÑADIR: asegura ancho completo siempre */
  display: block;
  /* ← AÑADIR: por si el browser usa otro display */
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(92, 62, 53, 0.08);
  border: 2px solid var(--azul);
  margin-bottom: 36px;
  transition: all 0.3s;
}

.map-section[open] {
  box-shadow: 0 6px 24px rgba(40, 77, 152, 0.15);
}

.map-toggle {
  width: 100%;
  /* ← AÑADIR: el summary también debe ocupar todo el ancho del details */
  box-sizing: border-box;
  /* ← AÑADIR: para que el padding no rompa el 100% */
  padding: 18px 24px;
  cursor: pointer;
  background: var(--azul);
  color: #fff;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background 0.2s;
  user-select: none;
}

.map-toggle::-webkit-details-marker {
  display: none;
}

.map-toggle:hover {
  background: var(--azul-dark);
}

.map-toggle-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.map-toggle h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-toggle h2 i {
  color: var(--verde);
  font-size: 1.1rem;
}

.map-toggle-hint {
  font-size: 0.8rem;
  opacity: 0.85;
  font-weight: 400;
  display: none;
}

@media (min-width: 600px) {
  .map-toggle-hint {
    display: inline;
  }
}

.map-toggle-arrow {
  background: rgba(255, 255, 255, 0.2);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
  flex-shrink: 0;
}

.map-section[open] .map-toggle-arrow {
  transform: rotate(180deg);
}

.map-wrapper {
  position: relative;
  width: 100%;
  line-height: 0;
  overflow: hidden;
  background: var(--verde-light);
}

.map-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

/* Animación al abrir */
.map-section[open] .map-wrapper {
  animation: mapaFadeIn 0.5s ease-out;
}

@keyframes mapaFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Markers */
.map-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 10;
}

.map-marker-dot {
  width: 14px;
  height: 14px;
  background: var(--rojo);
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 1px 8px rgba(210, 57, 48, 0.5);
  transition: all 0.2s;
}

.map-marker:hover .map-marker-dot {
  transform: scale(1.4);
  box-shadow: 0 2px 12px rgba(210, 57, 48, 0.65);
}

.map-marker-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: rgba(210, 57, 48, 0.35);
  border-radius: 50%;
  display: none;
}

.map-marker.active .map-marker-pulse {
  display: block;
  animation: mPulse 1.5s infinite;
}

.map-marker.active .map-marker-dot {
  transform: scale(1.5);
  background: var(--azul);
  box-shadow: 0 2px 12px rgba(40, 77, 152, 0.65);
}

@keyframes mPulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -50%) scale(3.5);
    opacity: 0;
  }
}

/* ══ BUSCADOR ══ */
.expo-search {
  position: relative;
  max-width: 480px;
  margin: 0 auto 24px;
}

.expo-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cafe);
  opacity: 0.6;
}

.expo-search input {
  width: 100%;
  padding: 14px 18px 14px 46px;
  border-radius: 12px;
  border: 2px solid var(--border);
  outline: none;
  font-size: 0.95rem;
  font-family: "Noto Sans", sans-serif;
  background: #fff;
  transition: all 0.2s;
}

.expo-search input:focus {
  border-color: var(--azul);
  box-shadow: 0 0 0 4px rgba(40, 77, 152, 0.1);
}

/* ══ BOTÓN DESCARGAR ══ */
.btn-download-dir {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--rojo);
  color: #fff;
  border: none;
  padding: 12px 26px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: "Noto Sans", sans-serif;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(210, 57, 48, 0.25);
}

.btn-download-dir:hover {
  background: var(--rojo-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(210, 57, 48, 0.35);
}

/* ══ TARJETAS ══ */
.expo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.expo-card-pub {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--border);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.expo-card-pub:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(92, 62, 53, 0.12);
  border-color: var(--verde);
}

.expo-logo-area {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  border-bottom: 1px solid var(--border);
}

.expo-logo-area img {
  max-width: 80%;
  max-height: 150px;
  object-fit: contain;
}

.expo-info {
  padding: 18px 20px;
  flex: 1;
}

.expo-stand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--azul);
  color: #fff;
  padding: 5px 13px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

.expo-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cafe);
  margin: 0 0 6px;
  line-height: 1.35;
}

.expo-sellos {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.expo-sello-tag {
  background: var(--verde-light);
  color: var(--cafe);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid var(--verde);
}

.expo-actions {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}

.expo-btn {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: "Noto Sans", sans-serif;
  transition: 0.2s;
}

.btn-locate {
  background: var(--rojo);
  color: #fff;
}

.btn-locate:hover {
  background: var(--rojo-dark);
}

.btn-sellos {
  background: var(--verde-light);
  color: var(--cafe);
  border: 1px solid var(--verde);
}

.btn-sellos:hover {
  background: var(--verde);
}

.btn-web {
  background: var(--azul-light);
  color: var(--azul);
  text-decoration: none;
  border: 1px solid #c7d4ed;
}

.btn-web:hover {
  background: var(--azul);
  color: #fff;
}

.empty-state {
  text-align: center;
  padding: 60px;
  color: var(--cafe);
  grid-column: 1/-1;
}

/* ══ RESPONSIVE ══ */
@media (max-width: 768px) {
  .expo-main {
    padding: 20px 0;
  }

  .expo-page-title h1 {
    font-size: 1.5rem;
  }

  .expo-page-title p {
    font-size: 0.95rem;
  }

  .map-section {
    border-radius: 12px;
    margin-bottom: 28px;
  }

  .map-toggle {
    padding: 14px 18px;
  }

  .map-toggle h2 {
    font-size: 0.95rem;
  }

  .expo-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .expo-logo-area {
    height: 160px;
    padding: 24px;
  }

  .expo-logo-area img {
    max-height: 120px;
    max-width: 85%;
  }

  .expo-actions {
    flex-wrap: wrap;
  }

  .expo-btn {
    min-width: calc(50% - 5px);
  }

  .map-marker-dot {
    width: 10px;
    height: 10px;
    border-width: 2px;
  }

  .map-marker-pulse {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 480px) {
  .expo-logo-area {
    height: 140px;
    padding: 20px;
  }

  .expo-logo-area img {
    max-height: 100px;
  }

  .expo-name {
    font-size: 1rem;
  }

  .map-marker-dot {
    width: 8px;
    height: 8px;
    border-width: 1.5px;
  }

  .map-marker-pulse {
    width: 8px;
    height: 8px;
  }
}
