:root {
  /* EonLifex corporate palette */
  --primary-color: #2e2c72; /* azul */
  --secondary-color: #006d3b; /* verde accesible con mayor contraste */
  --light-color: #ffffff;
  --white: #ffffff;
  --dark-color: #1a202c;
  --light-grey: #f4f7f9;
  --bright-green: var(--secondary-color);
  --dark-blue: var(--primary-color);
  --bg-color: #f4f7f9;
  --text-color: #4d4d4d;
  --heading-color: var(--dark-blue);
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.3);

  --highlight-font: 'MuseoModerno', cursive;

  /* Modular spacing system */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  line-height: 1.5;
  scroll-behavior: smooth;
  /* ELIMINADO: scroll-padding-top: 100px; ya que no es necesario y puede causar espacio. */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-2);
}

section {
  padding: var(--space-4) 0;
  margin-bottom: var(--space-4);
}

.card {
  padding: var(--space-2);
  margin-bottom: var(--space-3);
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 calc(-1 * var(--space-1));
}

.col {
  padding: 0 var(--space-1);
  flex: 1;
}

/* Reusable grid for card layouts */
.card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.flex-responsive {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.grid-responsive {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.form-grid-responsive {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Utility class to prevent horizontal overflow */
.overflow-x-auto {
  overflow-x: auto;
  width: 100%;
}

@media (min-width: 768px) { .col-6 { width: 50%; } }
@media (min-width: 1024px) { .col-4 { width: 33.333%; } }

a {
  color: var(--secondary-color);
  text-decoration: none;
}

.navbar-brand,
.navbar-nav .nav-link {
  color: var(--light-color) !important;
}

.navbar {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-eon {
  background-color: var(--secondary-color);
  color: var(--light-color);
  border: none;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.btn-eon:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}
.btn-eon:focus,
.btn-eon.active {
  background-color: rgba(0, 150, 94, 0.2);
  color: var(--secondary-color);
  box-shadow: inset 0 0 0 2px var(--secondary-color);
}

.footer-pro {
  background-color: #11131e;
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 20px 20px 20px;
}
.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 40px auto;
  text-align: left;
}
.footer-column {
  flex: 1;
  min-width: 250px;
}
.footer-column .logo {
  max-width: 150px;
  margin-bottom: 15px;
}
.footer-column h4 {
  color: var(--white);
  font-weight: 600;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--bright-green);
  padding-bottom: 10px;
  display: inline-block;
}
.footer-column ul {
  list-style: none;
  padding: 0;
}
.footer-column ul li a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  margin-bottom: 10px;
  display: inline-block;
  transition: color 0.3s;
}
.footer-column ul li a:hover {
  color: var(--bright-green);
}
.social-icons a {
  color: var(--white);
  font-size: 1.5rem;
  margin-right: 15px;
  transition: color 0.3s;
}
.social-icons a:hover {
  color: var(--bright-green);
}
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9em;
}

@media (max-width: 768px) {
  .footer-content { flex-direction: column; text-align: center; }
  .footer-column h4 { display: block; }
  .footer-column .logo { margin-left: auto; margin-right: auto; }
}

/* Floating navigation bar used across pages */
.main-nav {
  position: relative;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 2rem;
  /* Fondo translúcido unificado */
  background: var(--liquid-glass-bg);
  border: 1px solid var(--liquid-glass-border);
  border-radius: 10px;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--liquid-glass-shadow);
  transition: transform 0.3s ease-in-out;
  display: flex;
  justify-content: center;
  justify-content: space-between;
  align-items: center;
}
.main-nav + .main-nav {
  display: none;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--dark-blue);
  z-index: 1001;
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  z-index: 1001;
}
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: all 0.3s ease-in-out;
}
.main-nav.nav-hidden {
  transform: translateY(-100%);
}
.main-nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
  white-space: nowrap;
  display: flex;
  align-items: center;
}
.main-nav a:hover,
.main-nav a:focus {
  background-color: rgba(0, 150, 94, 0.1);
  color: var(--bright-green);
}
.nav-logo {
  height: 2.5rem;
  width: auto;
  margin-right: 0.5rem;
}
/* ELIMINADO: background-color: rgba(255, 255, 255, 0.2); color: #e0e0e0; */
/* Esta regla duplicada y sin selector causaba problemas. */
.nav-logo {
  height: 2.5rem;
  width: auto;
  margin-right: 0.5rem;
}

.content-wrapper {
  position: relative;
  z-index: 1;
  /* Espacio superior para que el menú fijo no cubra el contenido */
  padding-top: calc(5rem + env(safe-area-inset-top));
}



@media (max-width: 1023px) {
  .content-wrapper {
    padding-top: calc(4rem + env(safe-area-inset-top));
  }
  .main-nav {
    padding: 1rem;
    justify-content: space-between;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: var(--liquid-glass-bg);
    border: 1px solid var(--liquid-glass-border);
    border-radius: 0 0 10px 10px;
    padding: 1rem 0;
    box-shadow: var(--liquid-glass-shadow);
    background-color: rgba(0, 0, 0, 0.8);
    padding: 1rem 0;
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    width: 100%;
    text-align: center;
    padding: 0.8rem 1rem;
  }

  .nav-links a:first-child .nav-logo:first-of-type {
    display: none;
  }
}


/* Reusable layout styles from the home page */
.section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 120px 5%;
  width: 100%;
  text-align: center;
}

