:root {
  --primary: #7a1f1f;
  --primary-dark: #541515;
  --accent: #d8b46a;
  --text: #2f2f2f;
  --muted: #666;
  --light: #f7f3ea;
  --white: #fff;
  --border: #e7dcc8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

.brand {
  color: var(--primary);
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: flex-end;
}

.main-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: .98rem;
}

.main-nav a:hover { color: var(--primary); }

.hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  color: var(--white);
  text-align: center;
  overflow: hidden;
  background: #541515;
}

.hero-slider,
.hero-slide,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-slider { z-index: 0; }

.hero-slide {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  animation: heroCarousel 12s infinite;
}

.hero-slide-1 {
  background-image:
    linear-gradient(rgba(42, 20, 20, .24), rgba(42, 20, 20, .48)),
    url("cabecera-parroquia-san-jose-3.jpg");
}

.hero-slide-2 {
  background-image:
    linear-gradient(rgba(42, 20, 20, .24), rgba(42, 20, 20, .48)),
    url("cabecera-parroquia-san-jose-4.jpg");
  animation-delay: 6s;
}

@keyframes heroCarousel {
  0%, 42% { opacity: 1; }
  50%, 92% { opacity: 0; }
  100% { opacity: 1; }
}

.hero-overlay {
  z-index: 1;
  background: linear-gradient(90deg, rgba(20,10,10,.35), rgba(20,10,10,.08), rgba(20,10,10,.35));
}

.hero-content { position: relative; z-index: 2; max-width: 850px; }
.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  line-height: 1;
  margin: 0 0 22px;
}

.hero-text {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  max-width: 720px;
  margin: 0 auto 32px;
}

.hero-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}
.btn-primary { background: var(--accent); color: #3b230a; }
.btn-secondary { border: 1px solid rgba(255,255,255,.75); color: var(--white); }

.notice { padding: 54px 0; }
.notice-grid, .contact-grid {
  display: grid;
  grid-template-columns: 1.4fr .9fr;
  gap: 34px;
  align-items: center;
}
.notice h2, .section h2, .contact-section h2 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 14px; color: var(--primary-dark); }
.notice-card, .card, .contact-box, .map-embed {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 26px;
  box-shadow: 0 12px 32px rgba(84,21,21,.07);
}
.notice-card { background: var(--light); }

.section { padding: 76px 0; }
.section-light { background: var(--light); }
.section-title { max-width: 720px; margin-bottom: 34px; }
.section-title p { color: var(--muted); }

.cards { display: grid; gap: 22px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.card h3 { color: var(--primary); margin-top: 0; font-size: 1.35rem; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.feature {
  padding: 26px;
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.feature span { color: var(--primary); font-weight: 700; font-size: 1.2rem; }
.feature p { color: var(--muted); margin-bottom: 0; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.gallery div {
  min-height: 170px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--white);
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), #b98958);
}

.contact-section { background: #faf7f0; }
.map-embed {
  min-height: 320px;
  padding: 0;
  overflow: hidden;
  background: var(--white);
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: 320px;
  border: 0;
}

.site-footer {
  background: var(--primary-dark);
  color: var(--white);
  padding: 28px 0;
}
.footer-wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-wrap p { margin: 0; }

@media (max-width: 860px) {
  .nav-wrap { align-items: flex-start; flex-direction: column; padding: 16px 0; }
  .main-nav { justify-content: flex-start; gap: 12px; }
  .hero { min-height: 540px; }
  .notice-grid, .contact-grid, .cards.three, .cards.two, .feature-grid, .gallery {
    grid-template-columns: 1fr;
  }
}


.news-section { background: var(--white); }
.news-grid {
  display: grid;
  grid-template-columns: 1.2fr .9fr .9fr;
  gap: 22px;
}
.news-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(84,21,21,.07);
}
.news-image-open {
  min-height: 0;
  border-radius: 0;
}

.news-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
}
.news-card div { padding: 22px; }
.news-card span {
  color: var(--muted);
  font-size: .9rem;
}
.news-card h3 {
  color: var(--primary);
  margin: 8px 0 10px;
  font-size: 1.35rem;
}
.news-card p { margin-bottom: 0; }
.featured-news img { height: 300px; }
.photo-gallery figure {
  margin: 0;
}

.gallery-open,
.image-open {
  position: relative;
  width: 100%;
  min-height: 220px;
  display: block;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: var(--primary-dark);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.photo-gallery img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  display: block;
  opacity: .9;
  transition: transform .25s ease, opacity .25s ease;
}
.gallery-open:hover img,
.image-open:hover img { transform: scale(1.04); opacity: 1; }
.gallery-open:focus-visible,
.image-open:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.gallery-open span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 36px 18px 18px;
  color: var(--white);
  font-weight: 700;
  background: linear-gradient(transparent, rgba(0,0,0,.72));
}
@media (max-width: 860px) {
  .news-grid { grid-template-columns: 1fr; }
  .featured-news img, .news-card img { height: 220px; }
}


.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(20, 10, 10, .86);
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0,0,0,.45);
}
.lightbox p {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  margin: 0;
  color: var(--white);
  font-weight: 700;
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 999px;
  color: var(--white);
  background: rgba(255,255,255,.12);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,.22); }
body.lightbox-open { overflow: hidden; }
