@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=IBM+Plex+Sans:wght@300;400;500;600&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

:root {
  --blue: #2E4593;
  --blue-dark: #22336e;
  --blue-light: #3a56c0;
  --red: #FF1A1A;
  --white: #ffffff;
  --soft-white: #f6f8fc;
  --gray: #3e3e3e;
  --gray-mid: #777;
  --gray-light: #e4e8f0;
  --border-blue: 1.5px solid #2E4593;
  --shadow-red: 0 0 20px rgba(255, 26, 26, 0.22);
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'IBM Plex Sans', sans-serif;
  background: var(--white);
  color: var(--gray);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', serif;
  color: var(--blue);
  line-height: 1.2;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--white);
  border-bottom: 2px solid var(--blue);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
}

.nav-center {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 60px;
}

.nav-logo {
  height: 40px;
  width: auto;
}

.nav-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.08em;
}

.nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.nav-center .cross-icon {
  font-size: 1.8rem;
  color: var(--blue);
}

.nav-center small {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--blue);
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 500;
  text-transform: uppercase;
}

.nav-burger {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--blue);
  display: flex;
  align-items: center;
  padding: 0.25rem;
}

.nav-burger .material-icons { font-size: 1.9rem; }

/* ===== SLIDE PANEL ===== */
.slide-panel {
  position: fixed;
  top: 0;
  right: -300px;
  width: 270px;
  height: 100%;
  background: var(--white);
  border-left: 2px solid var(--blue);
  z-index: 1100;
  transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
  padding: 1.5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
}

.slide-panel.open { right: 0; }

.panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--gray-light);
  padding-bottom: 1rem;
}

.panel-top span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.05em;
}

.panel-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--blue);
  display: flex;
}

.panel-close .material-icons { font-size: 1.7rem; }

.panel-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.panel-link {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--blue);
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--gray-light);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: color 0.2s, padding-left 0.2s;
}

.panel-link .material-icons { font-size: 1.1rem; color: var(--red); }
.panel-link:hover { color: var(--red); padding-left: 0.5rem; }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  display: none;
  backdrop-filter: blur(2px);
}
.overlay.active { display: block; }

/* ===== PAGE HEADER ===== */
.page-header {
  background: var(--soft-white);
  border-bottom: 1px solid var(--gray-light);
  padding: 3.5rem 2rem 3rem;
  text-align: center;
}

.page-header .eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
}

.page-header .subtitle {
  font-size: 0.95rem;
  color: var(--gray-mid);
  margin-top: 0.5rem;
}

/* ===== SECTIONS ===== */
.section-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4.5rem 2rem;
}

.section-meta {
  margin-bottom: 2.5rem;
}

.section-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--blue);
}

/* ===== CARD GRID ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* ===== CARD ===== */
.card {
  background: var(--white);
  border: var(--border-blue);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  transition: box-shadow 0.25s, transform 0.25s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--blue);
  transition: background 0.25s;
}

.card:hover {
  box-shadow: var(--shadow-red);
  transform: translateY(-3px);
}

.card:hover::before { background: var(--red); }

.card-link { cursor: pointer; }

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.3rem;
}

.card .card-sub {
  font-size: 0.85rem;
  color: var(--gray-mid);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.card .card-sub .material-icons { font-size: 0.95rem; color: var(--blue); }

.card .vacant {
  color: #aaa;
  font-style: italic;
}

.card-arrow {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s;
}

.card:hover .card-arrow { color: var(--red); }
.card-arrow .material-icons { font-size: 1rem; }

/* ===== HERO (HOMEPAGE) ===== */
.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--blue-dark);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 3rem 2rem;
  max-width: 700px;
}

.hero-content .church-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 1.25rem;
}

.hero-content .hq-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 1.2rem;
  border-radius: 100px;
  letter-spacing: 0.04em;
}

.hero-content .hq-badge .material-icons { font-size: 1rem; color: var(--red); }

/* ===== LEADERSHIP (HOMEPAGE) ===== */
.leadership-section { background: var(--soft-white); }

.leader-card {
  max-width: 280px;
  text-align: center;
}

.leader-img-wrap {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--blue);
  margin: 0 auto 1.25rem;
  background: var(--gray-light);
}

.leader-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.leader-img-wrap:hover img { transform: scale(1.05); }

.leader-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.25rem;
}

.leader-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue);
}

/* ===== EVENTS CARD ===== */
.event-card {
  background: var(--white);
  border: var(--border-blue);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  transition: box-shadow 0.25s, transform 0.25s;
  position: relative;
  overflow: hidden;
}

.event-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--blue);
  transition: background 0.25s;
}

.event-card:hover {
  box-shadow: var(--shadow-red);
  transform: translateY(-3px);
}

.event-card:hover::before { background: var(--red); }

.event-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.event-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}

.event-meta-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--gray-mid);
}

.event-meta-row .material-icons { font-size: 1rem; color: var(--blue); }

.countdown-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-mid);
  margin-bottom: 0.3rem;
}

