html, body { overflow-x: hidden; }


body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: #f9f9f9;
    color: #333;
    padding-top: 60px; /* igual o mayor a la altura de la barra top */
    overflow-x: hidden; /* evita scroll horizontal */
}


/* Barra superior logo y menu */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff; /* blanco */
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #ddd;
    z-index: 1000; /* para que quede encima del resto */
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%; /* importante para evitar overflow */
    box-sizing: border-box;
}

.logo-top {
    height: 40px;
    max-width: 180px;
}


/* Links de escritorio */
.top-links {
    display: flex;
    gap: 1.5rem; /* espacio entre enlaces */
}

.top-links a {
    font-family: Arial, sans-serif;
    font-size: 14px;
    text-decoration: none;
    color: #003366;
    font-weight: bold;
}

.top-links a:hover {
    color: #0077cc;
}

/* Botón hamburguesa oculto por defecto */
.menu-toggle {
    display: none;
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
    color: #003366;
}


/* ===== Responsive moviles ===== */
@media (max-width: 768px) {

    .logo-top {
        height: 30px; /* logo más chico en móviles */
        max-width: 140px;
    }

    .top-links {
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -250px;
        height: 100vh;
        width: 250px;
        background: #fff;
        border-left: 1px solid #ddd;
        padding: 2rem 1rem;
        box-shadow: -2px 0 8px rgba(0,0,0,0.2);
        transition: right 0.3s ease-in-out;
        z-index: 999;
        gap: 0; /* en columna usamos márgenes verticales */
    }

    .top-links a {
        margin: 1rem 0;
        font-size: 16px;
    }

    .menu-toggle {
        display: block;       /* mostrar hamburguesa */
        z-index: 1001; /* encima del menú */
    }

    /* Estado abierto (slide adentro) */
    .top-links.active {
        right: 0;
    }
}

/* ===== Responsive tablets ===== */
@media (min-width: 769px) and (max-width: 1024px) {

    .logo-top {
        height: 35px; /* un poco más grande que móviles */
        max-width: 160px;
    }

    .top-links {
       flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%; /* oculto completamente */
        height: 100vh;
        width: 300px;
        background: #fff;
        border-left: 1px solid #ddd;
        padding: 2.5rem 1.5rem;
        box-shadow: -2px 0 8px rgba(0,0,0,0.25);
        transition: right 0.3s ease-in-out;
        z-index: 999;
        gap: 0;
    }

    .top-links a {
        margin: 1rem 0;
        font-size: 17px; /* un poquito más grande */
    }

    .menu-toggle {
        display: block;
        font-size: 30px;
        color: #003366;
        z-index: 1000;
    }

    .top-links.active {
        right: 0; /* se abre bien */
    }
}


html.no-scroll,
body.no-scroll {
  overflow: hidden !important; /* bloquea el scroll pero no mueve la pantalla */
}



/* HEADER HERO PARA LAPTOPS MOVILES Y TABLETS */
header.hero {
  position: relative;
  background: url("../assets/fondo_header.jpg") no-repeat center/cover;
  text-align: center;
  color: #ffffff;
  height: 90vh;
  min-height: 120px;
  max-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  overflow: hidden;
}


/* === CAPA DE OFERTA (overlay superior) === */
header.hero .overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(30, 30, 30, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: clamp(16px, 5vw, 48px);
  z-index: 10; /* sobre el contenido del hero */
  transition: opacity 0.3s ease-in-out;
}

/* Botón de cierre (X) */
header.hero .close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 5px;
  transition: background 0.2s;
}

header.hero .close-btn:hover {
  background: rgba(255,255,255,0.25);
}

/* Contenido dentro del overlay (imagen + texto) */
header.hero .offer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 4vw, 32px);
  max-width: 1100px;
  width: 100%;
  padding-inline: clamp(8px, 2vw, 24px);
  color: #fff;
}

