/* =============================================
   BULGARIAN ORTHODOXY — STYLES.CSS
   ============================================= */

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

/* ── CSS Variables ── */
:root {
  --bg:          hsl(36, 38%, 95%);
  --fg:          hsl(25, 40%, 16%);
  --card:        hsl(36, 38%, 98%);
  --card-fg:     hsl(25, 40%, 16%);
  --primary:     hsl(25, 39%, 17%);
  --primary-fg:  hsl(36, 38%, 95%);
  --secondary:   hsl(36, 25%, 88%);
  --muted:       hsl(36, 25%, 90%);
  --muted-fg:    hsl(25, 15%, 40%);
  --gold:        hsl(43, 53%, 54%);
  --gold-fg:     hsl(25, 40%, 16%);
  --dark:        hsl(25, 39%, 17%);
  --dark-fg:     hsl(36, 38%, 95%);
  --border:      hsl(36, 20%, 82%);
  --destructive: hsl(0, 84%, 60%);
  --success:     hsl(142, 65%, 35%);
  --success-bg:  hsl(142, 60%, 95%);
  --success-bd:  hsl(142, 45%, 75%);
  --radius:      0.5rem;
  --shadow-card: 0 4px 20px -4px hsl(25 39% 17% / 0.15);
  --shadow-hover:0 12px 32px -8px hsl(25 39% 17% / 0.28);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; background: none; border: none; }
ul, ol { list-style: none; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.font-serif { font-family: 'Cormorant Garamond', Georgia, serif; }

/* ── Layout ── */
.container {
  width: 100%;
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 768px) {
  .container { padding-left: 1.5rem; padding-right: 1.5rem; }
}

.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.page-main { flex: 1; padding-top: 6.25rem; }
@media (min-width: 768px) { .page-main { padding-top: 7.25rem; } }

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background-color: hsl(25 39% 17% / 0.80);
  backdrop-filter: blur(4px);
  transition: background-color 0.3s, box-shadow 0.3s;
}
.site-header.scrolled {
  background-color: hsl(25 39% 17% / 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px hsl(25 39% 17% / 0.4);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}
@media (min-width: 768px) { .header-inner { height: 5rem; } }
.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--dark-fg);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}
.header-logo:hover { color: var(--gold); }
@media (min-width: 768px) { .header-logo { font-size: 1.1rem; } }
.logo-cross { height: 2rem; width: 1.5rem; color: var(--gold); }
.header-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}
@media (min-width: 1024px) { .header-nav { display: flex; } }
.nav-link {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dark-fg);
  transition: color 0.2s;
  position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--gold); }
.header-banner {
  background-color: var(--gold);
  color: var(--gold-fg);
  padding: 0.5rem;
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  letter-spacing: 0.025em;
  border-top: 1px solid hsl(43 53% 54% / 0.4);
}
@media (min-width: 768px) { .header-banner { font-size: 1rem; } }

/* Dropdown */
.dropdown-wrapper { position: relative; }
.dropdown-trigger {
  display: flex; align-items: center; gap: 0.25rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem; font-weight: 500;
  color: var(--dark-fg);
  transition: color 0.2s;
  background: none; border: none;
}
.dropdown-trigger:hover { color: var(--gold); }
.dropdown-chevron { width: 1rem; height: 1rem; transition: transform 0.2s; }
.dropdown-wrapper.open .dropdown-chevron { transform: rotate(180deg); }
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  min-width: 16rem;
  background-color: var(--dark);
  border: 1px solid hsl(43 53% 54% / 0.3);
  border-radius: var(--radius);
  padding: 0.375rem;
  z-index: 60;
  box-shadow: var(--shadow-hover);
}
.dropdown-wrapper.open .dropdown-menu { display: block; }
.dropdown-item {
  display: block;
  padding: 0.6rem 0.875rem;
  font-size: 0.875rem;
  color: var(--dark-fg);
  border-radius: calc(var(--radius) - 2px);
  transition: color 0.2s, background 0.2s;
}
.dropdown-item:hover { color: var(--gold); background-color: hsl(25 39% 17% / 0.5); }

