/*
  Estilo global del sitio.
  Inspiracion: landing eclesial moderna con bloques amplios y jerarquia clara.
*/

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@500;600;700&display=swap');

:root {
  --wine: #5e1218;
  --wine-dark: #3f0d12;
  --sepia: #f3ede3;
  --ink: #1f1b1a;
  --muted: #6c625d;
  --line: #ded3c3;
  --white: #ffffff;
  --container: 1160px;
  --radius: 14px;
  --header-height: 84px;
  --shadow: 0 14px 34px rgba(32, 17, 17, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Source Sans 3', Arial, sans-serif;
  font-size: 17px;
  color: var(--ink);
  background: #faf8f5;
  line-height: 1.65;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: 'EB Garamond', Georgia, serif;
  line-height: 1.1;
  margin: 0 0 0.8rem;
}

h2 {
  font-size: clamp(2.1rem, 4vw, 4.2rem);
}

h3 {
  font-size: clamp(1.5rem, 2.1vw, 2rem);
}

p {
  margin: 0 0 1rem;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin: 0 auto;
}

.section {
  padding: 4.8rem 0;
}

.section.alt {
  background: #fff;
}

.section-title {
  max-width: 26ch;
}

.eyebrow {
  margin: 0 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--wine);
}

.block-eyebrow {
  margin-bottom: 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wine);
}

/* Header principal */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: var(--header-height);
  border-bottom: 1px solid rgba(94, 18, 24, 0.12);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
}

.header-row {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.brand {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(94, 18, 24, 0.2);
  background: #fff;
  object-fit: cover;
}

.brand-copy strong {
  display: block;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.35rem;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.9rem;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.main-nav a {
  text-decoration: none;
  color: #302828;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.25rem;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--wine);
  border-bottom-color: var(--wine);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(94, 18, 24, 0.28);
  border-radius: 10px;
  background: #fff;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  margin: 5px auto;
  display: block;
  background: var(--wine);
}

/* Hero de portada – carrusel */
.hero {
  position: relative;
  padding: 7rem 0 6rem;
  overflow: hidden;
}

/* Slides apilados */
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease;
  will-change: transform, opacity;
}

.hero-slide.active {
  opacity: 1;
  animation: kenburns 12s ease-in-out forwards;
}

@keyframes kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.07); }
}

@keyframes section-zoom-in {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}

/* Overlay oscuro */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(120deg, rgba(63, 13, 18, 0.58) 0%, rgba(94, 18, 24, 0.44) 55%, rgba(36, 9, 12, 0.34) 100%);
  pointer-events: none;
}

/* Flechas */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(0,0,0,0.30);
  border: none;
  color: #fff;
  font-size: 2.6rem;
  line-height: 1;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.hero-arrow:hover {
  background: rgba(0,0,0,0.55);
}

.hero-arrow-prev { left: 1.2rem; }
.hero-arrow-next { right: 1.2rem; }

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  text-align: center;
}

.hero-copy {
  max-width: 680px;
  margin-inline: auto;
}

.hero-copy h2 {
  color: #fff;
}

.hero-copy p {
  color: rgba(255,255,255,0.88);
  font-size: 1.2rem;
}

.hero-copy .eyebrow {
  color: rgba(255,255,255,0.7);
}

.hero-actions {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.78rem 1.2rem;
  font-weight: 700;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(130deg, var(--wine), var(--wine-dark));
}

.btn-outline {
  color: var(--wine-dark);
  border: 1px solid rgba(94, 18, 24, 0.35);
  background: #fff;
}

.hero .btn-outline {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: transparent;
}

.hero-media {
  justify-self: end;
  width: min(100%, 480px);
}

.hero-media img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* Bloques de portada tipo landing */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
  align-items: center;
}

.feature-tight {
  gap: 0.9rem;
}

.feature.reverse {
  direction: rtl;
}

.feature.reverse > * {
  direction: ltr;
}

.feature-media {
  position: relative;
  max-width: 300px;
  margin-left: auto;
}

.feature-media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 0;
  border: 1px solid var(--line);
  position: relative;
  z-index: 1;
}

.feature > div:first-child p:not(.eyebrow) {
  font-size: 1.1rem;
}

.feature-text p:not(.eyebrow) {
  font-size: 1.08rem;
}

