/* ═══════════════════════════════════════════════
   CENTRO DE REHABILITACIÓN JERUSALÉN
   styles.css  –  diseño responsivo elegante
   ═══════════════════════════════════════════════ */

/* ── Variables ───────────────────────────────── */
:root {
  --gold:    #b8972a;
  --gold-lt: #d4af37;
  --dark:    #0f1117;
  --dark2:   #1a1e2a;
  --soft-bg: #f5f2ed;
  --white:   #ffffff;
  --text:    #2c2c2c;
  --text-lt: #555;
  --wa-green:#25d366;
  --radius:  12px;
  --shadow:  0 8px 32px rgba(0,0,0,.15);
  --trans:   .3s ease;
  --font-head: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Lato', Arial, sans-serif;
}

/* ── Reset ───────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}
img { display:block; max-width:100%; height:auto; }
a  { text-decoration:none; color:inherit; }
ul { list-style:none; }

/* ── Utilidades ──────────────────────────────── */
.container { width:90%; max-width:1200px; margin-inline:auto; }
.section    { padding:90px 0; }
.section-dark { background:var(--dark2); color:var(--white); }
.section-soft { background:var(--soft-bg); }

/* ── Encabezados de sección ──────────────────── */
.section-header { text-align:center; margin-bottom:60px; }
.section-header.light h2,
.section-header.light .section-intro { color:var(--white); }
.section-tag {
  display:inline-block;
  font-size:.78rem;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--gold);
  margin-bottom:12px;
}
.section-header h2 {
  font-family:var(--font-head);
  font-size:clamp(2rem,4vw,3rem);
  font-weight:700;
  line-height:1.2;
  color:var(--dark);
  margin-bottom:16px;
}
.section-dark .section-header h2 { color:var(--white); }
.section-intro {
  font-size:1.05rem;
  color:var(--text-lt);
  max-width:640px;
  margin-inline:auto;
}

/* ═══════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════ */
.navbar {
  position:fixed; top:0; left:0; width:100%; z-index:1000;
  padding:14px 0;
  transition: background var(--trans), box-shadow var(--trans), padding var(--trans);
  background: transparent;
}
.navbar.scrolled {
  background: rgba(15,17,23,.96);
  backdrop-filter:blur(10px);
  box-shadow: 0 2px 20px rgba(0,0,0,.4);
  padding:10px 0;
}
.nav-container {
  display:flex; align-items:center; justify-content:space-between;
  width:90%; max-width:1200px; margin-inline:auto; gap:20px;
}
.nav-logo {
  display:flex; align-items:center; gap:10px;
  font-family:var(--font-head); font-size:1.3rem; font-weight:700;
  color:var(--white); flex-shrink:0;
}
.nav-logo img { width:46px; height:46px; object-fit:cover; border-radius:50%; }
.nav-menu ul {
  display:flex; gap:8px; align-items:center;
}
.nav-menu a {
  color:rgba(255,255,255,.88);
  font-size:.9rem;
  letter-spacing:.04em;
  padding:6px 14px;
  border-radius:20px;
  transition:background var(--trans), color var(--trans);
}
.nav-menu a:hover,
.nav-menu a:focus-visible {
  background:rgba(184,151,42,.2);
  color:var(--gold-lt);
}
/* Botón WhatsApp en navbar */
.nav-wa-btn {
  display:flex; align-items:center; gap:7px;
  background:var(--wa-green);
  color:var(--white);
  font-size:.82rem;
  font-weight:700;
  padding:7px 16px;
  border-radius:24px;
  white-space:nowrap;
  transition:opacity var(--trans), transform var(--trans);
  flex-shrink:0;
}
.nav-wa-btn svg { width:18px; height:18px; fill:var(--white); }
.nav-wa-btn:hover { opacity:.88; transform:scale(1.04); }

