/* =====================================================
   ®Lavabo — app.css v1.3.3 (FINAL / LIMPIO)
   ÚNICO CSS DEL SITIO (ES / EN / PT)
   - Roboto Google Font
   - Topbar glass
   - Language switch (dropdown) compacto + flecha minimal propia
   - Stats: bg con backup_datos.jpg + cards quietas (sin hover)
   - Activación: 2 columnas sobre video (fix definitivo)
   - Popup: centrado, compatible con JS (aria-hidden)
   - FIX RESPONSIVE: siempre TEXTO → IMAGEN (evita texto, img, img, texto)
   ===================================================== */

/* =========================
   0) GOOGLE FONT (ROBOTO)
   ========================= */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap");

/* =========================
   1) VARIABLES
   ========================= */
:root {
  --black: #000;
  --white: #fff;

  --container: 1120px;
  --gutter: 40px;
  --radius: 18px;

  --border: rgba(255, 255, 255, 0.12);
  --border-soft: rgba(255, 255, 255, 0.1);

  --glass: rgba(10, 10, 10, 0.72);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);

  --cta-red: #d53a2c;

  --text-main: rgba(255, 255, 255, 0.92);
  --text-soft: rgba(255, 255, 255, 0.72);
}

/* =========================
   2) RESET + BASE
   ========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--black);
  color: var(--white);
  font-family: "Roboto", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

p,
li {
  color: var(--text-main);
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0;
  font-weight: 900;
  letter-spacing: 0.01em;
}

ul {
  margin: 0;
  padding-left: 1.15em;
}

/* Accesibilidad */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Container helper */
:where(
    .hero__container,
    .info__container,
    .stats__container,
    .why__container,
    .plan__container,
    .contacto__container
  ) {
  width: min(var(--container), calc(100% - var(--gutter)));
  margin: 0 auto;
}

/* =========================
   3) TOPBAR (GLASS)
   ========================= */
.topbar {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 2000;
  pointer-events: none;
}

.topbar__inner {
  pointer-events: auto;
  width: min(var(--container), calc(100% - var(--gutter)));
  margin: 0 auto;
  padding: 14px 18px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.topbar__logo {
  height: 50px;
}

.topbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* =========================
   3.1) LANGUAGE SWITCH (DROPDOWN)
   ========================= */
.lang {
  display: inline-flex;
  align-items: center;
}

/* wrapper para flecha */
.lang__dropdown {
  position: relative;
  display: inline-block;
}

/* Flecha minimal propia */
.lang__dropdown::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 2px solid rgba(255, 255, 255, 0.75);
  border-bottom: 2px solid rgba(255, 255, 255, 0.75);
  transform: translateY(-55%) rotate(45deg);
  pointer-events: none;
}

/* Dropdown pill */
.lang__select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  height: 34px;
  padding: 0 44px 0 14px; /* aire para flecha */

  border-radius: 999px;
  border: 1px solid var(--border);

  background: rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(14px);

  color: var(--white);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;

  cursor: pointer;

  /* Banderas más grandes */
  font-size: 24px;
}

/* IE / Edge viejo */
.lang__select::-ms-expand {
  display: none;
}

.lang__select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.35);
}