.text-right {
  text-align: right;
}

.text-right .section-title {
  margin-left: auto;
}

.tradition-block {
  padding: 0;
}

.tradition-copy {
  max-width: 72ch;
  font-size: 1.1rem;
}

.history-media {
  margin: 0;
  position: relative;
  background: #fff;
  overflow: hidden;
}

.history-media img {
  width: 100%;
  height: clamp(320px, 45vw, 560px);
  object-fit: cover;
  object-position: center 30%;
  transform-origin: center;
  animation: section-zoom-in 14s ease-out forwards;
}

.history-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  background: linear-gradient(90deg, rgba(63, 13, 18, 0.68) 0%, rgba(94, 18, 24, 0.5) 48%, rgba(63, 13, 18, 0.22) 100%);
}

.history-overlay .container {
  color: #fff;
}

.history-overlay .eyebrow,
.history-overlay .tradition-copy,
.history-overlay a {
  color: #fff;
}

.history-overlay .btn-outline {
  color: var(--wine-dark);
  border-color: rgba(94, 18, 24, 0.45);
  background: #fff;
}

.institution-block {
  background: linear-gradient(180deg, #f4ebdf, #efe2d2);
}

.institution-inner {
  max-width: 760px;
}

.institution-inner > p:not(.eyebrow) {
  font-size: 1.08rem;
}

.logo-side img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.librus-side {
  max-width: 300px;
}

.librus-side img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0;
  border: 0;
}

.semana-block {
  padding: 0;
}

.semana-media {
  margin: 0;
  position: relative;
  overflow: hidden;
}

.semana-media img {
  width: 100%;
  height: clamp(340px, 46vw, 620px);
  object-fit: cover;
  object-position: center;
  transform-origin: center;
  animation: section-zoom-in 14s ease-out forwards;
}

.semana-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  background: linear-gradient(90deg, rgba(63, 13, 18, 0.7) 0%, rgba(94, 18, 24, 0.54) 46%, rgba(63, 13, 18, 0.26) 100%);
}

.semana-overlay .container {
  color: #fff;
  margin-top: clamp(-2rem, -5vw, -4rem);
}

.semana-overlay .eyebrow,
.semana-overlay .tradition-copy {
  color: #fff;
}

.semana-section-copy {
  max-width: 980px;
}

.semana-section-copy h3 {
  margin: 0 0 0.65rem;
  color: var(--wine-dark);
}

.semana-section-copy > p:not(.eyebrow) {
  margin: 0;
  max-width: 74ch;
  line-height: 1.7;
}

.entierro-timeline {
  position: relative;
  margin-top: 2rem;
  display: grid;
  --entierro-row-min: 300px;
  --entierro-gap: 1.1rem;
  gap: var(--entierro-gap);
}

.entierro-timeline::before {
  content: '';
  position: absolute;
  top: var(--timeline-top, calc(var(--entierro-row-min) / 2));
  bottom: var(--timeline-bottom, calc(var(--entierro-row-min) / 2));
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--wine-dark) 0%, var(--wine) 100%);
}

.entierro-stop {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr);
  align-items: center;
  min-height: var(--entierro-row-min);
}

.entierro-dot {
  grid-column: 2;
  justify-self: center;
  width: 1.64rem;
  height: 1.64rem;
  border-radius: 50%;
  background: var(--wine);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px rgba(94, 18, 24, 0.28);
  z-index: 2;
}

.entierro-item {
  width: min(100%, 400px);
  display: grid;
  gap: 0.42rem;
  justify-items: center;
}

.entierro-stop:nth-child(odd) .entierro-item {
  grid-column: 1;
  justify-self: end;
}

.entierro-stop:nth-child(even) .entierro-item {
  grid-column: 3;
  justify-self: start;
}

.entierro-item h4 {
  margin: 0;
  text-align: center;
  color: var(--wine-dark);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  line-height: 1.2;
}

.entierro-item h4 em {
  font-style: italic;
}

.entierro-media,
.entierro-media-placeholder {
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 2px solid rgba(94, 18, 24, 0.22);
}

.entierro-media {
  padding: 0;
  background: #f5ece0;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 10px 24px rgba(40, 18, 18, 0.12);
}

.entierro-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.22s ease;
}

