/* =========================================================
   RESET
   ========================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* =========================================================
   VARIABLES GLOBALES
   ========================================================= */
:root{
  /* Tipografía / color base */
  --bg: #f8f9fb;
  --fg: #222;
  --brand: #2271b3;

  /* Espaciados */
  --gap: 16px;

  /* HERO gaps */
  --hero-line-gap: .15rem;      /* separación entre título y primera línea */
  --hero-sub-gap: .15rem;       /* separación entre primera y segunda línea */
  --hero-btn-gap: clamp(24px, 6vw, 64px);  /* <— controla el espacio ANTES del botón */
}

/* =========================================================
   BASE
   ========================================================= */
body{
  font-family: "Poppins", sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

/* =========================================================
   HERO
   ========================================================= */
.hero{
  position: relative;
  height: 100vh;
  background: url('img/backgroundpg.png') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}
.hero .overlay{
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
}
.hero-content{
  position: relative; z-index: 1;
  max-width: 700px; padding: 20px;
}

/* Título + logo + subtítulo pegado abajo a la derecha */
/* =========================================================
   Título principal + subtítulo alineado al nombre
   ========================================================= */
.brand{
  display: inline-flex;
  flex-direction: column;
  align-items: center; /* centra todo en horizontal */
  margin-bottom: 1rem; /* separa del texto de abajo */
}

/* Fila del logo y nombre */
.title-row{
  display: inline-flex;
  align-items: center; /* logo centrado verticalmente con el texto */
  gap: .6rem;
  --name-size: clamp(2.6rem, 7vw, 4.2rem);
  font-size: var(--name-size);
}

/* SVG y nombre sincronizados */
.brand-logo{
  height: 1.05em; /* mismo alto que el texto */
  width: auto;
  object-fit: contain;
  display: inline-block;
  filter: brightness(0) invert(1); /* blanco */
}
.brand-title{
  font-size: 1em;  /* escala con el .title-row */
  line-height: 1;
  margin: 0;
}

/* Subtítulo pegado justo debajo del nombre */
.brand-sub{
  margin-top: .25rem;   /* <— pequeño respiro, pero muy pegado */
  font-size: clamp(.9rem, 2vw, 1.05rem);
  font-weight: 400;
  opacity: .9;
}


/* Líneas de texto del hero */
.hero h1{
  font-size: inherit;     /* <— importante */
  letter-spacing: 2px;
}
.hero p{ margin: 0; }

.hero-line{
  margin: var(--hero-line-gap) 0 0;
  line-height: 1.35;
}
.hero-sub{
  margin: var(--hero-sub-gap) 0 0;
  line-height: 1.35;
  opacity: .9;
}

/* Botón del hero: controla el hueco con la variable */
.hero .btn{ margin-top: var(--hero-btn-gap); }

.btn{
  display: inline-block;
  background: var(--brand);
  color: #fff; padding: 12px 30px;
  border-radius: 8px; text-decoration: none;
  font-weight: 600; transition: .3s;
}
.btn:hover{ background: var(--brand); }

/* Rotadores (hero) */
.hero-line, .hero-sub{ font-size: 1.1rem; }
.rotator, .rotator2{ display:inline-block; position:relative; min-width:8ch; }
.rotator .word, .rotator2 .word{
  display:inline-block; transition: opacity .24s ease, transform .24s ease;
  will-change: opacity, transform;
}
.word.is-out{ opacity:0; transform: translateY(8px); }
.word.is-in{  opacity:1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce){
  .rotator .word, .rotator2 .word{ transition:none; }
}

/* =========================================================
   SECCIÓN INFO
   ========================================================= */
.info{ padding: 80px 20px; display:flex; justify-content:center; }
.info-container{
  background:#0f1115; color:#f3f4f6;
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px; box-shadow:0 10px 30px rgba(0,0,0,.25);
  padding: 0px 0px; width:100%; max-width:1200px; text-align:center;
}
.info-container h2{ font-size:2rem; margin-bottom:40px; color:#fff; }

.info-grid{
  display:grid; grid-template-columns: repeat(4,1fr);
  gap: 24px;
}
.card{
  background:#212121; color:#ffffff;
  border-radius:14px; padding:24px;
  box-shadow:0 4px 18px rgba(0,0,0,.1);
  transition: transform .3s;
}
.card:hover{ transform: translateY(-6px); }
.card i{ font-size:2rem; color: var(--brand); margin-bottom:12px; }

/* =========================================================
   SECCIÓN INFO (con fondo animado)
   ========================================================= */
.info {
  position: relative; /* Clave para posicionar el canvas dentro */
  overflow: hidden;   /* Evita que las ondas se salgan */
  background: #0f1115; /* Fondo oscuro principal */
  padding: 80px 20px; /* Restauramos el padding completo */
  display: flex;
  justify-content: center;
  align-items: center;
}

#info-waves-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0; /* Lo manda al fondo */
}

.info-container {
  position: relative; /* Para que se ponga por encima del canvas */
  z-index: 1;
  background: transparent; /* MUY IMPORTANTE: quita el fondo para ver las ondas */
  border: 0px solid rgba(255, 255, 255, .08);
  border-radius: 0px;
  box-shadow: 0 0px 0px rgba(0, 0, 0, .25);
  padding: 0px 0px;
  width: 100%;
  max-width: 1200px;
  text-align: center;
}

/* =========================================================
   PROYECTOS
   ========================================================= */
.proyectos{ background:#fff; padding:80px 20px; text-align:center; }
/* Estilos para el título de la sección de proyectos */
.proyectos.starry-background .content-wrapper h2 {
  color: #FFFFFF; /* 1. Cambia el color del texto a blanco */
  font-size: 2rem;
  margin-bottom: 40px;
  
  /* 2. Alinea el icono con el texto */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px; /* 3. Añade un espacio entre el icono y el texto */
}
/* Tarjetas centradas con ancho consistente */
.projects-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
  gap: 20px;
  justify-content: center;
  max-width: 1100px;
  margin: auto;
}
.project{
  background:#fff; border-radius:14px; overflow:hidden;
  box-shadow:0 5px 18px rgba(0,0,0,.1);
}
.video-wrapper{ aspect-ratio:16/9; background:#000; }
.video-wrapper video{
  width:100%; height:100%;
  object-fit: contain; display:block; background:#000;
}
.project-info{ padding:14px 12px 18px; text-align:center; }
.project-info h3{
  display:flex; align-items:center; justify-content:center; gap:8px;
  font-size:1rem; margin-bottom:6px;
}
.project-logo{
  height:22px; width:auto; object-fit:contain; display:inline-block; vertical-align:middle;
}
.project-info a{
  display:inline-block; color: var(--brand);
  font-weight:600; text-decoration:none;
}

/* =========================================================
   COSTOS (texto)
   ========================================================= */
.costos-nota{
  padding: clamp(28px, 6vw, 64px) var(--gap);
  background:#0f1115; color:#e8eef6;
  text-align: center; 
}
.costos-nota h2{
  text-align:center; font-size:clamp(24px,4vw,36px); margin-bottom:12px;
}
.costos-nota .lead{
  max-width:980px; margin:0 auto 10px; line-height:1.65; opacity:.95;
}
.costos-nota .price-line{
  text-align:center; font-size:clamp(18px, 2.6vw, 22px); margin:14px 0 6px;
}
.costos-nota .mxn{ color:#fff; font-weight:800; }
.costos-nota .usd{ display:inline-block; margin-left:8px; opacity:.8; font-size:.95em; }

.domain-line{
  margin:14px auto 0; max-width:980px;
  display:flex; gap:10px; align-items:center; justify-content:center; flex-wrap:wrap;
}
.domain-left{ opacity:.9; }
.domain-demo{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  background:#101827; border:1px solid rgba(255,255,255,.1);
  padding:8px 12px; border-radius:10px; letter-spacing:.2px;
  box-shadow:0 6px 18px rgba(0,0,0,.25);
}
.domain-demo .dname{ font-weight:700; }
.domain-demo .dtld{ color:#60a5fa; font-weight:800; margin-left:2px; }
.domain-badge{
  background:#22c55e; color:#092312; padding:6px 10px; border-radius:999px;
  font-weight:800; font-size:.9rem; white-space:nowrap;
}
@media (max-width:680px){ .domain-line{ justify-content:center; } }

/* =========================================================
   BARRA DE MÉTODOS DE PAGO CON SCROLL (CSS CORREGIDO)
   ========================================================= */
.payment-methods {
  background: #0f1115; /* Un poco más oscuro que el fondo anterior */
  padding: 2.5rem 0;
  overflow: hidden;
  position: relative;
  width: 100%;
  white-space: nowrap; /* Evita que los logos se rompan en varias líneas */
}

.payment-methods::before,
.payment-methods::after {
  content: "";
  position: absolute;
  top: 0;
  width: 150px; /* Un difuminado más ancho */
  height: 100%;
  z-index: 2;
}

.payment-methods::before {
  left: 0;
  background: linear-gradient(to left, rgba(15, 17, 21, 0), #0f1115);
}

.payment-methods::after {
  right: 0;
  background: linear-gradient(to right, rgba(15, 17, 21, 0), #0f1115);
}

.logos-scroller {
  display: inline-block; /* Cambiado de flex a inline-block para la animación */
  animation: scroll 40s linear infinite;
}

.logos-slide {
  display: inline-flex; /* Usamos flex aquí para alinear los logos */
  align-items: center;
  gap: 60px;
  padding: 0 30px;
}

.logos-slide img {
  height: 28px; /* Un poco más grandes para mejor visibilidad */
  max-width: 100px;
  filter: grayscale(100%) opacity(60%); /* Los hacemos grises y semitransparentes */
  transition: filter 0.3s ease;
}

/* Efecto al pasar el mouse por la barra */
.payment-methods:hover .logos-slide img {
  filter: grayscale(0%) opacity(100%); /* Vuelven a su color y opacidad original */
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%); /* Ajustado para el nuevo método de display */
  }
}

/* Contenedor que se va a animar */
.logos-scroller {
  display: flex;
  width: fit-content; /* Se ajusta al ancho de sus hijos */
  animation: scroll 30s linear infinite;
}

/* Contenedor de cada grupo de logos */
.logos-slide {
  display: flex;
  align-items: center;
  gap: 60px; /* Espacio entre logos */
  padding: 0 30px;
}

/* Estilo de cada logo SVG */
.logos-slide svg {
  height: 24px; /* Altura unificada para todos los logos */
  width: auto;
  fill: #A0A0A0; /* Color gris claro para contraste (puedes cambiarlo a un gris más oscuro si prefieres) */
}

/* La animación clave */
@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    /* Mueve el contenedor exactamente el ancho de un grupo de logos */
    transform: translateX(-50%);
  }
}

/* =========================================================
   TIEMPOS (texto simple)
   ========================================================= */
.tiempos-simple{
  padding: clamp(24px, 6vw, 56px) var(--gap);
  background:#0b0d13; color:#f1f5f9; text-align:center;
}
.tiempos-simple h2{ font-size:clamp(24px,4vw,36px); margin-bottom:8px; }
.tiempos-simple p{ max-width:900px; margin:0 auto; line-height:1.6; opacity:.95; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer{
  background:#111; color:#ccc; text-align:center; padding:40px 20px;
}
.footer .socials{ margin-top:10px; }
.footer .socials a{
  color: var(--brand); margin:0 10px; font-size:1.5rem; transition:.3s;
}
.footer .socials a:hover{ color:#fff; }

/* =========================================================
   RESPONSIVE HERO
   ========================================================= */
@media (max-width:700px){
  .hero h1{ font-size: 2.2rem; }
  .hero p{ font-size: 1rem; }
}

/* Vuelve blanco cualquier SVG/PNG monocromo */
.brand-logo{
  filter: brightness(0) invert(1);
  user-select: none;     /* no permite seleccionarlo */
  pointer-events: none;  /* no responde a clics o arrastres */
}

/* ====== Ajuste fino de jerarquía en el HERO ====== */
:root{
  /* Reserva bajo el H1 para el subtítulo que “cuelga” */
  --brand-reserve: .55em;         /* antes ~.9em ⇒ MENOS hueco */
  --brand-gap-next: .60rem;       /* H1+subtítulo → “Haz que tu …” */

  /* Gaps entre líneas y con el botón */
  --hero-lines-gap: .35rem;       /* “Haz que tu …” ↔ “Muéstrale …” */
  --hero-btn-gap: 36px;           /* “Muéstrale …” ↔ botón */
}

/* Bloque del título: usa las variables nuevas */
.brand{
  padding-bottom: var(--brand-reserve);
  margin-bottom: var(--brand-gap-next);
}

/* Subtítulo: cuélgalo menos para borrar el hueco visual */
.brand-sub{
  transform: translateY(28%);     /* antes 55% ⇒ súbelo; prueba 20–35% */
}

/* Líneas del hero con separación pareja */
.hero-line{ margin: var(--hero-lines-gap) 0 0; }
.hero-sub { margin: var(--hero-lines-gap) 0 0; }

/* Aire antes del botón, más compacto */
.hero .btn{ margin-top: var(--hero-btn-gap); }

/* (Opcional) En móvil, un pelín más compacto aún */
@media (max-width:700px){
  :root{
    --brand-reserve: .45em;
    --brand-gap-next: .55rem;
    --hero-lines-gap: .3rem;
    --hero-btn-gap: 28px;
  }
}

.hero-line{
  margin-top: 1.2rem;  /* espacio después del subtítulo */
  line-height: 1.35;
}
.hero-sub{
  margin-top: .4rem;   /* espacio entre ambas líneas */
  line-height: 1.35;
  opacity: .9;
}
.hero .btn{
  margin-top: 1.8rem;  /* espacio antes del botón */
}

@keyframes waveMove {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* =========================================================
   SECCIÓN INFO (Fondo principal)
   ========================================================= */
.info {
  background: #0f1115; /* Fondo oscuro principal */
  padding: 80px 20px 0; /* Sin padding inferior */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.info-container {
  background: none; /* Quitamos el fondo, ya está en .info */
  /* ... mantener el resto de estilos del container ... */
  margin-bottom: 40px; /* Ajuste para separar del separador */
}


/* =========================================================
   SEPARADOR DE ONDAS (Wave Separator)
   ========================================================= */
.wave-separator {
  width: 100%;
  height: auto;
  display: block;
}
.wave-svg {
  width: 100%;
  height: auto;
  display: block;
  /* Invierte para que sirva como borde INFERIOR, asumiendo que el SVG es un borde superior */
  transform: scaleY(-1); 
  margin-bottom: -5px; /* Ajuste para evitar huecos */
}

/* =========================================================
   COSTOS (texto)
   ========================================================= */

/* ... (tus estilos existentes para .costos-nota) ... */

.costos-nota h2 {
  text-align: center;
  font-size: clamp(24px, 4vw, 36px);
  margin-bottom: 12px;
  
  /* --- NUEVOS ESTILOS PARA ALINEAR EL ÍCONO --- */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px; /* Espacio entre el ícono y el texto */
}

.costos-icon {
  /* Haz que el ícono se ajuste al tamaño del texto */
  width: 1em;
  height: 1em;
  
  /* Pinta el ícono del mismo color que el texto (blanco) */
  fill: currentColor; 
}

/* ... (el resto de tus estilos para .costos-nota) ... */

/* =========================================================
   TIEMPOS (texto simple)
   ========================================================= */

/* ... (tus estilos existentes para .tiempos-simple) ... */

.tiempos-simple h2 { 
  font-size: clamp(24px, 4vw, 36px); 
  margin-bottom: 8px;

  /* --- NUEVOS ESTILOS PARA ALINEAR EL ÍCONO --- */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px; /* Espacio entre el ícono y el texto */
}

.tiempos-icon {
  /* Haz que el ícono se ajuste al tamaño del texto */
  width: 1em;
  height: 1em;

  /* Pinta el ícono del mismo color que el texto (blanco) */
  fill: currentColor;
}

/* ... (el resto de tus estilos para .tiempos-simple) ... */

/* ... justo después de los estilos de .domain-line ... */

.hosting-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px; /* Espacio entre el ícono y el texto */
  margin-top: 18px; /* Espacio para separarlo de la línea del dominio */
  font-size: 0.95rem;
  opacity: 0.9;
}

.hosting-icon {
  width: 1.1em;
  height: 1.1em;
  fill: currentColor;
  opacity: 0.8;
}

/* ... al final de la sección de COSTOS ... */

.btn-cotizar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px; /* Espacio entre el ícono y el texto */
  background-color: #25D366; /* Color oficial de WhatsApp */
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 14px 28px;
  border-radius: 50px; /* Bordes redondeados */
  text-decoration: none;
  margin-top: 28px; /* Espacio superior */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-cotizar:hover {
  transform: translateY(-3px); /* Efecto de "levantarse" al pasar el mouse */
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.whatsapp-icon {
  width: 1.5em; /* Ajusta el ancho relativo al texto */
  height: 1.5em; /* Ajusta el alto relativo al texto */
  /* El color lo toma directamente del archivo SVG, ya no se necesita 'fill' */
}

/* =========================================================
   REGLAS RESPONSIVE PARA SECCIÓN DE INFORMACIÓN (CORREGIDO)
   ========================================================= */

/* Para tablets (hasta 1024px) */
@media (max-width: 1024px) {
  .info-grid {
    /* En tablets, la vista es 2x2 */
    grid-template-columns: repeat(2, 1fr);
    gap: 20px; 
  }
}

/* Para celulares (hasta 600px) */
@media (max-width: 600px) {
  .info {
    /* 1. Arreglamos el desbordamiento reduciendo el padding exterior */
    padding: 60px 15px; 
  }

  .info-container {
    /* 2. Quitamos el padding interior para dar más espacio */
    padding: 0;
  }

  .info-grid {
    /* 3. Forzamos la parrilla 2x2 y reducimos el espacio entre tarjetas */
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .card {
    /* 4. Hacemos el texto y los íconos un poco más compactos */
    padding: 15px;
    text-align: left; /* Lo regresamos a la izquierda para que se vea mejor en 2x2 */
  }

  .card h3 {
    font-size: 1.1rem;
  }

  .card p {
    font-size: 0.9rem;
  }
}

/* =========================================================
   ESTILOS PARA LA INTRO ANIMADA
   ========================================================= */

/* Regla para evitar el scroll mientras la intro está activa */
body.intro-activa {
  overflow: hidden;
}

/* 1. Contenedor principal de la intro */
#intro-loader {
  position: fixed; /* Se queda fijo en la pantalla */
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh; /* Ocupa toda la altura visible */
  background-color: #0d0e0e; /* Fondo negro */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* Se asegura de estar por encima de todo */
  transition: opacity 0.5s ease-out; /* Transición suave para ocultarse */
}

/* 2. Estilos del texto que se escribe */
#intro-loader .texto-animado {
  color: #FFFFFF;
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(2rem, 8vw, 4rem); /* Tamaño adaptable */
  white-space: nowrap;
  overflow: hidden;
  border-right: 3px solid white; /* El cursor | */

  /* Secuencia de animaciones */
  animation: 
    escribir 2s steps(15) forwards,
    parpadeo 0.75s step-end infinite,
    desvanecer-texto 1.5s ease-out 4s forwards;
}

/* 3. Clase para ocultar la intro cuando termine */
#intro-loader.oculto {
  opacity: 0;
  pointer-events: none; /* Impide interactuar con la intro invisible */
}

/* KEYFRAMES (Las instrucciones de la animación) INTROO */
@keyframes escribir {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes parpadeo {
  from, to { border-color: transparent; }
  50% { border-color: white; }
}

@keyframes desvanecer-texto {
  from { opacity: 1; }
  to { opacity: 0; border-color: transparent; }
}

/* =========================================================
   PROYECTOS CON FONDO ANIMADO (NUEVA VERSIÓN)
   ========================================================= */

/* --- Contenedor Principal de la sección --- */
.proyectos.starry-background {
  position: relative;
  background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
  overflow: hidden;
  padding: 80px 20px 150px; /* Aumentamos padding inferior para dar espacio al suelo */
  text-align: center;

    /* --- 👇 AÑADE ESTAS 4 LÍNEAS --- */
  min-height: 100vh;         /* 1. Fuerza la sección a tener el alto de la pantalla */
  display: flex;            /* 2. Activa Flexbox */
  justify-content: center;  /* 3. Centra el contenido verticalmente */
  align-items: center;      /* 4. Centra el contenido horizontalmente */
}

/* Wrapper para el contenido para que esté por encima del fondo */
.proyectos.starry-background .content-wrapper {
  position: relative;
  z-index: 10;
}

/* --- Capas de estrellas y cometas (Posicionamiento) --- */
@keyframes move-stars {
  from { transform: translateY(0); }
  to { transform: translateY(-1000px); }
}

.starry-background .stars-layer1,
.starry-background .stars-layer2,
.starry-background .stars-layer3,
.starry-background .comet {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1; /* Detrás del contenido */
}

/* Estilos de las capas de estrellas (igual que antes) */
.starry-background .stars-layer1 {
  width: 1px; height: 1px; background: transparent;
  box-shadow: -36vw 27vh #FFF, 8vw 87vh #FFF, 83vw 3vh #FFF, -45vw 26vh #FFF, -33vw 67vh #FFF, 15vw 71vh #FFF, -39vw 21vh #FFF, 53vw 93vh #FFF, -10vw 8vh #FFF, 1vw 48vh #FFF, 98vw 81vh #FFF, 2vw 98vh #FFF;
  animation: move-stars 200s linear infinite;
}
.starry-background .stars-layer2 {
  width: 2px; height: 2px; background: transparent;
  box-shadow: -14vw 46vh #FFF, -32vw 29vh #FFF, 4vw 9vh #FFF, 5vw 5vh #FFF, -4vw 80vh #FFF, -49vw 65vh #FFF, -17vw 3vh #FFF, 32vw 74vh #FFF, -48vw 8vh #FFF, 98vw 9vh #FFF, 24vw 85vh #FFF, 10vw 23vh #FFF;
  animation: move-stars 120s linear infinite;
}
.starry-background .stars-layer3 {
  width: 3px; height: 3px; background: transparent;
  box-shadow: 5vw 56vh #FFF, 80vw 21vh #FFF, 38vw 4vh #FFF, 56vw 1vh #FFF, 17vw 8vh #FFF, 61vw 86vh #FFF;
  animation: move-stars 80s linear infinite;
}

/* --- Cometas (igual que antes) --- */
.starry-background .comet {
  width: 8px; height: 8px; background-color: #fff; border-radius: 50%;
  box-shadow: 0 0 15px 5px #fff; opacity: 0;
  transform: rotate(-45deg) translateX(0);
  animation: comet-fall 5s linear infinite;
}
.starry-background .comet::after {
  content: ''; position: absolute; top: 50%; left: 50%; width: 300px; height: 2px;
  background: linear-gradient(to left, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
  transform: translate(-50%, -50%);
}
.starry-background .comet:nth-of-type(1) { left: 20%; animation-delay: 1s; animation-duration: 4s; }
.starry-background .comet:nth-of-type(2) { left: 60%; animation-delay: 3s; animation-duration: 5s; }
@keyframes comet-fall {
  0% { opacity: 0; transform: rotate(-45deg) translateX(0); }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; transform: rotate(-45deg) translateX(120vw); }
}

/* --- Suelo curvo y árbol --- */
.curved-ground {
  position: absolute; bottom: 0; left: 0;
  width: 100%; z-index: 5; line-height: 0;
}
.curved-ground svg { width: 100%; height: auto; }
.curved-ground path { fill: #090A0F; } /* Color del suelo */

.tree-silhouette {
  position: absolute;
  bottom: 45px; /* Ajusta esta altura para que el árbol se asiente bien en la colina */
  left: 15%; 
  width: 100px; 
  z-index: 6;
}

.tree-silhouette img {
  width: 100%;
  height: auto;
  display: block; /* Evita espacios extra debajo de la imagen */
  opacity: 0.9; 
}

/* --- Sistema Orbital de Iconos --- */
/* --- Sistema Orbital de Iconos --- */
.orbit-container {
  position: absolute;
  top: 50%;      /* Lo centramos verticalmente */
  left: 18%;     /* Lo movemos hacia la izquierda (puedes ajustar este valor) */
  width: 300px;
  height: 300px;
  z-index: 2;
  opacity: 0.15;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.75); /* Lo centramos en su nueva posición y lo hacemos un 25% más pequeño */
}

.orbit-center {
  position: absolute; top: 50%; left: 50%;
  width: 50px;
  transform: translate(-50%, -50%);
  animation: float 6s ease-in-out infinite;
}

.orbit-path {
  position: absolute; top: 50%; left: 50%;
  width: calc(var(--orbit-radius, 90px) * 2);
  height: calc(var(--orbit-radius, 90px) * 2);
  margin-top: calc(var(--orbit-radius, 90px) * -1);
  margin-left: calc(var(--orbit-radius, 90px) * -1);
  animation: rotate var(--orbit-duration, 12s) linear infinite;
  transform-origin: center;
}

.orbiter {
  position: absolute; top: 50%; left: 0;
  width: 45px;
  transform: translateY(-50%);
  /* La contra-rotación no es necesaria en este método */
}

/* Animaciones para los iconos */
@keyframes float {
  0% { transform: translate(-50%, -50%) translateY(0px); }
  50% { transform: translate(-50%, -50%) translateY(-15px); }
  100% { transform: translate(-50%, -50%) translateY(0px); }
}
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* =========================================================
   PANTALLA DE MANTENIMIENTO
   ========================================================= */

/* Oculta la pantalla de mantenimiento por defecto */
#maintenance-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 17, 21, 0.95); /* Fondo oscuro semi-transparente */
  backdrop-filter: blur(8px); /* Efecto de desenfoque en el fondo */
  z-index: 10000;
  justify-content: center;
  align-items: center;
  color: #fff;
  text-align: center;
  font-family: "Poppins", sans-serif;
}

/* --- ESTADO ACTIVO --- */
/* Cuando el body tiene la clase, se muestra el overlay y se oculta el sitio */
body.maintenance-active #maintenance-overlay {
  display: flex;
}
body.maintenance-active > *:not(#maintenance-overlay) {
  display: none; /* Oculta todo excepto el overlay */
}

.maintenance-box {
  background: #111;
  padding: 40px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  max-width: 400px;
  width: 90%;
}

.maintenance-logo {
  height: 50px;
  margin-bottom: 20px;
  filter: brightness(0) invert(1);
}

.maintenance-box h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.maintenance-box p {
  opacity: 0.8;
  margin-bottom: 25px;
}

#password-form {
  display: flex;
  gap: 10px;
}

#password-input {
  flex-grow: 1;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #222;
  color: #fff;
  border-radius: 8px;
  font-size: 1rem;
}

#password-form button {
  padding: 12px 20px;
  border: none;
  background-color: var(--brand); /* Usa tu color de marca */
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#password-form button:hover {
  background-color: #1a5a8e; /* Un tono más oscuro de tu marca */
}

