﻿/* ========================================
   Home: Hero (mobile-first)
   Base: 0-767
   Breakpoints: min-width 768 / 1200
   ======================================== */

.home-hero {
  position: relative;
  overflow: hidden;
  padding: var(--v2-space-5) var(--v2-space-3);
}

.home-hero__container {
  /* Estructura base mobile: titulo -> media */
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--v2-space-2);
  align-items: stretch;
}

.home-hero__main {
  display: contents;
}

.home-hero__media {
  order: 3;
}

.home-hero__badge {
  align-self: flex-start;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: var(--v2-space-2);
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--v2-color-primary) 10%, transparent);
  box-shadow: var(--v2-shadow-sm);
  color: var(--v2-color-primary);
  font-size: var(--v2-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.home-hero__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--v2-color-accent);
}

.home-hero__title {
  order: 2;
  margin-block: var(--v2-space-2);
  font-size: 2rem;
  line-height: 1.08;
  font-weight: 800;
  color: var(--v2-color-text);
  display: none;
}

.home-hero__title-accent {
  color: var(--v2-color-primary);
}

.home-hero__description {
  order: 4;
  margin-top: var(--v2-space-2);
  color: var(--v2-color-text-muted);
  font-size: var(--v2-text-lg);
  line-height: 1.2;
  text-align: left;
}

.home-hero__actions {
  order: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: end;
  gap: var(--v2-space-3);
}

.home-hero__trustline {
  order: 6;

  color: var(--v2-color-text-muted);
  font-size: var(--v2-text-sm);
  line-height: 1.35;
  text-align: center;
}

.home-hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  width: 100%;
  max-width: 600px;
  margin-top: var(--v2-space-2);
  padding: 0 var(--v2-space-5);
  border-radius: var(--v2-radius-md);
  text-decoration: none;
  font-size: var(--v2-text-md);
  font-weight: 700;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease;
}

.home-hero__btn:active {
  transform: translateY(1px);
}

.home-hero__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--v2-color-primary) 25%, transparent);
}

.home-hero__btn--primary {
  color: var(--v2-color-white);
  background: var(--v2-color-primary);
  box-shadow: var(--v2-shadow-sm);
}

.home-hero__btn--primary:hover {
  opacity: 1;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--v2-color-primary) 30%, transparent);
}

.home-hero__btn--secondary {
  color: var(--v2-color-primary);
  border: 1px solid var(--v2-color-primary);
  background: transparent;
}

.home-hero__btn--secondary:hover {
  background: color-mix(in srgb, var(--v2-color-primary) 10%, transparent);
}

.home-hero__carousel {
  /* Mobile: mas alto y ancho adaptable */
  position: relative;
  width: 100%;
  /* Controla este valor para subir/bajar la altura base mobile */
  --home-hero-carousel-min-h: 400px;
  height: clamp(var(--home-hero-carousel-min-h), 48vh, 500px);
  min-height: var(--home-hero-carousel-min-h);
  overflow: hidden;
  border-radius: var(--v2-radius-lg);
  background: var(--v2-color-white-soft);
  box-shadow: var(--v2-shadow-sm);
}

.home-hero__carousel-track {
  position: absolute;
  inset: 0;
}

.home-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
  transition: opacity 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.home-hero__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.home-hero__slide-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

.home-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-hero__slide-overlay {
  position: absolute;
  left: var(--v2-space-3);
  top: var(--v2-space-3);
  display: flex;
  align-items: center;
  gap: var(--v2-space-2);
  z-index: 2;
  max-width: calc(100% - (var(--v2-space-3) * 2));
}

.home-hero__slide-tag {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--v2-color-primary) 86%, transparent);
  color: var(--v2-color-white);
  font-size: var(--v2-text-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.home-hero__slide-title {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--v2-color-white) 88%, transparent);
  color: var(--v2-color-text);
  font-size: var(--v2-text-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: var(--v2-shadow-sm);
  opacity: 50%;
}

.home-hero__control {
  /* En mobile no mostramos flechas; se habilitan desde 768 */
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--v2-color-white) 88%, transparent);
  color: color-mix(in srgb, var(--v2-color-primary) 90%, var(--v2-color-text) 10%);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  box-shadow:
    0 8px 18px color-mix(in srgb, var(--v2-color-text) 12%, transparent),
    inset 0 1px 0 color-mix(in srgb, var(--v2-color-white) 75%, transparent);
  backdrop-filter: blur(4px) saturate(1.05);
  -webkit-backdrop-filter: blur(4px) saturate(1.05);
  transition:
    transform 0.18s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.home-hero__control:hover {
  background: var(--v2-color-primary);
  color: var(--v2-color-white);
  border-color: color-mix(in srgb, var(--v2-color-primary) 82%, var(--v2-color-white) 18%);
  box-shadow:
    0 12px 26px color-mix(in srgb, var(--v2-color-primary) 28%, transparent),
    inset 0 1px 0 color-mix(in srgb, var(--v2-color-white) 24%, transparent);
  transform: translateY(-50%) scale(1.04);
}

.home-hero__control:active {
  transform: translateY(-50%) scale(0.98);
}

.home-hero__control:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--v2-color-white) 88%, transparent),
    0 0 0 6px color-mix(in srgb, var(--v2-color-primary) 36%, transparent),
    0 8px 20px color-mix(in srgb, var(--v2-color-text) 12%, transparent);
}

.home-hero__control--prev {
  left: var(--v2-space-4);
}

