/* ═══════════════════════════════════════════
   Servidores Mundiales — Mission Trips Stylesheet
   ═══════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 20px; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; color: #1a1f36; background: #fff; line-height: 1.65; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

:root {
  --blue: #0019a4; --blue-hover: #1430c8;
  --blue-pale: #dde4f7; --blue-light: #f0f3fd;
  --gray-bg: #f4f6fb; --gray-border: #e2e7f2;
  --gray-mid: #8892b0; --text-dark: #1a1f36;
  --text-body: #3d4766;
  --radius: 12px; --radius-lg: 18px;
  --warm: #f9f6f0;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.section-label { font-size: 14px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--blue); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.section-label::before { content: ""; display: block; width: 20px; height: 2px; background: var(--blue); }
.section-title { font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 4.5vw, 48px); font-weight: 400; line-height: 1.2; color: var(--text-dark); margin-bottom: 18px; }
.btn-outline { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--blue); font-size: 17px; font-weight: 600; padding: 15px 28px; border-radius: var(--radius); border: 2px solid var(--blue); transition: all .18s; }
.btn-outline:hover { background: var(--blue); color: #fff; transform: translateY(-1px); }
.btn-primary { display: inline-flex; align-items: center; gap: 8px; background: var(--blue); color: #fff; font-size: 17px; font-weight: 600; padding: 15px 28px; border-radius: var(--radius); border: 2px solid var(--blue); transition: background .18s, transform .14s; }
.btn-primary:hover { background: var(--blue-hover); transform: translateY(-1px); }

/* ── NAV ── */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.97); border-bottom: 1px solid var(--gray-border); backdrop-filter: blur(8px); }
.nav-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; height: 84px; gap: 16px; }
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo img { max-height: 60px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; justify-content: center; gap: 4px; list-style: none; }
.nav-links a { font-size: 18px; font-weight: 500; color: var(--text-body); padding: 9px 18px; border-radius: 8px; transition: all .15s; }
.nav-links a:hover, .nav-links a.active { background: var(--blue-light); color: var(--blue); }
.nav-cta { display: flex; align-items: center; }
.hamburger { display: none; background: none; border: none; flex-direction: column; gap: 5px; padding: 4px; cursor: pointer; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text-dark); border-radius: 2px; }
.mobile-menu { display: none; background: #fff; border-top: 1px solid var(--gray-border); padding: 12px 0 16px; }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; font-size: 19px; font-weight: 500; color: var(--text-body); padding: 14px 24px; border-bottom: 1px solid var(--gray-border); }
.mobile-menu a:last-child { border-bottom: none; }
@media (max-width: 900px) {
  .nav-inner { grid-template-columns: auto auto; justify-content: space-between; }
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .nav-logo img { max-height: 50px; }
}

/* ── HERO ── */
/* Sin overlay azul: solo la imagen de fondo. background-position: center 20%
   sube el encuadre para que las cabezas de las personas no queden cortadas
   — ajusta ese porcentaje si hace falta (más bajo = muestra más arriba de
   la imagen, más alto = muestra más abajo). El título y el subtítulo ahora
   van en negro/gris oscuro en vez de blanco, ya que no hay overlay que
   los proteja sobre la foto. */
.page-hero {
  background-image: url('missions.jpg');
  background-size: cover;
  background-position: center 20%;
  padding: 88px 0 80px;
  position: relative;
  overflow: hidden;
}
.page-hero-title { font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 5.5vw, 68px); font-weight: 400; color: var(--text-dark); line-height: 1.1; margin-bottom: 22px; letter-spacing: -1px; }
.page-hero-sub { font-size: 20px; color: var(--text-body); line-height: 1.75; max-width: 580px; margin-bottom: 40px; }
.page-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-hero { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--blue); font-size: 17px; font-weight: 700; padding: 16px 30px; border-radius: var(--radius); border: 2px solid #fff; transition: all .18s; }
.btn-hero:hover { background: rgba(255,255,255,0.9); transform: translateY(-1px); }
.btn-hero-outline { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--text-dark); font-size: 17px; font-weight: 600; padding: 16px 30px; border-radius: var(--radius); border: 2px solid var(--text-dark); transition: all .18s; }
.btn-hero-outline:hover { border-color: var(--blue); color: var(--blue); background: rgba(0,25,164,0.06); transform: translateY(-1px); }

