/* WondarCore — código propio, no generado. Se puede modificar libremente. */

.pais-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  /* 1.5rem lateral, no 3.5rem — mismo criterio que .destino-wrapper (destino-publico.css): tiene
     que coincidir con el ancho real de .quick-menu en el header (layout.css). Compartida por
     Pais/Estado/Continente. */
  padding: 1.5rem 1.5rem 3rem;
}

/* ── BREADCRUMB (igual que destino.css) ── */
.destino-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.bc-link {
  font-size: 0.82rem;
  color: #666;
  text-decoration: none;
  transition: color 0.15s;
}

.bc-link:hover { color: #2563eb; }

.bc-sep {
  font-size: 0.82rem;
  color: #bbb;
}

.bc-current {
  font-size: 0.82rem;
  color: #1a1a2e;
  font-weight: 600;
}

/* ── DOTS fotos (igual que destino.css) ── */
.destino-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.destino-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.2s;
}

.destino-dot--active {
  background: white;
  width: 18px;
  border-radius: 4px;
}

/* Botones acción — estados activos (igual que destino.css) */
.btn-heart-dest.active svg { fill: #e53e3e; stroke: #e53e3e; }
.btn-pin-dest.active svg   { fill: #2563eb; stroke: #2563eb; }

/* ── MODO GALERÍA (igual que destino.css) ── */
.gallery-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.pais-hero.gallery-mode .gallery-overlay {
  opacity: 1;
  pointer-events: all;
}

.pais-hero.gallery-mode .pais-panel,
.pais-hero.gallery-mode .pais-overlay,
.pais-hero.gallery-mode .destino-dots,
.pais-hero.gallery-mode .pais-actions {
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.gallery-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.15s;
}
.gallery-close:hover { background: rgba(0,0,0,0.8); }

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.15s, transform 0.15s;
}
.gallery-nav:hover { background: rgba(0,0,0,0.75); }
.gallery-nav--prev { left: 16px; }
.gallery-nav--next { right: 16px; }
.gallery-nav--prev:hover { transform: translateY(-50%) translateX(-2px); }
.gallery-nav--next:hover { transform: translateY(-50%) translateX(2px); }

.gallery-counter {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.8);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.gallery-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.gallery-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  padding: 0;
}
.gallery-dot--active {
  background: white;
  width: 18px;
  border-radius: 4px;
}

/* Tooltips sobre los botones de acción del país */
.pais-actions [data-tip] { position: relative; }
.pais-actions [data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #1a1a2e;
  color: white;
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
}

/* ── CARRUSEL experiencias (igual que destino.css) ── */
.cercanos-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.cercanos-nav {
  display: flex;
  gap: 8px;
}

.cercanos-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: none;
  border: 1.5px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #555;
  transition: background 0.15s, border-color 0.15s;
}

.cercanos-btn:hover {
  background: #f4f5f7;
  border-color: #bbb;
}

.cercanos-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.cercanos-track-wrap {
  overflow: hidden;
}

.cercanos-track {
  display: flex;
  gap: 1rem;
  transition: transform 0.35s ease;
}

.cercanos-card {
  flex: 0 0 calc(25% - 0.75rem);
  min-width: 0;
}

.exp-bar span {
  background: #3b82f6 !important;
}

/* ── MAPA DE DESTINOS (ver todos los destinos) ── */
.pais-map-wrap {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  transition: max-height .42s ease, opacity .28s ease, margin-top .28s ease;
}

.pais-map-wrap.is-open {
  max-height: 900px;
  opacity: 1;
  margin-top: 1.25rem;
}

.pais-map-note {
  font-size: 0.82rem;
  color: #666;
  margin-bottom: 0.75rem;
}

.pais-map-note strong {
  color: #1a1a2e;
}

