/* ============================================================
   LeoThe14th.org — Shared Stylesheet
   Regal Purple & Vatican Gold Aesthetic
   ============================================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap');

/* --- CSS Variables --- */
:root {
  /* Purple palette — replaces the former burgundy tones */
  --burgundy:       #5C3898;   /* rich Vatican purple */
  --burgundy-dark:  #3D1F70;   /* deep purple — nav, footer */
  --burgundy-light: #7A55B8;   /* soft medium purple */

  /* Vatican gold — unchanged */
  --gold:           #C9972A;
  --gold-light:     #E4B84D;
  --gold-pale:      #EDE6FF;   /* pale lavender replaces warm gold-pale */

  /* Page backgrounds — white & light lavender */
  --ivory:          #FAF8FF;   /* near-white with a breath of lavender */
  --ivory-dark:     #EDE8FF;   /* soft lavender for alternate sections */

  /* Text — purple-toned instead of brown */
  --text-dark:      #1A0E38;
  --text-mid:       #3C2568;
  --text-light:     #6850A8;

  --white:          #FFFFFF;
  --shadow:         rgba(60,25,120,0.14);

  --font-display: 'Cinzel', 'Palatino Linotype', serif;
  --font-body:    'EB Garamond', Georgia, 'Times New Roman', serif;

  --nav-height: 70px;
  --max-width: 1100px;
  --section-pad: 80px 24px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 18px; }

body {
  font-family: var(--font-body);
  background-color: var(--ivory);
  color: var(--text-dark);
  line-height: 1.75;
}

img { max-width: 100%; display: block; }
a { color: var(--burgundy); text-decoration: none; }
a:hover { color: var(--gold); }

/* --- Gold Divider --- */
.gold-divider {
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 16px auto 32px;
  border: none;
}
.gold-divider.left { margin-left: 0; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--burgundy-dark);
  border-bottom: 3px solid var(--gold);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  box-shadow: 0 2px 12px var(--shadow);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold-light);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.nav-brand .cross { font-size: 1.4rem; }

.nav-links {
  list-style: none;
  display: flex;
  gap: 8px;
}
.nav-links a {
  color: var(--ivory);
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 3px;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a.active {
  background: var(--gold);
  color: var(--burgundy-dark);
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--gold-light);
  border-radius: 2px;
  transition: 0.3s;
}

/* ============================================================
   PAGE HERO BANNER
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--burgundy-dark) 0%, var(--burgundy) 60%, var(--burgundy-light) 100%);
  text-align: center;
  padding: 70px 24px 60px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center top, rgba(201,151,42,0.12) 0%, transparent 70%);
}
.page-hero .cross-ornament {
  font-size: 2.4rem;
  color: var(--gold);
  display: block;
  margin-bottom: 12px;
  position: relative;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  color: var(--gold-light);
  letter-spacing: 0.06em;
  line-height: 1.2;
  position: relative;
}
.page-hero p {
  color: var(--ivory-dark);
  font-size: 1.05rem;
  font-style: italic;
  margin-top: 10px;
  position: relative;
}

/* ============================================================
   SECTION LAYOUTS
   ============================================================ */
.section {
  padding: var(--section-pad);
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-alt {
  background: var(--ivory-dark);
  padding: var(--section-pad);
}
.section-alt .section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 2rem);
  color: var(--burgundy);
  text-align: center;
  letter-spacing: 0.05em;
}
.section-title.left { text-align: left; }

/* ============================================================
   HOME PAGE — HERO
   ============================================================ */
.home-hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--burgundy-dark);
}
.home-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(201,151,42,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(70,20,140,0.55) 0%, transparent 60%),
    linear-gradient(160deg, #180A40 0%, var(--burgundy-dark) 45%, #2A0E58 100%);
}
/* Subtle cross texture overlay */
.home-hero-bg::after {
  content: '✠';
  position: absolute;
  font-size: 460px;
  color: rgba(201,151,42,0.05);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-family: serif;
}

