/* ── Fonts (self-hosted, no external requests) ───────────────────── */
@import url('/assets/fonts/fonts.css');

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ─────────────────────────────────────────────────────── */
:root {
  --red:        #8b1a1a;
  --red-light:  #b52020;
  --gold:       #7a5c10;
  --text:       #222;
  --muted:      #666;
  --bg:         #f4f2ee;
  --bg-white:   #fff;
  --border:     #d8d0c4;
  --nav-bg:     #2b2b2b;
  --nav-hover:  #444;

  --font-heading: 'EB Garamond', Georgia, serif;
  --font-body:    'Open Sans', system-ui, sans-serif;
  --sidebar-w:    200px;
}

/* ── Base ───────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ─────────────────────────────────────────────────────── */
/* White bg intentionally matches the church-sketch image background
   so the image corners are invisible */
header {
  background: #fff;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0 1.25rem;
}

.header-church {
  width: clamp(60px, 7vw, 85px);
  height: auto;
  flex-shrink: 0;
}

.header-titles { flex: 1; }

.header-title-ru {
  font-family: var(--font-heading);
  font-size: clamp(0.95rem, 2.2vw, 1.35rem);
  font-style: italic;
  color: var(--gold);
  line-height: 1.35;
  margin-bottom: 0.15rem;
}

.header-title-de {
  font-family: var(--font-heading);
  font-size: clamp(0.78rem, 1.6vw, 0.95rem);
  color: #666;
  line-height: 1.35;
}

/* Language toggle — top-right of header */
.header-lang {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
  align-self: flex-start;
  padding-top: 0.1rem;
}

.lang-btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: #888;
  background: none;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.lang-btn:hover { border-color: var(--red); color: var(--red); text-decoration: none; }

.lang-btn-active {
  background: var(--red);
  border-color: var(--red);
  color: #fff !important;
}

.lang-btn-active:hover { color: #fff; }

/* ── Layout ─────────────────────────────────────────────────────── */
/* Dark bg on .layout fills the full sidebar column for any page height */
.layout { display: flex; flex: 1; align-items: flex-start; background: var(--nav-bg); }

/* ── Nav ────────────────────────────────────────────────────────── */
nav {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--nav-bg);
  align-self: flex-start;   /* must NOT be stretch — sticky needs this */
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
}

nav ul { list-style: none; padding: 0.5rem 0; }

nav a {
  display: block;
  color: #ddd;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.15s, color 0.15s;
}

nav a:hover { background: var(--nav-hover); color: #fff; text-decoration: none; }

.nav-active { background: var(--nav-hover) !important; color: #fff !important; }

/* ── Main ───────────────────────────────────────────────────────── */
main { flex: 1; background: var(--bg-white); }

section { padding: 2rem 2.25rem; border-bottom: 1px solid var(--border); }
section:last-child { border-bottom: none; }

h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--red);
  margin-bottom: 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

h3 { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 600; color: #333; margin: 1.5rem 0 0.5rem; }
h3:first-of-type { margin-top: 0; }

p { margin-bottom: 0.85rem; }
p:last-child { margin-bottom: 0; }

ul { padding-left: 1.4rem; margin-bottom: 0.85rem; }
ul li { margin-bottom: 0.2rem; }

code { font-family: monospace; font-size: 0.88em; background: #f0eeea; padding: 0.1em 0.35em; border-radius: 2px; }

/* ── Schedule ───────────────────────────────────────────────────── */
h3.month {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--red);
  margin: 1.5rem 0 0.4rem;
}
h3.month:first-of-type { margin-top: 0; }

.schedule-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; font-size: 0.92rem; }
.schedule-table td { padding: 0.35rem 0.6rem; vertical-align: top; border-bottom: 1px solid var(--border); }
.schedule-table tr:last-child td { border-bottom: none; }

.s-date { white-space: nowrap; color: var(--red-light); font-weight: 600; padding-left: 0 !important; width: 6.5rem; }
.s-time { white-space: nowrap; width: 4rem; color: var(--muted); }
.feast  { color: var(--red); font-weight: 600; }

p.note { font-size: 0.82rem; color: var(--muted); font-style: italic; margin-top: 0.5rem; }

/* ── Address / Map ──────────────────────────────────────────────── */
address { font-style: normal; line-height: 1.9; margin-bottom: 1.25rem; }

.map-container { width: 100%; aspect-ratio: 16/6; border: 1px solid var(--border); border-radius: 3px; overflow: hidden; }

.map-consent {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; padding: 1.5rem;
  background: #f0eeea; text-align: center;
}
.map-consent p { font-size: 0.85rem; color: var(--muted); margin: 0; }

.btn-load-map {
  background: var(--red); color: #fff; border: none; border-radius: 3px;
  padding: 0.5rem 1.25rem; font-family: var(--font-body); font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
}
.btn-load-map:hover { background: var(--red-light); }

/* ── Spenden / Donations ────────────────────────────────────────── */
.bank-box {
  background: #f9f8f5;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.1rem 1.4rem;
  margin: 1rem 0 1.5rem;
  font-size: 0.93rem;
  line-height: 2;
}
.bank-box strong { color: var(--red); }

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 0.55rem 1.2rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
  cursor: pointer;
}
.btn-download:hover { background: var(--red-light); color: #fff; text-decoration: none; }

/* ── Sub-page helpers ───────────────────────────────────────────── */
.section-rule { border: none; border-top: 1px solid var(--border); margin: 2rem 0 1.5rem; }
.ru-note { font-size: 0.88rem; color: var(--muted); line-height: 1.7; }

/* ── Footer ─────────────────────────────────────────────────────── */
footer { background: var(--nav-bg); color: #999; font-size: 0.8rem; text-align: right; padding: 0.75rem 1.5rem; }
footer a { color: #bbb; }
footer a:hover { color: #fff; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
  :root { --sidebar-w: 0px; }
  .layout { flex-direction: column; }
  nav { width: 100%; position: static; max-height: none; }
  nav ul { display: flex; flex-wrap: wrap; padding: 0; }
  nav a { border-bottom: none; border-right: 1px solid rgba(255,255,255,0.06); padding: 0.55rem 0.8rem; }
  section { padding: 1.25rem 1rem; }
  .s-date, .s-time { width: auto; }
  .header-title-ru { font-size: 0.9rem; }
  .header-title-de { font-size: 0.75rem; }
}