/* Mobile menu button */
.mobile-menu-btn {
  display: flex;
  color: var(--dark-fg);
  padding: 0.25rem;
}
@media (min-width: 1024px) { .mobile-menu-btn { display: none; } }
.mobile-menu-btn svg { width: 1.5rem; height: 1.5rem; }

/* Mobile nav */
.mobile-nav {
  display: none;
  background-color: var(--dark);
  border-top: 1px solid hsl(43 53% 54% / 0.2);
}
.mobile-nav.open { display: block; }
.mobile-nav-inner { padding: 1rem 0; display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--dark-fg);
  border-radius: var(--radius);
  transition: color 0.2s;
}
.mobile-nav-link:hover, .mobile-nav-link.active { color: var(--gold); }
.mobile-sub {
  padding-left: 1.5rem;
  display: flex; flex-direction: column; gap: 0.25rem;
  border-left: 1px solid hsl(43 53% 54% / 0.3);
  margin-left: 1rem;
  margin-top: 0.25rem;
}
.mobile-sub-link {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: hsl(36 38% 95% / 0.8);
  transition: color 0.2s;
}
.mobile-sub-link:hover { color: var(--gold); }

/* ── Footer ── */
.site-footer { background-color: var(--dark); color: var(--dark-fg); margin-top: 5rem; }
.footer-grid {
  padding: 3rem 0;
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-heading { font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; color: var(--gold); margin-bottom: 0.75rem; }
.footer-text { font-size: 0.875rem; color: hsl(36 38% 95% / 0.8); line-height: 1.625; }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-link { font-size: 0.875rem; color: var(--dark-fg); transition: color 0.2s; }
.footer-link:hover { color: var(--gold); }
.footer-contact-item {
  display: flex; align-items: flex-start; gap: 0.5rem;
  font-size: 0.875rem; color: hsl(36 38% 95% / 0.8);
}
.footer-contact-icon { width: 1rem; height: 1rem; margin-top: 0.125rem; color: var(--gold); flex-shrink: 0; }
.footer-bottom {
  border-top: 1px solid hsl(43 53% 54% / 0.2);
  padding: 1rem 0;
  text-align: center;
  font-size: 0.75rem;
  color: hsl(36 38% 95% / 0.6);
}

/* ── Scroll to Top ── */
.scroll-top-btn {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 40;
  width: 2.75rem; height: 2.75rem;
  border-radius: 9999px;
  background-color: var(--gold);
  color: var(--gold-fg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-hover);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.scroll-top-btn.visible { opacity: 1; pointer-events: auto; }
.scroll-top-btn:hover { transform: translateY(-2px); }
.scroll-top-btn svg { width: 1.25rem; height: 1.25rem; }

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--muted-fg);
  margin-bottom: 2rem;
}
.breadcrumb a { transition: color 0.2s; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { width: 1rem; height: 1rem; color: var(--muted-fg); }
.breadcrumb .current { color: var(--primary); font-weight: 500; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  border: 2px solid transparent;
}
.btn-gold {
  background-color: var(--gold);
  color: var(--gold-fg);
  border-color: var(--gold);
}
.btn-gold:hover { background-color: hsl(43 53% 48%); border-color: hsl(43 53% 48%); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--gold);
}
.btn-outline:hover { background-color: var(--gold); color: var(--gold-fg); }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; }
.btn-sm { padding: 0.4rem 0.875rem; font-size: 0.8125rem; }

/* ── Cards ── */
.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.card-hover {
  transition: transform 0.3s, box-shadow 0.3s;
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px -8px hsl(43 53% 54% / 0.45);
}

/* ── Page header ── */
.page-header { max-width: 48rem; margin-bottom: 3.5rem; }
.page-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  color: var(--primary);
  margin-bottom: 1rem;
}
.page-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  color: var(--gold);
  font-style: italic;
}

