/* CONTENEDOR GENERAL */
.custom-section {
  background-color: #fff;
  padding: 0 30px;
  position: relative;
  box-sizing: border-box;
  margin-bottom: 40px;
}

/* FORMULARIO WRAPPER */
.custom-wrap-form {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
}

.custom-container {
  max-width: 1540px;
  margin: 0 auto;
  position: relative;
  box-sizing: border-box;
}

/* FORMULARIO BOX */
.custom-form-box {
  margin: 17px 0 0 auto;
  width: 33%;
  background-color: #fff;
  padding: 31px;
  border-radius: 20px;
  box-shadow: 4px 4px 32px 0 rgba(0, 0, 0, 0.32);
  position: absolute;
  right: 30px;
  top: 0;
  box-sizing: border-box;
}

/* Contenedor principal del formulario en mobile */
@media screen and (max-width: 768px) {
  #formulario-taller-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    z-index: 10000;
    transform: translateY(0%);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 20px 20px 0 0;
    padding: 25px 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    margin: 0 !important;
    right: auto !important;
    top: auto !important;
  }

  #formulario-taller-wrapper.active {
    transform: translateY(0);
  }

  .custom-wrap-form {
    position: fixed !important;
    top: auto !important;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: 10001;
  }

  .custom-form-box {
    width: 100% !important;
    margin: 0 !important;
    padding: 25px 20px !important;
    border-radius: 20px 20px 0 0 !important;
    box-shadow: none !important;
    position: relative !important;
  }

  /* Overlay mejorado */
  .custom-overlay {
    background: rgba(0, 0, 0, 0.6) !important;
    z-index: 9999 !important;
    transition: opacity 0.3s ease !important;
  }

  /* Botón flotante de apertura */
  #open-form-button {
    background: #ffca00 !important;
    color: #1f1f1f !important;
    font-family: "LabGrotesque-Bold", sans-serif !important;
    padding: 18px 0 !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1) !important;
    border-radius: 0 !important;
  }

  /* Ajustes para inputs en mobile */
  .custom-input,
  .custom-input-row .custom-input {
    margin-bottom: 15px !important;
  }

  /* Botón de cierre mejorado */
  .custom-close-form {
    color: #1f1f1f !important;
    font-size: 30px !important;
    margin-bottom: 15px !important;
    display: block !important;
    position: absolute;
    right: 20px;
    top: 15px;
    z-index: 1;
  }
}

/* ============================================= */
/* ESTADOS ESPECIALES */
/* ============================================= */
/* Evitar scroll cuando el formulario está abierto */
.body-no-scroll {
  overflow: hidden;
  height: 100vh;
}

/* Transición suave para el botón */
#open-form-button {
  transition: all 0.3s ease;
}

@media screen and (max-width: 768px) {
  /* Asegurar que el formulario ocupe todo el ancho y esté centrado */
  #formulario-taller-wrapper {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
  }

  /* Contenedor interno del formulario */
  .custom-form-box {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 20px !important;
    left: 0 !important;
    right: 0 !important;
  }

  /* Ajustar el contenedor principal */
  .custom-wrap-form {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin: 0 auto !important;
  }

  /* Asegurar que los inputs no se salgan */
  .custom-input,
  .custom-input-row .custom-input {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Centrar el botón de cerrar */
  .custom-close-form {
    right: 20px !important;
    left: auto !important;
  }
}

@media screen and (max-width: 1190px) {
  .custom-form-box {
    position: static;
    width: 100%;
    padding: 20px;
    border-radius: 20px 20px 0 0;
    box-shadow: none;
  }
}

/* FORMULARIO TÍTULOS */
.custom-form-title h3 {
  font-size: 24px;
  text-align: center;
  color: #1f1f1f;
  font-family: "LabGrotesque-Bold", sans-serif;
  margin-bottom: 10px;
}

.custom-form-description {
  text-align: center;
  font-size: 15px;
  color: #1f1f1f;
  font-family: "LabGrotesque", sans-serif;
  margin-bottom: 24px;
}

/* INPUTS flotantes */
.custom-input,
.custom-input-row .custom-input {
  position: relative;
  margin-bottom: 20px;
  border: 1px solid #d0d1d8;
  border-radius: 8px;
  background-color: #fff;
}

.custom-input input,
.custom-input-row .custom-input input {
  border: none;
  width: 100%;
  height: 40px;
  padding: 18px 14px 0;
  font-size: 15px;
  background: none;
  color: #1f1f1f;
  font-family: "LabGrotesque", sans-serif;
  box-sizing: border-box;
  outline: none;
}

.custom-input label span,
.custom-input-row .custom-input label span {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: #1f1f1f;
  font-size: 15px;
  font-family: "LabGrotesque", sans-serif;
  transition: 0.2s ease;
  pointer-events: none;
  background-color: #fff;
  padding: 0 4px;
}

.custom-input.inFocus label span,
.custom-input input:focus + label span,
.custom-input input:not(:placeholder-shown) + label span,
.custom-input-row .custom-input.inFocus label span,
.custom-input-row .custom-input input:focus + label span,
.custom-input-row .custom-input input:not(:placeholder-shown) + label span {
  transform: translateY(-16px);
  font-size: 11px;
  color: #1f1f1f;
}

