:root {
  --vine-950: #13261e;
  --vine-900: #183427;
  --vine-800: #21533b;
  --vine-700: #2f6d4a;
  --leaf: #7fa35a;
  --grape: #5b3b67;
  --cream: #fbf7ee;
  --paper: #fffdf8;
  --ink: #172019;
  --muted: #667268;
  --line: rgba(23, 32, 25, 0.14);
  --shadow: 0 22px 70px rgba(19, 38, 30, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, var(--cream), #f5efe2 44%, var(--paper));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
body.menu-open, body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(251, 247, 238, 0.94);
  border-bottom: 1px solid rgba(23, 32, 25, 0.08);
  backdrop-filter: blur(18px);
}
.nav {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand-logo { width: 118px; height: 54px; object-fit: contain; mix-blend-mode: multiply; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a, .dropdown-toggle {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: var(--vine-900);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}
.nav-links a:hover, .dropdown-toggle:hover { background: rgba(127, 163, 90, 0.14); }
.nav-links .nav-cta { color: var(--paper); background: var(--vine-800); }
.nav-links .nav-cta:hover { background: var(--vine-700); }
.nav-dropdown { position: relative; }
.dropdown-toggle { gap: 7px; }
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 60;
  width: 235px;
  display: none;
  padding: 14px 8px 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu,
.nav-dropdown.is-open .dropdown-menu { display: grid; }
.dropdown-menu a {
  min-height: 40px;
  justify-content: flex-start;
  border-radius: 6px;
}
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: var(--vine-900);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}
.menu-toggle span:not(.sr-only) {
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 180ms ease, opacity 180ms ease;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 14ch;
  color: var(--vine-950);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 6vw, 5.8rem);
  line-height: 0.96;
}
.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid var(--vine-800);
  border-radius: 999px;
  font-weight: 900;
}
.button.primary { color: var(--paper); background: var(--vine-800); box-shadow: 0 14px 34px rgba(47, 109, 74, 0.22); }
.button.primary:hover { background: var(--vine-700); }
.button.ghost { color: var(--vine-900); background: rgba(255, 253, 248, 0.72); }
.eyebrow, .section-kicker, .card-label {
  color: var(--vine-700);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero {
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100svh - 76px);
  margin: 0 auto;
  padding: 76px 0 64px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 86px);
}

.home-banner {
  width: 100%;
  height: clamp(230px, 31vw, 430px);
  overflow: hidden;
  background: #e7f1e8;
}

