/* ====== Título ====== */
.vtcl__title {
  font-size: 28px;
  font-weight: 700;
  color: #000;
  text-align: left;
  position: relative;
  margin-top: 0px;
  margin-bottom: 56px;
}

.vtcl__title::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 80px;
  height: 4px;
  background: #ED1C25;
  border-radius: 4px;
}

/* ====== Header: título + filtro ====== */
.vtcl__box {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 0;
  flex-wrap: wrap;
  gap: 16px;
}

.vtcl__select {
  border: 1px solid #ED1C25;
  padding: 10px 40px 10px 14px;
  font-weight: 500;
  background: #fff;
  color: #000;
  border-radius: 4px;
  min-width: 180px;
  /* Quitar flecha nativa */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  /* Agregar SVG personalizado */
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMSIgaGVpZ2h0PSI3IiB2aWV3Qm94PSIwIDAgMTEgNyIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00LjcxNDE5IDUuODkyNUwyLjE5MzQ1ZS0wNSAxLjE3ODMzTDEuMTc4MzYgMEw1LjMwMzM2IDQuMTI1TDkuNDI4MzYgMEwxMC42MDY3IDEuMTc4MzNMNS44OTI1MiA1Ljg5MjVDNS43MzYyNSA2LjA0ODczIDUuNTI0MzMgNi4xMzY0OSA1LjMwMzM2IDYuMTM2NDlDNS4wODIzOSA2LjEzNjQ5IDQuODcwNDYgNi4wNDg3MyA0LjcxNDE5IDUuODkyNVoiIGZpbGw9IiNFMzA2MTQiLz4KPC9zdmc+');
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 11px 7px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

/* ====== Preloader del filtro ====== */
.vtcl__filter {
  position: relative;
}

.vtcl__filter-loader {
  position: absolute;
  top: 50%;
  right: 50px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.vtcl__spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #ED1C25;
  border-radius: 50%;
  animation: vtcl-spin 0.8s linear infinite;
}

@keyframes vtcl-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ====== Grid general ====== */
.vtcl__list {
  display: grid;
  gap: 32px;
}

/* === columnas dinámicas === */
.vtcl__list.columns-1 {
  grid-template-columns: 1fr;
}

.vtcl__list.columns-2 {
  grid-template-columns: repeat(2, 1fr);
}

.vtcl__list.columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.vtcl__list.columns-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* responsive: siempre 1 en mobile */
@media (max-width: 768px) {
  .vtcl__list {
    grid-template-columns: 1fr !important;
  }
}

/* ====== Card base ====== */
.vtcl__item {
  background: rgba(245, 243, 242, 0.50);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.vtcl__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ====== Layouts ====== */

/* Imagen arriba */
.vtcl__item.layout-image_top {
  flex-direction: column;
}

.vtcl__item.layout-image_top .vtcl__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Imagen izquierda */
.vtcl__item.layout-image_left {
  flex-direction: row;
  cursor: pointer;
}

.vtcl__item.layout-image_left .vtcl__media {
  flex: 0 0 35%;
}

.vtcl__item.layout-image_left .vtcl__content {
  flex: 1;
  padding: 1.5rem;
}

/* Imagen derecha */
.vtcl__item.layout-image_right {
  flex-direction: row-reverse;
  cursor: pointer;
}

.vtcl__item.layout-image_right .vtcl__media {
  flex: 0 0 35%;
}

.vtcl__item.layout-image_right .vtcl__content {
  flex: 1;
  padding: 1.5rem;
}

/* ====== Media ====== */
/* .vtcl__media {
  height: var(--vtcl-media-height, 220px);
} */

.vtcl__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.vtcl__item:hover .vtcl__media img {
  transform: scale(1.03);
}

/* ====== Contenido ====== */
.vtcl__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 24px 40px 24px;
}

.vtcl__date {
  font-size: 18px;
  font-weight: 400;
  color: #1D1D1D;
  margin-bottom: 16px;
}

.vtcl__item-title {
  font-size: 20px;
  font-weight: 600;
  color: #1D1D1D;
  margin: 0;
}

.vtcl__excerpt {
  font-size: 18px;
  font-weight: 400;
  color: #000;
  line-height: 24px;
  margin-bottom: 20px;
  margin-top: 16px;
}

/* ====== Botón ====== */
.vtcl__btn {
  background: #ED1C25;
  color: #fff;
  border: none;
  font-weight: 600;
  padding: 13px 24px;
  cursor: pointer;
  align-self: flex-start;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 14px;
}

.vtcl__btn:hover {
  opacity: 0.85;
  color: #FFF;
  transform: translateY(-1px);
}

/* ====== Paginación ====== */
.vtcl__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 3rem;
}

