/* =================== CUADRADO 1:1 =================== */
.srp-square {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1; /* moderno */
  padding-top: 0; /* desactiva fallback si existe aspect-ratio */
  overflow: hidden;
  z-index: 1;
  height: 350px;
  display: block;
}
@supports not (aspect-ratio: 1 / 1) {
  .srp-square {
    padding-top: 100%;
  } /* Fallback 1:1 */
}
.srp-square img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =================== META =================== */
.srp-meta {
  color: #666;
  font-size: 0.9rem;
  margin: 0.5rem 0 1rem;
}

/* =================== TERM LIST / BADGES =================== */
.srp-term-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
}
.srp-term-badge {
  display: inline-block;
  padding: 0.15rem 0.75rem;
  background-color: #f2f2f2;
  color: inherit;
  font-size: 0.75rem;
  line-height: 1.4;
  text-decoration: none;
}
.srp-term-badge:hover,
.srp-term-badge:focus {
  background-color: #e2e2e2;
}

.srp-archive-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
}

@media (max-width: 1024px) {
  .srp-archive-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .srp-archive-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .srp-sidebar {
    padding: 30px;
  }
}

/* =================== ARTÍCULO / THUMBS (si aplica) =================== */
.srp-archive-thumb {
  display: block;
  text-decoration: none;
}
.srp-archive-thumb__media {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  overflow: hidden;
}
.srp-archive-thumb__media img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =================== CONTENIDO =================== */
.srp-article-content {
  font-family: 'Neutra Text', sans-serif;
  background: white;
  margin-top: -40px;
  padding: 30px;
  z-index: 2;
  position: relative;
  width: 94%;
  margin-left: auto;
  margin-right: auto;
}
.srp-article-content h2 {
  font-family: 'Neutra Text', sans-serif;
  font-weight: 700;
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.srp-article-content p {
  text-align: justify;
}

/* =================== BOTÓN READMORE =================== */
.srp-readmore {
  background: #192a3c;
  color: white;
  border: 1px solid #192a3c;
  padding: 10px 20px;
  transition: all 0.3s, color 0.3s;
  text-decoration: none;
  text-transform: uppercase;
}
.srp-readmore:hover {
  background: white;
  color: #192a3c;
  border: 1px solid #192a3c;
}

/* =========================================================
   CARRUSEL VANILLA (sin Swiper)
   ========================================================= */

/* Root del carrusel para posicionar nav encima */
.srp-carousel {
  position: relative;
  --srp-gap: 16px; /* configurable desde inline style si quieres */
}

/* Viewport con scroll horizontal + snap */
.srp-carousel-viewport {
  overflow: hidden; /* oculta lo que desborda */
}
.srp-carousel-viewport:focus {
  outline: none;
}

/* Track desplazable con scroll-snap */
.srp-carousel-track {
  display: flex;
  gap: var(--srp-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; /* iOS */
  padding-bottom: 2px; /* evita corte de sombras */
  scrollbar-width: none; /* Firefox: oculta scroll bar */
}
.srp-carousel-track::-webkit-scrollbar {
  display: none;
} /* WebKit */

/* Slide: el ancho lo calcula el CSS según SPV */
.srp-slide {
  scroll-snap-align: start;
  /* El ancho real de la slide lo damos con flex-basis
     según SPV (items por vista). Lo fijamos con media queries abajo. */
  flex: 0 0 auto;
}

/* Card: limita el tamaño visual de cada tarjeta */
.srp-carousel-card {
  width: 100%;
  margin: 0 auto;
  max-width: 350px; /* Desktop / Tablet limit */
}
@media (max-width: 767.98px) {
  .srp-carousel-card {
    max-width: 280px;
  } /* Mobile limit */
}

/* ===== Navegación (flechas) superpuestas ===== */
.srp-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: 0;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.srp-nav-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}
.srp-nav-btn:hover {
  background: rgba(0, 0, 0, 0.65);
}

.srp-nav-prev {
  left: 8px;
}
.srp-nav-next {
  right: 8px;
}

.srp-nav-btn span,
.srp-nav-btn svg {
  width: 18px;
  height: 18px;
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
}

/* =================== BUSCADOR =================== */
.srp-search-form {
  display: flex;
  gap: 8px;
  align-items: stretch;
  border-bottom: 1px solid black;
  margin-bottom: 20px;
}
.srp-search-form__label {
  flex: 1;
}
.srp-search-form .search-field {
  width: 100%;
  padding: 10px 12px;
  border: none;
  outline: none;
  border-radius: 4px;
}
.srp-search-form .search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: black;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  transition: background 0.3s, color 0.3s;
}
.srp-search-form .search-submit:hover,
.srp-search-form .search-submit:focus {
  color: black;
}
.srp-search-icon {
  font-size: 1.1rem;
  line-height: 1;
}

