/*
 * VeloValue — Front Page Styles
 * Carousel · Featured grid · Category columns
 */

/* ==========================================================================
   Page wrapper
   ========================================================================== */
.vv-fp-wrap {
  width: 100%;
  padding: 0 1rem 4rem;
}

/* Section heading */
.vv-section-title {
  font-family: var(--vv-font-heading) !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .1em !important;
  color: var(--vv-black) !important;
  margin: 2.5rem 0 1.25rem !important;
  padding-bottom: .5rem;
  border-bottom: 3px solid var(--vv-sky);
  display: inline-block;
}

/* ==========================================================================
   HERO CAROUSEL — grid layout: main slide + sidebar
   ========================================================================== */
.vv-carousel {
  display: grid;
  grid-template-columns: 1fr 260px;
  width: 100%;
  border-radius: var(--vv-radius);
  margin-bottom: .25rem;
  background: var(--vv-black);
  overflow: hidden;
}

/* Main area — fixed height so viewport/track/slides all resolve 100% correctly */
.vv-carousel__main {
  position: relative;
  height: 460px;   /* explicit, not min-height, so children inherit it */
  overflow: hidden;
}

/* Viewport — fills main, clips the track */
.vv-carousel__viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Track — full-height flex row of slides */
.vv-carousel__track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform .45s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}

/* Slide — stacking context: image underneath, overlay on top */
.vv-carousel__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;   /* anchor for absolute children */
  overflow: hidden;
  background-color: var(--vv-gray-900);
}

/* Background image — stretches to fill the slide exactly */
.vv-carousel__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  z-index: 0;
}

.vv-carousel__bg-img--empty {
  background: linear-gradient(135deg, var(--vv-gray-900) 0%, #111 100%);
}

/* Gradient overlay — sits on top of the image, text reads over it */
.vv-carousel__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.85) 0%,
    rgba(0,0,0,.40) 45%,
    rgba(0,0,0,.05) 100%
  );
  display: flex;
  align-items: flex-end;   /* pin content to bottom-left corner */
}

/* Text content — sits in the bottom-left corner over the image */
.vv-carousel__content {
  position: relative;
  z-index: 2;
  padding: 2rem 2rem 2.5rem;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.vv-carousel__cat {
  display: inline-block;
  font-family: var(--vv-font-heading);
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--vv-sky);
  text-decoration: none;
  background: rgba(0,0,0,.4);
  padding: .25rem .65rem;
  border-radius: var(--vv-radius);
  align-self: flex-start;
}

.vv-carousel__title {
  margin: 0 !important;
  font-family: var(--vv-font-heading) !important;
  font-size: clamp(1.4rem, 3.5vw, 2rem) !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  line-height: 1.1 !important;
  color: var(--vv-white) !important;
}

.vv-carousel__title a {
  color: inherit !important;
  text-decoration: none !important;
}
.vv-carousel__title a:hover {
  color: var(--vv-sky) !important;
}

/* CTA button */
.vv-carousel__btn {
  display: inline-block;
  align-self: flex-start;
  padding: .55rem 1.25rem;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.12) 0px, rgba(255,255,255,.12) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0px, rgba(255,255,255,.08) 1px, transparent 1px, transparent 4px);
  background-color: var(--vv-sky);
  color: var(--vv-white) !important;
  text-decoration: none !important;
  font-family: var(--vv-font-heading);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-radius: var(--vv-radius);
  transition: background-color .15s ease, transform .1s ease;
}
.vv-carousel__btn:hover {
  background-color: var(--vv-sky-dark);
  transform: translateY(-1px);
  color: var(--vv-white) !important;
}

/* Arrows — anchored inside .vv-carousel__main */
.vv-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.5);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  color: var(--vv-white);
  cursor: pointer;
  transition: background .15s ease;
  padding: 0;
}
.vv-carousel__arrow:hover {
  background: var(--vv-sky);
  border-color: var(--vv-sky);
}
.vv-carousel__arrow--prev { left: .75rem; }
.vv-carousel__arrow--next { right: .75rem; }
.vv-carousel__arrow svg {
  width: 18px;
  height: 18px;
}