/* Imagen izquierda */
header.hero .offer-figure {
  height: 80%;
  max-height: 520px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

/* Texto a la derecha */
header.hero .offer-text {
  text-align: left;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  padding: clamp(12px, 2vw, 20px);
  max-width: 600px;
}

header.hero .offer-text h2 {
  margin: 0 0 0.4rem 0;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

header.hero .offer-text h3 {
  margin: 0.8rem 0 0.4rem 0;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

header.hero .offer-text p,
header.hero .offer-text li {
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  line-height: 1.45;
  margin: 0.2rem 0;
}

header.hero .offer-text ul {
  margin: 0.2rem 0 0.6rem 1rem;
}

header.hero .offer-text .contacto {
  margin-top: 0.6rem;
  font-weight: 600;
}


/* Espaciado y tamaño en escritorio */
header.hero h1 {
    margin-top: 0;
    margin-bottom: 0.3rem; /* espacio pequeño entre título y párrafo */
    font-size: 2rem;
    position: relative; /* queda sobre el overlay si lo necesitas */
    z-index: 0;
}

header.hero p {
    margin-top: 0;
    font-size: 1.1rem;
    position: relative;
    z-index: 0;
}


/* ===== Ajustes para tablets ===== */
@media (min-width: 769px) and (max-width: 1024px) {
  header.hero {
    height: 50vh;
    max-height: 450px;
  }

  /* Imagen y texto mantienen fila, con proporciones un poco más contenidas */
  header.hero .offer-figure {
    height: 75%;
    max-height: 420px;
  }

  header.hero .offer-text {
    max-width: 520px;
  }

  header.hero h1 { font-size: 2rem; margin-bottom: 0.25rem; }
  header.hero p  { font-size: 1rem; }
}

/* ===== Ajustes para móviles ===== */
@media (max-width: 768px) {
    /* El hero ya no limita la altura en mobile */
    header.hero {
      height: auto;
      max-height: none;
      overflow: visible;
    }

    /* Overlay a pantalla completa y con scroll */
    header.hero .overlay {
      position: fixed;          /* cubre toda la pantalla */
      inset: 0;
      background-color: rgba(30,30,30,0.92);
      display: flex;
      align-items: flex-start;  /* arrancamos arriba para que quepa todo */
      justify-content: center;
      padding: 16px 20px 24px;
      overflow-y: auto;         /* <— permite hacer scroll si el contenido crece */
      z-index: 9999;
    }

    /* En móvil apilamos: imagen arriba, texto abajo */
    /* Contenido apilado y fluido */
    header.hero .offer-content {
      flex-direction: column;
      gap: 12px;
      width: 100%;
      max-width: 680px;
    }

    /* Imagen visible y responsiva */
    header.hero .offer-figure {
      width: 100%;
      height: auto;            /* <— evita recortes por altura */
      max-height: none;
      object-fit: contain;
    }

    /* Texto ancho completo y legible */
    header.hero .offer-text {
      width: 100%;
      max-width: 100%;
      text-align: left;        /* o center si prefieres */
      padding: 12px;
    }


    header.hero h1 {
        font-size: 1.8rem;
        margin-bottom: 0.2rem;
    }

    header.hero p {
        font-size: 1rem;
    }

  /* Botón de cierre bien colocado */
  header.hero .close-btn {
    position: fixed;          /* Siempre visible en la esquina superior derecha */
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    z-index: 10000;           /* sobre todo */
    backdrop-filter: blur(3px);
    transition: background 0.2s ease-in-out;
  }

  header.hero .close-btn:hover {
    background: rgba(255, 255, 255, 0.35);
  }

}

/* ===== Ajustes para móviles muy pequeños ===== */
@media (max-width: 480px) {
  /* RECOMENDADO: no fuerces altura del hero en XS para no cortar el overlay
     (si quieres mantener tu 45vh, puedes reponerlo, pero no es necesario
     porque el overlay va fixed en móviles) */
  /* header.hero {
    height: 45vh;
    max-height: 450px;
  } */

  header.hero .offer-figure {
    width: 100%;
  }

  header.hero .offer-text p,
  header.hero .offer-text li {
    font-size: 0.95rem; /* más compacto */
  }

  header.hero .offer-text {
    padding: 10px;
  }

  header.hero h1 {
    font-size: 1.5rem;
    margin-bottom: 0.15rem;
  }

  header.hero p {
    font-size: 0.95rem;
  }

  /* Botón de cierre para móviles muy pequeños (MISMO media query, sin duplicar) */
  header.hero .close-btn {
    top: 10px;
    right: 10px;
    font-size: 1.6rem;
    padding: 3px 8px;
  }
} /* ← cierre correcto del @media 480px */

/*  F I N   -    Espaciado y tamaño en escritorio */


.logo {
    max-width: 180px;
}

h2 {
    color: #434AFE;
}
h4 {
    color: #434AFE;
}
.grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.cardMisionVision {
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    flex: 1;
    min-width: 250px;
    text-align: left;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}


.card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    flex: 1;
    min-width: 250px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.card img {
    max-width: 100%;
    border-radius: 10px;
}
.logo-certificado {
    max-width: 120px;
    display: block;
    margin: auto;
}
form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
form input, form textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}
form button {
    background-color: #434AFE;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
form button:hover {
    background-color: #333;
}
footer {
    background: #434AFE;
    color: white;
    text-align: center;
    padding: 10px;
}

.testimonios {
  margin: 2rem 0;
  padding: 0 1rem;
}

/* Wrapper centrado y con grid para desktop (2 columnas) */
.testimonios-wrapper {
  max-width: 1200px;
  margin: 0 auto;                 /* centra el bloque */
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* dos columnas iguales */
  gap: 2rem;
  box-sizing: border-box;
}

/* Tarjeta */
.testimonio {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: #fff;
  border-radius: 8px;
  box-sizing: border-box;
  align-items: flex-start;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.foto-persona {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.info-persona h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: bold;
}

.profesion {
  margin: 0;
  font-size: 0.9rem;
  color: #555;
  font-style: italic;
}

.texto-testimonio {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.3;
  color: #333;
}

/* ===== Responsive: móvil ===== */
@media (max-width: 768px) {

  .testimonios-wrapper {
    grid-template-columns: 1fr;   /* una columna en móvil */
  }

  .testimonio {
    flex: 0 0 80%;
    width: auto;
  }

  .testimonios {
    gap: 1rem;
    padding: 0 0.5rem; /* pequeño padding lateral */
  }

  .testimonios-wrapper::-webkit-scrollbar {
    display: none;
  }
}


/* ============   TARJETAS CURSOS    ===========*/
.cursos-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* siempre 3 columnas */
  gap: 20px;
  margin: 0 auto;
  padding: 0 20px;         /* 📏 margen lateral */
  max-width: 1040px;       /* 📏 límite en laptops y mayores */
}

/* Tarjeta base */
.cardCursos {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Imagen */
.cardCursos img {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 10px;
}

/* 📱 móviles: 1 tarjeta por fila */
@media (max-width: 767px) {
  .cursos-container {
    grid-template-columns: 1fr; /* solo 1 tarjeta */
    max-width: 100%;           /* usa todo el ancho disponible */
  }
}

/* 📲 tablets */
@media (min-width: 768px) and (max-width: 1199px) {
  .cursos-container {
    max-width: 1000px; /* límite en tablets */
  }
}

/* ============   FIN TARJETAS CURSOS    ===========*/

.card {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.card:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  transform: scale(1.05);
}


/* Responsive: en móviles una columna */
@media (max-width: 600px) {
  .testimonio {
    width: 100%;
  }
}

/* Estilo base de los iconos */
.social-icon {
    color: #434AFE;       /* Color inicial */
    transition: color 0.3s ease, 
                transform 0.3s ease; /* Animaciones suaves */
    margin: 10px;
    text-decoration: none;
    display: inline-block;
}

/* Efecto hover */
.social-icon:hover {
    color: #E8F300;   /* Color al pasar mouse */
    transform: scale(1.2); /* Zoom suave */
}

/* Estilo base de los iconos */
.social-icon-footer {
    color: #f1f5f9;       /* Color inicial */
    transition: color 0.3s ease, 
                transform 0.3s ease; /* Animaciones suaves */
    /* margin: 10px; */
    text-decoration: none;
    display: inline-block;
}

/* Efecto hover */
.social-icon-footer:hover {
    color: #E8F300;   /* Color al pasar mouse */
    transform: scale(1.2); /* Zoom suave */
}



section {
    padding: 40px 20px !important;
    max-width: 1000px;
    margin: auto !important;
}

#sobre, #mision, #certificacion {
    scroll-margin-top: 20px; /* altura del menú fijo */
    /* padding-top: 0; */
}

#mision {
    padding-top: 0;
}

.about, .mision-vision {
    max-width: 1000px;
    margin: auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.about h2, .mision-vision h2 {
    /* color: #003366; */
    margin-bottom: 10px;
}

.about p, .mision-vision p {
    line-height: 1.6;
    font-size: 15px;
}

.mision-vision {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.mision-vision > div {
    flex: 1 1 300px;
    /* background: #f8f8f8; */
    padding: 15px;
    border-radius: 6px;
}


.certificacion {
    display: flex;
    gap: 20px;
    align-items: center;
    max-width: 1000px;
    margin: auto;
    padding: 20px;
    flex-wrap: wrap; /* para que sea responsive */
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}


.cert-texto {
    flex: 1 1 300px;
}

.cert-texto h2 {
    /* color: #003366; */
    margin-bottom: 10px;
}

.cert-texto p {
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 10px 0;
}

.cert-logo {
    flex: 1 1 200px;
    text-align: center;
}

.cert-logo img {
    max-width: 180px;
    height: auto;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .certificacion {
        flex-direction: column;
        text-align: center;
    }

    .cert-logo {
        margin-top: 15px;
    }
}



.contacto {
    display: flex;
    gap: 20px;
    align-items: center;
    max-width: 1050px;
    margin: auto;
    padding: 40px;
    flex-wrap: wrap; /* para que sea responsive */
    /* background: #fff; */
    /* border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05); */
    margin-bottom: 30px;
    scroll-margin-top: 12px; /* ajusta el valor = altura navbar + 20px extra */
}


.contac-texto {
    flex: 1 1 300px;
    max-width: 500px;
    margin-left: 27px;
}

.contac-texto h2 {
    /* color: #003366; */
    margin-top: 5px;
    margin-bottom: 10px;
}

.contac-texto p {
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 10px 0;
}

.contac-texto select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border 0.3s ease;
    background-color: #ffffff;
    color: #877587; /* color inicial (placeholder) */
}

/* color gris SOLO en el option placeholder */
.contac-texto select option[disabled] {
    color: #877587;
}


.contac-logo {
    flex: 1 1 300px;
    text-align: center;
    padding-right: 10px;
    /* max-width: 317px; */
}

.contac-logo img {
    max-width: 380px;
    height: auto;
}

.logo-contacto {
    max-width: 466px !important;
    display: block;
    margin: auto;
    height: 100%;
}


/* Responsive para tablets */
@media (max-width: 768px) {
    .contacto {
        flex-direction: column;
        text-align: center;
        padding: 20px 10px; /* margen lateral */
    }

    .contac-texto {
        flex: 1 1 100%;
        max-width: 100%;
        margin: 0 10px; /* margen lateral de 10px */
    }

    .contac-texto form input,
    .contac-texto form select,
    .contac-texto form textarea,
    .contac-texto form button {
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 12px;
    }

    .contac-logo {
        margin-top: 20px;
        padding: 0 10px; /* margen lateral */
    }

    .contac-logo img {
        width: 100%;
        max-width: none; /* quitar límite */
        border-radius: 16px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.8);
    }
}

/* Ajustes extra para móviles pequeños */
@media (max-width: 480px) {
    .contacto {
        padding: 15px 10px;
    }

    .contac-texto {
        margin: 0 10px;
    }

    .contac-logo {
        margin-top: 15px;
    }
}




/* ===== Contenedor ===== */
.faq {
  max-width: 1000px;
  margin: 0px auto;
  padding: 20px;
  scroll-margin-top: 40px;
  /* text-align: center; */
  /* font-family: 'Segoe UI', Tahoma, sans-serif; */
}

.faq h2 {
  /* font-size: 2rem; */
  margin-bottom: 30px;
  /* color: #222; */
  /* font-weight: 600; */
  /* position: relative; */
}


/* ===== Cada tarjeta ===== */
.faq-item {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  margin: 15px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
  border-color: #0056b3;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}



/* ===== Pregunta ===== */
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.90rem;
  color: #333;
  padding: 15px 20px;
}

.faq-question .icon {
  width: 20px;
  height: 20px;
  color: #0056b3;
  transition: transform 0.3s ease;
  transform: rotate(0deg);
  transform-origin: center;   /* <- clave */
  transform-box: fill-box;    /* <- clave para SVG */
}

/* cuando está activa */
.faq-item.active .faq-question .icon{
  transform: rotate(90deg);
}

/* ===== Respuesta ===== */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 20px;
  transition: all 0.4s ease;
}

.faq-answer p {
  margin: 12px 0 15px;
  line-height: 1.6;
  font-size: 0.95rem;
  color: #444;
}

.faq-item.active .faq-answer {
  max-height: 500px; /* suficiente para cualquier respuesta */
  opacity: 1;
}







/* GALERIA IMAGENES */

.gallery {
  padding: 60px 20px;
  background: #f8f9fa;
  text-align: center;
}

.gallery h2 {
  /* font-size: 2rem; */
  margin-bottom: 30px;
  text-align: left !important;
  /* color: #333; */
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
}

.gallery-item {
  width: 100%;
  height: 120px;           /*  altura fija para la celda */
  overflow: hidden;        /*  oculta lo que sobresalga */
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;           /*  asegura que la imagen se estire bien */
  align-items: center;
  justify-content: center;
}

.gallery-item img {
  width: 100%;
  height: 100%;            /*  ocupa toda la celda */
  object-fit: cover;       /*  recorte sin deformar */
  transition: transform .3s ease;
}

.gallery-item:hover img {
    cursor: pointer;
    transform: scale(1.1);
}



.gallery-carousel {
  padding: 50px 20px;
  background: #f8f9fa;
  text-align: left;
}

.gallery-carousel h2 {
  /* font-size: 2rem; */
  margin-bottom: 25px;
  /* color: #333; */
}

.carousel-container {
  position: relative;
  max-width: 1100px; /* antes 900px → +200px (100px a cada lado) */
  margin: 0 auto;
  overflow: hidden;
  padding: 0 100px; /* área extra a derecha e izquierda */
  box-sizing: border-box;
}

.carousel-track-container {
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
}

.carousel-item {
  flex: 0 0 calc(25% - 10px); /* 4 por fila en desktop, restamos el gap */
  margin-right: 10px;         /* el espacio entre items */
  box-sizing: border-box;
}

.carousel-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.carousel-item img:hover {
  transform: scale(1.05);
}


.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10;
  transition: background 0.3s, transform 0.3s;
}