/* =========================================================
   Reparto de ancho por SPV (slides per view)
   =========================================================
   Usamos media queries + variables calculadas:
   flex-basis = (100% - gap*(spv-1)) / spv
   Así entran spv slides exactas por viewport, con gap fijo.

   IMPORTANTE: El JavaScript puede sobrescribir estos valores
   usando CSS custom properties dinámicas por instancia.
*/

/* Mobile: SPV = 1 por defecto; el JS ajusta si el usuario eligió otro valor */
@media (max-width: 767.98px) {
  .srp-carousel .srp-slide {
    flex-basis: calc((100% - (var(--srp-gap) * (var(--srp-spv-mobile, 1) - 1))) / var(--srp-spv-mobile, 1));
    min-width: 0; /* evita overflow */
  }
}

/* Tablet: SPV = 2 por defecto */
@media (min-width: 768px) and (max-width: 1023.98px) {
  .srp-carousel .srp-slide {
    flex-basis: calc((100% - (var(--srp-gap) * (var(--srp-spv-tablet, 2) - 1))) / var(--srp-spv-tablet, 2));
    min-width: 0; /* evita overflow */
  }
}

/* Desktop: SPV = 3 por defecto */
@media (min-width: 1024px) {
  .srp-carousel .srp-slide {
    flex-basis: calc((100% - (var(--srp-gap) * (var(--srp-spv-desktop, 3) - 1))) / var(--srp-spv-desktop, 3));
    min-width: 0; /* evita overflow */
  }
}

.srp-box h4 {
  background: #192a3c;
  color: white;
  padding: 25px 20px;
  text-transform: uppercase;
  line-height: 1;
}

aside.srp-sidebar {
  font-family: 'Neutra Text', sans-serif;
}

.srp-box ul {
  list-style: none;
  padding: 0;
  padding-left: 5px;
  /* color: black; */
}

.srp-box a {
  color: black;
  font-weight: 600;
}

.srp-box ul li {
  margin-bottom: 30px;
}

.srp-single-all-content {
  background: white;
  padding: 30px;
  margin: auto;
  margin-top: -80px;
  position: relative;
  z-index: 2;
  width: 95%;
  /* margin: auto; */
  font-family: 'Neutra Text';
}

.srp-single-all-content h1 {
  margin-top: 30px !important;
  margin-bottom: 10px !important;
  font-weight: bold;
}

.srp-single-all-content a {
  color: #192a3c;
}

.srp-term-badge.srp-term-badge--cat,
.srp-term-badge.srp-term-badge--tag {
  background-color: #192a3c;
  color: white;
}

[type='button'],
[type='submit'],
button {
  border: none;
  cursor: pointer;
  background: transparent;
  color: black;
  transition: all ease-in-out 0.4s;
}

[type='button']:focus,
[type='button']:hover,
[type='submit']:focus,
[type='submit']:hover,
button:focus,
button:hover {
  background: transparent;
  color: black;
  transform: scale(1.05);
  border: none;
}

.comment-form-comment textarea {
  font-family: 'Neutra Text', sans-serif;
  border: none;
  border-bottom: 2px solid black;
  resize: none;
  outline: none;
}

.srp-entry-banner {
  width: 100%;
  margin-bottom: 24px;
  margin-top: -200px;
}

@media (max-width: 768px) {
  .srp-entry-banner {
    margin-top: -60px;
  }
}
