/* Slovenske cerkve — modern, umirjen videz */

:root {
  --bg: #faf7f1;
  --bg-alt: #f2ede2;
  --surface: #ffffff;
  --ink: #26241f;
  --ink-soft: #5c5648;
  --border: #e5ddc9;
  --accent: #9a6b3a;
  --accent-ink: #ffffff;
  --accent-soft: #f1e3cf;
  --navy: #2f3a44;
  --danger: #a3402f;
  --shadow: 0 1px 2px rgba(38, 36, 31, 0.04), 0 8px 24px -12px rgba(38, 36, 31, 0.18);
  --radius: 14px;
  --serif: "Fraunces", Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1a17;
    --bg-alt: #221f1a;
    --surface: #24221d;
    --ink: #ede7d9;
    --ink-soft: #b8b0a0;
    --border: #3a362c;
    --accent: #d1a768;
    --accent-ink: #201a10;
    --accent-soft: #362c1c;
    --navy: #cdd6dd;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  --bg: #1b1a17;
  --bg-alt: #221f1a;
  --surface: #24221d;
  --ink: #ede7d9;
  --ink-soft: #b8b0a0;
  --border: #3a362c;
  --accent: #d1a768;
  --accent-ink: #201a10;
  --accent-soft: #362c1c;
  --navy: #cdd6dd;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  font-optical-sizing: auto;
  letter-spacing: 0.005em;
  color: var(--ink);
  margin: 0 0 0.5em;
}

h2 { position: relative; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--bg-alt);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.brand:hover { text-decoration: none; }
.brand .mark { color: var(--accent); font-size: 1.4em; }

.site-nav { display: flex; gap: 1.75rem; align-items: center; }
.site-nav a {
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.site-nav a:hover { color: var(--accent); text-decoration: none; }

/* Hero */
.hero {
  padding: 5.5rem 0 4rem;
  text-align: center;
  position: relative;
  background:
    radial-gradient(ellipse at top, var(--accent-soft) 0%, transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 5%, transparent) 0.6px, transparent 0.6px);
  background-size: 14px 14px;
  -webkit-mask-image: radial-gradient(ellipse 60% 100% at top, black, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 100% at top, black, transparent 75%);
}
.hero .wrap { position: relative; }
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-style: italic;
  margin-bottom: 0.4em;
}
.hero p.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 42em;
  margin: 0 auto 2rem;
}
.ornament {
  display: block;
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 0.4em;
  margin: 0 0 1rem;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.stat { text-align: center; }
.stat .n {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
}
.stat .l {
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Search */
.search-box {
  display: flex;
  max-width: 30em;
  margin: 0 auto;
  gap: 0.5rem;
}
.search-box input[type="text"] {
  flex: 1;
}

/* Form elements */
input[type="text"], input[type="email"], select, textarea {
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 0.65em 0.9em;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
textarea { resize: vertical; font-family: var(--sans); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.65em 1.4em;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.btn:hover { opacity: 0.88; text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* Sections */
section { padding: 3.5rem 0; }
section.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-head p { color: var(--ink-soft); max-width: 40em; margin: 0.5em auto 0; }

/* Card grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(38, 36, 31, 0.06), 0 14px 28px -14px rgba(38, 36, 31, 0.28);
}
.card a.card-link { color: inherit; }
.card a.card-link:hover { text-decoration: none; }

.card .thumb {
  aspect-ratio: 4/3;
  background: var(--bg-alt) center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 2rem;
  box-shadow: inset 0 0 0 6px var(--surface), inset 0 0 0 7px var(--border);
}
.card .body { padding: 1.1rem 1.2rem 1.3rem; }
.card h3 { font-size: 1.1rem; font-style: italic; margin-bottom: 0.25em; }
.card .meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.card .meta + .meta { margin-top: 0.15em; }

/* Filters bar */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 2rem;
}
.filters select { min-width: 10em; }
.filters .count { margin-left: auto; color: var(--ink-soft); font-size: 0.9rem; }

/* Church detail */
.church-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 800px) {
  .church-hero { grid-template-columns: 1fr; }
}

.gallery-main {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 6px var(--surface), inset 0 0 0 7px var(--border), var(--shadow);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-strip {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}
.gallery-strip img {
  width: 76px; height: 76px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  flex: none;
}

.fact-list { list-style: none; margin: 0; padding: 0; }
.fact-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.fact-list li:last-child { border-bottom: none; }
.fact-list .k {
  color: var(--ink-soft);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.fact-list .v { text-align: right; font-weight: 500; }

.prose { color: var(--ink); font-size: 1.02rem; }
.prose p { margin: 0 0 1em; }

#map { height: 340px; border-radius: var(--radius); border: 1px solid var(--border); margin-top: 1.5rem; }
#map-home { height: 380px; border-radius: var(--radius); border: 1px solid var(--border); }

/* Message / contact form */
.message-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  max-width: 640px;
  margin: 0 auto;
}
.message-card h2 { margin-bottom: 0.3em; }
.message-card .sub { color: var(--ink-soft); margin-bottom: 1.5rem; font-size: 0.95rem; }
.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 0.35em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.field input, .field textarea { width: 100%; }
.field .hint { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.3em; }

.form-status {
  margin-top: 1rem;
  padding: 0.75em 1em;
  border-radius: 10px;
  font-size: 0.92rem;
  display: none;
}
.form-status.ok { display: block; background: #e5f3ea; color: #1f5c37; }
.form-status.err { display: block; background: #fbe7e3; color: #7c2c1e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .form-status.ok { background: #1c3324; color: #a9dcb9; }
  :root:not([data-theme="light"]) .form-status.err { background: #3a2019; color: #f0b3a4; }
}
:root[data-theme="dark"] .form-status.ok { background: #1c3324; color: #a9dcb9; }
:root[data-theme="dark"] .form-status.err { background: #3a2019; color: #f0b3a4; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  text-align: center;
}
.site-footer a { color: var(--ink-soft); }
.footer-mark {
  font-family: var(--serif);
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

/* Empty state */
.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ink-soft);
}

/* Error page */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
}
.error-page .code { font-family: var(--serif); font-size: 4rem; color: var(--accent); margin-bottom: 0.2em; }
