/* ===== Carrusel editorial del blog ===== */

#blog .blog-grid {
  display: block;
}

.blog-carousel {
  position: relative;
  width: 100%;
  padding: 2px 44px 38px;
  box-sizing: border-box;
}

.blog-carousel-viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-inline: contain;
  touch-action: pan-x pan-y;
  padding: 8px 0 20px;
}

.blog-carousel-viewport::-webkit-scrollbar {
  display: none;
}

.blog-carousel-track {
  display: flex;
  align-items: stretch;
  gap: 22px;
  width: max-content;
  min-width: 100%;
}

.blog-carousel-card {
  flex: 0 0 calc((100vw - 280px) / 2.25);
  width: calc((100vw - 280px) / 2.25);
  min-width: 360px;
  max-width: 560px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.blog-carousel-card:hover {
  transform: translateY(-3px);
}

.blog-carousel-card .ph {
  width: 100%;
  display: block;
  object-fit: cover;
}

.blog-carousel-arrow {
  position: absolute;
  top: calc(50% - 30px);
  z-index: 4;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #6f91e7;
  box-shadow: 0 10px 28px rgba(31, 41, 51, .16);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease;
}

.blog-carousel-arrow:hover {
  transform: scale(1.06);
  box-shadow: 0 12px 32px rgba(31, 41, 51, .2);
}

.blog-carousel-arrow:disabled {
  opacity: .35;
}

.blog-carousel-prev {
  left: 0;
}

.blog-carousel-next {
  right: 0;
}

.blog-carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 5px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.blog-carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #d7dfef;
  cursor: pointer;
  transition: width .18s ease, border-radius .18s ease, background .18s ease;
}

.blog-carousel-dot.active {
  width: 22px;
  border-radius: 99px;
  background: #6f91e7;
}

@media (max-width: 1100px) {
  .blog-carousel-card {
    flex-basis: 58vw;
    width: 58vw;
    min-width: 390px;
  }
}

@media (max-width: 760px) {
  .blog-carousel {
    padding: 0 0 34px;
  }

  .blog-carousel-viewport {
    width: calc(100vw - 28px);
    margin-left: calc((100% - (100vw - 28px)) / 2);
    padding: 6px 14px 18px 0;
    scroll-padding-left: 0;
  }

  .blog-carousel-track {
    gap: 14px;
  }

  .blog-carousel-card {
    flex: 0 0 86vw;
    width: 86vw;
    min-width: 0;
    max-width: none;
  }

  .blog-carousel-arrow {
    display: none;
  }

  .blog-carousel-card:hover {
    transform: none;
  }
}


/* ===== Página general del Blog ===== */

.blog-index-page .blog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 30px;
}

.blog-index-page .blog-archive-card {
  width: 100%;
  min-width: 0;
  max-width: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.blog-index-page .blog-archive-card:hover {
  transform: translateY(-4px);
}

.blog-index-page .blog-archive-card .ph {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.blog-index-page .blog-archive-card .body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-index-page .blog-archive-excerpt {
  margin: 10px 0 16px;
  color: var(--gris-texto);
  font-size: 14px;
  line-height: 1.6;
}

.blog-index-page .blog-archive-more {
  display: inline-block;
  margin-top: auto;
  color: #6f91e7;
  font-weight: 700;
  font-size: 13.5px;
}

.blog-index-page .blog-archive-card:hover .blog-archive-more {
  text-decoration: underline;
}

@media (max-width: 760px) {
  .blog-index-page .blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 22px;
  }

  .blog-index-page .blog-archive-card:hover {
    transform: none;
  }
}
