/* ===================================================================
   MIDO 1000 DÍAS – index.css (OPTIMIZADO / ORDENADO POR SECCIÓN)
   - Coherencia responsive: TODAS las secciones (incl. HOME y AVISOS)
     pasan a columna en <=1024px.
   - HOME móvil: contador -> texto -> imagen
   - Anclas: scroll-margin-top para header fijo
=================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700;800;900&display=swap');

/* =========================
   RESET / BASE
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  scroll-behavior: smooth;
  font-family: 'Open Sans', sans-serif;
}

:root {
  --bg-color: #fdfdfd;
  --text-color: #fdfdfd;

  --gold: #B69159;
  --green: #036254;
  --green-dark: #216254;
  --green-header: #0C5C4C;
  --brown: #5a3e3e;

  /* Header fijo */
  --header-safe: 14rem;
}

html {
  font-size: 62.5%;
  overflow-x: hidden;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
}

/* =========================
   HEADER / NAV (FIJO)
========================= */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  position: fixed;
  top: 0;
  left: 0;
  width: 100%;

  background-color: #fdfdfd;
  z-index: 1000;

  padding: 2rem;
  border-bottom: 2px solid #2a826d;
}

.logo {
  max-width: 15%;
}

.nav-list {
  list-style-type: none;
  display: flex;
  gap: 2rem;
}

.nav-list a,
.nav-list li a {
  color: var(--brown);
  font-size: 1.6rem;
  font-weight: 600;
  text-decoration: none;
}

.abrir-menu,
.cerrar-menu {
  display: none;
}

/* =========================
   SECCIONES (GENÉRICO)
========================= */
section {
  min-height: 100vh;
  padding: 10rem 7% 2rem;
}

/* Anclas: evitar que el header tape títulos */
#avisos,
#home,
#capacitacion,
#seminarios,
#contacto {
  scroll-margin-top: var(--header-safe);
}

/* =========================
   HOME
========================= */
.home {
  position: relative;
  background-color: #ffffff;
  overflow: hidden;

  /* section ya da padding, aquí reforzamos top por header fijo */
  padding: 10rem 5%;
}

.home::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('../img/fondo_portada.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: bottom center;
  opacity: 0.2;
  z-index: 1;
}

.home::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 6px;
  width: 100%;
  background-color: var(--green-header);
  box-shadow: 0 calc(100% - 6px) 0 var(--green-header);
  z-index: 2;
}

.home>* {
  position: relative;
  z-index: 3;
}

/* Layout principal (DESKTOP: horizontal) */
.contenedor-flex-home {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding: 2rem 1rem;
}

/* Columna texto */
.contenido-home {
  flex: 1 1 55%;
  max-width: 80rem;
}

.contenido-home h1 {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 2rem;
  line-height: 1.1;
  color: var(--gold);
}

.contenido-home .texto-titulo {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 2rem;
  line-height: 1.6;
  color: var(--green-dark);
}

.contenido-home .texto-texto {
  font-size: 1.8rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--green-dark);
}

.contenido-home .texto-subtitulo {
  font-size: 1.8rem;
  font-weight: 900;
  margin-top: 2rem;
  line-height: 1.6;
  color: var(--green-dark);
}

/* Widget visitas */
#widget-visitas {
  flex: 0 0 auto;
  align-self: flex-start;
  min-width: 160px;
}

.widget-visitas {
  background-color: var(--green-header);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  text-align: center;
  display: inline-block;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);
  border: 2px solid var(--gold);
  max-width: 200px;
}

.widget-visitas span.titulo-visitas {
  display: block;
  font-size: 1.5rem;
}

.widget-visitas strong {
  font-size: 2rem;
  color: var(--gold);
}

/* Columna imagen */
.contenedor-comunidad {
  flex: 0 0 40%;
  max-width: 80rem;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2rem;
}