/* Hamburguesa */
.hamburger {
  display:none;
  flex-direction:column; justify-content:center; align-items:center;
  gap:5px; width:40px; height:40px;
  background:none; border:none; cursor:pointer;
  padding:4px;
}
.hamburger span {
  display:block; width:24px; height:2px;
  background:var(--white); border-radius:2px;
  transition:transform var(--trans), opacity var(--trans);
}
/* Hamburguesa activa → cruz */
.hamburger.active span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2){ opacity:0; }
.hamburger.active span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════ */
.hero {
  position:relative;
  height:100dvh; min-height:580px;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;
}
.hero-bg {
  position:absolute; inset:0;
  background-attachment:fixed;
  background-size:cover;
  background-position:center;
  will-change:transform;
}
/* Capa nublada */
.hero-fog {
  position:absolute; inset:0;
  background: linear-gradient(
    160deg,
    rgba(15,17,23,.72) 0%,
    rgba(15,17,23,.42) 45%,
    rgba(15,17,23,.68) 100%
  );
  backdrop-filter:blur(2px);
}
.hero-content {
  position:relative; z-index:2;
  text-align:center; color:var(--white);
  padding:20px;
  max-width:720px;
}
.hero-eyebrow {
  font-size:.82rem; letter-spacing:.22em;
  text-transform:uppercase; color:var(--gold-lt);
  margin-bottom:14px;
}
.hero-content h1 {
  font-family:var(--font-head);
  font-size:clamp(2.4rem,7vw,5rem);
  font-weight:700; line-height:1.1;
  margin-bottom:20px;
}
.hero-content h1 span { color:var(--gold-lt); }
.hero-sub {
  font-size:1.05rem; color:rgba(255,255,255,.85);
  margin-bottom:36px; max-width:520px; margin-inline:auto;
}

/* ── Botones ─────────────────────────────────── */
.btn-primary {
  display:inline-flex; align-items:center; gap:8px;
  background:var(--gold);
  color:var(--white);
  font-weight:700; font-size:.95rem;
  padding:14px 34px;
  border-radius:40px;
  border:2px solid var(--gold);
  transition:background var(--trans), color var(--trans), transform var(--trans);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background:transparent; color:var(--gold-lt);
  transform:translateY(-2px);
}
.btn-wa { background:var(--wa-green); border-color:var(--wa-green); }
.btn-wa svg { width:20px; height:20px; fill:var(--white); }
.btn-wa:hover { color:var(--wa-green); }

/* Botón WhatsApp del hero – más grande y llamativo */
.btn-hero-wa {
  background: var(--wa-green);
  border-color: var(--wa-green);
  font-size: 1.05rem;
  padding: 16px 38px;
  gap: 10px;
  box-shadow: 0 4px 24px rgba(37,211,102,.45);
  letter-spacing: .02em;
}
.btn-hero-wa svg { width: 22px; height: 22px; fill: var(--white); flex-shrink:0; }
.btn-hero-wa:hover {
  background: transparent;
  color: #25d366;
  box-shadow: 0 4px 24px rgba(37,211,102,.25);
}
.btn-hero-wa:hover svg { fill: #25d366; }

/* Indicador scroll */
.hero-scroll-indicator {
  position:absolute; bottom:30px; left:50%; transform:translateX(-50%);
  z-index:2;
}
.hero-scroll-indicator span {
  display:block; width:24px; height:38px;
  border:2px solid rgba(255,255,255,.5);
  border-radius:12px; position:relative;
}
.hero-scroll-indicator span::after {
  content:''; position:absolute;
  top:6px; left:50%; transform:translateX(-50%);
  width:4px; height:8px;
  background:var(--white); border-radius:2px;
  animation:scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0%   { top:6px; opacity:1; }
  70%  { top:20px; opacity:.2; }
  100% { top:6px; opacity:1; }
}

/* ═══════════════════════════════════════════════
   QUIÉNES SOMOS
   ═══════════════════════════════════════════════ */
.about-founder,
.about-team {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:60px;
  align-items:center;
  margin-bottom:80px;
}
.about-team { margin-bottom:0; }
.about-img-wrap {
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
}
.about-img-wrap img {
  width:100%; height:460px;
  object-fit:cover;
  transition:transform .5s ease;
}
.about-img-wrap:hover img { transform:scale(1.03); }
.label-pill {
  display:inline-block;
  background:var(--gold);
  color:var(--white);
  font-size:.73rem;
  letter-spacing:.1em;
  text-transform:uppercase;
  padding:4px 14px;
  border-radius:20px;
  margin-bottom:12px;
}
.about-text h3 {
  font-family:var(--font-head);
  font-size:clamp(1.6rem,3vw,2.2rem);
  font-weight:700;
  margin-bottom:16px;
  line-height:1.2;
}
.about-text p { margin-bottom:12px; color:var(--text-lt); }
.about-text strong { color:var(--dark); }
.about-text em { color:var(--gold); font-style:normal; font-weight:700; }

/* ═══════════════════════════════════════════════
   GALERÍA INSTALACIONES
   ═══════════════════════════════════════════════ */
.gallery-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
}
.gallery-item {
  position:relative; overflow:hidden;
  border-radius:var(--radius);
  aspect-ratio:4/3;
}
.gallery-item img {
  width:100%; height:100%;
  object-fit:cover;
  transition:transform .5s ease;
}
.gallery-item:hover img { transform:scale(1.07); }
.gallery-overlay {
  position:absolute; inset:0;
  background:linear-gradient(transparent 40%, rgba(0,0,0,.7));
  display:flex; align-items:flex-end;
  padding:16px;
  opacity:0; transition:opacity var(--trans);
}
.gallery-item:hover .gallery-overlay { opacity:1; }
.gallery-overlay p {
  color:var(--white); font-size:.9rem;
  font-weight:700; letter-spacing:.03em;
}

