/* ============================================================
   VARIABLES GLOBALES
   ============================================================ */
:root {
  --azul:     #002b7d;
  --turquesa: #00C4CC;
  --blanco:   #ffffff;
  --gris-bg:  #f5f5f5;
}

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

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--gris-bg);
}

* {
  font-family: 'Montserrat', sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  background: var(--blanco);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 0 40px 0 24px;
  height: 110px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.nav-logo img {
  height: 100px;
  padding: 4px 0;
}

.nav-cta {
  background: var(--turquesa);
  color: var(--blanco);
  border: none;
  font-size: 1.48rem;
  font-weight: 700;
  padding: 9px 22px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity .2s;
  line-height: 1.3;
  text-align: center;
}

.nav-cta:hover {
  opacity: .85;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-links a {
  font-size: 1.58rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 15px;
  line-height: 1.2;
  text-align: center;
  transition: opacity .2s;
}

.nav-links a:hover {
  opacity: .85;
}

.nav-links a.activo {
  background: var(--turquesa);
  color: var(--blanco);
}

.nav-links a.normal {
  background: var(--azul);
  color: var(--blanco);
}

.nav-links a.cta {
  background: var(--turquesa);
  color: var(--blanco);
}

/* ============================================================
   HERO
   ============================================================ */
#inicio {
  width: 100%;
  line-height: 0;
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-img-constructora {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   MISION / VISION
   ============================================================ */
#nosotros {
  background: var(--blanco);
  padding: 60px 80px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.mv-fila {
  width: 60%;               /* ocupa la mitad */
  margin-right: auto;       /* empuja a la izquierda ← MISIÓN */
}

.mv-fila.derecha {
  width: 60%;
  margin-left: auto;        /* empuja a la derecha → VISIÓN */
  text-align: right; 
  margin-right: 0px;       /* o justify si prefieres */
}

.mv-titulo {
  display: inline-block;
  color: var(--blanco);
  font-size: 2.5rem;
  font-weight: 800;
  padding: 10px 32px;
  border-radius: 15px;
  margin-bottom: 16px;
}

.mv-titulo.turquesa { background: var(--turquesa); }
.mv-titulo.azul     { background: var(--azul); }

.mv-texto {
  font-size: 1.5rem;
  line-height: 1.3;
  color: #17469c;
  font-weight: 600;
  text-align: justify;
}
/* ============================================================
   EQUIPO
   ============================================================ */
#equipo {
  background: var(--blanco);
  padding: 0;
}

.director-wrap {
  position: relative;          /* ← contenedor para el absolute */
  max-width: 100%;
  margin: 0 auto;
}

.director-img {
  width: 100%;
  height: auto;
  display: block;
}

.equipo-titulo-badge {
  position: absolute;
  background: var(--turquesa);
  color: var(--blanco);
  font-size: 2.5rem;           /* ajusta tamaño de letra aquí */
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 14px 40px;          /* ajusta alto/ancho aquí */
  border-radius: 10px;
  /* Posición: empieza donde empieza el card */
  left: 37%;                   /* ajusta para alinear con borde izquierdo del card */
  right: 10%;                   /* ajusta para alinear con borde derecho del card */
  top: 6%;                     /* ajusta altura dentro de la imagen */
  
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   CARRUSELES — LIDERES Y ASESORES
   ============================================================ */
#lideres,
#asesores {
  background: var(--blanco);
  padding: 100px 0;
  overflow: hidden;
}



.carrusel-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 60px 60px;              /* espacio para las flechas */
}

.carrusel-track {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  transition: none;
  justify-content: center;
}

.slide {
  flex-shrink: 0;
  width: 28%;                        /* ancho base de cada tarjeta */
  transition: transform .4s ease;
  cursor: pointer;
}

.slide img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
}

/* tarjeta central más grande */
.slide.activo {
  transform: scale(1.18);
  z-index: 2;
}

/* hover */
.slide:hover {
  transform: scale(1.08);
  z-index: 3;
}

.slide.activo:hover {
  transform: scale(1.22);
}

/* flechas */
.carrusel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: var(--turquesa);
  color: var(--blanco);
  border: none;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  line-height: 1;
}

.carrusel-btn:hover {
  background: var(--azul);
}

.carrusel-btn.prev { left: 16px; }
.carrusel-btn.next { right: 16px; }