.home-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 24px;
  max-width: 820px;
}
.home-hero-content .papal-cross {
  font-size: 3.5rem;
  color: var(--gold);
  display: block;
  margin-bottom: 8px;
  text-shadow: 0 0 30px rgba(201,151,42,0.4);
}
.home-hero-content .eyebrow {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 16px;
}
.home-hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 5rem);
  color: var(--white);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.home-hero-content h1 em {
  color: var(--gold-light);
  font-style: normal;
}
.home-hero-content .hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: #D8CFFF;
  font-style: italic;
  margin: 16px 0 36px;
  line-height: 1.5;
}
.hero-cta-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: 3px;
  text-decoration: none;
  transition: all 0.25s;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-gold {
  background: var(--gold);
  color: var(--burgundy-dark);
  border-color: var(--gold);
}
.btn-gold:hover {
  background: var(--gold-light);
  color: var(--burgundy-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201,151,42,0.35);
}
.btn-outline {
  background: transparent;
  color: var(--ivory);
  border-color: rgba(255,255,255,0.5);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold-light);
  transform: translateY(-2px);
}

/* ============================================================
   KEY FACTS STRIP
   ============================================================ */
.facts-strip {
  background: var(--burgundy);
  border-top: 3px solid var(--gold);
  border-bottom: 3px solid var(--gold);
  padding: 40px 24px;
}
.facts-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  text-align: center;
}
.fact-item .fact-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--gold-light);
  display: block;
  line-height: 1;
}
.fact-item .fact-label {
  font-size: 0.85rem;
  color: #D8CFFF;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 6px;
}

/* ============================================================
   INTRO CARD (HOME)
   ============================================================ */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.intro-text p {
  font-size: 1.05rem;
  color: var(--text-mid);
  margin-bottom: 18px;
}
.intro-image-wrap {
  position: relative;
}
.intro-image-wrap img {
  border-radius: 4px;
  box-shadow: 8px 8px 0 var(--gold), 16px 16px 0 var(--burgundy-light);
  width: 100%;
}
.intro-image-wrap .image-caption {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-light);
  font-style: italic;
  margin-top: 20px;
}

/* ============================================================
   QUICK LINKS / CARDS
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  max-width: var(--max-width);
  margin: 40px auto 0;
}
.card {
  background: var(--white);
  border: 1px solid var(--gold-pale);
  border-top: 4px solid var(--gold);
  border-radius: 4px;
  padding: 32px 28px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 10px var(--shadow);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(60,25,120,0.16);
}
.card-icon {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 14px;
}
.card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--burgundy);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Hero portrait (circular, used on news page) */
.hero-portrait {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--gold);
  margin: 0 auto 16px;
  display: block;
  box-shadow: 0 0 0 5px rgba(201,151,42,0.25), 0 4px 20px rgba(0,0,0,0.35);
}

/* ============================================================
   BIOGRAPHY PAGE
   ============================================================ */
.bio-content {
  max-width: 820px;
  margin: 0 auto;
}
.bio-content h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--burgundy);
  letter-spacing: 0.05em;
  margin: 48px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gold-pale);
}
.bio-content h2:first-of-type { margin-top: 0; }
.bio-content p {
  font-size: 1.05rem;
  color: var(--text-mid);
  margin-bottom: 18px;
  line-height: 1.85;
}
.bio-content blockquote {
  border-left: 4px solid var(--gold);
  padding: 16px 24px;
  margin: 30px 0;
  background: var(--ivory-dark);
  border-radius: 0 4px 4px 0;
  font-style: italic;
  color: var(--text-mid);
  font-size: 1.1rem;
}

/* Bio featured photo block */
.bio-photo-feature {
  max-width: 360px;
  margin: 40px auto 48px;
  text-align: center;
}
.bio-photo-feature img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 8px 8px 0 var(--gold), 16px 16px 0 var(--burgundy-light);
}
.bio-photo-feature .image-caption {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-light);
  font-style: italic;
  margin-top: 20px !important;
  margin-bottom: 0 !important;
}