/* ═══════════════════════════════════════════════
   FE Y ESPIRITUALIDAD
   ═══════════════════════════════════════════════ */
.faith-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:40px;
  align-items:start;
}
.faith-img {
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
  height:360px;
}
.faith-img img { width:100%; height:100%; object-fit:cover; }
.faith-text h3 {
  font-family:var(--font-head);
  font-size:1.7rem;
  font-weight:700;
  margin-bottom:14px;
  color:var(--dark);
}
.faith-text p { color:var(--text-lt); margin-bottom:12px; }
.faith-text strong { color:var(--dark); }
.faith-text em { color:var(--gold); font-style:italic; }
blockquote {
  border-left:3px solid var(--gold);
  padding:12px 20px;
  margin-top:20px;
  background:var(--soft-bg);
  border-radius:0 var(--radius) var(--radius) 0;
  font-family:var(--font-head);
  font-size:1.1rem;
  color:var(--dark);
}
blockquote cite {
  display:block;
  font-size:.82rem;
  color:var(--gold);
  margin-top:6px;
  letter-spacing:.05em;
}

/* ═══════════════════════════════════════════════
   ÁREAS COMUNES
   ═══════════════════════════════════════════════ */
.commons-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:32px;
}
.commons-item {
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
  background:var(--white);
}
.commons-item img {
  width:100%; height:280px;
  object-fit:cover;
  transition:transform .5s ease;
}
.commons-item:hover img { transform:scale(1.04); }
.commons-caption { padding:24px; }
.commons-caption h4 {
  font-family:var(--font-head);
  font-size:1.3rem;
  font-weight:700;
  margin-bottom:8px;
  color:var(--dark);
}
.commons-caption p { color:var(--text-lt); font-size:.95rem; }

/* ═══════════════════════════════════════════════
   PROGRAMAS
   ═══════════════════════════════════════════════ */
