:root {
  --bg: #f4f5f7;
  --text: #1a1f2b;
  --brand: #1e5a8a;
  --brand-dark: #17486f;
  --surface: #ffffff;
  --muted: #6a7280;
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

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

.hero {
  min-height: 80vh;
  background:
    linear-gradient(rgba(8, 22, 36, 0.55), rgba(8, 22, 36, 0.65)),
  /*  url("assets/hero-bg.svg") center / cover no-repeat; */
    url("assets/catedral_fondo_web.svg") center / cover no-repeat;
  color: #fff;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 0;
}

.top-nav .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  text-decoration: none;
}

.brand-logo {
  height: 40px;
  width: auto;
  display: block;
}

.top-nav ul {
  display: flex;
  list-style: none;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
}

.top-nav a {
  color: #eef5ff;
  text-decoration: none;
}

.top-nav a:hover {
  color: #fff;
}

.nav-social {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-social a {
  display: flex;
  align-items: center;
  color: #eef5ff;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.nav-social a:hover {
  opacity: 1;
  color: #fff;
}

.hero-content {
  display: grid;
  align-content: center;
  min-height: calc(80vh - 78px);
  max-width: 700px;
  padding: 1rem 0 2rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  margin-bottom: 0.6rem;
  color: #d3e7ff;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  line-height: 1.1;
  margin: 0;
}

.hero p {
  margin-top: 1rem;
  max-width: 60ch;
}

.cta {
  display: inline-block;
  margin-top: 1.2rem;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.72rem 1.2rem;
  font-weight: 600;
}

.cta:hover {
  background: var(--brand-dark);
}

.section {
  padding: 4rem 0;
}

.section h2 {
  font-size: clamp(1.5rem, 2.2vw, 2.3rem);
  margin-top: 0;
  margin-bottom: 0.8rem;
}

.section p {
  max-width: 72ch;
}

.cards {
  margin-top: 1.8rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.card h3,
.card p {
  margin: 0;
  padding: 0 1rem;
}

.card h3 {
  margin-top: 0.8rem;
}

.card p {
  padding-top: 0.35rem;
  padding-bottom: 1rem;
  color: var(--muted);
}

.section-alt {
  background: #ebf0f7;
}

.split {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.4rem;
  align-items: center;
}

.split img {
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.video-wrapper {
  max-width: 420px;
  margin: 1.5rem auto 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Plyr theme override to match brand color */
.plyr--full-ui input[type=range] { color: var(--brand); }
.plyr__control--overlaid,
.plyr__control--overlaid:hover { background: var(--brand); }
.plyr--video .plyr__control:hover,
.plyr--video .plyr__control[aria-expanded=true] { background: var(--brand); }
.plyr--video .plyr__progress input[type=range]::-webkit-slider-thumb { background: var(--brand); }

.site-footer {
  background: #0d1f33;
  color: #d8e2ef;
  padding: 2.5rem 0 1.2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 2rem 3rem;
}

.footer-col p {
  margin: 0 0 0.4rem;
  font-size: 0.92rem;
  line-height: 1.5;
}

.footer-title {
  font-weight: 700;
  font-size: 1rem !important;
  color: #fff;
  margin-bottom: 0.8rem !important;
}

.footer-col a {
  color: #a8c5e0;
  text-decoration: none;
}

.footer-col a:hover {
  color: #fff;
}

.footer-social-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #a8c5e0;
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-social-links a:hover {
  color: #fff;
}

.footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
}

.footer-bottom p {
  margin: 0;
  text-align: center;
  font-size: 0.82rem;
  color: #7a96b0;
}

/* ── Inner pages ─────────────────────────────────── */

.page-header {
  background:
    linear-gradient(rgba(8, 22, 36, 0.88), rgba(8, 22, 36, 0.94)),
    url("assets/catedral_fondo_web.svg") center / cover no-repeat;
  color: #fff;
}

.page-hero {
  padding: 2rem 0 2.8rem;
}

.page-hero h1 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  margin: 0 0 0.4rem;
  font-weight: 700;
}

.page-hero p {
  margin: 0;
  color: #d3e7ff;
  max-width: 60ch;
}

/* ── People grid (Curia / Clero) ─────────────────── */

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.person-card {
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
  padding-bottom: 1.2rem;
}

.person-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top;
}

.person-card .person-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #dde6f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.person-card .person-placeholder svg {
  width: 50%;
  height: 50%;
  color: #9ab0c8;
}