.vtcl__page {
  border: 2px solid #ED1C25;
  border-radius: 6px;
  padding: 8px 16px;
  text-decoration: none;
  color: #ED1C25;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s ease;
}

.vtcl__page:hover,
.vtcl__page.is-active {
  background: #ED1C25;
  color: #fff;
  transform: translateY(-1px);
}

/* ====== Modal ====== */
.vtcl-modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.25s ease forwards;
}

.vtcl-modal.is-open {
  display: flex;
}

.vtcl-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.vtcl-modal__dialog {
  background: #fff;
  padding: 40px 32px;
  width: 90%;
  max-width: 720px;
  max-height: 80vh;
  overflow-y: auto;
  scroll-behavior: smooth;
  position: relative;
  z-index: 1;
  text-align: center;
  animation: slideIn 0.3s ease;
  box-shadow: 0 4px 4px 0 rgba(180, 180, 180, 0.25);
}


@keyframes slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.vtcl-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #888;
  transition: color 0.2s ease, background 0.2s ease;
  line-height: 1;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.vtcl-modal__close:hover {
  color: #ED1C25;
  background: rgba(0, 0, 0, 0.05);
}

.vtcl-modal__close svg {
  pointer-events: none;
}

.vtcl-modal__content h3 {
  margin-top: 0;
  color: #000;
  font-weight: 700;
  width: 80%;
  font-size: 1.25rem;
  margin: auto;
}

@media(max-width: 768px) {
  .vtcl-modal__content h3 {
    width: 100%;
    text-align: center;
  }
}

.vtcl__modal-body {
  font-size: 0.95rem;
  color: #333;
  line-height: 1.6;
  margin-bottom: 1.8rem;
  text-align: left;
}

.vtcl-modal__loader {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 50px 0;
}

.vtcl-modal__loader .spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #ED1C25;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* ====== Responsive ajustes ====== */
/* Desde 1200px hacia abajo: reducir tamaños de fuente */
@media (max-width: 1200px) {
  .vtcl__title {
    font-size: 20px;
    margin-bottom: 32px;
  }

  .vtcl__date {
    font-size: 16px;
  }

  .vtcl__item-title {
    font-size: 18px;
  }

  .vtcl__excerpt {
    font-size: 16px;
  }
}

@media (max-width: 768px) {

  .vtcl__item.layout-image_left,
  .vtcl__item.layout-image_right {
    flex-direction: column;
  }

  /* .vtcl__item.layout-image_left .vtcl__media,
  .vtcl__item.layout-image_right .vtcl__media {
    flex: 0 0 100%;
  } */

  .vtcl__item.layout-image_left .vtcl__content,
  .vtcl__item.layout-image_right .vtcl__content {
    padding: 1.25rem;
  }

  .vtcl__title {
    text-align: left;
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 0;
  }

  .vtcl__box {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 24px;
  }

  .vtcl__excerpt {
    font-size: 16px;
  }

  .vtcl__item-title {
    font-size: 18px;
  }

  .vtcl__media {
    height: auto;
  }
}

@media(max-width: 500px) {

  .vtcl__box {
    justify-content: flex-start;
  }
  
  .vtcl__filter {
    width: 100%;
  }

  .vtcl__select {
    width: 100%;
    margin-top: 0px;
  }
}

/* ===== Scroll personalizado solo en el modal ===== */
.vtcl-modal__dialog {
  scrollbar-width: thin;
  /* Firefox */
  scrollbar-color: #ED1C25 #f0f0f0;
  /* Firefox */
}

/* Webkit (Chrome, Edge, Safari) */
.vtcl-modal__dialog::-webkit-scrollbar {
  width: 8px;
  /* grosor del scroll */
}

.vtcl-modal__dialog::-webkit-scrollbar-track {
  background: #f0f0f0;
  /* fondo del track */
  border-radius: 10px;
}

.vtcl-modal__dialog::-webkit-scrollbar-thumb {
  background-color: #ED1C25;
  /* color del scroll */
  border-radius: 10px;
}

/* Quitar flechas del scroll */
.vtcl-modal__dialog::-webkit-scrollbar-button {
  display: none;
}