/* ==== Base & Theme ==== */
:root{
  --brand-alt: #58A9CF;  /* Celeste institucional */
  --brand: #312d89 ;      /* Violeta TERO #A9006F*/
  --bg: #ffffff;
  --text: #222;
  --muted: #666;
  --card: #fafafa;
  --border: #eee;
  --hero-bg: #312d89;        

}



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

html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Nunito Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}


.container { width: min(1100px, 92vw); margin-inline: auto; }

a { color: var(--brand); text-decoration: none; }
a:hover { opacity: .9; }

.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 600;
}

/* ==== Header ==== */
header {
  background: #f7f7f7;
  color: var(--brand);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background-color: #3776f2;
}

.logo img {
  max-width: 220px;
  height: auto;
  display: block;
  margin: 4px auto;
}

/* Redes */
.social-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  border: none;
  padding: 0;
  margin: 0;
}
.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 1.3rem;
  border-radius: 10px;
  transition: transform .2s ease;
}
.social-icons a:hover { transform: translateY(-2px); }



/* HERO: ocupa siempre el alto del viewport y evita recortes en vistas angostas */
#inicio {
  position: relative;
  height: 100vh;
  height: 100svh;   /* corrige barras de navegador en mobile */
  min-height: 520px;
  overflow: hidden;
  background: var(--hero-bg, #312d89);
}

#inicio .video-fondo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;            /* llena el contenedor (recorta si hace falta) */
  object-position: top center;
}


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

/*
.overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.45), rgba(0,0,0,.05));
}*/

/* ==== Intro ==== */
#intro {
  background: var(--brand);
  color: white;
  text-align: center;
  padding: 60px 0 70px;
}
#intro h1 {
  font-size: clamp(28px, 5vw, 52px);
  line-height: 1.1;
  margin: 0 0 10px;
  font-weight: 800;
}

/* ==== Servicios ==== */
#servicios {
  padding: 48px 0 64px;
  background: #6126c2; /* #fcf3d2; */
  color: #f9f0e9; /*#f1b500;*/
  text-align: center;
}
#servicios h2 {
  margin: 0 0 24px;
  font-size: clamp(22px, 3.2vw, 36px);
}

.servicios-container {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.servicio {
  flex: 1 1 100%;
  max-width: 100%;
  padding: 16px;
  border: 1px solid var(--brand);
  border-radius: 14px;
  background: #f1b500; /*f1b500*/
  cursor: pointer;
  transition: transform .25s, box-shadow .25s, background-color .25s;
  font-weight: 600;
  color: #6126c2;
}
.servicio:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
}

.servicio.active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

/* Video embebido */
.video-container {
  margin-top: 24px;
  display: none;            /* se activa por JS */
  justify-content: center;
  align-items: center;
}

#servicio-video {
  width: min(100%, 980px);
  aspect-ratio: 16 / 9;
  border: 4px solid var(--brand);
  border-radius: 14px;
}

/* ==== Footer ==== */
footer {
  background: #111;
  color: #fff;
  padding: 22px 10px;
  text-align: center;
}
footer p {
  margin: 0;
  font-size: .9rem;
  color: #ddd;
}


@media (min-width: 600px) {
  .servicio { flex: 1 1 calc(50% - 14px); max-width: calc(50% - 14px); }
}
@media (min-width: 1024px) {
  .logo img { max-width: 260px; }
  .servicio { flex: 1 1 calc(25% - 14px); max-width: calc(25% - 14px); }
}

@media (max-width: 768px) {
  .logo img {
    width: 110px;      /* 50% de 220px */
    max-width: 110px;
    height: auto;
  }
}

/* ==== HERO FINAL ==== */
/* TABLET + MOBILE (<=1024px): sin recortes ni franjas (altura por contenido) */
@media (max-width: 1024px) {
  #inicio {
    height: auto !important;
    min-height: 0 !important;
    display: block;                 /* evita centrado por grid */
    background: transparent;        /* sin “vacío” de color */
    overflow: visible;
  }
  #inicio .video-fondo {
    position: static !important;    /* saca el absolute */
    width: 100% !important;
    height: auto !important;        /* video manda la altura */
    object-fit: contain !important; /* 0 recorte */
    object-position: top center !important; /* pegado arriba */
    background: transparent !important;
    border-radius: 0;
  }
  #inicio .overlay-gradient { display: none !important; }
}

/* DESKTOP (>=1025px): hero pantalla completa, recorte controlado */
@media (min-width: 1025px) {
  #inicio {
    height: 100vh;
    min-height: 520px;
    display: grid;
    place-items: center;
    overflow: hidden;
  }
  #inicio .video-fondo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;              /* llena sin dejar franjas */
    object-position: top center;    /* ancla arriba (recorta abajo si hace falta) */
  }
  /* overlay suave (opcional) */
  #inicio .overlay-gradient {
    background: linear-gradient(to top, rgba(0,0,0,.12), rgba(0,0,0,.03));
    pointer-events: none;
  }
}

@media (max-width: 480px) {
  .nav-container { 
    flex-wrap: nowrap; 
    gap: 8px;
  }
  .logo { flex: 0 1 auto; }
  .social-icons {
    flex: 1 1 auto;
    justify-content: flex-end;
    flex-wrap: nowrap;         /* una sola línea */
    gap: 8px;
  }
  .social-icons a {
    width: 28px; 
    height: 28px;
    font-size: 1rem;
    padding: 0;
  }
}

/* No-mobile: alinear logo e iconos arriba en la barra */
@media (min-width: 769px) {
  .nav-container {
    align-items: flex-start;   /* ← de center a top */
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .logo img {
    display: block;            /* evita “salto” por baseline */
    margin-top: 0;
  }

  .social-icons {
    align-self: flex-start;    /* asegura que también queden arriba */
    margin-top: 4px;           /* microajuste visual */
  }

  .social-icons a {
    line-height: 1;            /* quita espacio extra vertical */
  }
}
