/* =====================================================
   taxonomy-tours.css  ·  Archivo de Destinations / Activities / Trip Type
   (hero y layout; el buscador y las cards van en sus propios CSS)
   ===================================================== */

/* =====================================================
   VARIABLES DE MARCA
   ===================================================== */
body {
  --grafito:        #34383D;
  --grafito-oscuro: #26292D;
  --grafito-suave:  #5E636A;
  --naranja:        #F26B1D;
  --naranja-hover:  #FF8238;
  --fondo-claro:    #F5F4F2;
  --borde:          #E4E2DF;
  --blanco:         #FFFFFF;
  --texto-claro:    #F3F1EE;
  --texto-claro-suave: #B9BCC0;
  --radio:          20px;
  --ancho:          1200px;
  --pad-x: max(6vw, calc((100% - var(--ancho)) / 2));
  --pad-y: 96px;
  --textura: repeating-linear-gradient(115deg, transparent 0 14px, rgba(255, 255, 255, .025) 14px 15px);
}

/* =====================================================
   BASE
   ===================================================== */
:is(#tour-tax-hero, #tour-tax-hero-text, #tour-tax-posts, #tour-tax-all-categories),
:is(#tour-tax-hero, #tour-tax-hero-text, #tour-tax-posts, #tour-tax-all-categories) *,
:is(#tour-tax-hero, #tour-tax-hero-text, #tour-tax-posts, #tour-tax-all-categories) *::before,
:is(#tour-tax-hero, #tour-tax-hero-text, #tour-tax-posts, #tour-tax-all-categories) *::after {
  box-sizing: border-box;
}

#tour-tax-hero-text h1,
#tour-tax-all-categories h3 {
  font-weight: 400;          /* Bebas Neue solo tiene 400 */
  line-height: 1.05;
  letter-spacing: .5px;
}

/* =====================================================
   HERO: la imagen se funde en grafito y el título
   se monta sobre la parte baja de la imagen
   ===================================================== */
#tour-tax-hero {
  position: relative;
  overflow: hidden;
  background: var(--grafito);
}
#tour-tax-hero.has-image { min-height: 62vh; }
#tour-tax-hero:not(.has-image) { display: none; }

#tour-tax-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
#tour-tax-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg,
    var(--grafito) 0%,
    rgba(52, 56, 61, .75) 30%,
    rgba(52, 56, 61, .15) 75%,
    rgba(52, 56, 61, 0) 100%);
}

/* Bloque del título y la descripción */
#tour-tax-hero-text {
  position: relative;
  z-index: 2;
  padding: 160px var(--pad-x) var(--pad-y);
  background: var(--grafito);
  color: var(--texto-claro);
}
/* Con imagen: sube y se monta sobre la parte baja del hero */
#tour-tax-hero.has-image + #tour-tax-hero-text {
  margin-top: -170px;
  padding-top: 0;
  background: linear-gradient(180deg, transparent 0 170px, var(--grafito) 170px);
}

/* Línea naranja a la izquierda (igual que los demás heros) */
#tour-tax-hero-text h1,
#tour-tax-description {
  max-width: 780px;
  padding-left: 28px;
  border-left: 4px solid var(--naranja);
}
#tour-tax-hero-text h1 {
  margin: 0;
  padding-bottom: 20px;
  color: var(--blanco);
}
#tour-tax-description {
  margin: 0;
  color: var(--texto-claro-suave);
}
#tour-tax-description p {
  margin: 0 0 14px;
  font-weight: 400;
  line-height: 1.75;
}
#tour-tax-description p:last-child { margin-bottom: 0; }
#tour-tax-description a {
  color: var(--naranja-hover);
  font-weight: 600;
  text-underline-offset: 3px;
}
#tour-tax-description strong,
#tour-tax-description b { font-weight: 600; color: var(--blanco); }

/* =====================================================
   LISTADO DE TOURS
   ===================================================== */
#tour-tax-posts {
  padding: var(--pad-y) var(--pad-x);
  background: var(--blanco);
}
#tour-tax-posts .tour-card-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}

