/* ================================================================
   GUÍAS DE ANDORRA — Estilos editoriales
   Diseño: sobrio, limpio, alta legibilidad. Sin decoraciones innecesarias.
   ================================================================ */

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --g-blue:    #0A1C2F;
  --g-orange:  #f6a702;
  --g-gray:    #6b7280;
  --g-light:   #f9fafb;
  --g-border:  #e5e7eb;
  --g-text:    #1a1a1a;
  --g-lead:    #374151;
  --g-max:     1100px;
  --g-content: 720px;
  --g-sidebar: 260px;
}

/* ================================================================
   SECCIÓN HOME — "Inspírate en Andorra"
   ================================================================ */

.guias-home-section {
  padding: clamp(3rem, 5vw, 5rem) 20px;
  background: #fff;
  border-top: 1px solid var(--g-border);
}

.guias-home-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0;
  margin-bottom: 2rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.guias-home-titulo {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700;
  color: var(--g-blue);
  letter-spacing: -0.02em;
  margin: 0;
}

.guias-home-ver-todas {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--g-orange);
  text-decoration: none;
  white-space: nowrap;
}

.guias-home-ver-todas:hover {
  text-decoration: underline;
}

/* Swiper wrapper — hereda .category-carousel-wrapper, solo ajustamos max-width */
.guias-home-section .category-carousel-wrapper {
  max-width: 1400px;
}

/* Card editorial */
.guia-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--g-border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.guia-card:hover {
  border-color: #c8cdd5;
  text-decoration: none;
  color: inherit;
}

.guia-card:hover .guia-card-titulo {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.guia-card-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  background: var(--g-light);
}

.guia-card-body {
  padding: 1rem 1.125rem 1.25rem;
}

.guia-card-categoria {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--g-orange);
  margin-bottom: 0.5rem;
  display: block;
}

.guia-card-titulo {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--g-blue);
  line-height: 1.4;
  margin: 0 0 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.guia-card-desc {
  font-size: 0.8375rem;
  color: var(--g-gray);
  line-height: 1.55;
  margin: 0 0 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.guia-card-leer {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--g-orange);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ================================================================
   PÁGINA ÍNDICE DE GUÍAS — /guias
   ================================================================ */

.guias-index-page {
  min-height: 60vh;
  background: #fff;
}

.guias-index-hero {
  padding: clamp(2.5rem, 6vw, 5rem) 1.25rem clamp(1.5rem, 4vw, 3rem);
  max-width: var(--g-max);
  margin: 0 auto;
  border-bottom: 1px solid var(--g-border);
  box-sizing: border-box;
}

@media (min-width: 600px) {
  .guias-index-hero {
    padding-left: clamp(1.25rem, 4vw, 3rem);
    padding-right: clamp(1.25rem, 4vw, 3rem);
  }
}

.guias-index-hero h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--g-blue);
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}

.guias-index-hero p {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--g-gray);
  max-width: 560px;
  line-height: 1.65;
  margin: 0;
}

/* Filtros por categoría — una sola fila con scroll horizontal */
.guias-filtros {
  padding: 0 1.25rem;
  max-width: var(--g-max);
  margin: 0 auto;
  display: flex;
  gap: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid var(--g-border);
  box-sizing: border-box;
}

.guias-filtros::-webkit-scrollbar { display: none; }

@media (min-width: 600px) {
  .guias-filtros {
    padding-left: clamp(1.25rem, 4vw, 3rem);
    padding-right: clamp(1.25rem, 4vw, 3rem);
  }
}

.guias-filtro-btn {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--g-gray);
  background: none;
  border: none;
  padding: 1rem 0.875rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
  outline: none;
}

.guias-filtro-btn:hover,
.guias-filtro-btn.active {
  color: var(--g-blue);
  border-bottom-color: var(--g-orange);
}

/* Grid de artículos */
.guias-grid {
  padding: clamp(2rem, 4vw, 3rem) 1.25rem;
  max-width: var(--g-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  box-sizing: border-box;
}

@media (min-width: 600px) {
  .guias-grid {
    padding-left: clamp(1.25rem, 4vw, 3rem);
    padding-right: clamp(1.25rem, 4vw, 3rem);
  }
}

@media (max-width: 900px) {
  .guias-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .guias-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   PÁGINA ARTÍCULO — /guias/:slug
   ================================================================ */

.guia-page {
  background: #fff;
  min-height: 80vh;
}

/* Progress bar de lectura */
.guia-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--g-blue);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* Hero imagen */
.guia-hero {
  width: 100%;
  max-height: 520px;
  overflow: hidden;
  background: var(--g-light);
}

.guia-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-height: 520px;
}

