/* ==========================================================
   Turishuila · Vista de categorías (Internacional, Colombia,
   Cruceros...). Archivo independiente: solo lo carga
   Views/Planes/categoria.php. Todas las clases son nuevas
   (th-cat / thc-) para no chocar con main.css ni con el home.
   ========================================================== */

/* ---------- Página: el fondo fijo va detrás de todo ---------- */
html.th-categoria-page {
  background: #f1f5f9;
}

body.th-categoria-page {
  background: transparent !important;
}

.th-cat,
.th-cat *,
.th-cat *::before,
.th-cat *::after {
  box-sizing: border-box;
}

.th-cat {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #1e293b;

  /* Pérdida de nitidez de la foto de la categoría (panel admin).
     --th-blur-foto: desenfoque base en TODA la pantalla.
     --th-blur-abajo: desenfoque adicional que crece hacia abajo.
     Súbelos para más desenfoque, bájalos para menos. */
  --th-blur-foto: 1px;
  --th-blur-abajo: 6px;
}

/* ---------- Fondo estático (no se mueve al hacer scroll) ---------- */
.th-cat-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-color: #0b2d64;
  overflow: hidden;
}

.th-cat-bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  /* Filtro directo sobre la foto; el zoom evita bordes claros del desenfoque */
  filter: blur(var(--th-blur-foto));
  -webkit-filter: blur(var(--th-blur-foto));
  transform: scale(1.08);
}

/* Velo: azul rey profundo arriba que se funde en bruma clara hacia las tarjetas */
.th-cat-veil {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(11, 45, 100, 0.90) 0%,
    rgba(18, 66, 139, 0.80) 11%,
    rgba(59, 130, 196, 0.62) 23%,
    rgba(138, 187, 232, 0.56) 35%,
    rgba(226, 236, 247, 0.82) 50%,
    rgba(241, 245, 249, 0.94) 68%,
    rgba(241, 245, 249, 0.98) 100%
  );
}

/* Desenfoque adicional que aumenta hacia abajo; cubre toda la pantalla */
.th-cat-blur {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  -webkit-backdrop-filter: blur(var(--th-blur-abajo));
  backdrop-filter: blur(var(--th-blur-abajo));
  -webkit-mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.35) 30%,
    rgba(0, 0, 0, 0.75) 65%,
    rgba(0, 0, 0, 1) 100%
  );
  mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.35) 30%,
    rgba(0, 0, 0, 0.75) 65%,
    rgba(0, 0, 0, 1) 100%
  );
}

/* ALTERNATIVA (velo claro del HTML 12): reemplaza el degradado de .th-cat-veil por
   linear-gradient(180deg, rgba(15,23,42,.16) 0%, rgba(241,245,249,.34) 22%,
   rgba(241,245,249,.62) 52%, rgba(241,245,249,.86) 80%, rgba(241,245,249,.95) 100%) */

/* ---------- Contenedor principal ---------- */
.th-cat-main {
  position: relative;
  width: 94%;
  max-width: 1460px;
  margin: 0 auto;
  padding: 150px 24px 80px;
}

/* Título con el nombre de la categoría y halo blanco alrededor de cada letra */
.th-cat .th-cat-title {
  margin: 0 0 56px;
  text-align: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  color: #184785;
  user-select: none;
  text-shadow:
    0 0 6px rgba(255, 255, 255, 0.98),
    0 0 12px rgba(255, 255, 255, 0.95),
    0 0 20px rgba(255, 255, 255, 0.85),
    0 0 30px rgba(255, 255, 255, 0.6);
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.85));
}