/* ----- Paginación ----- */
.mitema-pagination { margin-top: 56px; }
.mitema-pagination .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.mitema-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.mitema-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--borde);
  border-radius: 999px;
  background: var(--blanco);
  color: var(--grafito);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background .25s, border-color .25s, color .25s;
}
.mitema-pagination a.page-numbers:hover {
  border-color: var(--naranja);
  color: var(--naranja);
}
.mitema-pagination .page-numbers.current {
  border-color: var(--grafito);
  background: var(--grafito);
  color: var(--blanco);
}
.mitema-pagination .page-numbers.dots {
  min-width: auto;
  padding: 0 4px;
  border: 0;
  background: none;
}
.mitema-pagination .prev,
.mitema-pagination .next {
  border-color: var(--naranja);
  background: var(--naranja);
  color: var(--blanco);
}
.mitema-pagination a.prev:hover,
.mitema-pagination a.next:hover {
  border-color: var(--grafito);
  background: var(--grafito);
  color: var(--blanco);
}
.mitema-pagination .page-numbers:focus-visible {
  outline: 3px solid var(--naranja-hover);
  outline-offset: 3px;
}

/* =====================================================
   TODAS LAS CATEGORÍAS
   ===================================================== */
#tour-tax-all-categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
  padding: var(--pad-y) var(--pad-x);
  background: var(--fondo-claro);
}
.tour-tax-category-group {
  padding: 36px 32px;
  border: 1px solid var(--grafito);
  border-radius: 24px;
  background: var(--grafito);
}
#tour-tax-all-categories h3 {
  margin: 0 0 24px;
  font-size: 30px;
  color: var(--blanco);
}
/* Rayita naranja bajo el título del grupo */
#tour-tax-all-categories h3::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin-top: 12px;
  border-radius: 2px;
  background: var(--naranja);
}

.tour-tax-category-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tour-tax-category-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  transition: border-color .25s;
}
.tour-tax-category-list li:hover { border-color: var(--naranja); }

.tour-tax-category-link {
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--texto-claro);
  text-decoration: none;
  transition: color .25s;
}
/* El enlace cubre toda la fila para que sea fácil de tocar */
.tour-tax-category-list li { position: relative; }
.tour-tax-category-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.tour-tax-category-list li:hover .tour-tax-category-link { color: var(--naranja-hover); }
.tour-tax-category-link:focus-visible {
  outline: none;
}
.tour-tax-category-link:focus-visible::after {
  outline: 3px solid var(--naranja-hover);
  outline-offset: 2px;
  border-radius: 14px;
}

.tour-tax-category-count {
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--naranja);
  color: var(--blanco);
  font-size: 12px;
  font-weight: 600;
}

/* =====================================================
   RESPONSIVE: TABLET (hasta 1024px)
   ===================================================== */
@media (max-width: 1024px) {
  body { --pad-y: 72px; }
  #tour-tax-hero-text h1 { font-size: 56px; }

  #tour-tax-hero.has-image { min-height: 50vh; }

  #tour-tax-all-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =====================================================
   RESPONSIVE: MÓVIL (hasta 767px)
   ===================================================== */
@media (max-width: 767px) {
  body { --pad-y: 56px; --pad-x: 20px; }
  #tour-tax-hero-text h1 { font-size: 42px; padding-bottom: 16px; }
  #tour-tax-all-categories h3 { font-size: 26px; }

  #tour-tax-hero.has-image { min-height: 44vh; }
  #tour-tax-hero.has-image + #tour-tax-hero-text {
    margin-top: -120px;
    background: linear-gradient(180deg, transparent 0 120px, var(--grafito) 120px);
  }
  #tour-tax-hero:not(.has-image) + #tour-tax-hero-text { padding-top: 96px; }

  #tour-tax-hero-text h1,
  #tour-tax-description { padding-left: 18px; }

  #tour-tax-posts .tour-card-list { gap: 20px; }

  .mitema-pagination { margin-top: 40px; }
  .mitema-pagination .page-numbers { min-width: 42px; height: 42px; padding: 0 12px; font-size: 14px; }

  #tour-tax-all-categories { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .tour-tax-category-group { padding: 28px 20px; border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  :is(#tour-tax-posts, #tour-tax-all-categories) * { transition: none !important; }
}