/* ==========================================================================
   AEPSIS — Home 2026
   Ubicación sugerida: /wp-content/themes/allegiant/css/aepsis-home.css
   Encolar solo en la portada (ver snippet en el HTML entregado).

   Paleta oficial (9.jpg):
   #e0c4ff lila claro   | #aa81db morado    | #89c2de celeste
   #3a4f99 azul medio   | #3e61e1 azul vivo | #280f91 índigo
   #101042 navy         | #e8f6fe celeste pálido (fondos de sección)
   ========================================================================== */

/* --- Base ---------------------------------------------------------------- */
.aep-sec,
.aep-sec * { box-sizing: border-box; }

.aep-sec {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 70px 24px;
  font-family: "Poppins", "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.aep-wrap {
  max-width: 1180px;
  margin: 0 auto;
}

.aep-sec img { max-width: 100%; height: auto; display: block; }

.aep-sec h1,
.aep-sec h2,
.aep-sec h3,
.aep-sec h4,
.aep-sec p,
.aep-sec ul { margin: 0; padding: 0; }

.aep-sec ul { list-style: none; }

/* Rejilla flexible reutilizable */
.aep-grid { display: flex; flex-wrap: wrap; margin: 0 -14px; }
.aep-grid > * { padding: 0 14px; margin-bottom: 28px; }
.aep-col-3 { width: 33.3333%; }
.aep-col-4 { width: 25%; }
.aep-col-6 { width: 50%; }