/* ── INVITATION HEADER ── */
.invite-section { padding: 80px 0 64px; background: #ffffff; border-bottom: 1px solid #ffffff; }
.invite-inner { max-width: 720px; }
.invite-verse { font-family: Georgia, serif; font-size: 22px; color: #000000; line-height: 1.8; font-style: italic; margin-bottom: 12px; }
.invite-verse-ref { font-size: 14px; font-weight: 700; color: #000000; letter-spacing: 1.5px; text-transform: uppercase; }

/* ── OUR VISION / THREE PILLARS ── */
.vision-section { padding: 88px 0; background: #fff; }
.vision-intro { max-width: 720px; margin-bottom: 52px; }
.vision-intro .section-title { margin-bottom: 18px; }
.vision-desc { font-size: 18px; color: var(--text-body); line-height: 1.85; }
.vision-desc strong { color: var(--text-dark); font-weight: 700; }

.pillars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.pillar-card { background: var(--blue-light); border: 1px solid var(--gray-border); border-radius: var(--radius-lg); padding: 36px 32px; }
.pillar-icon { width: 60px; height: 60px; border-radius: 50%; background: var(--blue); display: flex; align-items: center; justify-content: center; margin-bottom: 24px; }
.pillar-icon svg { width: 26px; height: 26px; }
.pillar-title { font-size: 19px; font-weight: 700; color: var(--text-dark); margin-bottom: 10px; line-height: 1.35; }
.pillar-text { font-size: 16px; color: var(--text-body); line-height: 1.75; margin: 0; }

/* ── MISSION WAYS — HUMAN LAYOUT ── */
.ways-section { padding: 88px 0; background: #fff; }

.way-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 56px 0;
  border-bottom: 1px solid var(--gray-border);
}
.way-item:last-child { border-bottom: none; }
.way-item.reverse { direction: rtl; }
.way-item.reverse > * { direction: ltr; }

.way-photo { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; position: relative; }
.way-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.way-item:hover .way-photo img { transform: scale(1.04); }

/* Carrusel dentro de .way-photo: apila las imágenes una encima de otra
   y hace un crossfade (fundido) automático entre la que está activa
   y la siguiente. El JS del HTML se encarga de mover la clase "active".
   Para añadir fotos nuevas, solo agrega más <img> dentro del mismo
   contenedor .way-photo.carousel en el HTML — no hace falta tocar este CSS. */
.way-photo.carousel img {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 0;
  transition: opacity 1.1s ease-in-out, transform .6s ease;
}
.way-photo.carousel img.active {
  opacity: 1;
  z-index: 1;
}

/* Small label pill — text only, no icon */
.way-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-pale);
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 18px;
}

.way-title {
  font-family: Georgia, serif;
  font-size: clamp(24px, 3.4vw, 33px);
  font-weight: 400;
  color: var(--text-dark);
  line-height: 1.3;
  margin-bottom: 16px;
}
.way-text {
  font-size: 18px;
  color: var(--text-body);
  line-height: 1.85;
  margin-bottom: 26px;
}

/* Human detail — a small personal note, no icon */
.way-note {
  background: var(--blue-light);
  border-left: 3px solid var(--blue);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin-bottom: 26px;
}
.way-note-text {
  font-size: 16px;
  color: var(--text-body);
  line-height: 1.7;
  font-style: italic;
}

.way-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-size: 17px;
  font-weight: 700;
  border-bottom: 2px solid var(--blue-pale);
  padding-bottom: 3px;
  transition: gap .2s, border-color .2s;
}
.way-cta:hover { gap: 14px; border-color: var(--blue); }

/* ── MID CTA ── */
.mid-cta { padding: 88px 0; background: var(--blue); text-align: center; }
.mid-cta-title { font-family: Georgia, serif; font-size: clamp(28px, 4vw, 46px); color: #fff; font-weight: 400; line-height: 1.25; margin-bottom: 14px; }
.mid-cta-sub { font-size: 19px; color: rgba(255,255,255,0.78); max-width: 540px; margin: 0 auto 36px; line-height: 1.75; }
.mid-cta-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ── GALLERY ── */
.gallery-section { padding: 96px 0; background: #fff; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: 220px 220px; gap: 10px; margin-top: 52px; }
.gallery-item { border-radius: 10px; overflow: hidden; background: var(--gray-bg); position: relative; }
.gallery-item.tall { grid-row: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item::after { content: ""; position: absolute; inset: 0; background: rgba(0,25,164,0); transition: background .3s; }
.gallery-item:hover::after { background: rgba(0,25,164,0.1); }

/* ── BEFORE & AFTER ── */
.before-after-section {
  padding: 104px 0;
  background: white(--warm);
  border-top: 1px solid #ffffff;
}
.before-after-intro { max-width: 640px; margin-bottom: 64px; }
.before-after-intro .section-title { margin-bottom: 14px; }
.before-after-intro p { font-size: 19px; color: var(--text-body); line-height: 1.8; }

.ba-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.ba-slot {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gray-bg);
  border: 1px solid var(--gray-border);
}

.ba-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

/* Antes era un "placeholder" vacío con borde punteado (las rayitas
   alrededor de la foto). Ahora que ya hay fotos reales dentro, se quitó
   ese borde y quedó como un simple contenedor — el marco limpio lo da
   .ba-slot, que ya tiene un solo borde sólido alrededor de toda la tarjeta. */
.ba-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--gray-bg);
}

.ba-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 20px;
  z-index: 2;
}
.ba-badge.before {
  background: rgba(30, 30, 30, 0.72);
  color: #fff;
  backdrop-filter: blur(4px);
}
.ba-badge.after {
  background: var(--blue);
  color: #fff;
}