/* ---------- Cuadrícula: se llena de izquierda a derecha ---------- */
.th-cat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 640px) {
  .th-cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .th-cat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Tarjeta ---------- */
.thc-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.thc-card:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.thc-media {
  position: relative;
  height: 288px;
  background: #e2e8f0;
  overflow: hidden;
}

@media (min-width: 1280px) {
  .thc-media {
    height: 320px;
  }
}

.thc-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.thc-card:hover .thc-media img {
  transform: scale(1.05);
}

.thc-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: #184785;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  padding: 6px 14px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* Título y descripción: siempre a la izquierda, con márgenes y máximo 2 renglones */
.thc-body {
  padding: 20px 24px 12px;
  text-align: left;
}

.th-cat .thc-title {
  margin: 0;
  min-height: 3.1rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.375;
  letter-spacing: normal;
  text-transform: uppercase;
  text-align: left;
  color: #184785;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

/* Descripción corta: misma letra y tamaño que "Desde" (12 px, peso 500) */
.th-cat .thc-desc {
  margin: 6px 0 0;
  min-height: 2.3rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.15rem;
  text-align: left;
  color: #64748b;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

/* ---------- Precios: dos columnas separadas por línea vertical ---------- */
.thc-prices {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 20px 20px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.thc-price-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 0;
}

.thc-prices:not(.thc-prices--single) .thc-price-col:first-child {
  padding-right: 10px;
}

.thc-prices:not(.thc-prices--single) .thc-price-col:last-child {
  padding-left: 10px;
}

.thc-price-sep {
  width: 1px;
  height: 80px;
  flex-shrink: 0;
  background: #e2e8f0;
}

.thc-price-label,
.thc-price-note {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  color: #64748b;
}

.thc-price-label {
  margin-bottom: 6px;
}

.thc-price-note {
  margin-top: 6px;
}

/* Botón de precio en pesos (rosa pastel) y en dólares (verde menta pastel).
   Solo destacan el precio; no son botones funcionales. */
.thc-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.5rem;
  white-space: nowrap;
  cursor: default;
}

@media (min-width: 1200px) {
  .thc-pill {
    min-width: 175px;
    padding: 8px 24px;
    font-size: 1.125rem;
  }
}

.thc-pill-cop {
  background: linear-gradient(180deg, #ffe4e6 0%, #fecdd3 100%);
  border: 1.5px solid #fda4af;
  color: #9f1239;
  box-shadow: 0 3px 8px rgba(244, 63, 94, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.thc-pill-usd {
  background: linear-gradient(180deg, #dcfce7 0%, #bbf7d0 100%);
  border: 1.5px solid #86efac;
  color: #065f46;
  box-shadow: 0 3px 8px rgba(16, 185, 129, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

/* ---------- Botón Ver detalles ---------- */
.thc-footer {
  padding: 0 24px 24px;
}

.th-cat .thc-btn,
.th-cat .thc-btn:hover,
.th-cat .thc-btn:focus {
  display: block;
  width: 100%;
  padding: 12px 0;
  border-radius: 8px;
  background: #184785;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s ease;
}

.th-cat .thc-btn:hover,
.th-cat .thc-btn:focus {
  background: #103261;
}

/* ---------- Estado vacío ---------- */
.thc-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 40px 20px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: #184785;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
}

/* ---------- Celular ---------- */
@media (max-width: 575px) {
  .th-cat-main {
    padding: 120px 14px 56px;
  }

  .th-cat .th-cat-title {
    margin-bottom: 36px;
  }

  .thc-media {
    height: 240px;
  }

  .thc-pill {
    min-width: 120px;
    padding: 8px 14px;
    font-size: 0.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .thc-card,
  .thc-media img,
  .thc-btn {
    transition: none;
  }
}

/* ==========================================================
   AJUSTE v4: más nitidez de fondo y tarjetas más grandes
   (para deshacer, borra desde esta línea hasta el final)
   ========================================================== */
.th-cat {
  --th-blur-foto: 1px;
  --th-blur-abajo: 5px;
}

/* Velo: azul arriba, casi transparente al medio, azul oscuro suave abajo (no blanco) */
.th-cat-veil {
  background: linear-gradient(
    180deg,
    rgba(11, 45, 100, 0.82) 0%,
    rgba(18, 66, 139, 0.58) 12%,
    rgba(30, 90, 170, 0.28) 28%,
    rgba(11, 45, 100, 0.12) 50%,
    rgba(11, 45, 100, 0.22) 75%,
    rgba(11, 45, 100, 0.34) 100%
  );
}

/* Contenedor más ancho = tarjetas más grandes */
.th-cat-main {
  width: 96%;
  max-width: 1640px;
}

.th-cat-grid {
  gap: 40px;
}

.thc-media {
  height: 340px;
}

@media (min-width: 1600px) {
  .thc-media {
    height: 360px;
  }
}

.thc-body {
  padding: 24px 28px 14px;
}

.th-cat .thc-title {
  font-size: 1.2rem;
  min-height: 3.3rem;
}

/* Descripción y "Desde / por persona": misma letra y tamaño entre sí */
.th-cat .thc-desc {
  font-size: 0.8125rem;
  line-height: 1.25rem;
  min-height: 2.5rem;
}

.thc-price-label,
.thc-price-note {
  font-size: 0.8125rem;
}

.thc-pill {
  min-width: 190px;
  font-size: 1.2rem;
  padding: 10px 26px;
}

.thc-footer {
  padding: 0 28px 28px;
}

.th-cat .thc-btn,
.th-cat .thc-btn:hover,
.th-cat .thc-btn:focus {
  padding: 14px 0;
  font-size: 0.9rem;
}

@media (max-width: 991px) {
  .thc-pill { min-width: 150px; font-size: 1.05rem; }
}

@media (max-width: 575px) {
  .thc-media { height: 250px; }
  .thc-pill { min-width: 120px; font-size: 0.95rem; padding: 8px 14px; }
}

/* ==========================================================
   AJUSTE v5: fondo idéntico a la referencia (HTML 12).
   Foto 100 % nítida arriba, velo claro y desenfoque progresivo.
   ========================================================== */
.th-cat {
  --th-blur-foto: 0px;
  --th-blur-abajo: 7px;
}

.th-cat-bg img {
  filter: none;
  -webkit-filter: none;
  transform: none;
}

.th-cat-veil {
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.16) 0%,
    rgba(241, 245, 249, 0.34) 22%,
    rgba(241, 245, 249, 0.62) 52%,
    rgba(241, 245, 249, 0.86) 80%,
    rgba(241, 245, 249, 0.95) 100%
  );
}

.th-cat-blur {
  -webkit-mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.25) 35%,
    rgba(0, 0, 0, 0.72) 72%,
    rgba(0, 0, 0, 1) 100%
  );
  mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.25) 35%,
    rgba(0, 0, 0, 0.72) 72%,
    rgba(0, 0, 0, 1) 100%
  );
}

/* ==========================================================
   AJUSTE v6: fondo horneado + tarjetas según el ancho de pantalla
   ========================================================== */
/* Si la imagen ya trae velo y desenfoque, se apagan las capas CSS */
.th-cat--procesado .th-cat-veil,
.th-cat--procesado .th-cat-blur {
  display: none;
}
.th-cat--procesado .th-cat-bg img {
  filter: none;
  -webkit-filter: none;
  transform: none;
}


/* ==========================================================
   AJUSTE v7: tamaño medio de tarjeta (como la referencia) y
   versión para el carrusel del home
   ========================================================== */
.th-cat-main { width: 94%; max-width: 1540px; }
.th-cat-grid { gap: 36px; }
.thc-media { height: 320px; }
.thc-body { padding: 22px 26px 12px; }
.th-cat .thc-title { font-size: 1.15rem; min-height: 3.2rem; }
.th-cat .thc-desc { font-size: 0.8125rem; line-height: 1.25rem; min-height: 2.5rem; }
.thc-price-label, .thc-price-note { font-size: 0.8125rem; }
.thc-pill { min-width: 175px; font-size: 1.125rem; padding: 9px 24px; }
.thc-footer { padding: 0 26px 26px; }
.th-cat .thc-btn, .th-cat .thc-btn:hover, .th-cat .thc-btn:focus { padding: 13px 0; font-size: 0.875rem; }

@media (max-width: 991px) {
  .thc-pill { min-width: 150px; font-size: 1.05rem; }
}
@media (max-width: 575px) {
  .thc-media { height: 250px; }
  .thc-pill { min-width: 120px; font-size: 0.95rem; padding: 8px 14px; }
}

/* ---------- Carrusel de paquetes del home ---------- */
.th-cat--home .swiper-paquetes { padding: 6px 4px 24px !important; }
.th-cat--home .thc-card.swiper-slide { height: auto; }
.th-cat--home .thc-media { height: 270px; }
.th-cat--home .thc-body { padding: 18px 20px 10px; }
.th-cat--home .thc-footer { padding: 0 20px 20px; }
.th-cat--home .thc-prices { margin: 8px 14px 16px; }
.th-cat--home .thc-pill { min-width: 0; width: 100%; max-width: 160px; font-size: 1rem; padding: 8px 12px; }

/* ==========================================================
   AJUSTE v8: tarjetas con un solo precio (Colombia) más grandes
   ========================================================== */
.th-cat .thc-prices--single .thc-price-label { font-size: 1.05rem; font-weight: 600; }
.th-cat .thc-prices--single .thc-price-note  { font-size: 1.05rem; }
.th-cat .thc-prices--single .thc-pill {
  min-width: 270px; font-size: 1.7rem; padding: 14px 36px; border-radius: 999px;
}
.th-cat--home .thc-prices--single .thc-pill {
  width: auto; max-width: none; min-width: 230px; font-size: 1.5rem; padding: 12px 28px;
}
@media (max-width: 575px) {
  .th-cat .thc-prices--single .thc-pill,
  .th-cat--home .thc-prices--single .thc-pill { min-width: 200px; font-size: 1.3rem; }
}

/* AJUSTE v9: el fondo horneado se muestra tal cual, sin filtros ni transparencia */
.th-cat--procesado .th-cat-bg img { filter: none !important; opacity: 1 !important; }