.entierro-media:hover img,
.entierro-media:focus-visible img {
  transform: scale(1.04);
}

.entierro-media-placeholder {
  background: radial-gradient(circle at 30% 30%, #f5ece0 0%, #ead9c4 55%, #ddc7aa 100%);
  box-shadow: inset 0 0 0 1px rgba(94, 18, 24, 0.08);
}

.entierro-expandable {
  width: 100%;
  justify-items: center;
  margin-top: 0.1rem;
}

.entierro-expandable.expandable-block {
  justify-items: center;
}

.entierro-expandable .expandable-content {
  width: 100%;
  text-align: center;
}

.entierro-expandable .expandable-content p {
  margin-top: 0.2rem;
}

.simbolos-grid {
  margin-top: 1.8rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.8rem;
}

.simbolo-card {
  display: grid;
  gap: 0.55rem;
}

.simbolo-media {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  background: #f2e8d8;
  padding: 0;
  cursor: zoom-in;
  overflow: hidden;
}

.simbolo-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.22s ease;
}

.simbolo-media:hover img,
.simbolo-media:focus-visible img {
  transform: scale(1.03);
}

.simbolo-card h4 {
  margin: 0.25rem 0 0;
  color: var(--ink);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(1.3rem, 1.8vw, 1.6rem);
  text-align: center;
  line-height: 1.2;
}

.simbolo-card p {
  margin: 0;
  color: var(--muted);
}

.simbolo-expandable {
  width: 100%;
  margin-top: 0.05rem;
  justify-items: center;
}

.simbolo-expandable .expandable-content {
  width: 100%;
  text-align: center;
}

.simbolo-expandable .expandable-content p {
  margin-top: 0.35rem;
}

@media (prefers-reduced-motion: reduce) {
  .history-media img,
  .semana-media img {
    animation: none;
  }

  .entierro-media img {
    transition: none;
  }
}

.video-side {
  max-width: 520px;
}

.video-side iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #000;
}

.service-times {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.1rem;
}

.service-item {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.service-item h4 {
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
}

/* Rejillas y tarjetas internas */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem;
}

.card h3 {
  margin-bottom: 1.2rem;
}

.card p:not(.eyebrow) {
  color: #4f4543;
}

.page-hero {
  padding: 4.2rem 0 3.2rem;
  color: #fff;
  background:
    linear-gradient(130deg, rgba(94, 18, 24, 0.95), rgba(63, 13, 18, 0.95)),
    radial-gradient(circle at 85% 15%, rgba(243, 237, 227, 0.25), transparent 40%);
}

.page-hero .eyebrow {
  color: #fff;
}

.page-hero p {
  max-width: 62ch;
}

.historia-hero-intro {
  font-size: clamp(1rem, 1.75vw, 1.15rem);
  line-height: 1.55;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.timeline .card {
  border-left: 4px solid var(--wine);
}

.historia-layout {
  display: grid;
  gap: 2.2rem;
  max-width: 1020px;
  margin-inline: auto;
}

.historia-quote {
  margin: 0;
  max-width: 86ch;
  margin-inline: auto;
  font-family: 'EB Garamond', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.26rem, 2.1vw, 1.54rem);
  line-height: 1.55;
  text-align: justify;
  text-align-last: left;
  color: #2f2523;
}

.historia-quote p {
  margin: 0 0 1rem;
}

.historia-quote p:last-child {
  margin-bottom: 0;
}

.historia-source {
  margin: -0.6rem 0 0;
  text-align: right;
  letter-spacing: 0.04em;
  color: #564b47;
}

.historia-source em {
  font-style: italic;
}

/* Cita bíblica (organizacion y otras páginas) */
.section-scripture {
  padding-bottom: 0;
}

.scripture-quote {
  margin: 0 auto;
  max-width: 72ch;
  text-align: center;
  font-family: 'EB Garamond', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  line-height: 1.45;
  color: #2f2523;
}

.scripture-quote p {
  margin: 0 0 0.75rem;
}

.scripture-ref {
  font-style: normal;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--wine);
}

.scripture-ref cite {
  font-style: normal;
}

/* ── Tarjetas de grupos organizativos ────────────────────────── */
.org-cards {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.org-card {
  display: grid;
  grid-template-columns: 1fr 38%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  min-height: 190px;
}

.org-card-body {
  padding: 2rem 2.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  justify-content: center;
}

.org-card-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
  color: var(--wine-dark);
  margin: 0;
  line-height: 1.15;
}