.logos-home {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.logo-home {
  height: 14rem;
  width: auto;
  object-fit: contain;
}

.imagen-comunidad2 {
  border-radius: 50%;
  object-fit: cover;
  width: 90%;
  height: auto;
  border: 4px solid var(--gold);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* =========================
   NUEVA SECCIÓN: BANNER SEMINARIOS (INCRUSTADA)
   - MISMO FONDO QUE (ANTES) CAPACITACIÓN
   - FIX: evitar “franja blanca” (fondo body) entre secciones
   - ✅ AJUSTE: reducir altura total un 10% (menos padding vertical)
========================= */
.banner-seminarios {
  position: relative;
  overflow: hidden;

  /* IMPORTANTE: anular por completo el section genérico */
  min-height: auto !important;

  /* ✅ Antes: padding 6rem 5% 6rem
     ✅ Ahora: 10% menos en alto => 5.4rem arriba y 5.4rem abajo */
  padding: 5.4rem 5% 5.4rem !important;

  /* Fondo base */
  background-color: var(--green-dark);
}

/* Pintamos el fondo verde como overlay (igual que home) para que cubra TODO */
.banner-seminarios::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('../img/fondo_portada_verde.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  opacity: 0.90;
  z-index: 1;
}

/* El contenido del banner (el include) arriba del fondo */
.banner-seminarios > * {
  position: relative;
  z-index: 2;
}

/* =========================
   ALIADOS
========================= */
.aliados {
  background: linear-gradient(to bottom, #e4d5bd 0%, #ffffff 100%) !important;
  padding: 1rem 0 !important;
  min-height: auto !important;
}

.aliados-row--main {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: space-between !important;
  gap: 1rem;
  width: 95%;
  margin: 1.5rem auto 0 auto !important;
}

.aliados-row--secundario {
  display: flex !important;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem auto 1rem auto !important;
  justify-content: center;
  width: 95%;
}

.aliado {
  flex: 0 1 auto !important;
  position: relative;
}

.aliado img {
  height: clamp(44px, 8vw, 80px);
  width: auto;
  object-fit: contain;
  display: block;
}

/* Separadores (solo pantallas medianas/grandes) */
.aliado:not(:first-child)::before {
  content: "";
  position: absolute;
  left: -0.75rem;
  top: 10%;
  height: 80%;
  border-left: 2px solid var(--gold);
}

@media (max-width:575px) {
  .aliado:not(:first-child)::before {
    display: none;
  }
}

@media (max-width:991.98px) {

  .aliados-row--main,
  .aliados-row--secundario {
    justify-content: center;
    gap: 2rem;
  }

  .aliado:not(:first-child)::before {
    display: none;
  }
}

@media (min-width:992px) {
  .aliados-row--main .aliado {
    flex: 1 1 0;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .aliados-row--secundario {
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 3rem;
  }

  .aliados-row--secundario .aliado:not(:first-child)::before {
    left: -1.5rem;
  }
}

/* =========================
   AVISOS
========================= */
.avisos {
  position: relative;
  overflow: hidden;
  background-color: #fff;
  min-height: auto !important;
  padding: 6rem 5% 6rem !important;
}

.avisos::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('../img/fondo_portada.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.2;
  z-index: 1;
}

.avisos>* {
  position: relative;
  z-index: 2;
}

.titulo-avisos {
  text-align: center;
  font-size: 3.7rem;
  font-weight: 900;
  color: #2a826d;
  margin: 0 !important;
  padding-bottom: 2.5rem;
  letter-spacing: 0.05rem;
}

.avisos-contenedor {
  width: 100%;
  max-width: 150rem;
  margin: 0 auto;
  padding: 1.5rem;
  border-radius: 1.6rem;
  background: rgba(255, 255, 255, 0.06);
}

/* Fallback de altura si algo no trae height */
.avisos-contenedor>* {
  min-height: 38rem;
}

/* Altura real del carrusel */
.avisos-contenedor .m1000-avisos {
  height: 59rem !important;
}

/* =========================
   CAPACITACIÓN (MIDO 1000 DÍAS)
   - CAMBIO: ahora usa el mismo fondo del HOME (blanco + overlay)
   - CAMBIO: texto en color negro
========================= */
.capacitacion {
  position: relative;
  background-color: #ffffff;
  overflow: hidden;

  /* section ya da padding, aquí reforzamos top por header fijo */
  padding: 10rem 5%;
}

/* Copiar el mismo fondo/overlay del HOME */
.capacitacion::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('../img/fondo_portada.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: bottom center;
  opacity: 0.2;
  z-index: 1;
}

/* Copiar la línea superior del HOME */
.capacitacion::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 6px;
  width: 100%;
  background-color: var(--green-header);
  box-shadow: 0 calc(100% - 6px) 0 var(--green-header);
  z-index: 2;
}

/* Mantener el contenido arriba del fondo */
.capacitacion > * {
  position: relative;
  z-index: 3;
}

.capacitacion-contenido {
  display: flex;
  justify-content: center;
  padding-top: 4rem;
}

.capacitacion-contenido h2 {
  color: #000000;
  text-align: center;
  font-size: 5rem;
  font-weight: 900;
  line-height: 1.3;
  margin: 0;
}

.capacitacion-apartados {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 5rem;
  padding: 4rem 5%;
  flex-wrap: wrap;
}

.apartado-izquierdo-capacitacion {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.imagen-capacitacion {
  width: 100%;
  max-width: 450px;
  border-radius: 50%;
  height: auto;
  display: block;
  margin: 0 auto;
  z-index: 1;
}

.boton-capacitacion {
  background-color: #ffffff;
  color: var(--green-dark);
  font-weight: 900;
  border: 3px solid var(--gold);
  padding: 2rem 4rem;
  border-radius: 5rem;
  font-size: 1.8rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;

  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  max-width: 90%;
  z-index: 2;

  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.boton-capacitacion:hover,
.boton-capacitacion:focus {
  background-color: #fdf7e7;
  color: var(--green-dark);
}

.apartado-derecho-capacitacion {
  flex: 1.5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
  padding-top: 2rem;
  color: #000000;
}

.apartado-derecho-capacitacion h3 {
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 1rem;
  color: #000000;
}

.texto-normal-capacitacion {
  font-size: 1.8rem;
  font-weight: 300;
  line-height: 1.6;
  color: #000000;
}

.texto-negrita-capacitacion {
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1.6;
  color: #000000;
}

/* =========================
   SEMINARIOS
========================= */
.seminarios {
  position: relative;
  overflow: hidden;
  background-color: #fff;
}

.seminarios::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('../img/fondo_portada.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.2;
  z-index: 1;
}

.seminarios-contenedor {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 4rem 2rem;
  gap: 6rem;
  background-color: transparent;
  align-items: stretch;
}

.seminarios-columna-texto {
  flex: 1;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.seminarios-columna-media {
  flex: 0 0 600px;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.seminarios-titulo {
  font-size: 4rem;
  color: var(--gold);
  font-weight: 900;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

.seminarios-texto {
  font-size: 2rem;
  color: var(--green-dark);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.seminarios-imagen-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
  margin-bottom: 6rem;
}

.seminarios-imagen {
  width: 100%;
  max-width: 60rem;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: .5rem solid var(--gold);
  display: block;
  margin: 0 auto;
  z-index: 1;
}

.seminarios-boton {
  background-color: #ffffff;
  color: var(--green-dark);
  font-weight: 900;
  border: 3px solid var(--gold);
  padding: 2rem 4rem;
  border-radius: 5rem;
  font-size: 1.8rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;

  position: absolute;
  bottom: -2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  max-width: 90%;

  z-index: 2;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.seminarios-boton:hover,
.seminarios-boton:focus {
  background-color: #fdf7e7;
  color: var(--green-dark);
}

/* =========================
   CONTACTO / SOPORTE
   - CAMBIO: ahora usa el mismo fondo de la (antigua) CAPACITACIÓN / BANNER
   - CAMBIO: letra en color blanco
========================= */
.contacto {
  position: relative;
  overflow: hidden;

  background-image: url('../img/fondo_portada_verde.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-color: var(--green-dark);

  padding: 10rem 5%;
}

.contacto::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('../img/fondo_portada_verde.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  opacity: 0.90;
  z-index: 1;
}

.contacto::after {
  content: none;
}

.contacto > * {
  position: relative;
  z-index: 3;
}

.contenedor-soporte {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 4rem 2rem;
  gap: 6rem;
  background-color: transparent;
  align-items: stretch;
}

.columna-texto {
  flex: 1;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.columna-formulario {
  flex: 0 0 600px;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.titulo-soporte {
  font-size: 4rem;
  color: #ffffff;
  font-weight: 900;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

.soporte-texto {
  font-size: 2rem;
  color: #ffffff;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.soporte-datos,
.soporte-asesores {
  padding-left: 2rem;
  font-size: 1.8rem;
  color: #ffffff;
  line-height: 1.6;
}

.soporte-datos {
  list-style: none;
}

.soporte-asesores {
  list-style-type: disc;
}

.soporte-datos li,
.soporte-asesores li {
  margin-bottom: 0.6rem;
}

.imagen-contacto-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
  margin-bottom: 6rem;
}

.imagen-contacto {
  width: 100%;
  max-width: 60rem;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: .5rem solid var(--gold);
  display: block;
  margin: 0 auto;
  z-index: 1;
}

.boton-contacto {
  background-color: #ffffff;
  color: var(--green-dark);
  font-weight: 900;
  border: 3px solid var(--gold);
  padding: 2rem 4rem;
  border-radius: 5rem;
  font-size: 1.8rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;

  position: absolute;
  bottom: -2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  max-width: 90%;

  z-index: 2;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.boton-contacto:hover,
.boton-contacto:focus {
  background-color: #fdf7e7;
  color: var(--green-dark);
}

/* =========================
   RESPONSIVE
   - Coherencia: en <=1024 TODO pasa a columna (incl. HOME)
========================= */
@media (max-width:1024px) {

  /* NAV */
  .abrir-menu,
  .cerrar-menu {
    display: block;
    font-size: 3rem;
    background-color: transparent;
    cursor: pointer;
  }

  .nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    background-color: #fdfdfd;
    padding: 2rem;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
  }

  .nav.visible {
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: end;
  }

  /* HOME: ya se vuelve columna (coherente con otras secciones) */
  .contenedor-flex-home {
    flex-direction: column;
    align-items: center;
    flex-wrap: nowrap;
  }

  /* Orden: contador -> texto -> imagen */
  #widget-visitas {
    order: -1;
    align-self: center;
    margin: 1.5rem auto 2rem auto;
  }

  .contenido-home {
    order: 0;
    max-width: 90%;
    text-align: center;
  }

  .contenedor-comunidad {
    order: 1;
    width: 100%;
    flex: 0 0 auto;
  }

  .contenido-home h1 {
    font-size: 3rem;
  }

  .contenido-home .texto-titulo,
  .contenido-home .texto-subtitulo,
  .contenido-home .texto-texto {
    font-size: 1.8rem;
  }

  .logo-home {
    height: 12rem;
  }

  .imagen-comunidad2 {
    width: 95%;
    max-width: 60rem;
  }

  /* AVISOS */
  .avisos {
    padding-top: 6rem !important;
  }

  .avisos-contenedor .m1000-avisos {
    height: 48rem !important;
  }

  /* CAPACITACIÓN */
  .capacitacion-apartados {
    flex-direction: column;
    align-items: center;
    gap: 4rem;
  }

  .imagen-capacitacion {
    max-width: 60%;
  }

  .boton-capacitacion {
    font-size: 1.4rem;
    max-width: 65%;
  }

  /* SEMINARIOS */
  .seminarios-contenedor {
    flex-direction: column;
    align-items: center;
    gap: 4rem;
  }

  .seminarios-columna-media {
    width: 100%;
    padding: 2rem;
    flex: none;
  }

  .seminarios-columna-texto {
    text-align: center;
  }

  .seminarios-imagen {
    max-width: 60%;
  }

  .seminarios-boton {
    font-size: 1.4rem;
    max-width: 65%;
  }

  /* CONTACTO */
  .contenedor-soporte {
    flex-direction: column;
    align-items: center;
    gap: 4rem;
  }

  .columna-formulario {
    width: 100%;
    flex: none;
  }

  .columna-texto {
    text-align: center;
  }

  .soporte-datos,
  .soporte-asesores {
    padding-left: 1rem;
  }

  .imagen-contacto {
    max-width: 60%;
  }

  .boton-contacto {
    font-size: 1.4rem;
    max-width: 65%;
  }
}

@media (max-width:768px) {
  .contenido-home h1 {
    font-size: 2.5rem;
    margin-top: 1rem;
  }

  .contenido-home .texto-titulo,
  .contenido-home .texto-subtitulo,
  .contenido-home .texto-texto {
    font-size: 1.5rem;
  }

  .imagen-comunidad2 {
    width: 90%;
  }

  .avisos {
    padding-top: 5rem !important;
  }

  .titulo-avisos {
    font-size: 3.2rem;
  }

  .avisos-contenedor .m1000-avisos {
    height: 32rem !important;
  }

  .seminarios-titulo {
    font-size: 3rem;
  }

  .seminarios-texto {
    font-size: 1.6rem;
  }

  .seminarios-boton {
    font-size: 1.2rem;
    max-width: 75%;
  }

  .boton-capacitacion {
    font-size: 1.2rem;
    max-width: 75%;
  }

  .boton-contacto {
    font-size: 1.2rem;
    max-width: 75%;
  }

  .seminarios-boton {
    font-size: 1.2rem;
    max-width: 75%;
  }

  .titulo-soporte {
    font-size: 3rem;
  }

  .soporte-texto,
  .soporte-datos,
  .soporte-asesores {
    font-size: 1.6rem;
  }
}

@media (max-width:480px) {
  .contenido-home h1 {
    font-size: 2rem;
  }

  .contenido-home .texto-titulo,
  .contenido-home .texto-subtitulo,
  .contenido-home .texto-texto {
    font-size: 1.4rem;
  }

  .imagen-comunidad2 {
    width: 90%;
  }

  .avisos {
    padding-top: 5rem !important;
  }

  .titulo-avisos {
    font-size: 2.6rem;
  }

  .avisos-contenedor {
    padding: 1.2rem;
  }

  .avisos-contenedor .m1000-avisos {
    height: 26rem !important;
  }

  .boton-capacitacion {
    font-size: 1rem;
    max-width: 90%;
  }

  .boton-contacto {
    font-size: 1rem;
    max-width: 90%;
  }

  .seminarios-boton {
    font-size: 1rem;
    max-width: 90%;
  }

  .titulo-soporte {
    font-size: 2.2rem;
  }

  .soporte-texto,
  .soporte-datos,
  .soporte-asesores {
    font-size: 1.4rem;
  }

  .seminarios-titulo {
    font-size: 2.2rem;
  }

  .seminarios-texto {
    font-size: 1.4rem;
  }
}