:root {
  --navy: #01205F;
  --blue: #3273BA;
  --sky: #01B3FD;
  --cream: #FAF7F2;
  --card: #FFFCF7;
  --pale: #E1EBF7;
  --pale-2: #F5FAFF;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  font-family: 'Inter', sans-serif;
  color: var(--navy);
  overflow-x: hidden;
}

h1, h2, h3 { font-family: 'Fraunces', serif; font-weight: 600; margin: 0; }

a { color: var(--blue); }
a:hover { color: var(--navy); }

img { max-width: 100%; display: block; }

/* Section decor: soft blurred orbs, parallaxed on scroll for depth between sections */
.section-decor {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}
.section-decor--agenda {
  width: 420px; height: 420px;
  top: -140px; right: -100px;
  background: radial-gradient(circle, rgba(1,179,253,0.20), transparent 70%);
}
.section-decor--quienes-somos {
  width: 520px; height: 520px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,255,255,0.55), transparent 70%);
}
.section-decor--actividades {
  width: 380px; height: 380px;
  bottom: -120px; left: -80px;
  background: radial-gradient(circle, rgba(50,115,186,0.12), transparent 70%);
}
.section-decor--directorio {
  width: 400px; height: 400px;
  top: -120px; right: -80px;
  background: radial-gradient(circle, rgba(1,179,253,0.16), transparent 70%);
}
.section-decor--contacto {
  width: 460px; height: 460px;
  bottom: -160px; right: -100px;
  background: radial-gradient(circle, rgba(1,179,253,0.28), transparent 70%);
}

@media (max-width: 700px) {
  .section-decor { display: none; }
}

/* Preloader */
body.is-preloading { overflow: hidden; }

.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  animation: fimulp-preloader-fallback 0.6s ease 4s forwards;
}
.preloader-svg { width: 130px; height: auto; overflow: visible; }
.preloader-piece { opacity: 0; }

@keyframes fimulp-preloader-fallback {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
  .preloader { display: none; }
}

@keyframes fimulp-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-1 * var(--marquee-distance, 50%))); }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 56px;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(1,32,95,0.06);
  transition: padding 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-scrolled {
  padding-top: 10px;
  padding-bottom: 10px;
  box-shadow: 0 12px 28px rgba(1,32,95,0.10);
}

.logo-link { display: inline-flex; line-height: 0; }
.logo { height: 52px; width: auto; transition: height 0.3s ease; }
.site-header.is-scrolled .logo { height: 40px; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  position: relative;
  z-index: 60;
  flex-shrink: 0;
}
.nav-toggle span {
  position: absolute;
  left: 7px;
  right: 7px;
  height: 2px;
  border-radius: 2px;
  background: var(--navy);
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}
.nav-toggle span:nth-child(1) { top: 13px; }
.nav-toggle span:nth-child(2) { top: 19px; }
.nav-toggle span:nth-child(3) { top: 25px; }
.nav-toggle.is-active span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.nav-link {
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: var(--navy);
  padding: 9px 16px;
  border-radius: 999px;
  transition: background 0.15s ease;
}
.nav-link:hover { background: var(--pale); color: var(--navy); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  background: var(--navy);
  color: #FFFCF7;
  padding: 10px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  margin-left: 8px;
  transition: background 0.15s ease;
}
.nav-cta:hover { background: var(--blue); color: #FFFCF7; }

/* Hero */
.hero { background: #FFFFFF; max-width: 100%; padding: 140px 56px 0; }

.hero-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 72px;
  align-items: center;
  padding-bottom: 140px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pale);
  color: var(--navy);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.3px;
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.badge-dot { width: 6px; height: 6px; background: var(--sky); border-radius: 50%; }

.hero-copy h1 {
  font-size: clamp(40px, 4.8vw, 70px);
  line-height: 1.06;
  letter-spacing: -1px;
  margin: 0 0 28px;
}

.hero-lead {
  font-size: 20px;
  line-height: 1.55;
  color: var(--navy);
  opacity: 0.78;
  max-width: 520px;
  margin: 0 0 40px;
}

.hero-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--navy);
  color: #FFFCF7;
  padding: 17px 36px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(1,32,95,0.18);
  transition: background 0.15s ease;
}
.btn-primary:hover { background: var(--blue); color: #FFFCF7; }

.link-arrow { font-weight: 600; font-size: 15px; color: var(--blue); text-decoration: none; }
.link-arrow:hover { color: var(--navy); }

.hero-media { position: relative; }

.hero-photo {
  width: 100%;
  height: 520px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--pale) 0%, #d7e9fb 45%, var(--sky) 150%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 25% 20%, rgba(255,255,255,0.5), transparent 45%);
}
.hero-photo-mark { width: 88px; height: 88px; color: rgba(1,32,95,0.28); position: relative; z-index: 1; }
.hero-photo-mark circle { fill: currentColor; }