.home-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-logo { width: min(100%, 540px); max-height: 240px; margin-bottom: 28px; object-fit: contain; object-position: left center; mix-blend-mode: multiply; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-media { position: relative; min-height: 610px; }
.hero-photo { position: absolute; display: block; object-fit: cover; border-radius: 8px; box-shadow: var(--shadow); }
.primary-photo { inset: 0 8% auto 0; width: 82%; height: 370px; }
.secondary-photo { right: 0; bottom: 10px; width: 52%; height: 230px; border: 8px solid var(--cream); }
.gather-card {
  position: relative;
  z-index: 2;
  width: min(360px, 70%);
  margin: 292px 0 0 auto;
  padding: 34px;
  color: var(--paper);
  background: linear-gradient(145deg, rgba(33, 83, 59, 0.96), rgba(19, 38, 30, 0.96));
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.gather-card .card-label, .gather-card dt { color: #d6e6c7; font-weight: 900; }
.gather-card dl { margin: 22px 0 0; display: grid; gap: 18px; }
.gather-card dd { margin: 2px 0 0; color: rgba(255, 253, 248, 0.88); }

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0;
}
.intro { max-width: 860px; text-align: center; }
.intro h2, .section-heading h2, .pastor-copy h2, .location h2, .gallery-heading h2 {
  color: var(--vine-950);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1;
}
.intro p, .pastor-copy p, .location address { color: var(--muted); font-size: 1.08rem; }
.section-heading {
  margin-bottom: 30px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}
.section-heading h2 { max-width: 680px; margin-bottom: 0; }

.schedule-grid, .ministry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.schedule-grid article, .ministry-card {
  background: rgba(255, 253, 248, 0.76);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.schedule-grid article { padding: 28px; }
.schedule-grid span { color: var(--vine-700); font-size: 0.84rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.schedule-grid h3 { margin: 10px 0 4px; color: var(--vine-950); font-size: 1.22rem; }
.schedule-grid p { margin-bottom: 0; color: var(--grape); font-size: 1.45rem; font-weight: 900; }
.ministry-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ministry-card {
  min-height: 190px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 180ms ease, background 180ms ease;
}
.ministry-card:hover { transform: translateY(-3px); background: var(--paper); }
.ministry-card svg { width: 42px; height: 42px; color: var(--vine-800); fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ministry-card h3 { margin: 22px 0 6px; color: var(--vine-950); font-size: 1rem; line-height: 1.16; }
.ministry-card p { margin-bottom: 0; color: var(--muted); font-size: 0.94rem; line-height: 1.35; }

.sermons-panel, .content-card, .ministry-info {
  padding: 30px;
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.sermons-panel { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.sermons-panel p { margin: 0; color: var(--muted); }

.pastor-section, .ministry-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 44px auto 0;
  display: grid;
  grid-template-columns: minmax(260px, 0.74fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 6vw, 78px);
}
.pastor-section {
  padding: 44px;
  color: var(--paper);
  background: var(--vine-900);
  border-radius: 8px;
  overflow: hidden;
}
.pastor-photo { align-self: end; background: rgba(255, 253, 248, 0.08); border-radius: 8px; }
.pastor-photo img { width: 100%; max-height: 540px; object-fit: contain; object-position: bottom center; }
.pastor-copy h2, .pastor-copy p { color: var(--paper); }
.pastor-copy .section-kicker { color: #d6e6c7; }
.pastor-more {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 0 16px 0 10px;
  color: var(--vine-950);
  background: #d6e6c7;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
}
.pastor-more span { width: 30px; height: 30px; display: grid; place-items: center; color: var(--paper); background: var(--vine-800); border-radius: 50%; }

.location { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
address { font-style: normal; }

.footer {
  margin-top: 20px;
  padding: 54px 0 34px;
  color: rgba(255, 253, 248, 0.86);
  background: var(--vine-950);
}
.footer-main, .partners, .app-promo { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.footer-main { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-brand .brand-logo { width: 108px; height: 54px; padding: 6px; background: var(--paper); border-radius: 6px; mix-blend-mode: normal; }
.socials { display: flex; gap: 10px; }
.socials a, .social-placeholder {
  width: 46px; height: 46px; display: grid; place-items: center; color: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 50%;
}
.socials svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.partners, .app-promo { margin-top: 38px; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.partners > span, .app-promo > span { display: block; margin-bottom: 16px; color: rgba(255, 253, 248, 0.68); font-size: 0.82rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.partner-logos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.partner-logos a { min-height: 98px; display: grid; place-items: center; padding: 4px; border-radius: 8px; }
.partner-logos img { width: 100%; max-height: 98px; object-fit: contain; }
.text-logo { min-height: 98px; color: var(--paper); display: grid; place-items: center; font-weight: 900; font-size: 1.65rem; border: 1px solid rgba(255,255,255,.22); }

.store-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.store-badge {
  min-width: 230px; min-height: 70px; display: inline-flex; align-items: center; gap: 14px;
  padding: 10px 16px; color: #111; background: #fff; border: 2px solid #111; border-radius: 8px; font-weight: 900;
}
.store-badge small, .store-badge strong { display: block; line-height: 1.05; }
.store-badge strong { margin-top: 4px; font-size: 1.5rem; }
.play-icon { width: 38px; height: 38px; clip-path: polygon(0 0,100% 50%,0 100%); background: linear-gradient(135deg,#28b446 0 32%,#1a73e8 32% 62%,#fbbc05 62% 80%,#ea4335 80%); }
.apple-icon { width: 38px; height: 38px; position: relative; display: inline-block; }
.apple-icon:before { content: ""; position: absolute; inset: 8px 6px 2px; background: #000; border-radius: 44% 44% 50% 50%; }
.apple-icon:after { content: ""; position: absolute; top: 0; left: 19px; width: 12px; height: 16px; background: #000; border-radius: 12px 0 12px 0; transform: rotate(28deg); }

.subpage-header { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0; }
.back-link { display: inline-flex; min-height: 42px; align-items: center; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; font-weight: 900; }
.ministry-hero { padding: 48px 0 34px; }
.ministry-hero img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; box-shadow: var(--shadow); }
.ministry-info { width: min(900px, calc(100% - 32px)); margin: 0 auto 70px; }
.ministry-info h2, .content-card h2 { color: var(--vine-950); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1; }
.ministry-info p, .content-card p, .content-card li { color: var(--muted); }
.ministry-gallery { width: min(1180px, calc(100% - 32px)); margin: 0 auto 82px; }
.carousel-shell { position: relative; overflow: hidden; padding: 10px 0; }
.carousel-track { display: flex; gap: 16px; transition: transform 520ms ease; }
.carousel-slide { flex: 0 0 min(360px, 78vw); margin: 0; overflow: hidden; border-radius: 8px; box-shadow: 0 16px 42px rgba(19,38,30,.12); }
.carousel-slide img { width: 100%; height: 260px; object-fit: cover; }
.carousel-actions { position: absolute; right: 14px; bottom: 24px; display: flex; gap: 8px; }
.carousel-actions button { width: 44px; height: 44px; display: grid; place-items: center; color: var(--paper); background: rgba(19,38,30,.84); border: 0; border-radius: 50%; font-size: 1.35rem; cursor: pointer; }

.content-page { width: min(980px, calc(100% - 32px)); margin: 0 auto 78px; padding-top: 44px; }
.wide-content { width: min(1180px, calc(100% - 32px)); }
.belief-grid { margin-top: 30px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.belief-grid article { padding: 26px; background: rgba(255,253,248,.78); border: 1px solid var(--line); border-radius: 8px; }
.belief-grid span { color: var(--grape); font-weight: 900; }
.belief-grid h2 { margin: 10px 0 12px; color: var(--vine-950); font-family: Georgia, "Times New Roman", serif; font-size: 1.5rem; line-height: 1.08; }
.belief-grid p { margin-bottom: 0; color: var(--muted); }
.gospel-card blockquote { margin: 0 0 24px; padding: 22px; color: var(--vine-900); background: #e7f1e8; border-left: 4px solid var(--leaf); border-radius: 8px; font-family: Georgia, "Times New Roman", serif; font-size: 1.12rem; }
.gospel-card cite { display: block; margin-top: 12px; color: var(--grape); font-family: Inter, sans-serif; font-size: .86rem; font-style: normal; font-weight: 900; text-transform: uppercase; }
.coming-soon { min-height: 56vh; display: grid; place-items: center; align-content: center; padding: clamp(32px, 8vw, 80px); text-align: center; background: rgba(255,253,248,.78); border: 1px solid var(--line); border-radius: 8px; }
.coming-soon svg { width: 92px; height: 92px; margin-bottom: 22px; color: var(--vine-800); fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.download-hero, .giving-page { width: min(980px, calc(100% - 32px)); margin: 0 auto 82px; padding-top: 60px; text-align: center; }
.download-hero h1 { max-width: none; margin-left: auto; margin-right: auto; }
.download-card { margin-top: 28px; padding: clamp(30px, 7vw, 70px); background: rgba(255,253,248,.78); border: 1px solid var(--line); border-radius: 8px; }
.download-card .store-badges { justify-content: center; margin-top: 26px; }

.giving-page { width: auto; min-height: calc(100svh - 76px); display: grid; place-items: center; padding: clamp(24px, 6vw, 72px) 16px; }
.giving-form { width: min(710px, 100%); padding: clamp(28px, 5vw, 42px) clamp(24px, 6vw, 56px); background: #fff; border: 1px solid rgba(19,38,30,.12); border-radius: 8px; box-shadow: var(--shadow); }
.giving-form h1 { max-width: none; margin: 0 0 22px; color: #0f1411; font-family: Inter, sans-serif; font-size: clamp(1.75rem, 4vw, 2.35rem); font-weight: 500; line-height: 1.2; text-align: center; }
.amount-field { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 44px; color: #444; font-size: clamp(4rem, 12vw, 5.8rem); line-height: 1; }
.amount-field input { width: min(330px, 70%); color: #aaa; border: 0; outline: 0; font: inherit; background: transparent; }
.giving-row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.giving-select { display: block; margin-bottom: 24px; text-align: left; }
.giving-select span { display: block; margin-bottom: -4px; color: #6f6f6f; font-size: .78rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.giving-select select { width: 100%; min-height: 46px; padding: 0 34px 0 4px; color: #222; background: #fff; border: 0; border-bottom: 2px solid #c9c9c9; border-radius: 0; font: inherit; font-size: 1.05rem; outline: 0; }
.giving-select select:focus { border-bottom-color: var(--vine-700); }
.muted-select { margin-top: -14px; }
.muted-select span, .muted-select select { color: #b8b8b8; }
.giving-continue { width: 100%; min-height: 54px; margin-top: 28px; color: #fff; background: var(--vine-800); border: 0; border-radius: 6px; font-size: 1.2rem; font-weight: 900; cursor: pointer; }
.giving-continue:hover { background: var(--vine-700); }

.modal-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(19,38,30,.62); backdrop-filter: blur(8px); }
.modal-overlay[hidden] { display: none; }
.modal-card { position: relative; width: min(720px, 100%); max-height: min(82vh, 760px); overflow: auto; padding: clamp(28px, 5vw, 46px); background: var(--paper); border-radius: 8px; box-shadow: 0 34px 90px rgba(0,0,0,.28); }
.modal-card h2 { color: var(--vine-950); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1; }
.modal-card p { color: var(--muted); }
.modal-close { position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #e7f1e8; font-weight: 900; cursor: pointer; }
.small-modal { width: min(500px, 100%); text-align: center; }
.small-modal h2 { max-width: none; margin-bottom: 0; font-family: Inter, sans-serif; font-size: clamp(1.35rem, 4vw, 2rem); line-height: 1.25; }

@media (max-width: 1100px) {
  .nav-links a, .dropdown-toggle { font-size: 0.78rem; padding: 0 8px; }
}
@media (max-width: 980px) {
  .hero, .pastor-section, .ministry-hero { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 58px; }
  .hero-media { min-height: 560px; }
  .ministry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .schedule-grid, .belief-grid { grid-template-columns: 1fr; }
  .location { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 760px) {
  .menu-toggle { position: relative; z-index: 1201; display: grid; }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(4) { transform: translateY(-6px) rotate(-45deg); }
  .nav-links {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
    padding: 96px 24px 32px;
    overflow: auto;
    background: rgba(251, 247, 238, 0.98);
    transform: translateX(100%);
    transition: transform 220ms ease;
    isolation: isolate;
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-links a, .dropdown-toggle { width: 100%; min-height: 52px; justify-content: center; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 1rem; }
  .nav-dropdown { width: 100%; }
  .dropdown-menu { position: static; width: 100%; margin-top: 8px; box-shadow: none; }
  .hero { width: min(100% - 24px, 1180px); padding: 44px 0 50px; gap: 28px; }
  .hero-logo { max-height: 150px; }
  .hero-media { min-height: auto; display: grid; gap: 14px; }
  .hero-photo { position: static; width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .secondary-photo { border: 0; }
  .gather-card { width: 100%; margin: 0; padding: 24px; }
  .section { width: min(100% - 24px, 1180px); padding: 56px 0; }
  .section-heading { display: block; }
  .schedule-grid, .ministry-grid, .partner-logos { grid-template-columns: 1fr; }
  .pastor-section { width: min(100% - 24px, 1180px); padding: 24px; }
  .footer-main { align-items: flex-start; flex-direction: column; }
  .store-badge, .button { width: 100%; }
  .giving-row { grid-template-columns: 1fr; gap: 0; }
}
/* --- CORRECCIÓN DEFINITIVA PARA EL MENÚ MÓVIL --- */

/* 1. Devolvemos a la cabecera su comportamiento "sticky" original para que se quede fija arriba al bajar */
.site-header {
  position: sticky !important;
  z-index: 9999 !important; /* Prioridad muy alta para que la cabecera esté por encima de todo */
}

/* 2. Solución al bug de "atrapamiento" de menús en pantallas de celular (<= 760px) */
@media (max-width: 760px) {
  .site-header {
    /* Al desactivar el desenfoque en móviles, el menú (.nav-links) se libera 
       y ahora sí puede expandirse a pantalla completa correctamente */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  
  .nav-links {
    /* Nos aseguramos de que el menú móvil tenga la prioridad visual definitiva */
    z-index: 10000 !important; 
  }
}