.carousel-btn:hover {
  background: rgba(0,0,0,0.8);
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

/* Responsive */
@media (max-width: 768px) {
  .carousel-item {
    min-width: 50%; /* 2 miniaturas en tablets */
  }
}

@media (max-width: 480px) {
  .carousel-item {
    min-width: 100%; /* 1 miniatura en móviles */
  }
  
}

/* === Responsive === */
@media (max-width: 768px) {
  .carousel-btn {
    font-size: 1.5rem;
    padding: 0.4rem 0.8rem;
  }

  .carousel-btn.prev {
    left: -0.0rem; /* más cerca del borde */
  }

  .carousel-btn.next {
    right: -0.0rem;
  }
}


/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.lightbox.show {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Centrar imagen con margen automático */
.lightbox img {
  max-width: 90%;
  max-height: 80%;
  display: block;
  margin: auto;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.lightbox .close {
  position: absolute;
  top: 5px;
  right: 35px;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
  transition: color 0.3s ease;
}

.lightbox .close:hover {
  color: #BABBB7;
}

/* Botones de navegación lightbox */
/* Botones estilo profesional */
.lightbox-btn.prev,
.lightbox-btn.next {
  position: fixed;                /* fijados a la ventana completa */
  top: 50%;
  transform: translateY(-50%);
  font-size: 4rem;                /* tamaño grande pero balanceado */
  font-weight: bold;
  color: #fff;
  background: rgba(0,0,0,0.6);    /* fondo más visible */
  border-radius: 50%;
  width: 70px;                    /* tamaño uniforme */
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  z-index: 10000;
  transition: background 0.3s, transform 0.3s;
}

.lightbox-btn.prev { left: 50px; }
.lightbox-btn.next { right: 50px; }

.lightbox-btn.prev:hover,
.lightbox-btn.next:hover {
  background: #181818;
  color: #BABBB7;
  transform: translateY(-50%) scale(1.15);
  cursor: pointer;
}


/* Mostrar botones cuando el mouse entra en lightbox */
.lightbox:hover .lightbox-btn {
  opacity: 1;
  pointer-events: auto;
}


/* Contenedor general */
#whatsapp-container {
    position: fixed;
    top: 74%;
    right: 0;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Cada tab */
.whatsapp-tab {
    background-color: #26E851;
    padding: 5px 10px;
    border-radius: 10px 0 0 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    text-align: center;
    min-width: 60px;
    position: relative;
}

.whatsapp-tab:hover {
    background-color: #26E851;
    transform: translateX(-10px); /* se desplaza 10px hacia afuera */
}

/* Icono */
.whatsapp-tab i {
    font-size: 26px;
    color: white;
    transition: transform 0.3s ease;
}

/* Label */
.whatsapp-label {
    display: block;
    font-size: 12px;
    font-weight: bold;
    color: white;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

/* Tooltip */
.whatsapp-link::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 110%;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.whatsapp-link:hover::after {
    opacity: 1;
}

/* ===== Responsive moviles ===== */
@media (max-width: 768px) {
    #whatsapp-container {
        top: 55%;                /* sigue centrado en la ventana */
        transform: translateY(-50%);
    }

    .whatsapp-tab i {
        font-size: 22px;         /* iconos más pequeños */
    }

    .whatsapp-label {
        font-size: 10px;         /* texto más pequeño */
    }

    /* En móvil eliminamos efecto flotante para no tapar contenido */
    .whatsapp-tab:hover {
        transform: none;
    }
}


/* ===== Responsive tablets ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    #whatsapp-container {
        top: 35%;               /* margen desde el header */
        bottom: auto;            
        right: 0;
        transform: translateY(-50%);
    }

    .whatsapp-tab i {
        font-size: 24px;
    }

    .whatsapp-label {
        font-size: 11px;
    }

    .whatsapp-tab:hover {
        transform: translateX(-10px);
    }
}










 /* para la respuesta de mensajes  */
#form-mensaje {
  min-height: 40px;             /* altura fija suficiente para cualquier mensaje */
  padding: 10px;                 /* padding constante */
  border-radius: 6px;
  font-size: 14px;

  /* siempre con border y background, solo cambia el color */
  border: 1px solid transparent; 
  background-color: transparent;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;

}

