/* ============================================================
   CATÁLOGO DE DESTINOS INTERACTIVO — Estilos
   Archivo: css/catalogo-destinos.css
   ============================================================ */

/* ---------- Tabs de filtro ---------- */
.dest-catalog-tabs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
.dest-tab {
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--white);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}
.dest-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}
.dest-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(3,105,161,0.3);
}

/* ---------- Grid de destinos ---------- */
.dest-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.75rem;
}

/* ---------- Tarjeta de destino ---------- */
.dest-catalog-card {
  background: var(--white);
  border-radius: 1.5rem;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: var(--transition);
  animation: destCardFadeIn 0.5s ease both;
}
.dest-catalog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(3,105,161,0.15);
}
@keyframes destCardFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.dest-catalog-card-img {
  position: relative;
  height: 14rem;
  overflow: hidden;
}
.dest-catalog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.dest-catalog-card:hover .dest-catalog-card-img img {
  transform: scale(1.1);
}
.dest-catalog-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(3,105,161,0.85) 0%, rgba(3,105,161,0.1) 50%, transparent 100%);
}
.dest-catalog-card-badge {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 2;
}
.badge-nat {
  background: var(--accent);
  color: var(--white);
}
.badge-intl {
  background: var(--secondary);
  color: var(--foreground);
}
.dest-catalog-card-name {
  position: absolute;
  bottom: 0.85rem;
  left: 1rem;
  right: 1rem;
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  z-index: 2;
}

.dest-catalog-card-body {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dest-catalog-card-count {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}
.dest-catalog-card-cta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  transition: var(--transition);
}
.dest-catalog-card:hover .dest-catalog-card-cta {
  letter-spacing: 0.02em;
}

/* ============================================================
   MODAL DE HOTELES
   ============================================================ */
.hotel-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.hotel-modal.open {
  display: flex;
}
.hotel-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
}
.hotel-modal-content {
  position: relative;
  background: var(--white);
  border-radius: 1.5rem;
  max-width: 72rem;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
  animation: modalSlideUp 0.3s ease;
}
@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.hotel-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--bg-gray);
  color: var(--foreground);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}
.hotel-modal-close:hover {
  background: var(--primary);
  color: var(--white);
  transform: rotate(90deg);
}
.hotel-modal-header {
  margin-bottom: 1.5rem;
  padding-right: 3rem;
}
.hotel-modal-header h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--foreground);
}
#hotel-modal-count {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}
.hotel-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ---------- Tarjeta de hotel dentro del modal ---------- */
.hotel-modal-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 1.25rem;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}
.hotel-modal-card:hover {
  border-color: rgba(3,105,161,0.25);
  box-shadow: 0 12px 30px rgba(3,105,161,0.12);
  transform: translateY(-4px);
}
.hotel-modal-card-img {
  position: relative;
  height: 180px;
  overflow: hidden;
}
.hotel-modal-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.hotel-modal-card:hover .hotel-modal-card-img img {
  transform: scale(1.08);
}
.hotel-modal-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(3,105,161,0.85) 0%, transparent 55%);
}
.hotel-modal-card-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.3rem 0.65rem;
  border-radius: 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 2;
}
.hotel-modal-card-badge.cat-adults {
  background: var(--secondary);
  color: var(--foreground);
}
.hotel-modal-card-badge.cat-family {
  background: var(--white);
  color: var(--primary);
}
.hotel-modal-card-name {
  position: absolute;
  bottom: 0.75rem;
  left: 0.85rem;
  right: 0.85rem;
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
  z-index: 2;
}
.hotel-modal-card-body {
  padding: 1rem 1.15rem;
}
.hotel-modal-card-desc {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 0.75rem 0;
}
.hotel-modal-card-gallery-btn {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  transition: var(--transition);
}
.hotel-modal-card:hover .hotel-modal-card-gallery-btn {
  letter-spacing: 0.02em;
}

/* ============================================================
   GALERÍA DE IMÁGENES
   ============================================================ */
.gallery-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(16px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.gallery-modal.open {
  display: flex;
}
.gallery-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 5;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}
.gallery-close:hover {
  background: rgba(255,255,255,0.2);
  color: var(--white);
}
.gallery-prev,
.gallery-next {
  position: absolute;
  top: 45%;
  z-index: 5;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}
.gallery-prev { left: 1.25rem; }
.gallery-next { right: 1.25rem; }
.gallery-prev:hover,
.gallery-next:hover {
  background: rgba(255,255,255,0.2);
  color: var(--white);
}
.gallery-content {
  max-width: 60rem;
  width: 100%;
  text-align: center;
}
#gallery-img {
  max-width: 100%;
  max-height: 68vh;
  object-fit: contain;
  border-radius: 1rem;
  transition: opacity 0.2s ease;
}
#gallery-img.loading {
  opacity: 0.5;
}
#gallery-caption {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: 1rem;
}
.gallery-thumbs {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}
.gallery-thumb {
  width: 4.5rem;
  height: 3.5rem;
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: var(--transition);
  opacity: 0.5;
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-thumb:hover {
  opacity: 0.85;
}
.gallery-thumb.active {
  border-color: var(--accent);
  opacity: 1;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .hotel-modal-content {
    padding: 1.25rem;
    max-height: 92vh;
  }
  .hotel-modal-grid {
    grid-template-columns: 1fr;
  }
  .dest-catalog-grid {
    grid-template-columns: 1fr;
  }
  .gallery-prev,
  .gallery-next {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.5rem;
  }
  .gallery-prev { left: 0.5rem; }
  .gallery-next { right: 0.5rem; }
  .gallery-thumb {
    width: 3.5rem;
    height: 2.5rem;
  }
}
@media (max-width: 480px) {
  .dest-tab {
    padding: 0.55rem 1rem;
    font-size: 0.8rem;
  }
  .hotel-modal-card-img { height: 160px; }
}