.ba-caption {
  padding: 20px 22px;
  border-top: 1px solid var(--gray-border);
  background: #fff;
}
.ba-caption-title { font-size: 17px; font-weight: 700; color: var(--text-dark); margin-bottom: 6px; }
.ba-caption-text { font-size: 16px; color: var(--text-body); line-height: 1.65; }

.ba-arrow {
  display: none;
}
@media (min-width: 640px) {
  .ba-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--blue);
    opacity: .4;
    position: absolute;
    left: 50%;
    top: 38%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 5;
  }
}
.ba-container { position: relative; }

/* Family quote — below the photos */
.ba-family-quote {
  margin-top: 44px;
  background: var(--blue);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  display: flex;
  align-items: flex-start;
  gap: 26px;
}
.ba-quote-icon { font-size: 44px; line-height: 1; color: rgba(255,255,255,0.2); font-family: Georgia, serif; flex-shrink: 0; margin-top: -4px; }
.ba-quote-text { font-family: Georgia, serif; font-size: 20px; color: rgba(255,255,255,0.9); font-style: italic; line-height: 1.8; }
.ba-quote-family { font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.5); letter-spacing: 1.5px; text-transform: uppercase; margin-top: 16px; font-style: normal; font-family: inherit; }

/* ── PLAN YOUR TRIP ── */
.plan-section { padding: 96px 0; background: var(--gray-bg); }
.plan-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.plan-steps { display: flex; flex-direction: column; margin-top: 40px; }
.plan-step { display: flex; gap: 22px; padding: 24px 0; border-bottom: 1px solid var(--gray-border); }
.plan-step:last-child { border-bottom: none; }
.plan-step-num { width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 800; flex-shrink: 0; margin-top: 2px; }
.plan-step-title { font-size: 18px; font-weight: 700; color: var(--text-dark); margin-bottom: 6px; }
.plan-step-text { font-size: 16px; color: var(--text-body); line-height: 1.7; }
.plan-card { background: var(--blue); border-radius: var(--radius-lg); padding: 44px; color: #fff; margin-top: 40px; }
.plan-card-label { font-size: 13px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 14px; }
.plan-card-title { font-family: Georgia, serif; font-size: 27px; font-weight: 400; margin-bottom: 16px; line-height: 1.3; }
.plan-card-text { font-size: 17px; color: rgba(255,255,255,0.78); line-height: 1.75; margin-bottom: 30px; }
.plan-card-contacts { display: flex; flex-direction: column; gap: 18px; margin-bottom: 30px; }
.plan-card-contact { display: flex; flex-direction: column; gap: 2px; }
.plan-card-contact-label { font-size: 13px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1px; }
.plan-card-contact-value { font-size: 17px; color: #fff; font-weight: 500; }
.btn-white { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--blue); font-size: 17px; font-weight: 700; padding: 16px 30px; border-radius: var(--radius); border: 2px solid #fff; transition: all .18s; width: 100%; justify-content: center; }
.btn-white:hover { background: rgba(255,255,255,0.9); transform: translateY(-1px); }

/* ── OUR PARTNERS ── */
.partners-section { padding: 96px 0 88px; background: #fff; border-top: 1px solid var(--gray-border); }
.partners-header { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.partners-accent { display: block; width: 48px; height: 3px; background: var(--blue); border-radius: 2px; margin: 0 auto 22px; }
.partners-title { font-size: clamp(28px, 4vw, 40px); font-weight: 800; color: var(--text-dark); margin-bottom: 14px; line-height: 1.2; }
.partners-sub { font-family: Georgia, serif; font-style: italic; font-size: 17px; color: var(--text-body); line-height: 1.7; }

.partners-carousel {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 12px 0;
  cursor: grab;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch; /* Activa el scroll suave de iOS */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.partners-carousel::-webkit-scrollbar { display: none; }
.partners-carousel.dragging { cursor: grabbing; }
.partners-carousel::before,
.partners-carousel::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}
.partners-carousel::before { left: 0; background: linear-gradient(90deg, #fff, rgba(255,255,255,0)); }
.partners-carousel::after { right: 0; background: linear-gradient(270deg, #fff, rgba(255,255,255,0)); }

.partners-track {
  display: flex;
  align-items: center;
  gap: 80px;
  width: max-content;
  will-change: transform;
}

.partner-logo { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; height: 140px; transition: transform 0.2s ease-out; }
.partner-logo img {
  max-height: 100%;
  width: auto;
  filter: grayscale(0%);
  opacity: .85;
  transition: filter .25s, opacity .25s;
  -webkit-user-drag: none; /* Evita que el iPhone quiera arrastrar el archivo */
  user-select: none; /* Evita seleccionar la imagen */
}
.partner-logo img:hover { filter: none; opacity: 1; }

.partners-dots { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 40px; }
.partners-dots .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gray-border); }
.partners-dots .dot.active { width: 8px; height: 8px; background: var(--blue); }

/* ── FOOTER ── */
.footer { background: #fff; border-top: 1px solid var(--gray-border); padding: 56px 0 32px; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.footer-logo img { height: 58px; width: auto; margin-bottom: 16px; }
.footer-brand-desc { font-size: 16px; color: var(--text-body); line-height: 1.75; max-width: 280px; }
.footer-col h4 { font-size: 16px; font-weight: 700; color: var(--text-dark); margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: 16px; color: var(--text-body); transition: color .15s; }
.footer-col a:hover { color: var(--blue); }
.footer-bottom { border-top: 1px solid var(--gray-border); margin-top: 44px; padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer-copy { font-size: 15px; color: var(--gray-mid); }

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .way-item, .way-item.reverse { grid-template-columns: 1fr; direction: ltr; gap: 30px; }
  .way-item.reverse .way-photo { order: -1; }
  .ba-grid { grid-template-columns: 1fr; }
  .ba-family-quote { flex-direction: column; gap: 14px; padding: 30px 26px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 180px 180px 180px; }
  .gallery-item.tall { grid-row: span 1; }
  .plan-inner { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 28px; }
  .pillars-grid { grid-template-columns: 1fr; }
  .partners-track { gap: 56px; }
  .partner-logo { height: 100px; }
}
@media (max-width: 580px) {
  html { font-size: 19px; }
  .gallery-grid { grid-template-rows: repeat(4,150px); }
  .gallery-section, .plan-section, .vision-section { padding: 64px 0; }
  .ways-section { padding: 64px 0; }
  .before-after-section { padding: 72px 0; }
  .mid-cta { padding: 64px 0; }
  .way-item { padding: 40px 0; }
  .partners-section { padding: 64px 0 56px; }
  .partners-carousel::before, .partners-carousel::after { width: 48px; }
  .partners-dots .dot:nth-child(4n) { display: none; }
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}