#form-mensaje.exito {
  opacity: 1;
  visibility: visible;
  background-color: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

#form-mensaje.error {
  opacity: 1;
  visibility: visible;
  background-color: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
  .contacto {
    flex-direction: column;
    text-align: center;
  }

  .contac-logo {
    margin-top: 15px;
  }
}


/*-----------------  F O O T E R  -------------------*/

.footer {
  background: #434AFE;
  color: #f1f5f9;
  padding: 25px 20px 20px;
  font-family: Arial, sans-serif;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 40px; /* Máximo 40px entre bloques */
  justify-content: flex-start;
}

.footer-block {
  flex: 1;
  min-width: 250px;
  text-align: left;
}

.footer-block h3 {
  color: #fff;
  font-size: 20px;
  margin-bottom: 15px;
}

.enlaces-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  line-height: 1.8;
}

.enlaces-footer a {
  color: #f1f5f9;
  text-decoration: none;
}

.enlaces-footer a:hover {
  text-decoration: underline;
}

/* Redes sociales */
.redes-footer {
  text-align: center;
}

.redes-footer .social-icons {
  display: flex;
  gap: 25px;
  justify-content: center;
  margin-top: 10px;
}

.social-icon-footer {
    font-size: 28px;
    color: #FFFFFF;       /* Color inicial */
    transition: color 0.3s ease, 
                transform 0.3s ease; /* Animaciones suaves */
    margin: 10px;
    text-decoration: none;
    display: inline-block;
}