.org-card-desc {
  color: var(--ink);
  line-height: 1.6;
  margin: 0;
  max-width: 58ch;
}

.btn-more {
  align-self: flex-start;
  margin-top: 0.3rem;
  padding: 0.52rem 1.3rem;
  border: 2px solid var(--wine);
  border-radius: 4px;
  background: transparent;
  color: var(--wine);
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.btn-more:hover,
.btn-more:focus-visible {
  background: var(--wine);
  color: #fff;
}

.org-card-image {
  position: relative;
  background-size: cover;
  background-position: center;
  min-height: 180px;
  border: 0;
  width: 100%;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.org-card-image:hover,
.org-card-image:focus-visible {
  transform: scale(1.02);
}

.org-card-image--junta {
  background-image: url('../images/organizacion/junta_directiva2.jpg');
}

.org-card-image--hermanos {
  background-image: url('../images/organizacion/hermanos_mayores.jpeg');
}

.org-card-image--barreros {
  background-image: url('../images/organizacion/barreros.jpeg');
}

.org-card-image--tejas {
  background-image: url('../images/shared/tejas.jpeg');
}

.org-card-image--penitentes {
  background-image: url('../images/organizacion/penitentes.jpg');
}

.org-card-image--socios {
  background-image: url('../images/organizacion/socios.jpg');
}

/* ── Modales ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 27, 26, 0.68);
  z-index: 2100;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-panel {
  background: var(--sepia);
  border-radius: var(--radius);
  padding: 2.8rem 2.8rem 2.4rem;
  max-width: 660px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 8px 40px rgba(31, 27, 26, 0.22);
}

.modal-panel h3 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  color: var(--wine-dark);
  margin: 0 0 1.4rem;
}

.image-lightbox {
  z-index: 3200;
  background: rgba(16, 13, 12, 0.92);
  padding: 2rem;
}

.image-lightbox-img {
  display: block;
  width: min(94vw, 1400px);
  max-height: 90vh;
  object-fit: contain;
}

.modal-close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 2.2rem;
  height: 2.2rem;
  border: 2px solid var(--wine);
  border-radius: 50%;
  background: transparent;
  color: var(--wine);
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s, color 0.15s;
}

.image-lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 3300;
  background: rgba(255, 255, 255, 0.9);
}

.modal-close:hover,
.modal-close:focus-visible {
  background: var(--wine);
  color: #fff;
}

.modal-body {
  color: var(--ink);
  line-height: 1.7;
}

.junta-list {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.junta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.2rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.junta-row:last-child {
  border-bottom: none;
}

.junta-row dt {
  font-weight: 600;
  color: var(--wine);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.junta-row dd {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.junta-note {
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
}

.modal-section-label {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

/* ── Preguntas frecuentes ─────────────────────────────────────── */
.section-faq {
  background: #fff;
}

.faq-list {
  max-width: 780px;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
}

.faq-question h4 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  line-height: 1.3;
}

.faq-item .expandable-content {
  padding: 0 0 1.2rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── CTA ──────────────────────────────────────────────────────── */
.section-cta {
  background: var(--wine-dark);
}

.cta-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.6rem;
  padding: 1rem 0;
}

.cta-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  color: var(--sepia);
  margin: 0;
  max-width: 50ch;
  line-height: 1.35;
}

.btn-cta {
  display: inline-block;
  padding: 0.75rem 2.1rem;
  background: var(--sepia);
  color: var(--wine-dark);
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 4px;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: background 0.18s;
}

.btn-cta:hover,
.btn-cta:focus-visible {
  background: #fff;
}

.historia-timeline {
  display: grid;
  gap: 2.4rem;
  margin-top: 0.4rem;
}

.timeline-row {
  display: grid;
  grid-template-columns: minmax(230px, 33%) 1fr;
  gap: 1.6rem;
  align-items: start;
}

.timeline-year-block {
  display: grid;
  gap: 0.4rem;
}

.timeline-year {
  margin: 0;
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--wine);
}

.timeline-period-note {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6a4a43;
}

.timeline-copy {
  max-width: 72ch;
  padding-left: 1rem;
  border-left: 1px solid rgba(94, 18, 24, 0.26);
}