/* CTA */
.topbar__cta {
  background: var(--white);
  color: var(--black);
  border: 0;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

/* =========================
   4) HERO (FULL BLEED)
   ========================= */
.hero {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  background: var(--black);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero__video {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.45);
}

.hero__content {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding-top: 140px;
  padding-bottom: 96px;
}

/* aire lateral extra (tablet/desktop) */
.hero__container {
  padding-left: clamp(24px, 6vw, 80px);
  padding-right: clamp(24px, 6vw, 80px);
}

.hero__kicker {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero__title {
  font-size: 84px;
  line-height: 1.05;
  margin-bottom: 28px;
  text-transform: none !important;
}

.hero__cta {
  background: var(--white);
  color: var(--cta-red);
  border: 0;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
}

/* =========================
   5) INFO
   ========================= */
.info {
  padding: 72px 0;
}

.info__container {
  text-align: center;
}

.info__text {
  font-size: 24px;
  line-height: 1.6;
  max-width: 78ch;
  margin: 0 auto 36px;
}

.info__video {
  max-width: 980px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
}

/* =========================
   6) STATS (DATOS QUE IMPORTAN)
   ========================= */
.stats {
  position: relative;
  padding: 92px 0;
  overflow: hidden;

  background-image: url("../img/backup_datos.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* overlay legibilidad */
.stats::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      900px 520px at 50% 15%,
      rgba(140, 90, 255, 0.22),
      transparent 55%
    ),
    rgba(0, 0, 0, 0.72);
  z-index: 0;
}

.stats__container {
  position: relative;
  z-index: 1;
}

.stats__header {
  text-align: center;
  margin-bottom: 48px;
}

.stats__kicker {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 14px;
}

.stats__title {
  font-size: 44px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* Card quieta */
.stat-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  backdrop-filter: blur(8px);

  transition: none !important;
  transform: none !important;
  cursor: default;
}
.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.12) !important;
  transform: none !important;
}

.stat-card__icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 18px;
}
.stat-card__icon img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.stat-card__value {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  justify-content: center;
  margin-bottom: 10px;
}

.stat-card__number {
  font-size: 56px;
  font-weight: 900;
}

.stat-card__unit {
  opacity: 0.9;
}

.stat-card__desc {
  max-width: 26ch;
  margin: 0 auto;
}

/* =========================
   7) WHY / PLAN / CONTACTO
   ========================= */
.why,
.plan,
.contacto {
  padding: 72px 0;
}

.why__container,
.plan__container,
.contacto__container {
  display: grid;
  gap: 48px;
}

.why__row,
.plan__row,
.contacto__row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
}

.why__row--reverse,
.contacto__row--reverse {
  grid-template-columns: 0.9fr 1.1fr;
}

.why__image img,
.plan__image img,
.contacto__image img {
  width: 100%;
  border-radius: var(--radius);
}

.why__kicker {
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.8;
}

.why__list {
  margin-top: 18px;
  line-height: 1.9;
  font-size: 20px;
}

/* =========================
   8) ACTIVACIÓN (FIX DEFINITIVO)
   ========================= */
.activation {
  position: relative !important;
  min-height: 90vh;
  width: 100%;
  overflow: hidden;
  background: var(--black);
}

.activation__media {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  overflow: hidden !important;
}

.activation__video {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}

.activation__overlay {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  background: rgba(0, 0, 0, 0.28) !important;
}

.activation__content {
  position: relative !important;
  z-index: 2 !important;
  min-height: 90vh !important;
  display: flex !important;
  align-items: center !important;
}

.activation__container {
  width: min(var(--container), calc(100% - var(--gutter))) !important;
  margin: 0 auto !important;

  display: grid !important;
  grid-template-columns: 1.05fr 0.95fr !important;
  gap: 56px !important;
  align-items: center !important;

  padding-left: clamp(24px, 6vw, 80px);
  padding-right: clamp(24px, 6vw, 80px);
}