/* ROW para nombres */
.custom-input-row {
  display: flex;
  gap: 15px;
}

/* CHECKBOXES */
.custom-checkbox {
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.4em;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.custom-checkbox input {
  margin-top: 4px;
  margin-right: 0;
  accent-color: #8459ee;
}

/* BOTÓN */
.custom-submit {
  margin-top: 20px;
}

#open-form-button {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 15px 0;
  background: #ffca00;
  color: white;
  text-align: center;
  font-weight: bold;
  font-size: 16px;
  border: none;
  z-index: 9998;
  transition: transform 0.3s ease;
  display: none; /* Inicialmente oculto */
}

#open-form-button {
    display: none;
  }

/* Espacio para el botón flotante */
footer {
  margin-bottom: 60px;
}

@media (min-width: 769px) {
  #open-form-button {
    display: none;
  }
  footer {
    margin-bottom: 0;
  }
}

.custom-btn {
  width: 100%;
  background-color: #1f1f1f;
  color: white;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: "LabGrotesque-Bold", sans-serif;
}

.custom-btn:hover {
  background-color: #1f1f1f;
}

/* SLIDER & OVERLAY */
.custom-slider-ctn {
  width: 100%;
  height: 100vh;
  border-radius: 20px;
}

.custom-slider {
  position: relative;
  z-index: 1;
}

.custom-item-sl {
  position: relative;
  height: 100vh;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
}

.custom-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
}

.custom-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background-color: #000;
  opacity: 0.6;
  z-index: 105;
  transition: opacity 0.4s;
}

.custom-overlay.active {
  height: 100vh;
  opacity: 0.6;
}

/* BOTÓN CIERRE */
.custom-close-form {
  font-size: 40px;
  color: #000;
  width: 40px;
  display: none;
  margin: 0 0 20px auto;
}

@media screen and (max-width: 1190px) {
  .custom-close-form {
    display: block;
  }
}

@media screen and (max-width: 768px) {
  .custom-item-sl {
    border-radius: 0 0 10px 10px;
  }
}

/* SECCIÓN "¿POR QUÉ ASISTIR?" */
.custom-about-section {
  padding: 10px 0;
}

.custom-about-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  flex-wrap: wrap;
  max-width: 1400px;
  margin: 0 auto;
  gap: 40px;
}

/* Columna izquierda */
.custom-about-left {
  width: 45%;
  min-width: 300px;
  position: relative;
}

/* Fondo decorativo tipo rectángulo redondeado */
.custom-about-deco {
  position: absolute;
  top: -40px;
  left: -40px;
  width: 160px;
  height: 160px;
  background-color: #97f5e9;
  border-radius: 0 100px 0 0;
  z-index: 0;
}

/* Contenedor de la imagen y caja */
.custom-about-photo-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.1;
  border-radius: 20px;
  overflow: hidden;
  z-index: 1;
}

/* Imagen de la persona */
.custom-about-photo {
  position: absolute;
  top: -5%;
  left: 50%;
  transform: translateX(-50%);
  width: 115%;
  height: 115%;
  background-size: cover;
  background-position: center top;
}

/* Ajustes específicos para la imagen en mobile */
@media (max-width: 1024px) {
  .custom-about-photo {
    position: absolute !important;
    width: 100% !important;
    height: 120% !important; /* Mostrar más área de la imagen */
    top: -15% !important; /* Subir la imagen para enfocar el rostro */
    left: 0 !important;
    transform: none !important;
    background-size: cover !important;
    background-position: center 25% !important; /* Enfocar en la parte superior de la imagen */
    background-repeat: no-repeat !important;
  }

  .custom-about-photo-container {
    height: 300px !important;
    padding-bottom: 40px !important;
    aspect-ratio: unset !important;
    overflow: hidden !important; /* Mantener el diseño limpio */
  }
}

/* Ajustes para móviles más pequeños */
@media (max-width: 768px) {
  .custom-about-photo-container {
    height: auto !important;
    min-height: 400px;
    padding-top: 0 !important; /* Eliminamos el padding anterior */
    position: relative;
    overflow: hidden !important; /* Mantenemos hidden para bordes redondeados */
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
  }

  /* Imagen ajustada correctamente */
  .custom-about-photo {
    position: relative !important; /* Cambiamos a relativo */
    order: 2; /* Va después de la caja */
    width: 100% !important;
    height: 300px !important; /* Altura fija */
    top: 0 !important;
    left: 0 !important;
    background-position: center 25% !important;
    background-size: cover !important;
    transform: none !important;
    margin-top: 20px; /* Espacio entre caja e imagen */
  }

  /* Caja de texto ahora al inicio */
  .custom-about-box {
    position: relative !important; /* Cambiamos a relativo */
    order: 1; /* Va primero */
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    margin: 0 auto 20px !important; /* Espacio inferior */
    padding: 20px !important;
    z-index: 2 !important;
    box-sizing: border-box;
    transform: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  /* Layout general */
  .custom-about-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }
  
  .custom-about-left {
    width: 100% !important;
    order: 2; /* Columna izquierda va después */
    margin-top: 30px;
  }
  
  .custom-about-right {
    width: 100% !important;
    order: 1; /* Columna derecha va primero */
  }

  /* Ocultar elemento decorativo */
  .custom-about-deco {
    display: none !important;
  }
}