.timeline-copy p {
  margin: 0 0 0.8rem;
  text-align: justify;
}

.timeline-copy p:last-child {
  margin-bottom: 0;
}

.presidentes-linea {
  margin-top: 1rem;
}

.presidentes-linea > .eyebrow {
  margin-bottom: 0.55rem;
}

.presidentes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1.6rem;
}

.presidente-item {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.55rem;
  padding-top: 0.8rem;
  width: min(100%, 38ch);
  margin-inline: auto;
}

.presidente-photo {
  width: min(100%, 170px);
  aspect-ratio: 1 / 1;
  margin: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(94, 18, 24, 0.22);
  box-shadow: 0 10px 24px rgba(40, 18, 18, 0.1);
}

.presidente-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.presidente-photo-placeholder {
  display: grid;
  place-items: center;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  color: #7a6b65;
  background: radial-gradient(circle at 30% 30%, #f6f0e8, #ebe1d4);
}

.presidente-item h4 {
  width: 100%;
  margin: 0;
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  color: var(--wine-dark);
}

.presidente-years {
  width: 100%;
  margin: -0.1rem 0 0.2rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wine);
}

.presidente-item p {
  width: 100%;
  margin: 0;
  text-align: justify;
  text-align-last: center;
  color: #4f4543;
}

.presidente-expandable {
  width: 100%;
  justify-items: center;
}

.gallery {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.gallery figure {
  margin: 0;
}

.gallery img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.gallery figcaption {
  font-size: 0.86rem;
  margin-top: 0.35rem;
  color: #5d5250;
}

/* Contacto: iconos e integración */
.icon {
  display: inline-block;
  width: 1.3em;
  height: 1.3em;
  vertical-align: middle;
  margin-right: 0.5rem;
  color: var(--wine);
}

.icon-location,
.icon-mail {
  flex-shrink: 0;
}

.card p:not(.eyebrow) {
  font-size: 1.05rem;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.card p a {
  color: var(--wine);
  text-decoration: none;
  border-bottom: 1px solid var(--wine);
  transition: opacity 0.2s;
}

.card p a:hover {
  opacity: 0.7;
}

.proposito-stack {
  display: grid;
  gap: 2.8rem;
}

.proposito-stack .proposito-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.proposito-card .eyebrow {
  margin-bottom: 0.55rem;
}

.proposito-card h3 {
  margin-bottom: 0.95rem;
}

.content-block-title {
  margin-bottom: 1.6rem;
}

.proposito-card p {
  display: block;
  gap: 0;
}

.objective-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.objective-list li {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 0 0 0.9rem;
  border-bottom: 1px solid rgba(222, 211, 195, 0.75);
}

.objective-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.objective-icon {
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: transparent;
  color: var(--wine-dark);
}

.objective-icon svg {
  width: 1.55rem;
  height: 1.55rem;
}

.objective-list li strong {
  color: var(--wine-dark);
}

.letter-intro {
  margin-bottom: 0.65rem;
}

.letter-layout {
  display: grid;
  grid-template-columns: minmax(130px, 160px) 1fr;
  gap: 1.2rem;
  align-items: start;
}

.letter-president-photo {
  margin: 0;
}

.letter-president-photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(94, 18, 24, 0.22);
  box-shadow: 0 10px 24px rgba(40, 18, 18, 0.12);
}

.letter-details {
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}

.expandable-block {
  display: grid;
  justify-items: start;
  gap: 0.85rem;
}

.simbolo-expandable.expandable-block {
  justify-items: center;
}

/* ── Tabla de calendario litúrgico ─────────────────────────────── */
.cal-table-wrap {
  overflow-x: auto;
  margin-top: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 18px rgba(40, 18, 18, 0.08);
}

.cal-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.97rem;
  background: #fff;
}

.cal-table thead tr {
  background: var(--wine-dark);
  color: #fff;
  text-align: left;
}