/* Dots — bottom-left of main area */
.vv-carousel__dots {
  position: absolute;
  bottom: 1rem;
  left: 1.5rem;
  display: flex;
  gap: .4rem;
  z-index: 10;
}

.vv-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  padding: 0;
  transition: background .2s ease, transform .2s ease;
}
.vv-carousel__dot.is-active {
  background: var(--vv-sky);
  transform: scale(1.3);
}

/* ==========================================================================
   CAROUSEL SIDEBAR — next 3 slides list
   ========================================================================== */
.vv-carousel__sidebar {
  background: var(--vv-gray-900);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid rgba(255,255,255,.06);
}

.vv-carousel__sb-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem .875rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,.06);
  cursor: pointer;
  text-align: left;
  transition: background .15s ease;
  /* hidden by default — JS shows 3 at a time */
  display: none;
}
.vv-carousel__sb-item.is-visible {
  display: flex;
}
.vv-carousel__sb-item:hover {
  background: rgba(255,255,255,.05);
}
.vv-carousel__sb-item.is-current {
  background: rgba(0, 174, 239, .12);
  border-left: 3px solid var(--vv-sky);
}
.vv-carousel__sb-item:last-child {
  border-bottom: none;
}

.vv-carousel__sb-thumb {
  width: 72px;
  height: 52px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  display: block;
}
.vv-carousel__sb-thumb--empty {
  background: var(--vv-gray-900);
  border: 1px solid rgba(255,255,255,.08);
}

.vv-carousel__sb-title {
  font-family: var(--vv-font-body);
  font-size: .775rem;
  font-weight: 500;
  color: var(--vv-gray-200);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   FEATURED GRID
   ========================================================================== */
.vv-fp-featured {
  margin-bottom: 1rem;
}

.vv-fp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.vv-fp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--vv-white);
  border-radius: var(--vv-radius);
  overflow: hidden;
  box-shadow: var(--vv-shadow);
  transition: box-shadow .2s ease, transform .15s ease;
}
.vv-fp-card:hover {
  box-shadow: var(--vv-shadow-md);
  transform: translateY(-2px);
}

.vv-fp-card__link { display: block; }

.vv-fp-card__img-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--vv-gray-200);
}

.vv-fp-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
  box-shadow: none !important;
  transition: transform .3s ease;
}
.vv-fp-card:hover .vv-fp-card__img { transform: scale(1.04); }

.vv-fp-card__img--placeholder {
  background: linear-gradient(135deg, var(--vv-gray-200) 0%, var(--vv-gray-400) 100%);
}

.vv-fp-card__body {
  padding: .875rem 1rem 1.125rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  flex: 1;
}

.vv-fp-card__cat {
  font-family: var(--vv-font-heading);
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--vv-sky);
  text-decoration: none;
}
.vv-fp-card__cat:hover { text-decoration: underline; }

.vv-fp-card__title {
  margin: 0 !important;
  font-family: var(--vv-font-heading) !important;
  font-size: .9375rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  line-height: 1.25 !important;
}
.vv-fp-card__title a { color: var(--vv-black) !important; text-decoration: none !important; }
.vv-fp-card__title a:hover { color: var(--vv-sky) !important; }

/* ==========================================================================
   CATEGORY COLUMNS
   ========================================================================== */
.vv-fp-cats {
  margin-bottom: 1rem;
}

.vv-fp-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.vv-fp-col {
  background: var(--vv-white);
  border-radius: var(--vv-radius);
  box-shadow: var(--vv-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Column header — black bar with icon + category name */
.vv-fp-col__header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .875rem 1.125rem;
  background: var(--vv-black);
}

.vv-fp-col__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--vv-sky);
  display: flex;
  align-items: center;
}
.vv-fp-col__icon svg {
  width: 100%;
  height: 100%;
}

.vv-fp-col__name,
.vv-fp-col__header .vv-fp-col__name {
  font-family: var(--vv-font-heading);
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--vv-white) !important;
  text-decoration: none;
}
.vv-fp-col__name:hover,
.vv-fp-col__header .vv-fp-col__name:hover {
  color: var(--vv-sky) !important;
}

/* Article list */
.vv-fp-col__list {
  list-style: none;
  margin: 0;
  padding: .5rem 0;
  flex: 1;
}