/* ── Article sections ── */
.article-section { margin-bottom: 3rem; }
.section-heading {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  color: var(--gold);
  margin-bottom: 1rem;
}
.section-body p {
  color: hsl(25 40% 16% / 0.85);
  line-height: 1.75;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
}
.section-body p + p { margin-top: 1rem; }
.article-max { max-width: 48rem; }

/* ── Nav banner (prev/next) ── */
.page-nav-banner {
  margin-top: 4rem;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  background-color: var(--card);
  box-shadow: var(--shadow-card);
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
}
@media (min-width: 640px) {
  .page-nav-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.nav-sep {
  display: none;
  width: 1px; height: 2rem;
  background-color: hsl(43 53% 54% / 0.4);
}
@media (min-width: 640px) { .nav-sep { display: block; } }

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes softPulse {
  0%, 100% { box-shadow: 0 0 0 0 hsl(43 53% 54% / 0); }
  50%       { box-shadow: 0 0 0 8px hsl(43 53% 54% / 0.2); }
}
.animate-fade-in { animation: fadeIn 0.5s ease both; }
.animate-fade-in-left  { animation: fadeInLeft  0.6s ease both; }
.animate-fade-in-right { animation: fadeInRight 0.6s ease both; }
.animate-pulse-gold { animation: softPulse 2.5s ease-in-out infinite; }
.timeline-item { opacity: 0; }
.timeline-item.visible-left  { animation: fadeInLeft  0.6s ease forwards; }
.timeline-item.visible-right { animation: fadeInRight 0.6s ease forwards; }

/* ══════════════════════════════════
   HOME PAGE
   ══════════════════════════════════ */
.hero {
  position: relative;
  height: 80vh; min-height: 500px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background-color: hsl(25 39% 17% / 0.7); }
.hero-content {
  position: relative; z-index: 10;
  color: var(--dark-fg);
}
.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  margin-bottom: 2rem;
  opacity: 0.9;
  font-weight: 300;
}

.features-grid {
  display: grid;
  gap: 2rem;
  padding: 4rem 0;
}
@media (min-width: 768px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }
.feature-card {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 2rem;
  border-radius: var(--radius);
  background-color: var(--card);
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px -8px hsl(43 53% 54% / 0.45);
  color: inherit;
}
.feature-icon {
  width: 4rem; height: 4rem;
  border-radius: 9999px;
  background-color: hsl(43 53% 54% / 0.15);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  transition: transform 0.3s;
}
.feature-card:hover .feature-icon { transform: scale(1.1); }
.feature-icon svg { width: 2rem; height: 2rem; }
.feature-title { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; color: var(--primary); }

.periods-section { background-color: hsl(36 25% 88% / 0.4); padding: 4rem 0; }
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.875rem, 4vw, 3rem);
  color: var(--primary);
  text-align: center;
  margin-bottom: 3rem;
}
.periods-grid {
  display: grid; gap: 1.5rem;
}
@media (min-width: 768px) { .periods-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .periods-grid { grid-template-columns: repeat(4, 1fr); } }
.period-card {
  padding: 1.5rem;
  display: flex; flex-direction: column;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s, box-shadow 0.3s;
}
.period-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px -8px hsl(43 53% 54% / 0.45);
}
.period-title { font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; color: var(--primary); margin-bottom: 0.75rem; }
.period-text { font-size: 0.875rem; color: var(--muted-fg); flex: 1; margin-bottom: 1rem; }

