:root {
  --bg: #f9f3e9;
  --surface: #fffdf7;
  --surface-soft: #f4ead8;
  --ink: #2a2116;
  --muted: #655647;
  --line: #d8c9ae;
  --primary: #483112;
  --accent: #233247;
  --hero-overlay: rgba(43, 31, 12, 0.52);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Source Sans 3", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg), #ede1cc);
}

.topbar {
  background: #f3e7d3;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  text-decoration: none;
  color: var(--primary);
  font-family: "Literata", serif;
  font-weight: 700;
}

.main-nav {
  width: 100%;
}

.menu-root,
.menu-root ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-root {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.menu-root > li {
  position: relative;
}

.menu-root > li > a {
  display: inline-block;
  text-decoration: none;
  color: var(--accent);
  font-weight: 700;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
}

.menu-root > li:hover > a {
  background: var(--surface-soft);
}

.menu-root li ul {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(35, 50, 71, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10;
}

.menu-root li:hover ul,
.menu-root li:focus-within ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-root li ul a {
  display: block;
  text-decoration: none;
  color: var(--ink);
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid #eee5d7;
}

.menu-root li ul li:last-child a {
  border-bottom: 0;
}

.menu-root li ul a:hover {
  background: var(--surface-soft);
}

main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 1.1rem;
}

.hero {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  min-height: 340px;
  background-image: url("assets/images/about-hero-st-philopateer.jpeg");
  background-size: cover;
  background-position: center;
  border: 1px solid #bda988;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
  text-align: center;
  padding: 4.5rem 1rem;
}

.hero h1 {
  margin: 0;
  font-family: "Literata", serif;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.hero p {
  margin-top: 0.8rem;
  font-size: 1.2rem;
  font-weight: 700;
}

section {
  margin-top: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}

.section-title h2,
.pope h2,
.bishop h2,
.direction h2 {
  margin: 0.2rem 0 0.8rem;
  font-family: "Literata", serif;
  color: var(--primary);
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.story-card {
  background: #fbf6ee;
  border: 1px solid #e3d8c6;
  border-radius: 10px;
  padding: 0.9rem;
}

.story-card h3 {
  margin: 0 0 0.45rem;
  color: var(--accent);
  font-family: "Literata", serif;
}

.story-card p,
.pope p,
.bishop p,
.direction p {
  margin: 0.4rem 0;
  color: var(--muted);
}

.pope {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1rem;
  background: linear-gradient(180deg, #f5ecdc, #fdf9f2);
}

.pope-image-wrap img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #cfbea3;
}

blockquote {
  margin: 0.45rem 0 0.8rem;
  padding: 0.8rem;
  border-left: 4px solid var(--primary);
  background: #fff8ed;
  color: #473423;
}

.inline-links a {
  display: inline-block;
  margin-right: 0.45rem;
  margin-bottom: 0.45rem;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  padding: 0.42rem 0.65rem;
  border-radius: 8px;
}

.bishop {
  background: linear-gradient(180deg, #eef2f8, #f7f7f5);
}

.bishop-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
  align-items: center;
}

.bishop-image-wrap img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #cfbea3;
}

.direction {
  text-align: center;
}

.map-link {
  display: inline-block;
  margin-top: 0.45rem;
  text-decoration: none;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-weight: 700;
}

.page-footer {
  max-width: 1160px;
  margin: 0 auto 1.1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ece0cd;
  color: #4b3f31;
  padding: 0.8rem 1rem;
}

.page-footer p {
  margin: 0.2rem 0;
}

@media (max-width: 900px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .menu-root {
    justify-content: flex-start;
    gap: 0.2rem;
  }

  .menu-root li ul {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    margin-top: 0.15rem;
    display: none;
  }

  .menu-root > li:hover ul,
  .menu-root > li:focus-within ul {
    display: block;
  }

  .story-grid,
  .pope {
    grid-template-columns: 1fr;
  }

  .bishop-head {
    grid-template-columns: 1fr;
  }

  .bishop-image-wrap img {
    max-width: 360px;
    height: auto;
  }

  .hero {
    min-height: 280px;
  }

  .hero-content {
    padding: 3rem 1rem;
  }
}