.programs-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:28px;
}
.program-card {
  position:relative;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.1);
  border-radius:var(--radius);
  padding:36px 28px;
  transition:transform var(--trans), border-color var(--trans);
}
.program-card:hover {
  transform:translateY(-6px);
  border-color:var(--gold);
}
.program-card.featured {
  border-color:var(--gold);
  background:rgba(184,151,42,.08);
}
.program-icon {
  width:60px; height:60px;
  border-radius:50%;
  background:var(--gold);
  color:var(--white);
  font-family:var(--font-head);
  font-size:1.4rem; font-weight:700;
  display:flex; align-items:center; justify-content:center;
  margin-bottom:20px;
}
.program-card h3 {
  font-family:var(--font-head);
  font-size:1.5rem; font-weight:700;
  color:var(--white);
  margin-bottom:12px;
}
.program-card p { color:rgba(255,255,255,.72); font-size:.95rem; margin-bottom:18px; }
.program-card ul { padding-left:0; }
.program-card li {
  color:rgba(255,255,255,.65);
  font-size:.88rem;
  padding:5px 0;
  border-bottom:1px solid rgba(255,255,255,.07);
  padding-left:16px; position:relative;
}
.program-card li::before {
  content:'✦'; position:absolute; left:0;
  color:var(--gold); font-size:.6rem; top:8px;
}
.badge {
  position:absolute; top:16px; right:16px;
  background:var(--gold); color:var(--white);
  font-size:.7rem; font-weight:700;
  letter-spacing:.08em; text-transform:uppercase;
  padding:4px 12px; border-radius:20px;
}

/* ── Imagen de servicios (sección programas) ── */
.services-img-wrap {
  margin-top:60px;
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:0 12px 40px rgba(0,0,0,.4);
  max-width:860px;
  margin-inline:auto;
}
.services-img-wrap img { width:100%; display:block; }
/* ═ Barra de credenciales (tras el hero) ═ */
.trust-bar {
  background: var(--dark);
  display:flex; flex-wrap:wrap;
  justify-content:center;
  gap:0;
  border-top:2px solid var(--gold);
}
.trust-item {
  display:flex; align-items:center; gap:12px;
  color:rgba(255,255,255,.85);
  font-size:.88rem;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  padding:18px 30px;
  flex:1 1 200px;
  justify-content:center;
  border-right:1px solid rgba(255,255,255,.07);
  transition: background var(--trans), color var(--trans);
}
.trust-item:last-child { border-right:none; }
.trust-item:hover { background:rgba(184,151,42,.12); color:var(--gold-lt); }
.trust-icon {
  width:36px; height:36px; flex-shrink:0;
  background:var(--gold);
  border-radius:50%;
  display:flex; align-items:center; justify-content:center;
}
.trust-icon svg { width:18px; height:18px; fill:var(--white); }
@media (max-width:768px) {
  .trust-bar { display: none; }
}
/* ═══════════════════════════════════════════════
   CONTACTO
   ═══════════════════════════════════════════════ */
.contact-grid {
  display:grid;
  grid-template-columns:1fr 1.4fr;
  gap:50px;
  align-items:start;
}
.contact-info { display:flex; flex-direction:column; gap:26px; }
.contact-item {
  display:flex; gap:16px; align-items:flex-start;
}
.contact-icon {
  width:44px; height:44px; flex-shrink:0;
  background:var(--gold);
  border-radius:50%;
  display:flex; align-items:center; justify-content:center;
}
.contact-icon svg { width:22px; height:22px; fill:var(--white); }
.contact-item strong { display:block; font-size:.9rem; letter-spacing:.04em; color:var(--dark); }
.contact-item p { color:var(--text-lt); font-size:.95rem; margin-top:2px; }
.map-wrap {
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
}
.map-wrap iframe { display:block; }

/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */
.footer {
  background:var(--dark);
  color:rgba(255,255,255,.6);
  padding:50px 0 30px;
}
.footer-inner {
  display:flex; flex-direction:column; align-items:center;
  gap:24px; text-align:center;
}
.footer-brand {
  display:flex; align-items:center; gap:14px;
}
.footer-brand img { width:50px; height:50px; object-fit:cover; border-radius:50%; }
.footer-brand p { font-size:.95rem; line-height:1.5; text-align:left; color:rgba(255,255,255,.7); }
.footer-brand strong { color:var(--gold-lt); }
.footer-nav {
  display:flex; flex-wrap:wrap; gap:8px 20px;
  justify-content:center;
}
.footer-nav a {
  font-size:.85rem;
  color:rgba(255,255,255,.55);
  transition:color var(--trans);
}
.footer-nav a:hover { color:var(--gold-lt); }
.footer-copy { font-size:.78rem; color:rgba(255,255,255,.3); }

