/* ==========================================================================
   Academia Simaer — hoja de estilos unificada
   Sustituye a los estilos inline y duplicados que había en cada página.
   ========================================================================== */

:root {
  /* Paleta de marca */
  --color-primario: #0086d7;
  --color-primario-oscuro: #005f9e;
  --color-secundario: #7f0409;
  --color-oscuro: #1b1b1b;
  --color-claro: #f0f7fb;
  --color-texto: #2b2b2b;
  --color-texto-claro: #ffffff;
  --color-muted: #7a7b7b;

  /* Colores de acento por curso — mismo tono de saturación/luz para que
     parezcan una paleta diseñada y no colores sueltos */
  --accent-primaria: #c2185b;
  --accent-secundaria: #0086d7;
  --accent-bachillerato: #7b1fa2;
  --accent-evau: #e64a19;
  --accent-acceso: #00897b;
  --color-whatsapp: #25d366;
  --color-whatsapp-oscuro: #1da851;

  /* Tipografía */
  --font-titulos: 'Poppins', 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-texto: 'Mulish', 'Segoe UI', Helvetica, Arial, sans-serif;

  /* Espaciado */
  --seccion-gap: 6rem;
  --seccion-gap-sm: 3rem;
  --radio: 14px;
}

/* --------------------------------------------------------------------
   Base
   -------------------------------------------------------------------- */

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-texto);
  color: var(--color-texto);
}

:focus-visible {
  outline: 3px solid var(--color-primario);
  outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-titulos);
  font-weight: 700;
}

a {
  transition: opacity .15s ease-in-out;
}

/* Todos los párrafos justificados del sitio pasaban a bloques irregulares
   en móvil: se alinean a la izquierda en todas partes. */
.text-justify {
  text-align: left !important;
}

/* --------------------------------------------------------------------
   Espaciado de secciones (sustituye a los <div style="height:100px;">.</div>)
   -------------------------------------------------------------------- */

.section-spacer {
  height: var(--seccion-gap);
}

@media (max-width: 950px) {
  .section-spacer {
    height: var(--seccion-gap-sm);
  }
}

/* --------------------------------------------------------------------
   Botones de marca (sustituyen a los badges usados como botones)
   -------------------------------------------------------------------- */

.btn-simaer {
  display: inline-block;
  font-family: var(--font-titulos);
  font-weight: 600;
  padding: .65rem 1.75rem;
  border-radius: 50px;
  border: none;
  color: var(--color-texto-claro);
  background-color: var(--color-primario);
  text-decoration: none;
  transition: background-color .15s ease-in-out, transform .15s ease-in-out;
}

.btn-simaer:hover,
.btn-simaer:focus {
  background-color: var(--color-primario-oscuro);
  color: var(--color-texto-claro);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-simaer-light {
  background-color: #fff;
  color: var(--color-primario);
}

.btn-simaer-light:hover,
.btn-simaer-light:focus {
  background-color: var(--color-claro);
  color: var(--color-primario-oscuro);
}

.btn-simaer-outline {
  background-color: transparent;
  border: 2px solid currentColor;
  color: inherit;
}

.btn-simaer-outline:hover,
.btn-simaer-outline:focus {
  background-color: currentColor;
}
.btn-simaer-outline:hover *,
.btn-simaer-outline:focus * {
  color: #fff;
}

/* Enlace de WhatsApp junto a las llamadas a la acción principales */
.btn-whatsapp-inline {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: .85rem;
  padding: .5rem 1.25rem;
  border-radius: 50px;
  background-color: var(--color-whatsapp);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .15s ease-in-out, transform .15s ease-in-out;
}

.btn-whatsapp-inline:hover,
.btn-whatsapp-inline:focus {
  background-color: var(--color-whatsapp-oscuro);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-whatsapp-inline i {
  font-size: 1.15rem;
}

.btn-whatsapp-inline--lg {
  margin-top: 0;
  padding: .85rem 1.75rem;
  font-size: 1.05rem;
}

/* Tarjeta de contacto por WhatsApp (sustituye al formulario que dependía
   de la base de datos) */
.whatsapp-card {
  background-color: var(--color-claro);
  border-left: solid 4px var(--color-whatsapp);
  border-radius: var(--radio);
  padding: 1.75rem;
}

.whatsapp-card h2 {
  margin-bottom: .5rem;
}

.whatsapp-card p {
  color: var(--color-muted);
  margin-bottom: 1.25rem;
}

/* Botón flotante de WhatsApp, visible en todas las páginas */
.whatsapp-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1030;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background-color: var(--color-whatsapp);
  color: #fff;
  font-size: 1.75rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
  transition: transform .15s ease-in-out, background-color .15s ease-in-out;
}

.whatsapp-float:hover,
.whatsapp-float:focus {
  background-color: var(--color-whatsapp-oscuro);
  color: #fff;
  transform: scale(1.08);
}

@media only screen and (max-width: 950px) {
  .whatsapp-float {
    width: 52px;
    height: 52px;
    font-size: 1.55rem;
    right: 1rem;
    bottom: 1rem;
  }
}

/* --------------------------------------------------------------------
   Horario
   -------------------------------------------------------------------- */

.horario-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  margin: 2.5rem auto;
  padding: 1.5rem 2rem;
  max-width: 780px;
  background: var(--color-claro);
  border-radius: var(--radio);
  border-left: solid 4px var(--color-primario);
}