.content-box {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 25px;
  padding: 40px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  max-width: 1200px;
  width: 100%;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.hero-section .content-box {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  max-width: 800px;
}

.logo {
  width: 150px;
  height: auto;
  display: block;
  margin-bottom: 32px;
  color: var(--dark-blue);
}

html[data-theme='dark'] .logo {
  color: var(--light-color);
}
h1 { font-size: 3.5rem; font-weight: 700; color: var(--heading-color); line-height: 1.2; }
.section-title { font-size: 2.8rem; font-weight: 700; color: var(--heading-color); margin-bottom: 1rem; }
.section-subtitle { font-size: 1.15rem; color: #6c757d; max-width: 800px; margin: 0 auto 60px auto; }
.lead { font-size: 1.25rem; font-weight: 300; margin: 24px 0; color: #333; }
.cta-button {
  display: inline-block;
  background: var(--bright-green);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 150, 94, 0.3);
  margin-top: 20px;
  border: 1px solid transparent;
}
.cta-button:hover {
  background: var(--dark-blue);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(46, 44, 114, 0.4);
}

/* Special emphasis font */
.museo {
  font-family: var(--highlight-font);
}

/* Crystal style form elements */
.glass-input {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-color);
}

.password-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #6c757d;
}

/* === Fondo completo sin bordes blancos ni márgenes === */
html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg-color);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Si manejas modo oscuro con [data-theme="dark"] */
[data-theme="dark"] {
  --bg-color: linear-gradient(135deg, #0f112b, #1a1a2e); /* Fondo modo oscuro */
}

/* Capa de respaldo por si algún componente falla */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background: var(--bg-color);
  z-index: -1;
}

/* En modo oscuro también */
[data-theme="dark"] body::before {
  background: var(--bg-color);
}

/* Resaltado global al pasar o enfocar elementos interactivos */
a,
button,
input,
textarea,
select {
  transition: outline 0.2s ease;
}

a:hover,
a:focus,
button:hover,
button:focus,
input:hover,
input:focus,
textarea:hover,
textarea:focus,
select:hover,
select:focus {
  outline: 2px solid var(--bright-green);
  outline-offset: 2px;
}

/* Flash message styles */
.flash-container {
  margin-top: 1rem;
}

.alert {
  padding: 0.75rem 1.25rem;
  border-radius: 0.25rem;
  margin-bottom: 1rem;
  position: relative;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
}

.alert-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
}

/* Pagination */
.pagination li.active {
  background-color: var(--secondary-color);
  color: var(--white);
}

.pagination li.active a {
  background-color: var(--secondary-color);
  color: var(--white);
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary-color), #5a2abf, #1bb184);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
          background-clip: text;
          color: transparent;
}

.badge.text-bg-primary-soft {
  background: rgba(90, 42, 191, 0.15);
  color: var(--primary-color);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  letter-spacing: 0.06em;
}

.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px rgba(18, 23, 53, 0.25);
}

.program-card {
  background: linear-gradient(160deg, rgba(46, 44, 114, 0.92), rgba(27, 177, 132, 0.9));
  color: var(--light-color);
  border-radius: 1.5rem;
  padding: 2.5rem 1.75rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
  box-shadow: 0 18px 45px rgba(12, 21, 46, 0.25);
}

.program-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.25), transparent 50%);
  opacity: 0.6;
  pointer-events: none;
}

.program-card__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: inline-flex;
}

.program-card h3 {
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.program-card p {
  margin-bottom: 0;
  font-size: 1rem;
}

.program-card.is-active,
.program-card:hover {
  transform: translateY(-8px);
  filter: brightness(1.05);
  box-shadow: 0 25px 60px rgba(26, 32, 60, 0.35);
}

.impact-card {
  background: var(--light-color);
  border-radius: 1.25rem;
  padding: 1.75rem;
  border: 1px solid rgba(46, 44, 114, 0.12);
  box-shadow: 0 18px 35px rgba(26, 32, 60, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.impact-card__label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: rgba(46, 44, 114, 0.6);
}

.impact-card__value {
  font-size: 2.75rem;
  font-weight: 700;
  margin: 0.75rem 0;
  color: var(--primary-color);
}

.impact-card__text {
  margin: 0;
  color: rgba(26, 32, 60, 0.75);
}

.impact-card.is-active,
.impact-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 60px rgba(26, 32, 60, 0.25);
}

.cta-ribbon {
  background: linear-gradient(120deg, #1bb184, #5a2abf);
  border-radius: 2rem;
  padding: 3.5rem 4rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 32px 60px rgba(18, 23, 53, 0.35);
  color: var(--light-color);
}

.cta-ribbon::before,
.cta-ribbon::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  filter: blur(4px);
}

.cta-ribbon::before {
  top: -60px;
  right: -40px;
}

.cta-ribbon::after {
  bottom: -80px;
  left: -60px;
}

.cta-ribbon__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.testimonial-card {
  background: var(--light-color);
  border-radius: 1.75rem;
  padding: 2.5rem;
  border: 1px solid rgba(27, 177, 132, 0.25);
  box-shadow: 0 22px 55px rgba(12, 21, 46, 0.18);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card::before {
  content: "\201C";
  font-size: 4.5rem;
  color: rgba(27, 177, 132, 0.15);
  position: absolute;
  top: 10px;
  left: 24px;
}

.testimonial-card__quote {
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(26, 32, 60, 0.85);
  margin-bottom: 1.5rem;
}

.testimonial-card__author {
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0;
}

.testimonial-card.is-active,
.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 65px rgba(12, 21, 46, 0.3);
}

@media (max-width: 991px) {
  .cta-ribbon {
    padding: 2.5rem;
    text-align: center;
  }

  .cta-ribbon__content {
    margin: 0 auto;
  }
}

