/* =========================================================================
   rok-gmuend.de - styles
   Colors come from the old site's banners; fonts are stored on our own
   server (no Google Fonts, which matters for German privacy law).
   ========================================================================= */

@font-face { font-family: "PT Serif"; font-weight: 400; font-style: normal; font-display: swap;
  src: url(../fonts/pt-serif-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "PT Serif"; font-weight: 400; font-style: normal; font-display: swap;
  src: url(../fonts/pt-serif-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: "PT Serif"; font-weight: 400; font-style: italic; font-display: swap;
  src: url(../fonts/pt-serif-cyrillic-400-italic.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "PT Serif"; font-weight: 400; font-style: italic; font-display: swap;
  src: url(../fonts/pt-serif-latin-400-italic.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: "PT Serif"; font-weight: 700; font-style: normal; font-display: swap;
  src: url(../fonts/pt-serif-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "PT Serif"; font-weight: 700; font-style: normal; font-display: swap;
  src: url(../fonts/pt-serif-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: "Montserrat"; font-weight: 600; font-style: normal; font-display: swap;
  src: url(../fonts/montserrat-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Montserrat"; font-weight: 600; font-style: normal; font-display: swap;
  src: url(../fonts/montserrat-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: "Montserrat"; font-weight: 700; font-style: normal; font-display: swap;
  src: url(../fonts/montserrat-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Montserrat"; font-weight: 700; font-style: normal; font-display: swap;
  src: url(../fonts/montserrat-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }

:root {
  --brown: #93715c;
  --brown-deep: #6f5242;
  --cream: #fee8b7;
  --cream-soft: #fff6e3;
  --paper: #fffdf9;
  --line: #eadfce;
  --ink: #2f2620;
  --muted: #74655a;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--serif); font-size: 1.0625rem; line-height: 1.65;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brown-deep); }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--sans); font-weight: 600; color: var(--brown-deep); line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.55rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 10; }

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 18px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: inherit; flex: 1; min-width: 0; }
.brand img { width: 84px; height: 84px; flex: none; }
.brand__name { font-family: var(--sans); font-weight: 700; font-size: clamp(1.05rem, 2.4vw, 1.45rem); color: var(--brown-deep); line-height: 1.2; display: block; }
.brand__sub { font-size: .95rem; color: var(--muted); display: block; margin-top: 2px; }
.lang { display: flex; gap: 6px; flex: none; }
.lang a {
  font-family: var(--sans); font-weight: 600; font-size: .8rem; text-decoration: none;
  padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line); color: var(--brown-deep);
}
.lang a[aria-current="true"] { background: var(--brown); border-color: var(--brown); color: #fff; }

/* ---------- Navigation ---------- */
.nav { background: var(--brown); }
.nav__toggle { display: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.nav a {
  display: block; padding: 13px 18px; color: #fff; text-decoration: none;
  font-family: var(--sans); font-weight: 600; font-size: .92rem;
}
.nav a:hover { background: var(--brown-deep); }
.nav a[aria-current="page"] { background: var(--brown-deep); box-shadow: inset 0 -3px 0 var(--cream); }

@media (max-width: 760px) {
  .brand img { width: 60px; height: 60px; }
  .brand__sub { font-size: .82rem; }
  .site-header__inner { flex-wrap: wrap; }
  .nav__toggle {
    display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; color: #fff;
    font-family: var(--sans); font-weight: 600; font-size: .95rem; padding: 12px clamp(16px, 4vw, 32px); cursor: pointer;
  }
  .nav__toggle span { display: block; width: 20px; height: 2px; background: #fff; box-shadow: 0 6px 0 #fff, 0 -6px 0 #fff; }
  .nav ul { display: none; flex-direction: column; padding-bottom: 8px; }
  .nav.is-open ul { display: flex; }
  .nav a { padding: 10px clamp(16px, 4vw, 32px); }
}

/* ---------- Page layout ---------- */
.page { padding: clamp(28px, 5vw, 48px) 0 clamp(40px, 6vw, 64px); }
.home { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(24px, 4vw, 48px); align-items: start; }
@media (max-width: 900px) { .home { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: clamp(28px, 4vw, 40px); }

.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: clamp(18px, 3vw, 28px); }
.card--cream { background: var(--cream-soft); border-color: #f3e2bf; }
.note { background: var(--cream-soft); border-left: 4px solid var(--brown); border-radius: 0 8px 8px 0; padding: 12px 16px; color: var(--muted); font-style: italic; }

/* News */
.post { display: grid; gap: 4px; }
.post__date { font-family: var(--sans); font-size: .82rem; font-weight: 600; color: var(--brown); text-transform: uppercase; letter-spacing: .04em; }
.post h2, .post h3 { margin-bottom: .4em; }
.post + .post { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 24px; }
.more { font-family: var(--sans); font-weight: 600; font-size: .9rem; }

.donate { display: block; max-width: 672px; border-radius: 12px; overflow: hidden; transition: transform .15s ease; }
.donate:hover { transform: translateY(-2px); }

/* «Ближайшие богослужения» (filled in by assets/js/schedule.js) */
.schedule { margin: 0 0 .6em; padding: 0; list-style: none; }
.schedule li { display: grid; grid-template-columns: minmax(3.4em, max-content) 1fr; gap: 14px; padding: 5px 0; }
.schedule li + li { border-top: 1px dashed #ecdcbc; }
.schedule time { font-family: var(--sans); font-weight: 600; color: var(--brown-deep); white-space: nowrap; }
.weekend[hidden], .publish [hidden] { display: none; }
.weekend__day { font-size: 1.05rem; margin: 1.1em 0 .3em; }
.weekend__day:first-child, .weekend h2 + div > .weekend__day:first-child { margin-top: 0; }
.weekend__feast { display: block; font-family: var(--serif); font-weight: 400; font-style: italic; font-size: .95rem; color: var(--muted); }
.weekend__important, .weekend__important span { font-weight: 700; }
.weekend p { margin: 0 0 .6em; }
.weekend__meta { font-size: .85rem; color: var(--muted); font-style: italic; }

/* Saints of the day */
.day__date { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.day__date img { width: 64px; height: 64px; flex: none; }
.day__weekday { display: block; font-family: var(--sans); font-weight: 600; text-transform: capitalize; color: var(--brown-deep); }
.day__new { display: block; font-size: 1.1rem; }
.day__old { display: block; font-size: .92rem; color: var(--muted); }
.button {
  display: inline-block; background: var(--brown); color: #fff; text-decoration: none;
  font-family: var(--sans); font-weight: 600; font-size: .92rem; padding: 10px 16px; border-radius: 8px;
}
.button:hover { background: var(--brown-deep); color: #fff; }
.bote { display: block; text-decoration: none; color: inherit; }
.bote__name { display: block; font-family: var(--sans); font-weight: 700; color: var(--brown-deep); font-size: 1.1rem; }
.bote__desc { display: block; font-size: .92rem; color: var(--muted); }

/* Contacts */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
/* space between cards placed directly on a page (English page, contacts) */
.page .wrap > .contact-grid + .card, .page .wrap > .card + .card { margin-top: 20px; }
.contact-grid h2 { font-size: 1.15rem; }
dl.facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; }
dl.facts dt { font-family: var(--sans); font-weight: 600; font-size: .9rem; color: var(--brown-deep); padding-top: 2px; }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }

/* Gallery */
.gallery-feed { min-height: 120px; }

/* Legal pages */
.legal { max-width: 760px; }
.legal h2 { font-size: 1.2rem; margin-top: 1.6em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brown); color: #fff; margin-top: auto; }
.site-footer a { color: #fff; }
.site-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; padding-top: 36px; padding-bottom: 28px; }
.site-footer h2 { color: var(--cream); font-size: 1.1rem; }
.site-footer address { font-style: normal; margin-bottom: 8px; }
.social { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; }
.social img { width: 52px; height: 52px; background: #fff; border-radius: 50%; padding: 4px; }
.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.25); padding-top: 14px; padding-bottom: 18px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; font-size: .9rem; color: var(--cream);
}
.site-footer__bottom p { margin: 0; }
.site-footer__legal a { margin-left: 16px; }
.site-footer__legal a:first-child { margin-left: 0; }

/* ---------- Photo gallery ---------- */
.post__img { border-radius: 10px; margin-bottom: 14px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 24px; }
.gallery a { display: block; border-radius: 8px; overflow: hidden; background: var(--line); }
.gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .25s ease; }
.gallery a:hover img { transform: scale(1.04); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
.lightbox::backdrop { background: rgba(20, 14, 10, .9); }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 6px; }
.lightbox__btn {
  position: fixed; background: rgba(255,255,255,.15); color: #fff; border: 0; cursor: pointer;
  font-size: 2rem; line-height: 1; width: 48px; height: 48px; border-radius: 50%;
}
.lightbox__btn:hover { background: rgba(255,255,255,.3); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }
.gallery-archive { margin-top: 36px; }

/* ---------- News list ---------- */
.news-list .post, .stack .post {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start;
  border: 0; margin: 0; padding: 22px 0; border-top: 1px solid var(--line);
}
.news-list .post:first-child { border-top: 0; }
.stack .post { grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 16px 0; }
.post:not(:has(.post__media)) { grid-template-columns: 1fr !important; }
.post__media { position: relative; border-radius: 10px; overflow: hidden; background: var(--line); }
.post__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.post__play {
  position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; font-size: 1.1rem; padding-left: 3px;
}
.post__body { min-width: 0; overflow-wrap: anywhere; }
.post__body .post__date { display: block; margin-bottom: 6px; }
.post__body p { margin-bottom: .7em; }
.news-list .post { scroll-margin-top: 16px; }
.news-list .post:target { background: var(--cream-soft); box-shadow: 0 0 0 12px var(--cream-soft); border-radius: 4px; }
@media (max-width: 600px) {
  .news-list .post { grid-template-columns: 1fr; }
  .news-list .post__media img { aspect-ratio: 16 / 10; }
  .stack .post { grid-template-columns: 90px minmax(0, 1fr); }
}

/* Lightbox caption */
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-height: 82vh; }
.lightbox figcaption { color: #fff; font-family: var(--sans); font-size: .9rem; margin-top: 10px; display: flex; gap: 18px; }
.lightbox figcaption a { color: var(--cream); }

/* ---------- Homepage announcement box ---------- */
.announce {
  display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit;
  background: var(--cream-soft); border: 1px solid #f3e2bf; border-radius: 10px; padding: 12px; margin-bottom: 1em;
}
.announce img { width: 64px; height: auto; border-radius: 6px; flex: none; }
.announce > span { display: block; }
.announce__date { display: block; font-family: var(--sans); font-size: .82rem; font-weight: 600; color: var(--brown); text-transform: uppercase; letter-spacing: .04em; }
.announce strong { display: block; color: var(--brown-deep); font-family: var(--sans); font-weight: 600; line-height: 1.3; margin: 2px 0 4px; }
.announce__more { display: block; font-family: var(--sans); font-weight: 600; font-size: .9rem; color: var(--brown-deep); text-decoration: underline; }
.announce:hover strong { color: var(--ink); }

/* ---------- Contest page «Рождественская лира» ---------- */
.lira { max-width: 920px; }
.lira__head { text-align: center; margin-bottom: clamp(20px, 4vw, 32px); }
.lira__head h1 { font-size: clamp(1.7rem, 4.2vw, 2.4rem); }
.lira__lead { font-size: 1.15rem; }
.lira__grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: clamp(20px, 4vw, 36px); align-items: start; }
.lira__poster { display: block; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 22px rgba(47, 38, 32, .18); }
.lira__list, .lira__ways { margin: 0 0 1em; padding-left: 1.3em; }
.lira__list li, .lira__ways li { margin-bottom: .3em; }
.lira__register { margin-top: clamp(24px, 4vw, 36px); }
.lira__end { text-align: center; font-family: var(--sans); font-weight: 600; font-size: 1.25rem; color: var(--brown-deep); margin-top: 28px; }
@media (max-width: 700px) {
  .lira__grid { grid-template-columns: 1fr; }
  .lira__poster { max-width: 340px; margin: 0 auto; }
  dl.lira__facts { grid-template-columns: 1fr; gap: 0; }
  dl.lira__facts dd { margin-bottom: 10px; }
}

/* ---------- Forms ---------- */
.form[hidden], .form__done[hidden] { display: none; }
.form { display: grid; gap: 16px; max-width: 560px; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.form__row { display: grid; gap: 4px; }
.form__row--short select { max-width: 120px; }
.form label { font-family: var(--sans); font-weight: 600; font-size: .9rem; color: var(--brown-deep); }
.form input[type="text"], .form select {
  font: inherit; color: var(--ink); background: #fff; width: 100%;
  border: 1px solid #d8c8b2; border-radius: 8px; padding: 10px 12px;
}
.form input:focus, .form select:focus { outline: 2px solid var(--brown); outline-offset: 1px; border-color: var(--brown); }
.form__check { display: flex; gap: 10px; align-items: flex-start; font-family: var(--serif) !important; font-weight: 400 !important; font-size: .95rem !important; color: var(--ink) !important; line-height: 1.5; }
.form__check input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--brown); }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .button { justify-self: start; border: 0; cursor: pointer; font-size: 1rem; padding: 12px 22px; }
.form .button[disabled] { opacity: .6; cursor: wait; }
.form__status { margin: 0; min-height: 1.5em; }
.form__status.is-error { color: #a12d1f; }
.form__done { margin-top: 8px; padding: 18px; background: var(--cream-soft); border-radius: 10px; border-left: 4px solid var(--brown); }
.form__done .button { border: 0; cursor: pointer; }
.form__hint { margin: 0 0 -6px; font-size: .92rem; color: var(--muted); font-style: italic; }

/* ---------- Page for publishing the schedule (/raspisanie/opublikovat/) ---------- */
.publish { max-width: 640px; }
.publish__steps { padding-left: 1.3em; margin: 0 0 1em; }
.publish__steps li { margin-bottom: .25em; }
.publish__form { max-width: none; }
.form textarea {
  font: inherit; color: var(--ink); background: #fff; width: 100%; resize: vertical; min-height: 9em;
  border: 1px solid #d8c8b2; border-radius: 8px; padding: 10px 12px;
}
.form textarea:focus, .form input[type="password"]:focus { outline: 2px solid var(--brown); outline-offset: 1px; border-color: var(--brown); }
.form input[type="password"] {
  font: inherit; color: var(--ink); background: #fff; width: 100%; max-width: 280px;
  border: 1px solid #d8c8b2; border-radius: 8px; padding: 10px 12px;
}
.form .button--light, .button--light {
  background: #fff; color: var(--brown-deep); border: 1px solid var(--brown); cursor: pointer; font-size: .92rem; padding: 9px 14px;
}
.button--light:hover { background: var(--cream-soft); color: var(--ink); }
.publish__preview { margin: 4px 0; }
.publish__label { font-family: var(--sans); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--brown); margin: 0 0 8px; }
.publish__warn { background: #fff1ec; border-left: 4px solid #a12d1f; border-radius: 0 8px 8px 0; padding: 8px 12px; color: #7d2418; margin: 0 0 12px; }
.publish__after { font-size: .95rem; color: var(--muted); margin-top: 18px; }
.form__status.is-ok { color: #2e6b2f; font-weight: 600; }