.activation__card {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.activation__kicker {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.92;
  margin: 0 0 14px;
}

.activation__title {
  font-size: 84px;
  line-height: 1.02;
  margin: 0 0 22px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.activation__cta {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  background: #fff !important;
  color: var(--cta-red) !important;

  border: 0 !important;
  padding: 16px 34px !important;
  border-radius: 999px !important;

  font-weight: 900 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase !important;

  cursor: pointer !important;
}

.activation__list {
  margin: 0 !important;
  padding-left: 1.15em !important;
  list-style: disc !important;
  line-height: 1.9 !important;
  font-size: 24px !important;
}
.activation__list li {
  margin: 0 0 10px;
}

/* =========================
   9) PLAN
   ========================= */
.plan {
  background: radial-gradient(
      1200px 400px at 50% -100px,
      rgba(255, 255, 255, 0.06),
      transparent 60%
    ),
    #2f2f2f;
}

.plan__header {
  text-align: center;
}

.plan__subtitle {
  margin: 10px auto 0;
  max-width: 70ch;
  color: var(--text-soft);
}

.plan__row,
.plan__content,
.plan__content * {
  text-align: left;
}

.plan__row-title {
  font-size: 28px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.plan__text {
  color: var(--text-main);
  line-height: 1.8;
}

/* =========================
   10) CONTACTO
   ========================= */
.contacto__list {
  line-height: 1.9;
  font-size: 20px;
}

.contacto__subtitle {
  margin: 0 0 8px;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contacto__text {
  color: var(--text-soft);
}

.contacto__link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================
   11) TITULOS UNIFICADOS
   ========================= */
.plan__title,
.contacto__title,
.why__title {
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.contacto__title {
  margin-bottom: 16px;
}

/* =========================
   12) POPUP (NO TOCAR JS)
   ========================= */
#popupContainer {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;

  display: none;

  align-items: center !important;
  justify-content: center !important;

  padding: 24px !important;

  background: rgba(0, 0, 0, 0.55) !important;
  backdrop-filter: blur(10px) !important;
}

#popupContainer[aria-hidden="false"] {
  display: flex !important;
}

#popupBox {
  position: relative !important;
  width: 380px;
  max-width: calc(100vw - 48px);

  background: rgba(15, 15, 15, 0.9);
  backdrop-filter: blur(18px);

  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.15);

  padding: 28px;

  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.6);
  animation: popupIn 0.25s ease forwards;
}

@keyframes popupIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.popup__close {
  position: absolute;
  top: 14px;
  right: 14px;

  width: 36px;
  height: 36px;

  border-radius: 50%;
  border: 0;

  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
}

.popup__close img {
  width: 14px;
  height: 14px;
}

.popup__title {
  margin-bottom: 22px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}

.popup__form {
  display: grid;
  gap: 16px;
}

.popup__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.popup__label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
}

.popup__field input,
.popup__field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);

  border-radius: 12px;
  padding: 12px 14px;

  color: #fff;
  font-size: 16px;
  outline: none;
}

.popup__field textarea {
  min-height: 90px;
  resize: vertical;
}

.popup__field input:focus,
.popup__field textarea:focus {
  border-color: #fff;
}

.popup__submit {
  margin-top: 10px;
  align-self: center;

  background: #fff;
  color: var(--cta-red);

  border: 0;
  padding: 14px 34px;
  border-radius: 999px;

  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;

  cursor: pointer;
}

/* =========================
   13) FOOTER
   ========================= */
.footer {
  padding: 28px 0;
  text-align: center;
}