#lideres {
  margin-bottom: 0;
  padding-bottom: 40px;
}

.separador-equipo {
  background: var(--blanco);
  height: 60px;                        /* ← ajusta el alto del espacio */
}

/* ============================================================
   INMUEBLES CALIENTES
   ============================================================ */
#calientes {
  background: var(--blanco);
  padding: 100px 0;
}

.calientes-header {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.calientes-badge {
  background: var(--turquesa);
  color: var(--blanco);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 14px 60px;
  border-radius: 15px;
  display: inline-block;
}

/* overlay hover en slide de calientes */
#track-calientes .slide {
  position: relative;
  cursor: pointer;
}

#track-calientes .slide-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 196, 204, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: background .3s;
}

#track-calientes .slide-overlay span {
  color: var(--blanco);
  font-weight: 800;
  font-size: 1rem;
  opacity: 0;
  transition: opacity .3s;
}

#track-calientes .slide:hover .slide-overlay {
  background: rgba(0, 196, 204, .45);
}

#track-calientes .slide:hover .slide-overlay span {
  opacity: 1;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .88);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay.activo {
  display: flex;
}

.lightbox-contenido {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 80vw;
  max-height: 90vh;
}

.lightbox-contenido img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}

.lightbox-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 16px;
  gap: 24px;
}

#lightbox-contador {
  color: var(--blanco);
  font-size: .95rem;
  font-weight: 600;
}

.lightbox-wa-btn {
  background: #25D366;
  color: var(--blanco);
  font-weight: 800;
  font-size: .95rem;
  padding: 10px 28px;
  border-radius: 50px;
  transition: opacity .2s;
}

.lightbox-wa-btn:hover { opacity: .85; }

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: var(--blanco);
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  z-index: 1001;
}

.lightbox-nav {
  background: rgba(255,255,255,.15);
  border: none;
  color: var(--blanco);
  font-size: 3rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  flex-shrink: 0;
}

.lightbox-nav:hover { background: rgba(255,255,255,.3); }

/* ============================================================
   VIDEOS
   ============================================================ */
#videos {
  background: var(--blanco);
  padding: 60px 0;
}

.slide-video {
  cursor: pointer;
}

.video-thumb-wrap {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 4 / 5;
}

.video-thumb-iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;       /* evita que el iframe capture el clic */
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.25);
  transition: background .3s;
}

.slide-video:hover .video-play-overlay {
  background: rgba(0,196,204,.4);
}

.video-play-btn {
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--azul);
  padding-left: 4px;
  transition: transform .2s;
}

.slide-video:hover .video-play-btn {
  transform: scale(1.12);
}

/* lightbox video */
.lightbox-video-contenido {
  width: auto;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.video-iframe-wrap {
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightbox-video-player {
  max-width: 90vw;
  max-height: 78vh;
  width: auto;
  height: auto;
  display: block;
}

#lightbox-video-titulo {
  color: var(--blanco);
  font-size: .95rem;
  font-weight: 600;
}
#track-videos .slide.activo {
  transform: none;    /* ← cancela el scale del activo */
  z-index: auto;
}

#track-videos .slide:hover {
  transform: none;    /* ← cancela el hover scale también */
}
.video-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0; left: 0;
  display: block;
}

/* ============================================================
   NUESTROS PROYECTOS
   ============================================================ */
#proyectos {
  width: 100%;
}

.proyectos-fondo {
  position: relative;
  width: 100%;
  min-height: 750px;
  background: url('../assets/fondo_proyecto.png') center center / 100% auto no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.proyectos-contenido {
  position: relative;
  z-index: 2;
  max-width: 900px;
  text-align: center;
  padding: 80px 30px;
}

.proyectos-titulo {
  display: inline-block;
  color: var(--blanco);
  font-size: 3.8rem;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 12px 32px;
  border-radius: 12px;
  margin-bottom: 28px;
  white-space: nowrap; 
}

.proyectos-texto {
  color: var(--blanco);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.65;
  text-align: justify;
}

/* ============================================================
   PROYECTOS DETALLE
   ============================================================ */
#proyectos-detalle {
  background: var(--blanco);
  padding: 60px 120px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.proyecto-card {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-top: 32px
}

/* Lado del video/media */
.proyecto-media {
  flex: 0 0 48%;
  display: flex;
  justify-content: center;
  margin:20px
}

/* Lado del texto */
.proyecto-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin:20px
}