/* ═══════════════════════════════════════════════
   BOTÓN FLOTANTE WHATSAPP
   ═══════════════════════════════════════════════ */
.wa-float {
  position:fixed; bottom:28px; right:24px; z-index:999;
  width:58px; height:58px;
  background:var(--wa-green);
  border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 4px 16px rgba(37,211,102,.45);
  transition:transform var(--trans), box-shadow var(--trans);
}
.wa-float svg { width:28px; height:28px; fill:var(--white); }
.wa-float:hover {
  transform:scale(1.1);
  box-shadow:0 8px 24px rgba(37,211,102,.6);
}

/* ═══════════════════════════════════════════════
   ANIMACIÓN FADE-IN
   ═══════════════════════════════════════════════ */
.fade-in {
  opacity:0; transform:translateY(30px);
  transition:opacity .7s ease, transform .7s ease;
}
.fade-in.visible { opacity:1; transform:none; }

/* ═══════════════════════════════════════════════
   RESPONSIVE  ≤ 1024px
   ═══════════════════════════════════════════════ */
@media (max-width:1024px) {
  .about-founder, .about-team {
    grid-template-columns:1fr;
    gap:36px;
  }
  .about-team .about-img-wrap { order:-1; }
  .about-img-wrap img { height:340px; }
  .faith-grid { grid-template-columns:1fr; }
  .faith-img { height:280px; }
  .contact-grid { grid-template-columns:1fr; }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE  ≤ 768px  (tablet / móvil)
   ═══════════════════════════════════════════════ */
@media (max-width:768px) {
  /* Navbar móvil */
  .hamburger { display:flex; }
  .nav-wa-btn { display:none; }
  .nav-menu {
    display:flex;
    position:fixed; inset:0 0 0 30%;
    background:rgba(10,12,20,.97);
    backdrop-filter:blur(12px);
    flex-direction:column;
    justify-content:center;
    transform:translateX(100%);
    transition:transform .35s cubic-bezier(.4,0,.2,1);
    z-index:999;
    padding:40px 28px;
    overflow-y:auto;
  }
  .nav-menu.open { transform:translateX(0); }
  .nav-menu ul {
    display:flex;
    flex-direction:column; gap:0;
    align-items:flex-start;
    width:100%;
  }
  .nav-menu li { width:100%; }
  .nav-menu a {
    display:block;
    font-size:1.2rem;
    padding:14px 6px;
    width:100%;
    border-radius:0;
    border-bottom:1px solid rgba(255,255,255,.08);
  }
  .nav-menu a:hover { background:none; color:var(--gold-lt); }

  /* Hero */
  .hero-bg { background-attachment:scroll; } /* fallback iOS */

  /* Secciones */
  .section { padding:60px 0; }

  /* Galería */
  .gallery-grid { grid-template-columns:repeat(2,1fr); gap:12px; }

  /* Áreas comunes */
  .commons-grid { grid-template-columns:1fr; }

  /* Programas */
  .programs-grid { grid-template-columns:1fr; }

  /* ── Reducción de texto en móvil ── */
  .hero-sub { display:none; }
  .section-intro { display:none; }
  .program-card p { display:none; }
  .about-text p:not(:first-of-type) { display:none; }
  .faith-text p:not(:first-of-type) { display:none; }
  blockquote { display:none; }
  .faith-always p,
  .faith-always blockquote { display:block; }
  .commons-caption p { display:none; }
  .section-header { margin-bottom:36px; }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE  ≤ 480px
   ═══════════════════════════════════════════════ */
@media (max-width:480px) {
  .gallery-grid { grid-template-columns:1fr; }
  .nav-menu { inset:0 0 0 0; } /* pantalla completa */
  .hero-content h1 { font-size:2.2rem; }
  .footer-brand { flex-direction:column; text-align:center; }
  .footer-brand p { text-align:center; }
}