#error-message {
  color: #ff5555;
  margin-top: 15px;
  font-weight: 600;
  transition: opacity 0.3s;
}

.error-hidden {
  opacity: 0;
}

/* =========================================================
   REGLAS RESPONSIVE PARA LA SECCIÓN DE PROYECTOS (CORREGIDO)
   ========================================================= */

@media (max-width: 768px) {

  /* 1. REPOSICIONAMOS los iconos a la esquina superior. */
  .orbit-container {
    top: 80px;  /* Distancia desde la parte superior de la sección */
    left: 5%;   /* Distancia desde el borde izquierdo */
    transform: scale(0.6); /* Hacemos la animación un 40% más pequeña */
    /* NOTA: Eliminamos 'translate' para anclarlo a la esquina */
  }

  /* Ajustamos el padding de la sección. */
  .proyectos.starry-background {
    padding: 60px 15px 120px;
  }

  /* Posicionamos el árbol. */
  .tree-silhouette {
    left: 15%;
    transform: translateX(-50%);
    width: 80px;
    bottom: 35;
  }
  
  /* 2. CORREGIMOS el título para alinear el icono y el texto. */
  .proyectos.starry-background .content-wrapper h2 {
    font-size: 1.8rem;
    gap: 12px;
    /* Re-aplicamos flexbox para forzar la alineación horizontal */
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* =========================================================
   BOTÓN DE CAMBIO DE IDIOMA
   ========================================================= */
#language-switcher {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  font-family: "Poppins", sans-serif;
  font-size: 16px; /* Tamaño base para PC */
}

.current-language,
.language-options li {
  display: flex;
  align-items: center;
  gap: 0.75em;
  padding: 0.6em 1em;
  background-color: #f8f9fb;
  color: #222;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-weight: 500;
}

.current-language {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.language-options {
  position: absolute;
  bottom: calc(100% + 8px); /* Se posiciona arriba del botón */
  right: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.language-options li:hover {
  background-color: #e9ecef;
}

#language-switcher img {
  width: 1.5em;
  height: auto;
  border-radius: 2px;
}

.chevron {
  width: 1.2em;
  height: 1.2em;
  transition: transform 0.3s ease;
}

/* Gira la flecha cuando el menú está activo */
#language-switcher.active .chevron {
  transform: rotate(180deg);
}

.hidden {
  display: none;
}

/* --- RESPONSIVE PARA MÓVILES --- */
@media (max-width: 768px) {
  #language-switcher {
    font-size: 14px; /* Hacemos el botón más pequeño en móviles */
    bottom: 15px;
    right: 15px;
  }
}

