/* =======================
   HERO (Talentia V3)
   ======================= */

.b-hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  --hero-overlay: 20%;
}

/* Imagen (dos variantes) */
.b-hero__img {
  display: block;
  max-width: none;
}

/* --- MOBILE: imagen ocupa toda la sección --- */
.b-hero__img--mobile {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;      /* llena sin deformar */
  object-position: center;
  z-index: 0;
}

.b-hero__overlay--mobile {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: calc(var(--hero-overlay) / 100);
  z-index: 1;
}

/* Contenido MOBILE encima */
.b-hero__mobile {
  position: relative;
  z-index: 2;
  display: flex;               /* usamos flexbox */
  align-items: center;         /* centrado vertical */
  justify-content: center;     /* centrado horizontal */
  min-height: 100vh;           /* ocupa toda la pantalla */
  padding: 2rem 1rem;          /* márgenes internos */
  box-sizing: border-box;
}

.b-hero__mobile-card {
  width: 100%;
  max-width: 720px;
  background: hsla(var(--muted)/0.95);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
}

/* Titular (dos líneas) */
.b-hero__title {
  margin: 0 0 0.75rem 0;
  font-weight: 700;
  line-height: 1.1;
}
.b-hero__title-top   { display: block; font-size: 72px; color: hsl(var(--primary)); }
.b-hero__title-accent{ display: block; font-size: 72px; color: hsl(var(--secondary)); }

/* Párrafo */
.b-hero__paragraph {
  margin: 0 0 1rem 0;
  font-size: clamp(1rem, 3.5vw, 1.125rem);
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
}

/* Botones (columna en mobile) */
.b-hero__buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

/* ===== Desktop split ===== */
.b-hero__desktop { display: none; }

@media (min-width: 1024px) {
  .b-hero__mobile { display: none; }
  .b-hero__overlay--mobile, .b-hero__img--mobile { display: none; }

  .b-hero__desktop {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    min-height: 100vh;
  }

  .b-hero__left {
    position: relative;
    width: 50%;
    height: 100vh;
    overflow: hidden;    /* evita desbordes */
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Imagen en la columna izquierda */
  .b-hero__img--left {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .b-hero__right {
    width: 50%;
    height: 100vh;
    background: hsl(var(--muted));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .b-hero__right-inner {
    padding: 2rem 3rem;
    max-width: 860px;
    width: 100%;
  }
  .b-hero__content { text-align: left; }

  .b-hero__title-top   { font-size: 72px; }
  .b-hero__title-accent{ font-size: 72px; }

  .b-hero__paragraph {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    max-width: 42rem;
    margin-bottom: 2rem;
  }

  .b-hero__buttons {
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 16px;
  }
}

/* ===== Botones ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  text-decoration: none;
  font-weight: 500;
  min-height:47px;
  line-height: 1;
  border-radius: 9999px;
  transition: transform .25s ease, background-color .25s ease, color .25s ease, border-color .25s ease;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
}
.btn--lg { padding: .8rem 2rem; font-size: 1.125rem; }

.btn--primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border: 0;
}
.btn--outline {
  border: 2px solid hsl(var(--accent-foreground));
  color: hsl(var(--accent-foreground));
  background: hsl(var(--accent));
}
.btn--outline:hover {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

/* Iconos */
.i { width:16px; height:16px; display: inline-block; vertical-align: middle; }

/* ===== Animaciones ===== */
.js-fade {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
}
.is-in .js-fade { opacity: 1; transform: translateY(0); }
.is-in .hero-buttons { transition-delay: .2s; }

/* Hover Scale */
[data-hover-scale]:hover { transform: scale(1.03); }

/* =======================
   Ajustes MOBILE extra
   ======================= */
@media (max-width: 767px) {
  /* Tarjeta más contenida */
  .b-hero__mobile-card {
    max-width: 90%;
    padding: 1rem;
    margin-bottom: 50%;
  }

  /* Títulos más pequeños y fluidos */
  .b-hero__title-top,
  .b-hero__title-accent {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
    word-break: break-word;
  }

  /* Párrafo más compacto */
  .b-hero__paragraph {
    font-size: clamp(0.9rem, 4vw, 1rem);
    line-height: 1.4;
    margin-bottom: 1rem;
  }

  /* Botones ocupan todo el ancho */
  .b-hero__buttons {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  .b-hero__buttons .btn {
    width: 100%;
    max-width: 100%;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    box-sizing: border-box;
  }
}


@media (min-width: 1024px) {
  .b-hero__buttons {
    flex-direction: row;
    flex-wrap: wrap;       /* ✅ evita que se estiren, pasan a otra fila */
    align-items: flex-start;
    justify-content: flex-start;
    gap: 16px;
  }

  .b-hero__buttons .btn {
    white-space: nowrap;   /* ✅ evita saltos de línea internos */
    flex: 0 0 auto;        /* ✅ no se estiran para rellenar */
  }
}

/* En tablets (768px–1023px) lo forzamos a columna, así como en mobile */
@media (max-width: 1023px) {
  .b-hero__buttons {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .b-hero__buttons .btn {
    width: 100%;
    max-width: 100%;
    text-align: center;
    white-space: normal;   /* ✅ aquí sí permitimos saltos */
  }
}