/* Botones */
.aep-btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 40px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.2;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.aep-btn:hover,
.aep-btn:focus { text-decoration: none; transform: translateY(-2px); }
.aep-btn:focus-visible { outline: 3px solid #3e61e1; outline-offset: 3px; }

.aep-btn--navy   { background: #101042; color: #ffffff; }
.aep-btn--navy:hover,   .aep-btn--navy:focus   { background: #280f91; color: #ffffff; }
.aep-btn--blue   { background: #3e61e1; color: #ffffff; }
.aep-btn--blue:hover,   .aep-btn--blue:focus   { background: #280f91; color: #ffffff; }
.aep-btn--lilac  { background: #e0c4ff; color: #101042; }
.aep-btn--lilac:hover,  .aep-btn--lilac:focus  { background: #ffffff; color: #101042; }
.aep-btn--purple { background: #aa81db; color: #ffffff; }
.aep-btn--purple:hover, .aep-btn--purple:focus { background: #280f91; color: #ffffff; }

/* Título de sección */
.aep-title {
  font-size: 46px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.01em;
  margin-bottom: 38px;
}

/* --- 1. Hero ------------------------------------------------------------- */
.aep-hero { background: #e0c4ff; padding: 46px 24px 0; }
.aep-hero__inner { display: flex; flex-wrap: wrap; align-items: center; }
.aep-hero__text { width: 46%; padding: 40px 40px 70px 0; }
.aep-hero__media { width: 54%; }
.aep-hero__media img { border-radius: 18px; }

.aep-hero__brand { margin-bottom: 46px; }
.aep-hero__brand img { max-height: 58px; width: auto; }

.aep-hero__title {
  font-size: 44px;
  font-weight: 700;
  line-height: 1.12;
  color: #101042;
  margin-bottom: 22px;
}
.aep-hero__text p {
  font-size: 14px;
  line-height: 1.75;
  color: #2a2a55;
  margin-bottom: 30px;
  max-width: 460px;
}
.aep-hero__text strong { color: #280f91; }
.aep-hero__cta .aep-btn { margin: 0 12px 12px 0; }

/* --- 2. Qué hacemos ------------------------------------------------------ */
.aep-que { background: #3e61e1; }
.aep-que .aep-title { color: #ffffff; }

.aep-card-servicio {
  background: #280f91;
  border-radius: 16px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.aep-card-servicio__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.aep-card-servicio__body { padding: 18px 20px 24px; }
.aep-card-servicio__tag {
  display: inline-block;
  background: #aa81db;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 30px;
  margin-bottom: 14px;
}
.aep-card-servicio__body p { color: #e6e4ff; font-size: 12.5px; line-height: 1.7; }

/* Envoltorio para que las tarjetas igualen altura dentro de la rejilla */
.aep-grid--stretch { align-items: stretch; }
.aep-grid--stretch > * { display: flex; }
.aep-grid--stretch > * > * { width: 100%; }

/* --- 3. Próximos congresos y agenda -------------------------------------- */
.aep-agenda { background: #e8f6fe; }
.aep-eyebrow {
  display: inline-block;
  background: #e0c4ff;
  color: #280f91;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 22px;
  border-radius: 30px;
  margin-bottom: 34px;
}

.aep-card-evento {
  background: #f2f2f7;
  border-radius: 16px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.aep-card-evento__media { position: relative; }
.aep-card-evento__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.aep-card-evento__fecha {
  position: absolute;
  left: 18px;
  bottom: -18px;
  background: #3e61e1;
  color: #ffffff;
  border-radius: 12px;
  padding: 10px 14px;
  text-align: center;
  min-width: 62px;
  line-height: 1.05;
}
.aep-card-evento__dia { display: block; font-size: 20px; font-weight: 700; }
.aep-card-evento__mes { display: block; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

.aep-card-evento__body { padding: 32px 20px 24px; display: flex; flex-direction: column; flex: 1; }
.aep-card-evento__tipo {
  display: inline-block;
  align-self: flex-start;
  background: #101042;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 30px;
  margin-bottom: 14px;
}
.aep-card-evento__titulo {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  color: #3e61e1;
  margin-bottom: 10px;
}
.aep-card-evento__body p { font-size: 13px; color: #45456b; margin-bottom: 20px; }
.aep-card-evento__body .aep-btn { align-self: flex-start; margin-top: auto; }

/* --- 4. Comunidad / cifras ----------------------------------------------- */
.aep-comunidad { background: #cfeaf9; }
.aep-comunidad__title {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.3;
  color: #101042;
  margin-bottom: 46px;
  max-width: 720px;
}
.aep-comunidad__title .aep-mark { background: #e0c4ff; padding: 2px 8px; border-radius: 6px; }

.aep-dato { text-align: left; }
.aep-dato__num { display: block; font-size: 34px; font-weight: 700; color: #3e61e1; line-height: 1.1; margin-bottom: 6px; }
.aep-dato__txt { display: block; font-size: 14px; color: #101042; line-height: 1.45; }

/* --- 5. Noticias --------------------------------------------------------- */
.aep-noticias { background: #e0c4ff; }
.aep-noticias .aep-title { color: #101042; }

.aep-card-noticia {
  background: #101042;
  border-radius: 16px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.aep-card-noticia__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.aep-card-noticia__body { padding: 18px 20px 24px; display: flex; flex-direction: column; flex: 1; }
.aep-card-noticia__meta {
  font-size: 10.5px;
  color: #aa81db;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.aep-card-noticia__titulo {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 12px;
}
.aep-card-noticia__body p { font-size: 12.5px; line-height: 1.65; color: #c9c7e8; margin-bottom: 20px; }
.aep-card-noticia__body .aep-btn { align-self: flex-start; margin-top: auto; font-size: 10px; padding: 10px 20px; }

/* --- 6. FAQs ------------------------------------------------------------- */
.aep-faqs { background: #e0c4ff; padding-top: 20px; }
.aep-faqs .aep-title { color: #101042; }

.aep-faq {
  background: #101042;
  border-radius: 16px;
  padding: 26px 24px 30px;
  height: 100%;
}
.aep-faq__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #3a4f99;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}
.aep-faq__q { font-size: 17px; font-weight: 700; line-height: 1.3; color: #e0c4ff; margin-bottom: 12px; }
.aep-faq p { font-size: 12.5px; line-height: 1.7; color: #c9c7e8; }

/* --- 7. Formulario ------------------------------------------------------- */
.aep-form { background: #3e61e1; }
.aep-form__inner { display: flex; flex-wrap: wrap; align-items: center; margin: 0 -18px; }
.aep-form__text,
.aep-form__box { padding: 0 18px; }

.aep-form__box .contact-form .col-md-12 { padding: 0px; }
.aep-form__text { width: 45%; }
.aep-form__box { width: 55%; }

.aep-form__title { font-size: 44px; font-weight: 700; line-height: 1.1; color: #ffffff; margin-bottom: 30px; }
.aep-form__nota { display: flex; align-items: flex-start; }
.aep-form__nota img { width: 54px; margin-right: 16px; flex: none; }
.aep-form__nota p { font-size: 12.5px; line-height: 1.7; color: #e6ecff; max-width: 320px; }

/* Contenedor del formulario (Contact Form 7 / includeme) */
.aep-form__box-inner { background: #ffffff; border-radius: 14px; padding: 30px 30px 24px; }
.aep-form__box-inner h3 { font-size: 20px; font-weight: 700; color: #101042; margin-bottom: 22px; }

/* Estilado defensivo de los campos que inyecte CF7 o el PHP embebido */
.aep-form__box-inner input[type="text"],
.aep-form__box-inner input[type="email"],
.aep-form__box-inner input[type="tel"],
.aep-form__box-inner textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #cfd3e6;
  background: transparent;
  padding: 12px 2px;
  margin-bottom: 18px;
  font-size: 14px;
  color: #101042;
  border-radius: 0;
  box-shadow: none;
}
.aep-form__box-inner textarea { min-height: 90px; resize: vertical; }
.aep-form__box-inner input:focus,
.aep-form__box-inner textarea:focus { outline: none; border-bottom-color: #3e61e1; }
.aep-form__box-inner input[type="submit"],
.aep-form__box-inner button[type="submit"] {
  background: #3e61e1;
  color: #ffffff;
  border: 0;
  border-radius: 40px;
  padding: 13px 34px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.aep-form__legal { font-size: 10px; color: #8a8aa5; margin-top: 14px; }

/* --- 8. CTA final -------------------------------------------------------- */
.aep-cta { background: #e0c4ff; padding: 0 24px; }
.aep-cta__inner { display: flex; flex-wrap: wrap; align-items: center; }
.aep-cta__media { width: 45%; }
.aep-cta__text { width: 55%; padding: 60px 0 60px 40px; }
.aep-cta__title { font-size: 40px; font-weight: 700; line-height: 1.12; color: #101042; margin-bottom: 24px; }
.aep-cta__text p { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #280f91; margin-bottom: 18px; max-width: 380px; }

/* --- 9. Footer ----------------------------------------------------------- */
.aep-footer { background: #101042; padding: 46px 24px; }
.aep-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.aep-footer__brand img { max-height: 40px; width: auto; }
.aep-footer__social { display: flex; align-items: center; }
.aep-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-left: 14px;
  border-radius: 50%;
  color: #ffffff;
  text-decoration: none;
  transition: background-color .2s ease;
}
.aep-footer__social a:hover,
.aep-footer__social a:focus { background: #280f91; }
.aep-footer__social svg { width: 22px; height: 22px; fill: currentColor; }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 1024px) {
  .aep-title { font-size: 38px; }
  .aep-hero__title,
  .aep-form__title { font-size: 36px; }
  .aep-cta__title { font-size: 32px; }
  .aep-comunidad__title { font-size: 26px; }
}

@media (max-width: 900px) {
  .aep-sec { padding: 54px 20px; }
  .aep-col-3 { width: 50%; }
  .aep-col-4 { width: 50%; }
  .aep-hero { padding: 34px 20px 0; }
  .aep-hero__text,
  .aep-hero__media,
  .aep-form__text,
  .aep-form__box,
  .aep-cta__media,
  .aep-cta__text { width: 100%; }
  .aep-hero__text { padding: 0 0 34px; }
  .aep-form__text { margin-bottom: 34px; }
  .aep-cta__text { padding: 34px 0 54px; }
  .aep-footer__inner { justify-content: center; }
  .aep-footer__brand { width: 100%; text-align: center; margin-bottom: 24px; }
  .aep-footer__brand img { margin: 0 auto; }
  .aep-footer__social a { margin: 0 7px; }
}

@media (max-width: 600px) {
  .aep-col-3,
  .aep-col-4,
  .aep-col-6 { width: 100%; }
  .aep-title { font-size: 30px; }
  .aep-hero__title,
  .aep-form__title { font-size: 29px; }
  .aep-cta__title { font-size: 27px; }
  .aep-comunidad__title { font-size: 22px; }
  .aep-form__box-inner { padding: 24px 20px; }
}

/* Accesibilidad: respetar la preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  .aep-btn { transition: none; }
  .aep-btn:hover, .aep-btn:focus { transform: none; }
}