/* =========================================================
   SILUETA DEL ÁRBOL CON MÁSCARA CSS (MÉTODO MODERNO)
   ========================================================= */

.tree-silhouette {
  /* 1. Posición y tamaño (ajusta el ancho y alto a tu gusto) */
  position: absolute;
  z-index: 6;
  width: 100px;  /* Ancho del árbol */
  height: 120px; /* Alto del árbol */
  left: 16%;     /* <-- Ligeramente ajustado */
  bottom: 48px;  /* <-- VALOR CORREGIDO: Lo sube para que sea visible */

  /* 2. El color que quieres para el árbol */
  background-color: #090A0F; /* ¡El mismo color de la colina! */

  /* 3. La MÁSCARA: usa tu SVG para recortar el fondo */
  -webkit-mask-image: url('img/arbol.svg');
  mask-image: url('img/arbol.svg');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

@media (max-width: 768px) {
  /* ... tus otras reglas ... */

  .tree-silhouette {
    width: 80px;  /* Ancho para móvil */
    height: 96px; /* Alto para móvil */
    left: 50%;
    transform: translateX(-50%);
    bottom: 20px;
  }

  /* ... tus otras reglas ... */
}

/* =========================================================
   ESTILOS PARA LA INTRO CON LOGO Y CÍRCULO DE CARGA
   ========================================================= */

/* Regla para evitar el scroll mientras la intro está activa */
body.intro-activa {
  overflow: hidden;
}

/* Contenedor principal de la intro */
#intro-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: #000000; /* Fondo negro */
  z-index: 9999; /* Se asegura de estar por encima de todo */
  transition: opacity 0.8s ease-in-out; /* Transición suave para el desvanecido */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Contenedor para alinear el logo y el círculo */
.loader-content {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* El logo que va en el centro */
/* Tu logo SVG en el centro */
/* Tu logo llamado como imagen */
.loader-logo {
  width: 150px; /* Ajusta el tamaño si es necesario */
  height: auto;
  position: relative;
  z-index: 2;
}

/* El círculo que gira alrededor del logo */
.loader-circle {
  position: absolute;
  width: 200px; /* Debe ser más grande que el logo */
  height: 200px;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top-color: #ffffff; /* Color del trazo giratorio */
  animation: spin 1.5s linear infinite;
  z-index: 1;
}

/* Animación para que el círculo gire */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Clase para ocultar la intro con el efecto de desvanecido */
#intro-loader.oculto {
  opacity: 0;
  pointer-events: none; /* Impide interactuar con la intro cuando es invisible */
}

/* =========================================================
   AJUSTES RESPONSIVE PARA EL HERO Y EL INDICADOR
   ========================================================= */

@media (max-width: 768px) {
  
  /* 1. Hace el Hero menos alto en móviles */
  .hero {
    min-height: 85vh; /* <-- Reduce la altura para que no ocupe toda la pantalla */
    height: auto;     /* Anula la altura fija de 100vh */
  }

  /* 2. Muestra el indicador de scroll solo en móviles */
  .scroll-indicator {
    display: block;
  }
}

/* =========================================================
   NUEVO INDICADOR DE SCROLL (TEXTO + FLECHA)
   ========================================================= */

/* Oculto por defecto en escritorio */
.scroll-indicator-arrow {
  display: none; 
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  
  /* Estilos del contenedor */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  
  /* Transición para desaparecer suavemente */
  opacity: 1;
  transition: opacity 0.4s ease-out;
}

/* Estilo para el texto "Desliza" */
.scroll-indicator-arrow span {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6); /* Color blanco con 60% de opacidad */
  letter-spacing: 0.5px;
}

/* Estilo para la flecha SVG */
.scroll-indicator-arrow svg {
  width: 28px;
  height: 28px;
  animation: bounce-arrow 2s ease-in-out infinite;
}
.scroll-indicator-arrow svg path {
  stroke: rgba(255, 255, 255, 0.6); /* Color de la flecha con opacidad */
}

/* Clase que se añadirá con JS para ocultarlo */
.scroll-indicator-arrow.hidden {
  opacity: 0;
  pointer-events: none; /* Evita interacciones cuando está oculto */
}

/* Animación de rebote para la flecha */
@keyframes bounce-arrow {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}


/* =========================================================
   AJUSTES RESPONSIVE (YA EXISTENTES, SOLO ASEGÚRATE DE TENERLOS)
   ========================================================= */

@media (max-width: 768px) {
  .hero {
    min-height: 85vh;
    height: auto;
  }

  /* Muestra el indicador solo en móviles */
  .scroll-indicator-arrow {
    display: flex;
  }
}