.proyecto-badge {
  display: inline-block;
  color: var(--blanco);
  font-size: 2.5rem;
  font-weight: 800;
  padding: 18px 40px;
  border-radius: 12px;
  letter-spacing: 1px;
  width: 100%;
  max-width: 700px;
  text-align: center;
}

.proyecto-badge.turquesa { background: var(--turquesa); }
.proyecto-badge.azul     { background: var(--azul); }

.proyecto-info p {
  font-size: 1.5rem;
  font-weight: 600;
  color: #17469c;
  line-height: 1.65;
  text-align: justify;
}

.proyecto-lista {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.proyecto-lista li {
  position: relative;
  padding-left: 28px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #17469c;
  line-height: 1.5;
}

.proyecto-lista li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--turquesa);
}

.proyecto-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 16px;
}

.slide-video.formato-vertical {
  width: 28%;
}

.lightbox-footer {
  display: none;
}

.proyecto-media img {
  width: 100%;
  border-radius: 16px;
  display: block;
}

/* Wrapper externo que cubre todo el ancho con fondo blanco */
#constructora-detalle {
  background: var(--blanco);
  padding: 60px 0;           /* padding vertical, sin padding lateral aquí */
}

/* Contenedor interno que centra y limita el ancho */
#constructora-detalle .proyecto-card {
  max-width: 1100px;         /* ← VARIABLE 1: ancho total del contenido */
  margin: 0 auto;
}

#constructora-detalle .proyecto-badge {
  font-size: 1.6rem;         /* ← VARIABLE 3: tamaño del texto del badge */
  padding: 14px 28px;        /* ← VARIABLE 4: padding del badge */
  margin-bottom: 20px;
}

#constructora-detalle .proyecto-info > p {
  font-size: 1.1rem;
}

/* ============================================================
   RESPONSIVE — Mobile first
   ============================================================ */

/* ---- MOBILE (<768px) ---- */
@media (max-width: 767px) {

  /* NAVBAR */
  #navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    padding: 0 16px;
    height: 64px;
    justify-content: space-between;
  }

    .proyectos-fondo {
    min-height: 0;
    background-size: cover;
    background-position: center center;
    padding: 0;
  }

  .proyectos-contenido {
    padding: 60px 20px;
  }
  .nav-mobile-actions {
  display: none;
}

  body {
    padding-top: 64px;
  }

  .nav-logo img {
    height: 52px;
  }

  .nav-cta {
    display: none;
  }


  /* Menú mobile — dropdown anclado a la derecha, animado desde el hamburguesa */
  .nav-links {
    display: flex;
    position: fixed;
    top: 72px;
    right: 12px;
    left: auto;
    width: 200px;
    background: var(--blanco);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 16px;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
    z-index: 998;
    transform-origin: top right;
    transform: scale(0.85) translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform .22s ease, opacity .18s ease, visibility .22s;
  }