.countdown-value {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--red);
  letter-spacing: 0.03em;
}

/* ===== MAP ===== */
.map-section { padding: 0; }

.map-wrap {
  width: 100%;
  height: 380px;
  border-top: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ===== BRANCH CARD ===== */
.branch-card {
  background: var(--white);
  border: var(--border-blue);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem;
  transition: box-shadow 0.25s, transform 0.25s;
  position: relative;
}

.branch-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--blue);
  border-radius: var(--radius) 0 0 var(--radius);
  transition: background 0.25s;
}

.branch-card:hover {
  box-shadow: var(--shadow-red);
  transform: translateY(-3px);
}

.branch-card:hover::before { background: var(--red); }

.branch-name {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.branch-leader {
  font-size: 0.85rem;
  color: var(--gray-mid);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.branch-leader .material-icons { font-size: 0.95rem; color: var(--blue); }

.branch-location {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--blue);
  margin-top: 0.6rem;
  font-weight: 500;
  transition: color 0.2s;
  text-decoration: none;
}

.branch-location .material-icons { font-size: 0.9rem; color: var(--red); }
.branch-location:hover { color: var(--red); text-decoration: underline; }

/* ===== REGION HERO ===== */
.region-hero {
  background: var(--soft-white);
  border-bottom: 1px solid var(--gray-light);
  padding: 3rem 2rem;
  max-width: 1180px;
  margin: 0 auto;
}

.region-hero .back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--blue);
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}

.region-hero .back-link:hover { color: var(--red); }
.region-hero .back-link .material-icons { font-size: 1rem; }

.region-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 0.5rem;
}

.region-bishop {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--gray-mid);
}

.region-bishop .material-icons { font-size: 1rem; color: var(--red); }

/* ===== FOOTER ===== */
footer {
  background: var(--blue);
  color: rgba(255,255,255,0.8);
  padding: 3rem 2rem;
  text-align: center;
}

.footer-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.4rem;
}

.footer-hq {
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}

.footer-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.15);
  margin: 1.5rem auto;
  max-width: 200px;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.footer-social a {
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
  display: flex;
}

.footer-social a:hover { color: var(--red); }
.footer-social .material-icons { font-size: 1.5rem; }

.footer-copy {
  font-size: 0.75rem;
  margin-top: 1.5rem;
  color: rgba(255,255,255,0.4);
}

/* ===== FULL-WIDTH DIVIDER ===== */
.section-divider {
  border: none;
  border-top: 1px solid var(--gray-light);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .card-grid,
  .card-grid-2 { grid-template-columns: 1fr; }
  .section-wrap { padding: 3rem 1.25rem; }
  .navbar { padding: 0 1.25rem; }
  .page-header { padding: 2.5rem 1.25rem 2rem; }
}

/* ===== NAV LOGO (user-defined — do not modify) ===== */
/* .nav-logo styles are managed externally by site owner */

/* ===== BISHOPS GRID ===== */
.bishops-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.bishop-card {
  text-align: center;
}

.bishop-img-wrap {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  border: 2.5px solid var(--blue);
  margin: 0 auto 0.85rem;
  background: var(--gray-light);
  transition: border-color 0.25s;
}

.bishop-card:hover .bishop-img-wrap { border-color: var(--red); }

.bishop-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.bishop-card:hover .bishop-img-wrap img { transform: scale(1.06); }

.bishop-role {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.2rem;
}

.bishop-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blue);
}

.bishop-region {
  font-size: 0.78rem;
  color: var(--gray-mid);
  margin-top: 0.15rem;
}

.arch-bishop-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
}

@media (max-width: 860px) {
  .bishops-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .bishops-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .bishop-img-wrap { width: 100px; height: 100px; }
}

/* ===== GALLERY ===== */
.gallery-grid {
  columns: 3;
  column-gap: 1.25rem;
  margin-bottom: 3.5rem;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1.25rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: var(--border-blue);
  cursor: pointer;
  position: relative;
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.35s;
}

.gallery-item:hover img { transform: scale(1.04); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(46, 69, 147, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-overlay .material-icons {
  font-size: 2.5rem;
  color: var(--white);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.video-item {
  border: var(--border-blue);
  border-radius: var(--radius);
  overflow: hidden;
}

.video-item video {
  width: 100%;
  display: block;
  background: #000;
}

.video-caption {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--gray-mid);
  border-top: 1px solid var(--gray-light);
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: var(--radius);
  object-fit: contain;
  box-shadow: 0 0 60px rgba(0,0,0,0.7);
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  display: flex;
}

.lightbox-close .material-icons { font-size: 2.2rem; }

@media (max-width: 768px) {
  .gallery-grid { columns: 2; }
  .video-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .gallery-grid { columns: 1; }
}

/* ===== FOOTER DEV CREDIT ===== */
.footer-dev {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.28);
  margin-top: 0.75rem;
  cursor: pointer;
  transition: color 0.2s;
  letter-spacing: 0.04em;
}

.footer-dev:hover { color: rgba(255, 255, 255, 0.55); }