.facts-section { padding: 4rem 0; }
.facts-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .facts-grid { grid-template-columns: repeat(3, 1fr); } }
.fact-card {
  padding: 1.5rem;
  background-color: var(--card);
  border: 2px solid hsl(43 53% 54% / 0.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  position: relative;
}
.fact-number {
  position: absolute; top: -1rem; left: 1.5rem;
  background-color: var(--gold);
  color: var(--gold-fg);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700; font-size: 1.125rem;
  width: 2.5rem; height: 2.5rem;
  border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px hsl(43 53% 54% / 0.4);
}
.fact-text { color: hsl(25 40% 16% / 0.85); line-height: 1.625; padding-top: 0.5rem; }

/* ══════════════════════════════════
   HISTORY / TIMELINE
   ══════════════════════════════════ */
.page-py { padding-top: 3rem; padding-bottom: 3rem; }
@media (min-width: 768px) { .page-py { padding-top: 4rem; padding-bottom: 4rem; } }
.page-intro { max-width: 48rem; margin-bottom: 4rem; }
.page-intro p { font-size: 1.125rem; color: hsl(25 40% 16% / 0.8); line-height: 1.75; }

.timeline-wrapper { position: relative; }
.timeline-line {
  position: absolute;
  left: 1rem;
  top: 0; bottom: 0;
  width: 2px;
  background-color: hsl(43 53% 54% / 0.5);
}
@media (min-width: 768px) {
  .timeline-line { left: 50%; transform: translateX(-50%); }
}
.timeline-events { display: flex; flex-direction: column; gap: 4rem; }
@media (min-width: 768px) { .timeline-events { gap: 6rem; } }

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .timeline-item { grid-template-columns: repeat(2, 1fr); gap: 3rem; }
}
.timeline-dot {
  position: absolute;
  left: 1rem; top: 0.5rem;
  transform: translateX(-50%);
  z-index: 10;
  width: 1.25rem; height: 1.25rem;
  border-radius: 9999px;
  background-color: var(--gold);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--gold);
}
@media (min-width: 768px) {
  .timeline-dot { left: 50%; transform: translateX(-50%); }
}
.timeline-content {
  padding-left: 3rem;
  grid-column: 1;
}
@media (min-width: 768px) {
  .timeline-content { padding-left: 0; }
  .timeline-item.left  .timeline-content { grid-column: 1; padding-right: 3rem; text-align: right; }
  .timeline-item.right .timeline-content { grid-column: 2; padding-left: 3rem; text-align: left; }
}
.timeline-year {
  display: inline-block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.timeline-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  color: var(--primary);
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}
.timeline-link:hover .timeline-title { color: var(--gold); }
.timeline-img-wrap {
  margin-bottom: 1rem;
  overflow: hidden;
  border-radius: var(--radius);
  border: 2px solid hsl(43 53% 54% / 0.4);
  box-shadow: var(--shadow-card);
  display: inline-block;
  max-width: 24rem;
}
@media (min-width: 768px) {
  .timeline-item.left .timeline-img-wrap { margin-left: auto; }
}
.timeline-img-wrap img {
  width: 100%; height: auto;
  transition: transform 0.5s;
}
.timeline-link:hover .timeline-img-wrap img { transform: scale(1.05); }
.timeline-text { color: hsl(25 40% 16% / 0.8); line-height: 1.625; }
.timeline-cta {
  display: inline-flex; align-items: center; gap: 0.375rem;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem; font-weight: 500;
  border-radius: var(--radius);
  border: 2px solid var(--gold);
  color: var(--primary);
  transition: all 0.2s;
}
@media (min-width: 768px) {
  .timeline-item.left .timeline-cta { margin-left: auto; }
}
.timeline-link:hover .timeline-cta { background-color: var(--gold); color: var(--gold-fg); }
.timeline-cta svg { width: 1rem; height: 1rem; }

/* Stats row */
.stats-grid { display: grid; gap: 1.5rem; margin-top: 6rem; }
@media (min-width: 640px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
.stat-card {
  text-align: center;
  padding: 2rem;
  background-color: var(--card);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s, transform 0.3s;
}
.stat-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.stat-value { font-family: 'Cormorant Garamond', serif; font-size: 3.75rem; color: var(--gold); font-weight: 700; line-height: 1; }
.stat-suffix { font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; color: var(--primary); margin: 0.375rem 0; }
.stat-label { font-size: 0.75rem; color: var(--muted-fg); text-transform: uppercase; letter-spacing: 0.05em; }

/* ══════════════════════════════════
   GALLERY PAGE
   ══════════════════════════════════ */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2.5rem; }