.cal-table thead th {
  padding: 0.85rem 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.cal-table tbody tr:nth-child(even) {
  background: #faf6f0;
}

.cal-table tbody tr:hover {
  background: #f3ebe0;
}

.cal-table tbody td {
  padding: 0.7rem 1rem;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  line-height: 1.5;
}

.cal-table .col-dia {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 1.03rem;
  color: var(--wine-dark);
  white-space: nowrap;
  min-width: 160px;
}

.cal-table .col-hora {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  min-width: 90px;
}

.cal-table tbody .col-hora {
  color: var(--muted);
}

.cal-table .col-acto {
  min-width: 260px;
}

.cal-table tr.cal-group-header td {
  background: #ede3d8;
  color: var(--wine-dark);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.55rem 1rem;
  border-bottom: 2px solid var(--wine);
}

.cal-note {
  margin-top: 1.6rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--wine);
  background: #faf6f0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.93rem;
  color: var(--ink);
  line-height: 1.6;
}

.cal-note strong {
  display: block;
  margin-bottom: 0.4rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem;
  color: var(--wine-dark);
  letter-spacing: 0.02em;
}

@media (max-width: 600px) {
  .cal-table .col-dia,
  .cal-table .col-hora {
    white-space: normal;
    min-width: unset;
  }
}

/* ── Galería por año ─────────────────────────────────────── */
.gallery-year-board {
  margin-top: 2.2rem;
  padding: 1.8rem;
  border: 2px solid var(--wine);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff 0%, #fbf6ef 100%);
  box-shadow: 0 8px 24px rgba(35, 17, 16, 0.08);
}

.gallery-year-head {
  display: grid;
  justify-items: center;
  text-align: center;
  margin-bottom: 1.2rem;
}

.gallery-year-label {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.gallery-year-number {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1;
  color: var(--wine-dark);
  letter-spacing: 0.04em;
}

.gallery-topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.gallery-topic-btn {
  border: 1px solid rgba(94, 18, 24, 0.35);
  border-radius: 12px;
  background: #fff;
  color: var(--wine-dark);
  min-height: 3rem;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
}

.gallery-topic-btn:hover,
.gallery-topic-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(94, 18, 24, 0.14);
  background: #f8efe3;
  outline: none;
}

/* ── Carrusel modal ──────────────────────────────────────── */
.gallery-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: rgba(15, 8, 8, 0.92);
  padding: 1rem;
}

.gallery-carousel[hidden] {
  display: none;
}

.gallery-carousel-track {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  max-width: calc(100vw - 160px);
}

.gallery-carousel-img {
  max-height: 88vh;
  max-width: 100%;
  object-fit: contain;
  border-radius: 6px;
  display: block;
  box-shadow: 0 8px 40px rgba(0,0,0,0.55);
}

.gallery-carousel-video {
  max-height: 88vh;
  max-width: 100%;
  border-radius: 6px;
  display: block;
  box-shadow: 0 8px 40px rgba(0,0,0,0.55);
  background: #000;
}

.gallery-carousel-img[hidden],
.gallery-carousel-video[hidden] {
  display: none !important;
}

.gallery-carousel-arrow {
  flex-shrink: 0;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 3rem;
  line-height: 1;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  padding: 0;
}

.gallery-carousel-arrow:hover,
.gallery-carousel-arrow:focus-visible {
  background: rgba(255,255,255,0.22);
  outline: none;
}

.gallery-carousel-close {
  position: fixed;
  top: 1.1rem;
  right: 1.3rem;
  z-index: 1101;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 1.5rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-carousel-close:hover {
  background: rgba(255,255,255,0.25);
}

.gallery-carousel-counter {
  position: fixed;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  font-family: 'Source Sans 3', sans-serif;
  letter-spacing: 0.06em;
  pointer-events: none;
}

.gallery-carousel-title {
  position: fixed;
  bottom: 3.2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.86);
  font-size: 1rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  letter-spacing: 0.03em;
  pointer-events: none;
}

@media (max-width: 840px) {
  .gallery-topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-carousel-track {
    max-width: calc(100vw - 96px);
  }
}

@media (max-width: 580px) {
  .gallery-topic-grid {
    grid-template-columns: 1fr;
  }

  .gallery-year-board {
    padding: 1.2rem;
  }

  .gallery-carousel-arrow {
    width: 44px;
    height: 44px;
    font-size: 2.1rem;
  }
}