.hero-stat-card {
  position: absolute;
  left: -20px;
  bottom: -24px;
  background: #FFFFFF;
  border-radius: 18px;
  padding: 18px 26px;
  box-shadow: 0 20px 40px rgba(1,32,95,0.14);
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero-stat-number { font-family: 'Fraunces', serif; font-weight: 600; font-size: 28px; color: var(--navy); }
.hero-stat-label { font-size: 13px; line-height: 1.3; color: var(--navy); opacity: 0.7; max-width: 110px; }

/* Marquee */
.marquee-wrap {
  border-top: 1px solid var(--pale);
  border-bottom: 1px solid var(--pale);
  background: #FFFFFF;
  overflow: hidden;
  padding: 24px 0;
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation-name: fimulp-marquee;
  animation-duration: var(--marquee-duration, 16s);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.marquee-set { display: flex; }
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding-right: 20px;
  flex-shrink: 0;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--navy);
  white-space: nowrap;
}
.marquee-item i {
  width: 8px;
  height: 8px;
  background: var(--sky);
  border-radius: 2px;
  transform: rotate(45deg);
  flex-shrink: 0;
  margin-left: 20px;
  font-style: normal;
}

/* Stats */
.stats {
  background: var(--pale);
  padding: 56px 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
}
.stat { text-align: center; }
.stat-number { font-family: 'Fraunces', serif; font-weight: 600; font-size: 44px; color: var(--navy); }
.stat-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--blue);
  margin-top: 8px;
}

/* Section headings shared */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  font-size: 13px;
  color: var(--blue);
  margin-bottom: 16px;
}
.section-lead { font-size: 18px; line-height: 1.5; color: var(--navy); opacity: 0.75; margin: 0 0 56px; }

/* Agenda */
.agenda { position: relative; overflow: hidden; max-width: 100%; }
.agenda-inner { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 110px 48px; }
.agenda h2 { font-size: clamp(32px, 3.6vw, 48px); line-height: 1.12; margin: 0 0 18px; max-width: 720px; }
.agenda .section-lead { max-width: 600px; }