.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem; font-weight: 500;
  border: 2px solid hsl(25 39% 17% / 0.3);
  background: transparent;
  color: var(--primary);
  transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--gold); color: var(--gold); }
.filter-btn.active {
  background-color: var(--gold);
  color: var(--gold-fg);
  border-color: var(--gold);
  box-shadow: var(--shadow-card);
}

.gallery-grid {
  columns: 1;
  gap: 1rem;
}
@media (min-width: 640px) { .gallery-grid { columns: 2; gap: 1rem; } }
@media (min-width: 1024px) { .gallery-grid { columns: 3; gap: 1rem; } }
.gallery-item {
  display: block;
  width: 100%;
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  background: none; border: none; padding: 0; text-align: left;
}
.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px -8px hsl(43 53% 54% / 0.45);
}
.gallery-item img { width: 100%; height: auto; object-fit: contain; background-color: var(--secondary); transition: transform 0.5s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-caption {
  position: absolute;
  inset-x: 0; bottom: 0;
  background: linear-gradient(to top, hsl(25 39% 17% / 0.9), hsl(25 39% 17% / 0.5) 50%, transparent);
  padding: 1rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: var(--dark-fg);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s, transform 0.3s;
}
.gallery-item:hover .gallery-caption { opacity: 1; transform: translateY(0); }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  z-index: 100;
  background-color: hsl(25 39% 17% / 0.95);
  backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  color: var(--dark-fg);
  padding: 0.5rem;
  transition: color 0.2s;
}
.lightbox-close:hover { color: var(--gold); }
.lightbox-close svg { width: 2rem; height: 2rem; }
.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  color: var(--dark-fg);
  padding: 0.5rem;
  transition: color 0.2s;
}
.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }
@media (min-width: 768px) { .lightbox-prev { left: 1.5rem; } .lightbox-next { right: 1.5rem; } }
.lightbox-prev:hover, .lightbox-next:hover { color: var(--gold); }
.lightbox-prev svg, .lightbox-next svg { width: 2.5rem; height: 2.5rem; }
.lightbox-figure {
  max-width: 64rem;
  max-height: 85vh;
  margin: 0 1rem;
  display: flex; flex-direction: column; align-items: center;
}
.lightbox-img { max-height: 75vh; width: auto; object-fit: contain; border-radius: var(--radius); box-shadow: var(--shadow-hover); }
.lightbox-caption {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  color: var(--dark-fg);
  margin-top: 1rem;
  text-align: center;
  padding: 0 1rem;
}

/* ══════════════════════════════════
   LICHNOSTI — FLIP CARDS
   ══════════════════════════════════ */
.persons-grid { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .persons-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .persons-grid { grid-template-columns: repeat(3, 1fr); } }

.flip-card {
  perspective: 1200px;
  height: 20rem;
  cursor: pointer;
}
.flip-card-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform 0.7s;
  transform-style: preserve-3d;
}
.flip-card:hover .flip-card-inner,
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}
.flip-front, .flip-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.flip-front {
  background-color: var(--card);
  border: 2px solid hsl(43 53% 54% / 0.4);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 2rem;
}
.flip-back {
  background-color: var(--dark);
  color: var(--dark-fg);
  border: 2px solid var(--gold);
  box-shadow: var(--shadow-hover);
  transform: rotateY(180deg);
  display: flex; flex-direction: column; justify-content: center;
  padding: 1.5rem;
}
.flip-icon-wrap {
  width: 5rem; height: 5rem;
  border-radius: 9999px;
  background-color: hsl(43 53% 54% / 0.15);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}