.nav-links.abierto {
    transform: scale(1) translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-links li {
    width: 100%;
  }

.nav-links a {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 16px 24px;
    border-radius: 0;
    color: var(--azul) !important;
    background: transparent !important;
    border-left: 4px solid transparent;
    transition: border-color .2s, background .2s;
  }

    .nav-links a:hover,
  .nav-links a.activo {
    background: #f0f8ff !important;
    border-left-color: var(--turquesa);
    color: var(--azul) !important;
  }

    .nav-links li + li {
    border-top: 1px solid #eee;
  }

    .nav-mobile-actions {
    display: flex;
    align-items: center;
    gap: 4px;
  }

    .nav-wsp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #25D366;
    border-radius: 50%;
    text-decoration: none;
    transition: opacity .2s;
    flex-shrink: 0;
  }

    .nav-wsp-btn:hover {
    opacity: .85;
  }

    .nav-wsp-btn svg {
    width: 26px;
    height: 26px;
    fill: white;
  }

  /* Botón hamburguesa (se añade con JS) */
  .nav-hamburger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background .2s;
  }

  .nav-hamburger:hover {
    background: #f0f0f0;
  }

    .nav-hamburger span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: var(--azul);
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
    transform-origin: center;
  }

  .nav-hamburger.abierto span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }
  .nav-hamburger.abierto span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .nav-hamburger.abierto span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }


  /* MISIÓN / VISIÓN */
  #nosotros {
    padding: 40px 20px;
    gap: 28px;
  }

  .mv-fila,
  .mv-fila.derecha {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    text-align: left;
  }

  .mv-titulo {
    font-size: 1.6rem;
    padding: 8px 20px;
  }

  .mv-texto {
    font-size: 1.1rem;
  }

  /* BADGE DEL EQUIPO */
 .director-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px 0;
  }

  .equipo-titulo-badge {
    position: static;
    display: inline-block;
    font-size: 1.2rem;
    padding: 10px 24px;
    margin-bottom: 16px;
    left: auto;
    right: auto;
    top: auto;
    order:-1;
  }

    #lideres, #asesores, #calientes {
    padding: 40px 0;
  }

  .carrusel-wrap {
    padding: 20px 44px;
  }

  .slide {
    width: 85%;
  }

    .slide.activo {
    transform: scale(1.03);
  }

  #videos { padding: 40px 0; }

  /* Mostrar solo 1 slide a la vez en mobile */
  .carrusel-track {
    justify-content: center;
  }

  .slide-video.formato-vertical {
    width: 72%;
  }

  /* PROYECTOS — hero */
  .proyectos-titulo {
    font-size: 2rem;
    white-space: normal;
    padding: 10px 18px;
  }

  .proyectos-texto {
    font-size: 1rem;
  }

  /* PROYECTOS — cards */
  #proyectos-detalle {
    padding: 40px 16px;
    gap: 48px;
  }

  .proyecto-card {
    flex-direction: column;
    gap: 20px;
  }

  /* En mobile el texto va PRIMERO (arriba) siempre */
  .proyecto-card .proyecto-media {
    order: 2;
    flex: unset;
    width: 100%;
    margin: 0;
  }

  .proyecto-card .proyecto-info {
    order: 1;
    margin: 0;
  }

  .proyecto-badge {
    font-size: 1.4rem;
    padding: 12px 20px;
  }

  .proyecto-info p {
    font-size: 1.05rem;
  }

  /* CONSTRUCTORA DETALLE */
  #constructora-detalle {
    padding: 40px 16px;
  }

  #constructora-detalle .proyecto-card {
    flex-direction: column;
    max-width: 100%;
  }

  /* CALIENTES badge */
  .calientes-badge {
    font-size: 1.5rem;
    padding: 10px 28px;
    text-align: center;
  }
}

/* ---- TABLET (768px – 1024px) ---- */
@media (min-width: 768px) and (max-width: 1024px) {

  .proyectos-titulo {
    font-size: 2.4rem;
    white-space: normal;
    padding: 10px 24px;
  }

  .proyectos-texto {
    font-size: 1.1rem;
  }

  .proyectos-contenido {
    padding: 50px 24px;
  }
  #navbar {
    padding: 0 24px;
    height: 90px;
  }

  #constructora-detalle {
    padding: 50px 40px;
  }

  #constructora-detalle .proyecto-badge {
    font-size: 1.05rem;
    padding: 10px 18px;
  }

  .nav-logo img {
    height: 76px;
  }
  .equipo-titulo-badge {
    font-size: 1.3rem;
    padding: 10px 20px;
    left: 30%;
    right: 6%;
    top: 5%;
  }

.nav-links {
    position: static;
    left: auto;
    transform: none;
    flex: 1;
    justify-content: center;
    gap: 6px;
    min-width: 0;
  }

  .nav-links a {
    font-size: 0.95rem;
    padding: 6px 10px;
    white-space: nowrap;
  }

  .nav-cta {
    font-size: 1.1rem;
  }

  /* MISIÓN / VISIÓN */
  #nosotros {
    padding: 50px 40px;
  }

  .mv-fila,
  .mv-fila.derecha {
    width: 75%;
  }

  .mv-texto {
    font-size: 1.2rem;
  }

  /* CARRUSELES */
  .slide {
    width: 42%;
  }

  /* PROYECTOS */
  #proyectos-detalle {
    padding: 50px 40px;
  }

  .proyecto-badge {
    font-size: 1.8rem;
  }

  .proyecto-info p {
    font-size: 1.2rem;
  }
}
@media (max-width: 1024px) {
  #track-lideres .slide:not(.activo),
  #track-asesores .slide:not(.activo),
  #track-calientes .slide:not(.activo),
  #track-videos .slide:not(.activo) {
    display: none !important;
  }
}