/* Efecto hover */
.social-icon-footer:hover {
    color: #E8F300;   /* Color al pasar mouse */
    transform: scale(1.2); /* Zoom suave */
}


/* .social-icon-footer {
  font-size: 28px;
  color: #f1f5f9;
  transition: color 0.3s ease;
}

.social-icon-footer:hover {
  color: #e0f2fe;
} */

/* Certificación */
.cert-logo {
  margin-top: 30px;
  text-align: center;
}

.cert-logo h3 {
  margin-bottom: 15px;
}

.cert-logo img {
  max-width: 200px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

/* Línea inferior */
.footer-bottom {
  margin-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.3);
  padding-top: 20px;
  text-align: center;
  font-size: 14px;
  color: #e0f2fe;
}

/* Responsive tablets y móviles */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-block {
    min-width: 100%;
  }

  .enlaces-footer ul {
    text-align: left;
  }

  .enlaces-footer li {
    margin: 5px 0;
  }
}

/*-----------------------  F I N    F O O T E R  ----------------------------*/


/* Evita que algún hijo empuje la barra fuera del viewport */
.top-bar, .top-bar-content { max-width: 100vw; box-sizing: border-box; }
.top-bar-content { width: 100%; }

/* Asegura que el botón no se comprima ni desaparezca */
.menu-toggle { flex: 0 0 auto; }

/* Permite que el nav se encoja y no fuerce scroll horizontal */
.top-links { min-width: 0; }

/* En móvil, garantizamos que el menú esté oculto hasta abrirlo */
@media (max-width: 768px) {
  .top-links { display: none !important; }
  .top-links.active { display: flex !important; }
}