.pais-map-layout {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

/* Reusa el look de .filters-sidebar de la portada (x.css) */
.pais-map-sidebar {
  flex-shrink: 0;
  width: 210px;
}

.pais-map-canvas {
  flex: 1;
  min-width: 0;
}

#destinos-map {
  height: 420px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

@media (max-width: 768px) {
  .pais-map-layout {
    flex-direction: column;
  }
  .pais-map-sidebar {
    width: 100%;
  }
}

.map-minicard {
  display: flex;
  flex-direction: column;
  width: 150px;
  font-family: inherit;
  border-radius: 12px;
  overflow: hidden;
}

.map-minicard__img {
  height: 80px;
  background-size: cover;
  background-position: center;
}

.map-minicard__body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 10px 10px;
}

.map-minicard strong {
  font-size: 0.88rem;
  color: #1a1a2e;
  line-height: 1.1;
}

.map-minicard__rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.map-minicard__score {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1a1a2e;
}

.map-minicard__bar {
  flex: 1;
  height: 5px;
  background: #eee;
  border-radius: 3px;
  overflow: hidden;
}

.map-minicard__bar span {
  display: block;
  height: 100%;
  background: #e53e3e;
  border-radius: 3px;
}

.map-minicard__tag {
  align-self: flex-start;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: #f4f5f7;
  border-radius: 5px;
  padding: 3px 8px;
  color: #555;
}

/* Popup de Leaflet sin el padding/sombra por defecto, para que se vea como una card */
.leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.leaflet-popup-content {
  margin: 0;
  padding: 0;
  width: auto !important;
  line-height: normal;
}

.leaflet-popup-tip {
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* ── HERO CARD ── */
.pais-hero {
  position: relative;
  width: 100%;
  height: 304px;
  border-radius: 20px;
  overflow: hidden;
}

.pais-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.pais-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(10,10,20,0.74) 0%, rgba(10,10,20,0.70) 35%, rgba(10,10,20,0) 55%);
}

/* Quién subió la foto que se está mostrando (mismo criterio que destino-publico.css) — un solo
   badge alcanza acá porque esta página no divide la foto en panel fijo + mini carrusel. */
.foto-autor-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0,0,0,0.4);
  color: rgba(255,255,255,0.9);
  font-size: 0.66rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 50px;
  backdrop-filter: blur(4px);
}
.foto-autor-badge svg { flex-shrink: 0; color: rgba(255,255,255,0.85); }
.foto-autor-badge:empty { display: none; }

.pais-actions {
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.pais-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: none;
  border-radius: 50px;
  padding: 0 14px;
  height: 38px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: #333;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: box-shadow 0.15s, transform 0.1s;
}

.pais-action-btn:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  transform: translateY(-1px);
}

.pais-action-btn:not(.pais-action-btn--photos) {
  width: 38px;
  padding: 0;
  justify-content: center;
}

.pais-panel {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 2.2rem;
  max-width: 480px;
}

/* .pais-desc ya no la usan País/Región (migración diseño Gonzalo, 2026-07-25 — el resumen pasó a
   la tarjeta "Sobre {pais}"/"Sobre {estado}"), pero Continente todavía la tiene en su hero
   (Views/ContinentePublico/Detalle.cshtml) y reusa este mismo CSS compartido — no tocado en esta
   migración porque Gonzalo no cambió continente.html. */