.home-hero__control--next {
  right: var(--v2-space-4);
}

.home-hero__control span {
  /* Ocultamos el caracter tipografico y dibujamos un chevron vectorial */
  width: 0;
  height: 0;
  font-size: 0;
  line-height: 0;
}

.home-hero__control::before {
  content: "";
  width: 10px;
  height: 10px;
  border-top: 2.5px solid currentColor;
  border-right: 2.5px solid currentColor;
}

.home-hero__control--prev::before {
  transform: rotate(-135deg);
  margin-left: 2px;
}

.home-hero__control--next::before {
  transform: rotate(45deg);
  margin-right: 2px;
}

.home-hero__dots {
  position: absolute;
  left: 50%;
  bottom: var(--v2-space-3);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--v2-space-2);
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;

  backdrop-filter: blur(2px);
}

.home-hero__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: color-mix(in srgb, var(--v2-color-primary) 28%, var(--v2-color-white) 72%);
  transition:
    width .25s ease,
    background-color .2s ease,
    transform .2s ease,
    box-shadow .2s ease,
    opacity .2s ease;
  opacity: .95;
}

.home-hero__dot:hover {
  background: color-mix(in srgb, var(--v2-color-primary) 44%, var(--v2-color-white) 56%);
  transform: translateY(-1px);
}

.home-hero__dot.is-active {
  width: 28px;
  background: color-mix(in srgb, var(--v2-color-primary) 86%, var(--v2-color-white) 14%);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--v2-color-primary) 30%, transparent);
  opacity: 1;
}

.home-hero__dot:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--v2-color-white) 72%, transparent),
    0 0 0 6px color-mix(in srgb, var(--v2-color-primary) 45%, transparent);
}

/* ========================================
   Home: Highlights (beneficios)
   ======================================== */
.home-highlights__container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--v2-space-4);
}

.home-highlights__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--v2-space-2);
}

.home-highlights__item {
  display: inline-flex;
  align-items: center;
  gap: var(--v2-space-2);
  padding: 8px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--v2-color-primary) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--v2-color-primary) 14%, transparent);
  color: color-mix(in srgb, var(--v2-color-text) 78%, transparent);
  font-size: var(--v2-text-sm);
}

.home-highlights__icon {
  width: 18px;
  height: 18px;
  color: var(--v2-color-primary);
}

/* ========================================
   Home: Payments (medios de pago)
   ======================================== */
.home-payments__container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--v2-space-4) var(--v2-space-4) var(--v2-space-2);
}

.home-payments__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--v2-space-2);
}

.home-payments__item {
  display: inline-flex;
  align-items: center;
  gap: var(--v2-space-2);
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--v2-color-primary) 12%, transparent);
  background: var(--v2-color-white-soft);
  color: color-mix(in srgb, var(--v2-color-text) 75%, transparent);
  font-size: var(--v2-text-xs);
  font-weight: 700;
}

.home-payments__icon {
  width: 16px;
  height: 16px;
  color: var(--v2-color-primary);
}

@media (min-width: 568px) {
  .home-hero{
    padding-inline: 10%;
  }
}


/* ========================================
   >= 768px: tablet / laptop chica
   ======================================== */
@media (min-width: 888px) {
  .home-hero{
    
  }

    .home-hero {
    /* Evita desbalance visual de padding 10% en pantallas grandes */
    padding-inline: var(--v2-space-6);
  }

  .home-hero__container {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    grid-template-areas:
      "main media";
    gap: clamp(1.5rem, 2vw, 2.5rem);
    align-items: stretch;
    justify-items: stretch;
    max-width: 1320px;
    margin: 0 auto;
  }

  .home-hero__main {
    display: block;
    grid-area: main;
    min-width: 0;
    width: 100%;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: var(--v2-space-4);
  }

  .home-hero__badge {
    align-self: flex-start;
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: var(--v2-space-2);
    padding: 6px 12px;
    font-size: var(--v2-text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
  }

  .home-hero__media {
    order: initial;
    grid-area: media;
    min-width: 0;
    width: 100%;
  }
  
  .home-hero__title {
    display: inline;
    font-size: 2.2rem;
    margin-top: var(--v2-space-6);
  }

  .home-hero__description{
    text-align: left;
    font-size: 1rem;
    margin-top: var(--v2-space-6);
  }

  .home-hero__actions {
    margin-top: var(--v2-space-6);
    justify-content: flex-start;
    align-items: center;
  }

  .home-hero__trustline {
    margin-top: var(--v2-space-1);
    text-align: left;
  }

  .home-hero__btn {
    width: auto;
    min-width: 220px;
    margin-top: 0;
  }

  .home-hero__carousel:hover .home-hero__control {
    opacity: 1;
  }

  .home-hero__carousel {
    width: 100%;
    aspect-ratio: 5 / 4;
    min-height: clamp(360px, 45vw, 590px);
  }

}

/* ========================================
   >= 1200px: desktop full
   ======================================== */
@media (min-width: 1200px) {
  .home-hero__title {
    font-size: 2.8rem;
  }

  .home-hero__description{
    font-size: var(--v2-text-lg);
  }


}

/* Accesibilidad: sin animaciones si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
  .home-hero__slide,
  .home-hero__dot,
  .home-hero__control {
    transition: none;
  }
}

@media (min-width: 1400px) {
  .home-hero__container {
    max-width: 1400px;
  }

  .home-hero__title {
    font-size: 3.2rem;
  }
}