.expand-toggle {
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(94, 18, 24, 0.28);
  border-radius: 50%;
  background: #fff;
  color: var(--wine);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.expand-toggle:hover {
  background: rgba(94, 18, 24, 0.08);
  border-color: rgba(94, 18, 24, 0.4);
  transform: translateY(-1px);
}

.expand-toggle-symbol {
  font-family: 'Source Sans 3', Arial, sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
}

.expandable-content {
  width: 100%;
}

.expandable-content p {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.expandable-content p:last-child {
  margin-bottom: 0;
}

.presidente-expandable {
  width: 100%;
  justify-items: center;
}

.social-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  background: rgba(94, 18, 24, 0.08);
  border-radius: 50%;
  color: var(--wine);
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
}

.social-link:hover {
  background: rgba(94, 18, 24, 0.16);
  transform: scale(1.08);
}

.social-link .icon {
  width: 1.4em;
  height: 1.4em;
  margin: 0;
}

/* Footer */
.site-footer {
  margin-top: 0;
  color: #f8f3ea;
  background: linear-gradient(180deg, #271416, #1a0e10);
  border-top: 2px solid rgba(216, 201, 181, 0.28);
}

.footer-grid {
  padding: 3rem 0 2rem;
  display: grid;
  gap: 1.3rem;
  grid-template-columns: 1.1fr 1fr 1fr;
}

.footer-grid p,
.footer-grid li {
  color: #e8ddcd;
}

.footer-simple {
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  align-items: center;
}

.footer-simple h3 {
  margin-bottom: 0.7rem;
}

.footer-brand-block {
  text-align: center;
}

.footer-logo {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  margin: 0 auto 0.8rem;
  border: 1px solid rgba(248, 243, 234, 0.35);
}

.site-footer .social-link {
  color: #f8f3ea;
  background: rgba(248, 243, 234, 0.12);
}

.site-footer .social-link:hover {
  background: rgba(248, 243, 234, 0.22);
}

.site-footer .social-link .icon {
  color: #fff;
}

.footer-links {
  margin: 0;
  padding-left: 1.1rem;
}

.footer-bottom {
  border-top: 1px solid rgba(248, 243, 234, 0.2);
  padding: 0.95rem 0 1.2rem;
  text-align: center;
  font-size: 0.84rem;
}

/* Responsive */
@media (max-width: 1080px) {
  .hero-grid,
  .feature,
  .grid-3,
  .grid-2,
  .footer-grid,
  .timeline,
  .gallery,
  .service-times {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 2.6rem;
  }

  .hero-media {
    display: none;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .feature-media {
    margin-inline: auto;
  }
}

@media (max-width: 900px) {
  .menu-toggle {
    display: inline-block;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    width: 100%;
    padding: 0.8rem 1rem 1rem;
    border-bottom: 1px solid rgba(94, 18, 24, 0.2);
    background: rgba(255, 255, 255, 0.98);
    transform: scaleY(0);
    transform-origin: top;
    opacity: 0;
    pointer-events: none;
    transition: transform 220ms ease, opacity 220ms ease;
  }

  .main-nav.open {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .letter-layout {
    grid-template-columns: 1fr;
  }

  .letter-president-photo {
    max-width: 170px;
  }

  .historia-quote {
    font-size: clamp(1.15rem, 4.2vw, 1.32rem);
  }

  .timeline-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .timeline-year {
    font-size: clamp(1.8rem, 9vw, 2.6rem);
  }

  .timeline-copy {
    border-left: 0;
    padding-left: 0;
  }

  .presidentes-grid {
    grid-template-columns: 1fr;
    gap: 1.65rem;
  }

  .entierro-stop {
    grid-template-columns: 34px 1fr;
    min-height: 0;
    align-items: start;
    padding: 0.3rem 0 0.65rem;
  }

  .entierro-timeline::before {
    left: 17px;
    transform: none;
    width: 8px;
    top: var(--timeline-top, 1.45rem);
    bottom: var(--timeline-bottom, 1.45rem);
  }

  .entierro-dot {
    grid-column: 1;
    margin-top: 0.55rem;
  }

  .entierro-item,
  .entierro-stop:nth-child(odd) .entierro-item,
  .entierro-stop:nth-child(even) .entierro-item {
    grid-column: 2;
    justify-self: stretch;
    width: 100%;
    max-width: 100%;
  }

  .simbolos-grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .org-card {
    grid-template-columns: 1fr;
  }

  .org-card-image {
    min-height: 140px;
  }
}