.person-card h3 {
  margin: 0.8rem 0.8rem 0.2rem;
  font-size: 0.95rem;
  line-height: 1.3;
}

.person-card .role {
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0 0.8rem 0;
  display: block;
}

.person-card p {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0.4rem 0.8rem 0;
  line-height: 1.4;
}

/* ── Clero subsection heading ────────────────────── */

.subsection-heading {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: var(--brand);
  border-bottom: 2px solid #c8d9ec;
  padding-bottom: 0.4rem;
  margin-top: 3rem !important;
  margin-bottom: 0;
}

/* ── Prose blocks (Diócesis / Vida Religiosa) ────── */

.prose-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-top: 2.5rem;
}

.prose-block.reverse {
  direction: rtl;
}

.prose-block.reverse > * {
  direction: ltr;
}

.prose-block img {
  width: 100%;
  border-radius: 14px;
  box-shadow: var(--shadow);
  object-fit: cover;
}

.prose-block .prose-text h3 {
  margin-top: 0;
}

/* ── Coming soon ─────────────────────────────────── */

.coming-soon {
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1rem;
}

.coming-soon .coming-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.coming-soon h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  margin: 0 0 0.6rem;
}

.coming-soon p {
  color: var(--muted);
  max-width: 42ch;
  margin: 0 auto;
}

/* ── Curia list ──────────────────────────────────── */

.curia-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.6rem;
}

.curia-list li {
  background: var(--surface);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  box-shadow: 0 2px 8px rgba(17,24,39,0.07);
  font-size: 0.9rem;
  line-height: 1.4;
}

.curia-list li strong {
  display: block;
  color: var(--brand);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

/* ── Tables (pastoral-table & clergy-table) ──────── */

.pastoral-table,
.clergy-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.2rem;
  font-size: 0.9rem;
}

.pastoral-table th,
.clergy-table th {
  background: var(--brand);
  color: #fff;
  text-align: left;
  padding: 0.6rem 1rem;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pastoral-table td,
.clergy-table td {
  padding: 0.55rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
  line-height: 1.4;
}

.pastoral-table tr:nth-child(even) td,
.clergy-table tr:nth-child(even) td {
  background: #f8fafc;
}

.section-note {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.4rem;
}

/* ── Photo gallery ───────────────────────────── */

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.photo-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: block;
}

/* ── Link pills ─────────────────────────────── */

.link-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--surface);
  border: 1.5px solid #c8d9ec;
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.88rem;
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}

.link-pill:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.link-pill svg {
  flex-shrink: 0;
}

/* ── Responsive ──────────────────────────────────── */

@media (max-width: 920px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split {
    grid-template-columns: 1fr;
  }

  .prose-block {
    grid-template-columns: 1fr;
  }

  .prose-block.reverse {
    direction: ltr;
  }
}

/* ── Hamburger button (hidden on desktop) ────────── */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.nav-toggle .bar {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* ── Mobile nav ──────────────────────────────────── */

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .top-nav {
    flex-wrap: wrap;
    align-items: center;
  }

  .top-nav .brand {
    flex: 1;
  }

  .top-nav ul,
  .top-nav .nav-social {
    display: none;
    width: 100%;
  }

  .top-nav.nav-open ul {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.4rem 0 0.6rem;
  }

  .top-nav.nav-open ul li a {
    display: block;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 1rem;
  }

  .top-nav.nav-open .nav-social {
    display: flex;
    padding-bottom: 0.8rem;
  }

  /* Hamburger → X animation */
  .top-nav.nav-open .nav-toggle .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .top-nav.nav-open .nav-toggle .bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .top-nav.nav-open .nav-toggle .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .photo-gallery {
    grid-template-columns: 1fr;
  }
}