.vv-fp-col__item {
  border-bottom: 1px solid var(--vv-gray-200);
}
.vv-fp-col__item:last-child { border-bottom: none; }

.vv-fp-col__link {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  padding: .65rem 1.125rem;
  color: var(--vv-gray-900) !important;
  text-decoration: none !important;
  font-size: .875rem;
  line-height: 1.4;
  transition: background .12s ease, color .12s ease;
}
.vv-fp-col__link:hover {
  background: var(--vv-gray-100);
  color: var(--vv-sky) !important;
}

.vv-fp-col__arrow {
  color: var(--vv-sky);
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}

/* "Ver todos" link */
.vv-fp-col__more {
  display: block;
  text-align: center;
  padding: .625rem 1rem;
  background: var(--vv-gray-100);
  border-top: 1px solid var(--vv-gray-200);
  font-family: var(--vv-font-heading);
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--vv-sky) !important;
  text-decoration: none !important;
  transition: background .12s ease;
}
.vv-fp-col__more:hover {
  background: var(--vv-sky);
  color: var(--vv-white) !important;
}

/* Description variant — replaces article list with category description */
.vv-fp-col--desc {
  justify-content: space-between;
}

.vv-fp-col__img-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--vv-gray-200);
  flex-shrink: 0;
}

.vv-fp-col__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.vv-fp-col--desc:hover .vv-fp-col__img {
  transform: scale(1.04);
}

.vv-fp-col__img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--vv-gray-200) 0%, var(--vv-gray-100) 100%);
}

.vv-fp-col__desc {
  padding: .5rem 0;
  flex: 1;
}

.vv-fp-col__desc-text {
  display: block;
  padding: .75rem 1.125rem;
  font-size: .875rem;
  font-family: var(--vv-font-body);
  font-weight: 400;
  color: var(--vv-gray-600);
  line-height: 1.55;
  text-align: center;
}

/* Dynamic column count for the desc block */
.vv-fp-cols--1 { grid-template-columns: 1fr; max-width: 360px; }
.vv-fp-cols--2 { grid-template-columns: repeat(2, 1fr); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  /* Carousel — stack sidebar below on tablet */
  .vv-carousel {
    grid-template-columns: 1fr;
  }
  .vv-carousel__main {
    height: 340px;
  }
  .vv-carousel__sidebar {
    flex-direction: row;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,.06);
    overflow-x: auto;
    max-height: 90px;
  }
  .vv-carousel__sb-item {
    flex-direction: row;
    min-width: 200px;
    border-bottom: none;
    border-right: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
  }
  .vv-carousel__sb-item.is-current {
    border-left: none;
    border-top: 3px solid var(--vv-sky);
  }
  .vv-carousel__sb-thumb {
    width: 56px;
    height: 40px;
  }

  /* Featured grid */
  .vv-fp-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .vv-fp-card:nth-child(3) {
    grid-column: 1 / -1;
  }
  .vv-fp-card:nth-child(3) .vv-fp-card__img-wrap {
    aspect-ratio: 21 / 9;
  }

  .vv-fp-cols {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .vv-fp-wrap {
    padding: 0 .75rem 3rem;
  }

  /* Carousel — single column, compact */
  .vv-carousel__main {
    height: 260px;
  }
  .vv-carousel__content {
    padding: 1.5rem 1rem;
  }
  .vv-carousel__arrow {
    width: 34px;
    height: 34px;
  }
  .vv-carousel__arrow svg {
    width: 15px;
    height: 15px;
  }
  .vv-carousel__sidebar {
    max-height: 76px;
  }
  .vv-carousel__sb-item {
    min-width: 160px;
  }
  .vv-carousel__sb-thumb {
    width: 44px;
    height: 32px;
  }
  .vv-carousel__sb-title {
    font-size: .7rem;
    -webkit-line-clamp: 2;
  }

  /* Featured grid */
  .vv-fp-grid {
    grid-template-columns: 1fr;
  }
  .vv-fp-card:nth-child(3) {
    grid-column: auto;
  }
  .vv-fp-card:nth-child(3) .vv-fp-card__img-wrap {
    aspect-ratio: 16 / 9;
  }
}
