:root {
  --header-height: 80px;
  --bg-dark: rgba(0, 0, 0, 0.6);
  --text-light: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #111;
  background-color: #fff;
}

html.preload-lang body {
  opacity: 0;
  transition: opacity .15s ease;
}
/* HEADER BASE */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-height);
  z-index: 30;
  display: flex;
  align-items: center;

  /* Transiciones suaves */
  transition: background-color 0.35s ease, padding 0.35s ease,
    backdrop-filter 0.35s ease;

  background-color: transparent;
  padding: 1rem 0;
  backdrop-filter: none;
}

/* HEADER SCROLLED */
.site-header.scrolled {
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);

  /* Reducimos altura sin tocar height */
  padding: 0.4rem 0;
}

/* Ajuste del contenido interno */
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header.scrolled .header-inner {
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}

.logo img {
  width: 6rem;
  height: auto;
  overflow: hidden;
}

/* NAV DESKTOP */

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-list a {
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: #fff;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.3s ease;
}

.nav-list a:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-links a {
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.85rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background-color: #0000006d;
  transition: ease-in-out 0.2s;
}
.social-links a:hover {
  background-color: #ffffff8b;
  transition: ease-in-out 0.2s;
}

/* BOTÓN HAMBURGUESA */
.nav-toggle {
  display: none;
  position: relative;
  width: 32px;
  height: 24px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  z-index: 1000; /* por encima del overlay móvil */
}

.nav-toggle span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text-light);
  transition: transform 0.25s ease, top 0.25s ease, opacity 0.2s ease;
}

.nav-toggle span:first-child {
  top: 6px;
}

.nav-toggle span:last-child {
  top: 16px;
}

.nav-toggle.is-active span:first-child {
  top: 11px;
  transform: rotate(45deg);
}

.nav-toggle.is-active span:last-child {
  top: 11px;
  transform: rotate(-45deg);
}

/* NAV MÓVIL FULLSCREEN */

.nav-mobile {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh; /* SIEMPRE pantalla completa */
  background: #000;
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 0.25s ease, transform 0.25s ease;

  z-index: 999; /* por encima del header */
}

.nav-mobile.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-mobile-list {
  list-style: none;
  margin: 0 0 2rem 0;
  padding: 0;
  text-align: center;
}

.nav-mobile-list li {
  margin: 0.75rem 0;
}

.nav-mobile-list a {
  text-decoration: none;
  color: var(--text-light);
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.social-mobile {
  display: flex;
  gap: 1rem;
  text-align: center;
}
.social-mobile i {
  font-size: 1.3rem;
  background-color: #00000007;
  color: #fff;
  border-radius: 1rem;
  padding: 0.5rem;
  border: 0.9px solid #ffffff70;
}

.social-mobile a {
  color: var(--text-light);
  text-decoration: none;
}

/* HERO VIDEO */

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--header-height) + 2rem) 1.5rem 3rem;
  color: var(--text-light);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 40%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3; /* debajo del texto, encima del video */
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.25) 30%,
    rgba(0, 0, 0, 0) 60%
  );
  pointer-events: none;
}

.hero-overlay h1 {
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  margin: 0 0 0.5rem 0;
}

.hero-overlay p {
  margin: 0;
  max-width: 420px;
}

.container {
  width: 100%;
  max-width: 1200px; /* mismo valor que header-inner */
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container2 {
  width: 100%;
  max-width: 1200px; /* mismo valor que header-inner */
  margin: 0 auto;
  padding: 1rem 3rem;
}

/* Switch IDIOMA  */

.lang-pill {
  position: fixed;
  bottom: 2rem;
  right: 2rem;

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

  background: rgba(0, 0, 0, 0.55); /* más oscuro para fondos claros */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;

  padding: 0.35rem 0.5rem;
  gap: 0.5rem;

  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #fff;

  cursor: pointer;
  z-index: 8888;
  user-select: none;

  transition: all 0.35s ease; /* ← hace suave el movimiento */
}
/* Estado cuando toca el footer */
.lang-pill.at-footer {
  right: 50%;
  transform: translateX(50%); /* la centra */
  bottom: 1rem; /* más pegado al borde inferior */
}

.lang-pill:hover {
  background: rgba(0, 0, 0, 0.7);
}

.lang-pill span {
  padding: 0.35rem 0.7rem;
  border-radius: 10px;
  opacity: 0.5;
  transition: all 0.25s ease;
}

/* Idioma activo */
.lang-pill span.active {
  background: rgba(255, 255, 255, 0.18);
  opacity: 1;
}



/* RESPONSIVE */

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }

  .nav-toggle {
    display: block;
  }
  .hero {
    min-height: 90vh !important;
  }

  .hero-overlay {
    justify-content: flex-end;
    min-height: 90vh;
    padding: calc(var(--header-height) + 1.5rem) 0rem 2.5rem;
  }
  .container2 {
    padding: 0rem 1.5rem;
  }
  .lang-pill {
    padding: 0.15rem 0.2rem;
    gap: 0.5rem;

    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.5px;

    bottom: 1rem;
    right: 1rem;
  }
}