/* Estilos base para todos los dispositivos */
.custom-about-photo {
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-position: center 30% !important; /* Posición por defecto */
  transition: all 0.3s ease; /* Transición suave para cambios */
}

/* Caja "¿Por qué asistir?" */
.custom-about-box {
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: #97f5e9;
  border-radius: 20px;
  padding: 25px 20px;
  text-align: center;
  max-width: 300px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

.custom-about-box h3 {
  font-size: 30px;
  font-weight: 700;
  color: #1f1f1f;
  font-family: "LabGrotesque-Bold", sans-serif;
  margin-bottom: 10px;
}

/* Columna derecha */
.custom-about-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Fuerza 2 columnas */
  gap: 25px;
  align-items: stretch; /* fuerza misma altura */
  justify-items: center;
  width: 100%;
  height: 90%; /* Agrega esto si no está */
  grid-auto-rows: 1fr; /* 💡 ESTA ES LA CLAVE para igualar alturas */
}

.custom-about-card {
  background-color: #003f46;
  border-radius: 20px;
  padding: 25px;
  color: #fff;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center; /* centra el texto verticalmente */
  max-width: 100%;
  box-sizing: border-box; /* Asegura que padding no aumente el tamaño visual */
}

.custom-about-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 12px;
  line-height: 1.3em;
}

.custom-about-description {
  font-size: 14px;
  line-height: 1.5em;
}

/* Asegura la simetría en tablets también */
@media (max-width: 768px) {
  .custom-about-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsivo */
@media (max-width: 768px) {
  .custom-about-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px; /* Espacio entre secciones */
  }

  /* Contenedor de la foto y caja - ahora va primero */
  .custom-about-left {
    order: 1;
    width: 100%;
    position: relative;
    margin-bottom: 0;
  }

  /* Grid de tarjetas - ahora va después */
  .custom-about-right {
    order: 2;
    width: 100%;
  }

  /* Contenedor de la foto */
  .custom-about-photo-container {
    height: 350px; /* Altura fija adecuada */
    position: relative;
    margin-bottom: 0;
    overflow: hidden;
    border-radius: 20px;
  }

  /* Imagen de la persona */
  .custom-about-photo {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-size: cover;
    background-position: center 25%; /* Enfoca mejor el rostro */
  }

  /* Caja de texto */
  .custom-about-box {
    position: absolute;
    bottom: -30px; /* Sobreposición controlada */
    right: 20px;
    width: calc(100% - 40px); /* Ancho ajustado con márgenes */
    max-width: 300px;
    background-color: #97f5e9;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    z-index: 2;
    margin: 0 auto;
    left: 20px; /* Centrado horizontal */
  }

  /* Eliminar elemento decorativo en mobile */
  .custom-about-deco {
    display: none;
  }

  /* Grid de tarjetas */
  .custom-about-grid {
    grid-template-columns: 1fr; /* Una columna en mobile */
    gap: 20px;
  }
}

/* Animaciones opcionales */
.custom-fade-init [class*="custom-fade-"] {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease-out;
}

.custom-fade-init.custom-visible .custom-fade-left {
  opacity: 1;
  transform: translateX(0);
}

.custom-fade-init.custom-visible .custom-fade-right {
  opacity: 1;
  transform: translateX(0);
}

.custom-fade-left {
  transform: translateX(-40px);
}

.custom-fade-right {
  transform: translateX(40px);
}

.custom-modality-section {
  padding: 80px 0;
  background-color: #fff;
}

.custom-modality-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.custom-modality-header {
  text-align: center;
  margin-bottom: 40px;
}

.custom-modality-title {
  font-size: 32px;
  font-weight: 800;
  color: #1f1f1f;
  font-family: "LabGrotesque-Bold", sans-serif;
}

.custom-modality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.custom-modality-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 20px;
  padding: 40px 30px;
  text-align: left;
  transition: box-shadow 0.3s ease;
}

.custom-modality-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

.custom-modality-icon img {
  width: 45px;
  height: 45px;
  margin-bottom: 30px;
}

.custom-modality-card-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #000;
}

.custom-modality-description {
  font-size: 15px;
  color: #555;
  line-height: 1.5em;
}

/* Animaciones personalizadas */
.custom-modality-animate-init [class*="custom-modality-fade-up-"] {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease-out;
}

.custom-modality-animate-init.custom-visible .custom-modality-fade-up-0,
.custom-modality-animate-init.custom-visible .custom-modality-fade-up-1 {
  opacity: 1;
  transform: translateY(0);
}

/* BLOQUE CUSTOM BANNER */
.custom-banner-section {
  padding: 50px 0;
}

.custom-banner-container {
  max-width: 1300px;
  margin: 0 auto;
  text-align: center;
}

.custom-banner-link {
  display: block;
}

.custom-img-tag {
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transition: opacity 0.4s ease;
}