/* Contenedor principal */
.guia-container {
  max-width: var(--g-max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
  display: grid;
  grid-template-columns: 1fr var(--g-sidebar);
  gap: 3rem;
  align-items: start;
  box-sizing: border-box;
}

@media (min-width: 600px) {
  .guia-container {
    padding-left: clamp(1.25rem, 3vw, 2rem);
    padding-right: clamp(1.25rem, 3vw, 2rem);
  }
}

@media (max-width: 900px) {
  .guia-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* clip evita scroll horizontal por el widget 100vw en móvil, sin crear BFC */
.guia-page { overflow-x: clip; }

/* min-width:0 evita que los hijos de grid desborden su celda */
.guia-container > main,
.guia-container > aside {
  min-width: 0;
}

.guia-content,
.guia-container { box-sizing: border-box; }

/* max-width:100% evita que tablas, imágenes y banners desborden en móvil */
.guia-content > *:not(.guia-gyg-widget) { max-width: 100%; box-sizing: border-box; }

.guia-table-wrapper { max-width: 100%; }

/* Breadcrumb */
.guia-breadcrumb {
  display: flex;
  gap: 0.375rem;
  align-items: center;
  font-size: 0.8rem;
  color: var(--g-gray);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.guia-breadcrumb a {
  color: var(--g-gray);
  text-decoration: none;
}

.guia-breadcrumb a:hover {
  color: var(--g-blue);
}

.guia-breadcrumb-sep {
  color: #d1d5db;
}

/* Header del artículo */
.guia-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--g-border);
}

.guia-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.875rem;
  flex-wrap: wrap;
}

.guia-meta-categoria {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--g-orange);
}

.guia-meta-sep { color: var(--g-border); }

.guia-meta-read,
.guia-meta-fecha {
  font-size: 0.8rem;
  color: var(--g-gray);
}

.guia-h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--g-blue);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 1rem;
}

.guia-lead {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--g-lead);
  line-height: 1.75;
  margin: 0;
}

/* Contenido editorial */
.guia-content {
  max-width: var(--g-content);
}

.guia-content h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 700;
  color: var(--g-blue);
  letter-spacing: -0.02em;
  margin: 2.5rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--g-border);
}

/* scroll-margin-top compensa el header sticky al navegar por anclas */
.guia-content h2[id],
.guia-content h3[id] {
  scroll-margin-top: 90px;
}

.guia-content h2:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.guia-content h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--g-blue);
  margin: 1.75rem 0 0.5rem;
}

.guia-content p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--g-text);
  margin: 0 0 1.25rem;
}

.guia-content a {
  color: var(--g-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.guia-content a:hover {
  color: var(--g-orange);
}

/* Caja de tips/destacados */
.guia-tip {
  background: var(--g-light);
  border-left: none;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 4px 4px 0;
}

.guia-tip p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--g-lead);
}

.guia-tip strong {
  color: var(--g-blue);
  font-weight: 600;
}

/* Tabla de datos */
.guia-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--g-border);
  border-radius: 6px;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.guia-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.guia-table th {
  background: #f3f4f6;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--g-blue);
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--g-border);
}

.guia-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--g-border);
  color: var(--g-text);
  vertical-align: top;
}

.guia-table tr:last-child td { border-bottom: none; }
.guia-table tr:hover td { background: #fafafa; }

/* Imagen dentro del artículo */
.guia-img-block {
  margin: 2rem 0;
}

.guia-img-block img {
  width: 100%;
  border-radius: 6px;
  display: block;
}

.guia-img-caption {
  font-size: 0.8125rem;
  color: var(--g-gray);
  margin-top: 0.5rem;
  text-align: center;
}

/* CTA de reserva al final del artículo */
.guia-cta-reserva {
  margin: 3rem 0;
  padding: 2rem;
  border: 1px solid var(--g-border);
  border-radius: 8px;
  text-align: center;
}

.guia-cta-reserva h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--g-blue);
  margin: 0 0 0.5rem;
}

.guia-cta-reserva p {
  font-size: 0.9375rem;
  color: var(--g-gray);
  margin: 0 0 1.25rem;
}

.guia-cta-btn {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff !important;
  background: var(--g-blue);
  padding: 0.75rem 2rem;
  border-radius: 6px;
  text-decoration: none !important;
  transition: background 0.2s;
}

.guia-cta-btn:hover {
  background: #0d2640;
  color: #fff !important;
  text-decoration: none !important;
}

/* Tags */
.guia-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--g-border);
}

.guia-tag {
  font-size: 0.8rem;
  color: var(--g-gray);
  border: 1px solid var(--g-border);
  border-radius: 4px;
  padding: 0.25rem 0.625rem;
}

/* ================================================================
   SIDEBAR
   ================================================================ */

.guia-sidebar {
  position: sticky;
  top: 80px;
}

/* Tabla de contenidos */
.guia-toc {
  border: 1px solid var(--g-border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.guia-toc-header {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--g-blue);
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--g-border);
  background: var(--g-light);
}

.guia-toc-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}