.flip-icon-wrap svg { width: 2.5rem; height: 2rem; color: var(--gold); }
.flip-name { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; color: var(--primary); margin-bottom: 0.5rem; }
.flip-years { color: var(--gold); font-weight: 500; margin-bottom: 0.25rem; }
.flip-role { font-size: 0.875rem; color: var(--muted-fg); }
.flip-hint { font-size: 0.75rem; color: hsl(25 15% 40% / 0.7); margin-top: 1rem; font-style: italic; }
.flip-back-name { font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; color: var(--gold); margin-bottom: 0.75rem; }
.flip-back-text { font-size: 0.875rem; line-height: 1.75; color: hsl(36 38% 95% / 0.9); }

/* ══════════════════════════════════
   CONTACT FORM
   ══════════════════════════════════ */
.contact-grid { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }

.form-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}
@media (min-width: 768px) { .form-card { padding: 2rem; } }
.form-title { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; color: var(--primary); margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.25rem; }
.form-required { color: var(--destructive); }
.form-input, .form-textarea {
  width: 100%; padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background-color: var(--bg);
  color: var(--fg);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px hsl(43 53% 54% / 0.2);
}
.form-input.error, .form-textarea.error { border-color: var(--destructive); }
.form-input.error:focus, .form-textarea.error:focus { box-shadow: 0 0 0 3px hsl(0 84% 60% / 0.2); }
.form-textarea { resize: vertical; min-height: 7rem; }
.form-error { font-size: 0.75rem; color: var(--destructive); margin-top: 0.25rem; }
.form-success {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius);
  background-color: var(--success-bg);
  border: 1px solid var(--success-bd);
  color: var(--success);
  margin-bottom: 1.25rem;
  font-size: 0.875rem; font-weight: 500;
}
.form-success svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; margin-top: 0.125rem; }
.form-success.hidden { display: none; }
.btn-submit {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--gold);
  color: var(--gold-fg);
  border: none;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}
.btn-submit:hover { background-color: hsl(43 53% 48%); }

.info-card {
  background-color: var(--dark);
  color: var(--dark-fg);
  border: 2px solid hsl(43 53% 54% / 0.3);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  align-self: flex-start;
}
@media (min-width: 768px) { .info-card { padding: 2rem; } }
.info-heading { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; color: var(--gold); margin-bottom: 1.5rem; }
.info-item { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1rem; }
.info-icon { width: 1.25rem; height: 1.25rem; color: var(--gold); flex-shrink: 0; margin-top: 0.125rem; }
.info-label { font-weight: 600; margin-bottom: 0.125rem; }
.info-val { font-size: 0.875rem; color: hsl(36 38% 95% / 0.8); }
.source-box {
  border: 2px solid hsl(43 53% 54% / 0.6);
  border-radius: calc(var(--radius) - 2px);
  padding: 1rem;
  background-color: hsl(25 39% 17% / 0.4);
  margin-top: 1.5rem;
}
.source-head { display: flex; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.5rem; }
.source-head svg { width: 1.25rem; height: 1.25rem; color: var(--gold); flex-shrink: 0; margin-top: 0.125rem; }
.source-head span { color: var(--gold); font-family: 'Cormorant Garamond', serif; font-weight: 600; }
.source-text { font-size: 0.875rem; color: hsl(36 38% 95% / 0.85); line-height: 1.625; }

/* ══════════════════════════════════
   404 PAGE
   ══════════════════════════════════ */
.notfound-wrap {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  background-color: var(--muted);
}
.notfound-inner { text-align: center; }
.notfound-inner h1 { font-size: 3rem; font-weight: 700; margin-bottom: 1rem; }
.notfound-inner p { font-size: 1.25rem; color: var(--muted-fg); margin-bottom: 1rem; }
.notfound-inner a { color: var(--primary); text-decoration: underline; }

/* ── Utilities ── */
.text-gold { color: var(--gold); }
.text-primary { color: var(--primary); }
.text-muted { color: var(--muted-fg); }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
