/* ================================
   RESET Y CONFIGURACIÓN GENERAL
   ================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth; /* Scroll suave */
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #f7f7f7;
  color: #2b2b2b;
  line-height: 1.6;
}

/* Paleta principal – colores institucionales */
:root {
  --color-primary: #4BA6C1;
  --color-primary-dark: #3a93aa;
  --color-accent: #2e8daf;
  --color-white: #ffffff;

  /* Sombras suaves */
  --shadow-soft: 0 4px 12px rgba(0,0,0,0.10);
  --shadow-medium: 0 10px 25px rgba(0,0,0,0.15);

  --radius-soft: 6px;
  --radius-medium: 10px;
  --radius-full: 999px;
}

/* ================================
   HEADER / MENÚ SUPERIOR
   ================================ */

header {
  background-color: var(--color-primary);
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
}

.logo {
  max-width: 140px;
}

/* Menú (mobile-first: como panel desplegable) */
#navbar {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: var(--color-primary);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.5rem 1.5rem 1rem;
  gap: 0.3rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.25s ease;
}

#navbar a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: .35rem 0;
  border-radius: 4px;
  transition:
    background-color .25s ease,
    transform .15s ease;
}

/* Estado abierto del menú en mobile */
#navbar.open {
  max-height: 260px;
  opacity: 1;
}

#navbar a:hover,
#navbar a.active {
  background-color: rgba(255, 255, 255, .18);
  transform: translateY(-1px);
}

/* Botón hamburguesa (visible en mobile) */
.menu-toggle {
  display: block;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.7rem;
  cursor: pointer;
}

/* ================================
   SECCIÓN HERO / CARRUSEL
   ================================ */

.hero {
  position: relative;
  text-align: center;
  overflow: hidden;

  /* ANULA el padding general de las secciones para que
     la tarjeta no se salga de la imagen */
  padding: 0;
  margin-bottom: 3rem; /* espacio hacia la sección siguiente */
}

section {
  padding: 3rem 1rem;
  text-align: center;
}

/* El carrusel va de fondo */
.hero-slider {
  position: relative;
  height: 360px;          /* altura base (mobile) */
  z-index: 1;
}

.hero-slider .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.8);
}

/* El texto siempre por encima de las imágenes */
.hero-content {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  padding: 1.6rem 1.4rem;
  border-radius: 10px;
  max-width: 90%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: .8rem;
}

.hero p {
  font-size: 1.05rem;
}

/* ================================
   SECCIONES GENERALES
   ================================ */

section {
  padding: 3rem 1rem;
  text-align: center;
}

h2 {
  color: var(--color-primary);
  font-size: 2rem;
  margin-bottom: .8rem;
}

.descripcion {
  max-width: 800px;
  margin: 0 auto 2rem auto;
  font-size: 1rem;
}

/* ================================
   CERTIFICADOS (QUIÉN SOY)
   ================================ */

.certificados {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.card img {
  width: 180px;
  border-radius: var(--radius-soft);
  box-shadow: var(--shadow-soft);
  transition:
    transform .3s ease,
    box-shadow .3s ease;
}

.card img:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-medium);
}

/* ================================
   SERVICIOS
   ================================ */

ul {
  list-style: none;
  padding: 0;
  max-width: 500px;
  margin: 0 auto;
}

ul li {
  font-size: 1.1rem;
  margin: .5rem 0;
}

/* ================================
   SECCIÓN FORMACIÓN / ESTUDIOS
   ================================ */

.formacion-grid {
  margin-top: 2rem;
  display: grid;
  gap: 1.5rem;
}

.formacion-card {
  background-color: white;
  padding: 1rem;
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-soft);
  transition:
    transform .25s ease,
    box-shadow .25s ease;
}

.formacion-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.formacion-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-soft);
  margin-bottom: .8rem;
}

/* =====================================
   BOTÓN HTML DE "RESERVAR TURNO"
   ===================================== */

.btn-turno {
  display: inline-block;
  padding: 1rem 2.2rem;
  background: linear-gradient(135deg, #4BA6C1, #2e8daf);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.2rem;
  border-radius: 50px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.20);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

/* Animación hover moderna */
.btn-turno:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 16px 32px rgba(0,0,0,0.28);
  background: linear-gradient(135deg, #5fc0dd, #3ba2bd);
}

/* =====================================
   ICONOS DE REDES SOCIALES (Bootstrap Icons)
   ===================================== */

.redes-sociales {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.redes-sociales a {
  font-size: 2rem; /* tamaño de los íconos */
  color: var(--color-primary);
  text-decoration: none;
  transition: transform 0.25s ease, color 0.25s ease;
}

.redes-sociales a:hover {
  transform: translateY(-3px);
  color: var(--color-primary-dark);
}

/* ================================
   SECCIÓN UBICACIÓN (MAPAS)
   ================================ */

.mapas {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mapa h3 {
  margin-bottom: .4rem;
  color: var(--color-primary);
}

.mapa iframe {
  width: 100%;
  height: 250px;
  border: none;
  border-radius: var(--radius-soft);
  box-shadow: var(--shadow-soft);
}

/* ================================
   FORMULARIO DE CONTACTO + CAPTCHA
   ================================ */

form {
  max-width: 500px;
  margin: 0 auto 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

form input,
form textarea {
  padding: .8rem;
  border-radius: var(--radius-soft);
  border: 1px solid #bbbbbb;
  font-size: 1rem;
}

form textarea {
  height: 120px;
  resize: none;
}

form button {
  padding: .9rem;
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-soft);
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  transition:
    background-color .2s ease,
    transform .2s ease;
}

form button:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
}

/* Captcha */
.captcha-group {
  text-align: left;
  font-size: .95rem;
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: .6rem;
}

#captcha-pregunta {
  font-weight: bold;
  color: var(--color-primary);
}

#captcha-respuesta {
  width: 120px;
}

/* ================================
   FOOTER
   ================================ */

footer {
  background-color: var(--color-primary);
  color: white;
  padding: 1rem;
  text-align: center;
  margin-top: 2rem;
}

/* ================================
   WHATSAPP FLOTANTE
   ================================ */

.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  z-index: 999;
  transition:
    transform .25s ease,
    box-shadow .25s ease;
}

.whatsapp-float img {
  width: 100%;
}

.whatsapp-float:hover {
  transform: scale(1.07);
  box-shadow: var(--shadow-medium);
}

/* ================================
   RESPONSIVE
   ================================ */

/* Tablet y desktop */
@media (min-width: 768px) {
  /* Header en fila, menú visible y sin panel */
  #navbar {
    position: static;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0;
    gap: 12px;
    max-height: none;
    opacity: 1;
    background-color: transparent;
  }

  .menu-toggle {
    display: none;
  }

  .hero-slider {
    height: 480px;
  }

  .hero-slider .swiper-slide img {
    height: 100%;
  }

  .hero-content {
    max-width: 700px;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero p {
    font-size: 1.2rem;
  }

  .formacion-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .mapas {
    flex-direction: row;
  }

  .mapa {
    width: 32%;
  }
}

/* Desktop grande */
@media (min-width: 1024px) {
  .hero h1 {
    font-size: 3.1rem;
  }
  .hero p {
    font-size: 1.3rem;
  }
}