.timeline {
  position: relative;
  padding-left: 32px;
  margin: 20px 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), var(--burgundy-light));
}
.timeline-item {
  position: relative;
  margin-bottom: 28px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 8px;
  width: 10px;
  height: 10px;
  background: var(--gold);
  border-radius: 50%;
  border: 2px solid var(--ivory);
  box-shadow: 0 0 0 2px var(--gold);
}
.timeline-year {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.timeline-item p {
  margin-bottom: 0;
  font-size: 1rem;
}

/* ============================================================
   GALLERY PAGE
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  max-width: var(--max-width);
  margin: 40px auto 0;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  border: 2px solid var(--gold-pale);
  background: var(--white);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 10px var(--shadow);
}
.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(60,25,120,0.18);
  border-color: var(--gold);
}
.gallery-item img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}
.gallery-item:hover img { transform: scale(1.03); }
.gallery-caption {
  padding: 14px 16px;
  font-size: 0.88rem;
  color: var(--text-mid);
  font-style: italic;
  text-align: center;
  border-top: 1px solid var(--gold-pale);
  background: var(--white);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(15,5,35,0.93);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border: 3px solid var(--gold);
  border-radius: 4px;
  box-shadow: 0 0 60px rgba(0,0,0,0.6);
}
.lightbox-caption {
  color: #D8CFFF;
  font-style: italic;
  margin-top: 14px;
  font-size: 0.95rem;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: var(--gold-light);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}
.lightbox-close:hover { color: var(--white); }

/* ============================================================
   NEWS / RSS PAGE
   ============================================================ */
.rss-controls {
  max-width: var(--max-width);
  margin: 0 auto 36px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.rss-controls select {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 10px 16px;
  border: 2px solid var(--gold-pale);
  border-radius: 4px;
  background: var(--white);
  color: var(--text-dark);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%235C3898' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  min-width: 220px;
}
.rss-last-updated {
  font-size: 0.82rem;
  color: var(--text-light);
  font-style: italic;
  margin-left: auto;
}
.rss-status {
  max-width: var(--max-width);
  margin: 0 auto 20px;
}
.rss-loader {
  text-align: center;
  padding: 60px 0;
  color: var(--text-light);
  font-style: italic;
}
.rss-loader .spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 3px solid var(--gold-pale);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin-bottom: 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.news-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.news-card {
  background: var(--white);
  border: 1px solid var(--gold-pale);
  border-top: 4px solid var(--gold);
  border-radius: 4px;
  padding: 24px 22px;
  box-shadow: 0 2px 10px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(60,25,120,0.15);
}
.news-card .news-source {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.news-card h3 {
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: var(--burgundy);
  line-height: 1.4;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.news-card h3 a {
  color: inherit;
  text-decoration: none;
}
.news-card h3 a:hover { color: var(--gold); }
.news-card .news-excerpt {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.65;
  flex-grow: 1;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card .news-meta {
  font-size: 0.78rem;
  color: var(--text-light);
  font-style: italic;
  border-top: 1px solid var(--gold-pale);
  padding-top: 12px;
  margin-top: auto;
}
.news-error {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px;
  background: var(--white);
  border: 1px solid #d8ccf5;
  border-left: 4px solid var(--burgundy-light);
  border-radius: 4px;
  color: var(--text-mid);
  font-style: italic;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--burgundy-dark);
  border-top: 3px solid var(--gold);
  color: #D8CFFF;
  text-align: center;
  padding: 48px 24px 32px;
}
.footer-cross {
  font-size: 2rem;
  color: var(--gold);
  display: block;
  margin-bottom: 12px;
}
.footer-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold-light);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.footer-tagline {
  font-size: 0.88rem;
  font-style: italic;
  color: #D8CFFF;
  opacity: 0.75;
  margin-bottom: 24px;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.footer-links a {
  color: #D8CFFF;
  font-size: 0.85rem;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s, color 0.2s;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
}
.footer-links a:hover { color: var(--gold-light); opacity: 1; }
.footer-copy {
  font-size: 0.78rem;
  opacity: 0.55;
  margin-top: 8px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  :root { --section-pad: 50px 20px; }

  .nav-links { display: none; flex-direction: column; position: absolute; top: var(--nav-height); left: 0; right: 0; background: var(--burgundy-dark); padding: 16px; border-bottom: 2px solid var(--gold); gap: 4px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; width: 100%; text-align: left; }
  .nav-toggle { display: flex; }

  .intro-grid { grid-template-columns: 1fr; gap: 36px; }
  .intro-image-wrap { order: -1; }
  .intro-image-wrap img { box-shadow: 4px 4px 0 var(--gold); }

  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .hero-cta-row { flex-direction: column; align-items: center; }
  .home-hero { min-height: 80vh; }
}
@media (max-width: 480px) {
  .facts-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .gallery-grid { grid-template-columns: 1fr; }
}