.pais-desc {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.pais-name {
  font-size: 3.4rem;
  font-weight: 900;
  color: white;
  line-height: 1;
  margin-bottom: 0.2rem;
  letter-spacing: -1px;
}

.pais-subtitle {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.75rem;
}

/* ── "SOBRE {PAÍS}" / "SOBRE {ESTADO}" — mismo componente visual que "Sobre el destino"
   (destino-publico.css: .destino-card/.destino-quickgrid/.destino-quick-stat, ya cargado en esta
   página). Acá ninguna tarjeta tiene mini-gráfico debajo del valor (a diferencia de Destino), así
   que se pisa a 2 columnas (país: Capital/Idioma/Moneda/Enchufe) o 3 (región, ver
   .destino-quickgrid--3col) y se saca el min-height pensado para alinear con esos gráficos. Scopeado
   a .pais-wrapper para no afectar la grilla de 3 columnas de Destino. ── */
.pais-wrapper .destino-quickgrid {
  grid-template-columns: repeat(2, minmax(0,1fr));
}
.pais-wrapper .destino-quickgrid--3col {
  grid-template-columns: repeat(3, minmax(0,1fr));
}
.pais-wrapper .destino-quick-stat {
  min-height: 0;
}

/* ── REPRODUCTOR DE FOTOS (migración diseño Gonzalo, 2026-07-25) — clic en la foto estando en modo
   galería la abre en su tamaño/relación de aspecto real, sin el recorte de `background-size:cover`
   del banner. Capa fija a toda la pantalla, comparte esta hoja de estilos con estado-publico.js
   (ambos linkean pais-publico.css), así que el fix aplica a las 2 páginas por igual. ── */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.photo-lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}

.photo-lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
}

.photo-lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.15s;
}
.photo-lightbox-close:hover { background: rgba(0,0,0,0.8); }

.photo-lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.15s, transform 0.15s;
}
.photo-lightbox-nav:hover { background: rgba(0,0,0,0.75); }
.photo-lightbox-nav--prev { left: 20px; }
.photo-lightbox-nav--next { right: 20px; }
.photo-lightbox-nav--prev:hover { transform: translateY(-50%) translateX(-2px); }
.photo-lightbox-nav--next:hover { transform: translateY(-50%) translateX(2px); }

.photo-lightbox-counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.8);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Estando en modo galería, el cursor sobre la foto tiene que dar la pista de que es clickeable
   para abrir el reproductor (antes no hacía nada al clickearla). */
.pais-hero.gallery-mode .gallery-overlay { cursor: zoom-in; }

/* El botón flotante de Guardados (guardados.js, #guardados-toggle) queda fijo abajo a la derecha y
   se superpone con la flecha "siguiente" del reproductor — se oculta mientras el reproductor está
   abierto (mismo criterio que favoritos.css, que ya lo esconde cuando no tiene sentido mostrarlo). */
body:has(.photo-lightbox.is-open) #guardados-toggle {
  display: none;
}

.pais-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.pais-score {
  font-size: 1.9rem;
  font-weight: 900;
  color: white;
  line-height: 1;
}

.pais-score-max {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  margin-right: 4px;
}

.pais-rating-bar {
  flex: 1;
  max-width: 200px;
  height: 7px;
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
  overflow: hidden;
}

.pais-rating-bar span {
  display: block;
  height: 100%;
  background: #e53e3e;
  border-radius: 3px;
}

.pais-rating-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.65);
}

/* ── SECCIONES ── */
.pais-section {
  margin-top: 2.25rem;
}

.pais-section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 3px;
}

.pais-section-sub {
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 1.25rem;
}

.pais-section-footer {
  margin-top: 1rem;
  text-align: right;
}

.pais-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: underline;
  cursor: pointer;
}

/* ── EXPERIENCIAS — tags arriba (igual que destino.css) ── */
.exp-card {
  border-radius: 14px;
  overflow: hidden;
}