.horario-banner__item {
  display: flex;
  align-items: center;
  gap: .85rem;
  text-align: left;
}

.horario-banner__item i {
  font-size: 1.75rem;
  color: var(--color-primario);
}

.horario-banner__item strong {
  display: block;
  font-family: var(--font-titulos);
  color: var(--color-texto);
}

.horario-banner__item span {
  color: var(--color-muted);
}

.horario-banner__divider {
  width: 1px;
  align-self: stretch;
  background-color: rgba(0, 0, 0, .1);
}

@media only screen and (max-width: 576px) {
  .horario-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
  .horario-banner__divider {
    display: none;
  }
}

/* --------------------------------------------------------------------
   Tarjetas de cursos (sustituyen al bloque .media desalineado)
   -------------------------------------------------------------------- */

.curso-card {
  position: relative;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: #fff;
  border-radius: var(--radio);
  padding: 1.25rem;
  padding-right: 3rem;
  height: 100%;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .06);
  transition: transform .15s ease-in-out, box-shadow .15s ease-in-out;
}

.curso-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .1);
}

.curso-card__img {
  width: 40%;
  min-width: 110px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

.curso-card__body h3 {
  font-size: 1.4rem;
  margin-bottom: .5rem;
}

/* Tarjeta completamente clicable: el enlace real es invisible y cubre
   toda la tarjeta (sin necesidad de un "+info" de texto). */
.stretched-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.curso-card__arrow {
  position: absolute;
  right: 1.1rem;
  bottom: 1.1rem;
  font-size: 1.4rem;
  opacity: .55;
  transition: transform .15s ease-in-out, opacity .15s ease-in-out;
}

.curso-card:hover .curso-card__arrow {
  opacity: 1;
  transform: translateX(3px);
}

/* --------------------------------------------------------------------
   Animación de entrada al hacer scroll (progressive enhancement:
   la clase .reveal-on-scroll solo la añade el JS, así que sin JS o si
   IntersectionObserver falla, las tarjetas se ven normal desde el inicio).
   -------------------------------------------------------------------- */

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease-out, transform .6s ease-out;
  transition-delay: var(--reveal-delay, 0s);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 576px) {
  .curso-card {
    flex-direction: column;
  }
  .curso-card__img {
    width: 100%;
    aspect-ratio: 16 / 9;
  }
}

/* --------------------------------------------------------------------
   Cabecera / navegación
   -------------------------------------------------------------------- */

#main_logo img {
  width: 45%;
  max-width: 260px;
  height: auto;
}

@media only screen and (max-width: 950px) {
  .datitos {
    font-size: 11.5px;
  }
  #main_logo img {
    width: 80%;
  }
}

ul.icon {
  list-style-type: none;
}

/* Degradado sutil detrás del menú fijo para que el texto blanco se lea
   bien encima de cualquier foto de fondo, sin cambiar el diseño transparente. */
nav.navbar.fixed-top::before {
  content: "";
  position: absolute;
  top: -1rem;
  left: 0;
  right: 0;
  height: calc(100% + 1rem);
  background: linear-gradient(to bottom, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0));
  z-index: -1;
  pointer-events: none;
}

/* El ancla de "Cursos" no debe quedar tapada por el menú fijo al hacer scroll */
#cursos {
  scroll-margin-top: 6.5rem;
}

/* Tipografía fluida para los títulos de cabecera: escala suavemente
   entre móvil y escritorio en vez de saltar solo en el breakpoint. */
#cabecera h1 {
  font-size: clamp(1.9rem, 4vw + 1rem, 3rem);
}

/* --------------------------------------------------------------------
   Formularios
   -------------------------------------------------------------------- */

.campo-requerido {
  color: var(--color-secundario);
}

/* --------------------------------------------------------------------
   Utilidades responsive
   -------------------------------------------------------------------- */

.mapa-responsive {
  position: relative;
  width: 100%;
  padding-bottom: 65%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radio);
}

.mapa-responsive iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media only screen and (max-width: 950px) {
  .hide-sm { display: none; }
}
@media only screen and (min-width: 950px) {
  .hide-md { display: none; }
}
@media only screen and (max-width: 950px) {
  .hide { display: none; }
}

/* --------------------------------------------------------------------
   Cabecera móvil: el menú fijo se solapaba con el título de la cabecera
   en todas las páginas interiores (el truco de margin-top negativo para
   la imagen de fondo dejaba el contenido justo debajo del logo/menú).
   -------------------------------------------------------------------- */

@media only screen and (max-width: 950px) {
  #cabecera {
    padding-top: 10rem !important;
  }

  .row.hide-md > .col {
    margin-top: 0 !important;
  }
}