.agenda-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.agenda-card {
  background: var(--card);
  border: 1px solid var(--pale);
  border-radius: 20px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.agenda-card:hover { transform: translateY(-6px); box-shadow: 0 20px 32px rgba(1,32,95,0.10); }

.agenda-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.tag-fill { background: var(--pale); color: var(--navy); font-weight: 600; font-size: 13px; padding: 6px 14px; border-radius: 999px; }
.tag-outline { border: 1px solid var(--pale); color: var(--blue); font-weight: 600; font-size: 13px; padding: 6px 14px; border-radius: 999px; }

.agenda-card h3 { font-size: 23px; margin: 6px 0 0; line-height: 1.25; }
.agenda-place { font-size: 15px; color: var(--navy); opacity: 0.65; }

.btn-outline {
  margin-top: 10px;
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  border: 1.5px solid var(--blue);
  color: var(--blue);
  padding: 10px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-outline:hover { background: var(--blue); color: #FFFCF7; }

/* Quienes somos */
.quienes-somos { position: relative; overflow: hidden; background: var(--pale); padding: 110px 48px; }
.quienes-somos-inner { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; text-align: center; }
.quienes-somos-text {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.45;
  margin: 0;
  color: var(--navy);
}

/* Actividades */
.actividades { position: relative; overflow: hidden; background: #FFFFFF; max-width: 100%; margin: 0 auto; padding: 110px 48px; }
.actividades-inner { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; }
.actividades-inner h2 { font-size: clamp(32px, 3.6vw, 48px); line-height: 1.12; margin: 0 0 18px; max-width: 760px; }
.actividades .section-lead { max-width: 640px; }

.actividades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.actividad-card { background: var(--card); border-radius: 20px; padding: 40px 36px; }
.actividad-card h3 { font-size: 22px; margin: 0 0 12px; }
.actividad-card p { font-size: 15px; line-height: 1.55; color: var(--navy); opacity: 0.72; margin: 0; }

.actividad-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--pale);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.icon-shape { position: relative; }
.icon-charlas { width: 34px; height: 26px; }
.icon-charlas span:nth-child(1) { position: absolute; left: 0; top: 0; width: 20px; height: 16px; border-radius: 8px; background: var(--navy); }
.icon-charlas span:nth-child(2) { position: absolute; right: 0; bottom: 0; width: 14px; height: 12px; border-radius: 6px; background: var(--sky); }

.icon-capacitaciones { display: flex; flex-direction: column; gap: 4px; }
.icon-capacitaciones span { display: block; height: 5px; border-radius: 3px; background: var(--navy); }
.icon-capacitaciones span:nth-child(1) { width: 28px; }
.icon-capacitaciones span:nth-child(2) { width: 20px; }
.icon-capacitaciones span:nth-child(3) { width: 24px; background: var(--sky); }

.icon-mentorias { width: 36px; height: 26px; }
.icon-mentorias span:nth-child(1) { position: absolute; left: 0; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--navy); }
.icon-mentorias span:nth-child(2) { position: absolute; right: 0; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--sky); }
.icon-mentorias span:nth-child(3) { position: absolute; left: 14px; top: 11px; width: 14px; height: 1.5px; background: var(--navy); opacity: 0.4; }

/* Directorio */
.directorio { position: relative; overflow: hidden; background: var(--pale-2); padding: 110px 48px; }
.directorio-inner { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; }
.directorio-inner h2 { font-size: clamp(32px, 3.6vw, 48px); line-height: 1.12; margin: 0 0 18px; }
.directorio .section-lead { max-width: 600px; }

.directorio-carousel { position: relative; }

.directorio-scroll {
  overflow-x: auto;
  overflow-y: visible;
  padding: 12px 4px 28px;
  margin: 0 -4px;
  scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(to right, black, black calc(100% - 90px), transparent);
  mask-image: linear-gradient(to right, black, black calc(100% - 90px), transparent);
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.directorio-scroll.dragging { cursor: grabbing; scroll-behavior: auto; }
.directorio-track { display: flex; gap: 28px; width: max-content; }

.directorio-arrow {
  position: absolute;
  top: 50%;
  right: -8px;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: #FFFFFF;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(1,32,95,0.18);
  transition: background 0.15s ease, opacity 0.2s ease, transform 0.15s ease;
  z-index: 2;
}
.directorio-arrow:hover { background: var(--navy); color: #FFFCF7; transform: translateY(-50%) scale(1.06); }
.directorio-arrow:disabled { opacity: 0; pointer-events: none; }

@media (max-width: 700px) {
  .directorio-arrow { display: none; }
}

.directorio-card {
  scroll-snap-align: start;
  flex-shrink: 0;
  width: 300px;
  background: #FFFFFF;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(1,32,95,0.06);
  transition: box-shadow 0.35s ease;
}
.directorio-card:hover { box-shadow: 0 24px 40px rgba(1,32,95,0.16); }

.directorio-photo { width: 300px; height: 360px; object-fit: cover; }

.directorio-avatar {
  width: 300px;
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 64px;
}

.directorio-body { padding: 22px 24px 26px; }
.directorio-body h3 { font-size: 20px; margin: 0 0 4px; }
.directorio-role { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--blue); margin-bottom: 10px; }
.directorio-desc { font-size: 14px; line-height: 1.55; color: var(--navy); opacity: 0.72; margin: 0 0 14px; }
.directorio-link { font-size: 13px; font-weight: 600; color: var(--blue); text-decoration: none; }
.directorio-link:hover { color: var(--navy); }

/* Contacto */
.contacto { position: relative; overflow: hidden; background: var(--navy); color: #FFFCF7; padding: 120px 48px; }
.contacto-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 64px;
  align-items: center;
}
.contacto-bar { display: inline-block; width: 48px; height: 4px; background: var(--sky); border-radius: 2px; margin-bottom: 28px; }
.contacto-copy h2 { font-size: clamp(30px, 3.6vw, 44px); margin: 0 0 20px; line-height: 1.15; color: #FFFCF7; }
.contacto-note { font-size: 17px; line-height: 1.5; color: #FFFCF7; opacity: 0.75; margin: 0; max-width: 400px; }

.contacto-form {
  background: var(--card);
  border-radius: 24px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--navy); }
.field input, .field textarea {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--pale);
  background: #FFFFFF;
  color: var(--navy);
}
.field textarea { resize: vertical; }

#submit-btn {
  background: var(--navy);
  color: #FFFCF7;
  border: none;
  padding: 15px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease;
}
#submit-btn:hover { background: var(--blue); }
#submit-btn:disabled { cursor: default; }

/* Footer */
.site-footer {
  background: var(--navy);
  border-top: 1px solid rgba(255,252,247,0.15);
  padding: 32px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo { height: 36px; width: auto; filter: brightness(0) invert(1); }
.footer-copy { font-size: 13px; color: var(--pale); opacity: 0.7; }

/* Responsive tweaks */
@media (max-width: 900px) {
  .nav-toggle { display: block; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #FFFCF7;
    padding: 12px 24px 28px;
    box-shadow: 0 20px 40px rgba(1,32,95,0.14);
    max-height: calc(100vh - 84px);
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }

  .nav-link {
    padding: 16px 4px;
    border-radius: 0;
    border-bottom: 1px solid var(--pale);
    font-size: 16px;
  }

  .nav-cta { margin: 20px 0 0; justify-content: center; padding: 14px 24px; }
}

body.nav-open { overflow: hidden; }

@media (max-width: 700px) {
  .site-header, .hero, .agenda, .quienes-somos, .actividades, .directorio, .contacto, .site-footer {
    padding-left: 20px;
    padding-right: 20px;
  }
  .stats { padding: 40px 20px; grid-template-columns: repeat(2, 1fr); }
  .hero { padding-top: 96px; }
  .hero-inner { padding-bottom: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .agenda-card, .directorio-card { transition: none; }
}