.guia-toc-list li a {
  display: block;
  font-size: 0.875rem;
  color: var(--g-lead);
  padding: 0.375rem 1rem;
  text-decoration: none;
  transition: color 0.15s;
  line-height: 1.4;
}

.guia-toc-list li a:hover,
.guia-toc-list li a.active {
  color: var(--g-orange);
}

/* Mobile TOC colapsable */
.guia-toc-mobile {
  display: none;
  border: 1px solid var(--g-border);
  border-radius: 8px;
  margin-bottom: 2rem;
}

.guia-toc-mobile summary {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--g-blue);
  padding: 0.875rem 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.guia-toc-mobile summary::-webkit-details-marker { display: none; }

.guia-toc-mobile .guia-toc-list {
  border-top: 1px solid var(--g-border);
}

@media (max-width: 900px) {
  .guia-toc-mobile { display: block; }
  .guia-sidebar .guia-toc { display: none; }
}

/* Widget reservar */
.guia-sidebar-widget {
  border: 1px solid var(--g-border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.guia-sidebar-widget h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--g-blue);
  margin: 0 0 0.5rem;
}

.guia-sidebar-widget p {
  font-size: 0.8375rem;
  color: var(--g-gray);
  margin: 0 0 1rem;
  line-height: 1.5;
}

.guia-sidebar-btn {
  display: block;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--g-blue);
  border: 1.5px solid var(--g-blue);
  border-radius: 6px;
  padding: 0.625rem 1rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.guia-sidebar-btn:hover {
  background: var(--g-blue);
  color: #fff !important;
  text-decoration: none !important;
}

/* Artículos relacionados en sidebar */
.guia-relacionados-sidebar h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--g-gray);
  margin: 0 0 0.75rem;
}

.guia-relacionado-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--g-border);
}

.guia-relacionado-item:last-child { border-bottom: none; }

.guia-relacionado-item:hover .guia-relacionado-titulo {
  color: var(--g-orange);
}

.guia-relacionado-img {
  width: 56px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--g-light);
}

.guia-relacionado-titulo {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--g-blue);
  line-height: 1.35;
  transition: color 0.15s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ================================================================
   WIDGET GETYOURGUIDE
   ================================================================ */

/* El article no puede cortar el overflow del widget */
.guia-content-with-gyg {
  overflow: visible;
}

/* Widget GYG */
.guia-gyg-widget {
  width: 100%;
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
  padding: 1.75rem 0;
  background: #f9fafb;
  border-top: 1px solid var(--g-border);
  border-bottom: 1px solid var(--g-border);
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .guia-gyg-widget {
    width: 100%;
    padding: 1.5rem 0;
  }
}

.guia-gyg-titulo {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--g-blue);
  margin: 0 0 1.25rem;
}

.guia-gyg-widget [data-gyg-widget] {
  width: 100%;
}


/* ================================================================
   ANUNCIOS ADSENSE — posiciones 1, 2 y 3
   ================================================================ */

/* Contenedor base para todos los anuncios */
.guia-ad {
  margin: 2rem 0;
  padding: 0.75rem 0;
  text-align: center;
  border-top: 1px solid var(--g-border);
  border-bottom: 1px solid var(--g-border);
  background: #fafafa;
  border-radius: 2px;
  overflow: hidden;
}

/* Posición 1 — inline-top: entre el header y el cuerpo */
.guia-ad-top {
  margin-top: 1.5rem;
  margin-bottom: 1.75rem;
}

/* Posición 2 — mid-content: entre el contenido y el CTA */
.guia-ad-mid {
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
}

/* Posición 3 — bottom */
.guia-ad-bot {
  margin-top: 0;
  margin-bottom: 2rem;
  border-top: none;
}

/* Limitar altura máxima para evitar formatos oversized en todos los slots */
.guia-ad .adsbygoogle {
  max-height: 280px;
}

/* Bloquear vídeos in-banner dentro de slots de guías */
.guia-ad video,
.guia-ad iframe video,
.guia-ad-inline video,
.guia-ad-inline iframe video {
  display: none !important;
  pointer-events: none !important;
}

/* Ad In-article inyectado dinámicamente entre párrafos */
.guia-ad-inline {
  margin: 1.75rem 0;
  padding: 0.5rem 0;
  border-top: 1px solid var(--g-border);
  border-bottom: 1px solid var(--g-border);
  background: #fafafa;
  overflow: hidden;
  clear: both;
}

/* El formato fluid de In-article no necesita min-height forzada — AdSense lo gestiona */
.guia-ad-inline .adsbygoogle {
  display: block;
  text-align: center;
}

/* En móvil: formato rectangular vertical tipo TripAdvisor */
@media (max-width: 600px) {
  .guia-ad {
    padding: 0.5rem 0;
  }
  .guia-ad-mid .adsbygoogle,
  .guia-ad-bot .adsbygoogle {
    min-height: 250px;
    max-height: 280px;
  }
  .guia-ad-inline {
    margin: 1.25rem 0;
  }
}