.exp-tags-top {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.exp-tag {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 5px;
  padding: 3px 8px;
  color: rgba(255,255,255,0.95);
  backdrop-filter: blur(4px);
}

.exp-tag--main {
  background: rgba(234,179,8,0.85);
  border-color: rgba(234,179,8,0.5);
  color: white;
}

/* ── GRID destinos / experiencias (reusa dest-card-home / exp-card de x.css) ── */
.pais-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.pais-grid-4 .card-img-wrap {
  height: 280px;
}

/* ── PAÍSES LIMÍTROFES ── */
.pais-limitrofe-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* ── Expandir/contraer suave (igual que el prototipo) ── */
.pais-limitrofe-extra {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  transition: max-height .42s ease, opacity .28s ease, margin-top .28s ease;
}

.pais-limitrofe-extra.is-open {
  max-height: 340px;
  opacity: 1;
  margin-top: 1rem;
}

.pais-limitrofe-extra .pais-limitrofe-card {
  transform: translateY(8px);
  opacity: 0;
  transition: transform .28s ease, opacity .28s ease;
}

.pais-limitrofe-extra.is-open .pais-limitrofe-card {
  transform: translateY(0);
  opacity: 1;
}

.pais-limitrofe-img {
  border-radius: 14px;
  overflow: hidden;
  height: 128px;
  position: relative;
}

.pais-limitrofe-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}

.pais-limitrofe-card:hover .pais-limitrofe-img img {
  transform: scale(1.04);
}

.pais-limitrofe-img--empty {
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
}

.pais-limitrofe-name {
  margin-top: 0.6rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a2e;
}

/* ── DESTINOS POR REGIÓN ── */
.pais-region-card {
  background: white;
  border-radius: 16px;
  padding: 1.75rem 2rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.pais-region-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
}

.pais-region-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.6rem;
  text-decoration: none;
}

.pais-region-name:hover {
  text-decoration: underline;
  color: #2563eb;
}

.pais-region-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pais-region-list li {
  font-size: 0.82rem;
}

.pais-region-list a {
  color: #555;
  text-decoration: none;
  transition: color .15s ease;
}

.pais-region-list a:hover {
  color: #2563eb;
  text-decoration: underline;
}

.pais-region-footer {
  margin-top: 1.5rem;
  text-align: right;
}

/* Expandir/contraer regiones extra (mismo patrón que países limítrofes) */
.pais-region-extra {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  transition: max-height .42s ease, opacity .28s ease, margin-top .28s ease;
}

.pais-region-extra.is-open {
  max-height: 260px;
  opacity: 1;
  margin-top: 1.5rem;
}

.pais-region-extra .pais-region-col {
  transform: translateY(8px);
  opacity: 0;
  transition: transform .28s ease, opacity .28s ease;
}

.pais-region-extra.is-open .pais-region-col {
  transform: translateY(0);
  opacity: 1;
}

.pais-btn-ver-todos {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.pais-btn-ver-todos:hover { opacity: 0.88; transform: translateY(-1px); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .pais-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pais-region-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .pais-wrapper { padding: 1rem 0.75rem 3rem; }

  .pais-hero { height: auto; min-height: 480px; border-radius: 14px; }

  .pais-overlay {
    background: linear-gradient(to top, rgba(10,10,20,0.72) 0%, rgba(10,10,20,0.68) 58%, rgba(10,10,20,0) 80%);
  }

  .pais-panel {
    max-width: 100%;
    justify-content: flex-end;
    padding: 1.5rem;
  }

  .pais-name { font-size: 2.4rem; }
  .pais-desc { display: none; } /* Continente todavía usa esto — ver comentario en la regla base. */

  .pais-grid-4 { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .pais-grid-4 .card-img-wrap { height: 190px; }

  .pais-section-title { font-size: 1.3rem; }

  .cercanos-header { flex-wrap: nowrap; align-items: flex-start; gap: 10px; }
  .cercanos-header > div { flex: 1; min-width: 0; }
  .cercanos-nav { flex-shrink: 0; }

  .exp-section .cercanos-card { flex: 0 0 75%; }
  .exp-section .cercanos-card .card-img-wrap { height: 200px; }
  .exp-tags-top { display: none; }

  .pais-region-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .pais-region-card { padding: 1.25rem; }

  /* "Sobre {país}"/"Sobre {estado}" en mobile — mismo criterio que "Sobre Barcelona" en
     destino-publico.css (que ya trae el padding/título/grilla 2 columnas en su propia media query). */
  .destino-quickgrid--3col { grid-template-columns: 1fr 1fr; }
}