.footer h5 {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

/* =====================================================
   RESPONSIVE — GLOBAL (≤ 900px)
   ===================================================== */
@media (max-width: 900px) {
  :root {
    --gutter: 24px;
  }

  .hero__content {
    padding-top: 120px;
    padding-bottom: 64px;
  }

  .hero__title,
  .activation__title {
    font-size: 60px;
  }

  /* Layout 1 columna */
  .why__row,
  .plan__row,
  .contacto__row {
    grid-template-columns: 1fr;
  }

  .activation__container {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  #popupContainer {
    padding: 16px !important;
  }

  /* ✅ FIX GLOBAL: SIEMPRE TEXTO → IMAGEN
     (funciona para normal + reverse + flip en todas las secciones) */
  .why__row,
  .why__row--reverse,
  .plan__row,
  .plan__row--flip,
  .contacto__row,
  .contacto__row--reverse {
    grid-template-columns: 1fr !important;
  }

  .why__content,
  .plan__content,
  .contacto__content {
    order: 1 !important;
  }

  .why__image,
  .plan__image,
  .contacto__image {
    order: 2 !important;
  }
}

/* =====================================================
   TABLET TUNING (768px–1024px)
   ===================================================== */
@media (min-width: 768px) and (max-width: 1024px) {
  :root {
    --gutter: 28px;
  }

  .topbar {
    top: 14px;
  }
  .topbar__logo {
    height: 44px;
  }

  .hero__title {
    font-size: clamp(52px, 6vw, 72px);
  }

  .info__text {
    font-size: 21px;
  }

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

  .why__row,
  .plan__row,
  .contacto__row {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .activation__title {
    font-size: clamp(52px, 6vw, 72px);
  }
  .activation__list {
    font-size: 20px !important;
  }
}

/* =====================================================
   iPad / iPad mini — STATS en 3 columnas (768–1180)
   ===================================================== */
@media (min-width: 768px) and (max-width: 1180px) {
  .stats__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .stat-card {
    padding: 26px 20px;
  }

  .stat-card__number {
    font-size: 46px;
  }

  .stat-card__desc {
    font-size: 15px;
    line-height: 1.45;
  }
}

/* =====================================================
   MOBILE iPhone (≤ 480px)
   ===================================================== */
@media (max-width: 480px) {
  :root {
    --gutter: 20px;
  }

  .topbar {
    top: 12px;
  }
  .topbar__inner {
    padding: 10px 12px;
    border-radius: 16px;
  }
  .topbar__logo {
    height: 40px;
  }
  .topbar__cta {
    padding: 9px 14px;
    font-weight: 800;
  }

  .lang__select {
    height: 32px;
    padding: 0 40px 0 12px;
    font-size: 18px; /* banderas grandes pero sin romper */
  }

  .lang__dropdown::after {
    right: 12px;
    width: 6px;
    height: 6px;
  }

  .hero__content {
    min-height: 92vh;
    padding-top: 110px;
    padding-bottom: 42px;
    align-items: flex-end;
  }

  .hero__container {
    padding-left: 0;
    padding-right: 0;
  }

  .hero__kicker {
    font-size: 13px;
    letter-spacing: 0.12em;
    margin-bottom: 10px;
  }

  .hero__title {
    font-size: clamp(38px, 10vw, 54px);
    line-height: 1.05;
    margin-bottom: 18px;
  }

  .hero__cta {
    padding: 13px 18px;
    width: fit-content;
  }

  .info {
    padding: 52px 0;
  }
  .info__text {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 22px;
  }

  .stats {
    padding: 56px 0;
  }
  .stats__header {
    margin-bottom: 28px;
  }
  .stats__title {
    font-size: 34px;
    line-height: 1.1;
  }
  .stats__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .stat-card {
    padding: 22px 18px;
    border-radius: 18px;
  }
  .stat-card__icon img {
    width: 56px;
    height: 56px;
  }
  .stat-card__number {
    font-size: 44px;
  }
  .stat-card__desc {
    font-size: 16px;
    line-height: 1.55;
  }

  .why,
  .plan,
  .contacto {
    padding: 56px 0;
  }

  .plan__title,
  .contacto__title,
  .why__title {
    font-size: 34px;
    line-height: 1.1;
  }

  .plan__subtitle {
    font-size: 16px;
    line-height: 1.55;
    margin-top: 10px;
  }

  .plan__row-title {
    font-size: 22px;
  }
  .plan__text {
    font-size: 16px;
    line-height: 1.6;
  }

  .activation {
    min-height: 86vh;
  }
  .activation__content {
    min-height: 86vh !important;
    padding: 18px 0;
  }
  .activation__container {
    width: min(var(--container), calc(100% - var(--gutter))) !important;
    gap: 18px !important;
    padding-left: 0;
    padding-right: 0;
  }
  .activation__kicker {
    font-size: 13px;
    letter-spacing: 0.12em;
    margin-bottom: 10px;
  }
  .activation__title {
    font-size: clamp(38px, 10vw, 54px);
    line-height: 1.02;
    margin-bottom: 16px;
  }
  .activation__cta {
    padding: 14px 18px !important;
  }
  .activation__list {
    font-size: 16px !important;
    line-height: 1.75 !important;
  }

  #popupBox {
    width: 100%;
    max-width: 420px;
    padding: 22px;
    border-radius: 18px;
  }
  .popup__title {
    font-size: 22px;
  }
}