@import url("fonts/fonts.css");

:root {
  --pergament: #f5eddc;
  --pergament-2: #ecdfc4;
  --mastilo: #2a1d14;
  --mastilo-2: #5a4636;
  --cinober: #a3302a;
  --bordo: #6e1e22;
  --lapis: #1f2f5a;
  --zlato: #a8812e;
  --zlato-svetlo: #d9b860;
  --zlato-tekst: #7a5a18; /* злато за ситан текст на пергаменту (AA) */
  --linija: #d8c6a2;
  --kartica: #fbf6ea;

  --r-voda: #2c5d8f;
  --r-ulje: #765510;
  --r-riba: #2f6b5c;
  --r-mrsno: #6b5a48;
  --r-belimrs: #94512f;

  --noc: 0; /* 0 → 1 како се Божић приближава (поставља app.js) */
  --naslov: "EB Garamond", Georgia, serif;
  --tekst: "Lora", Georgia, serif;
  --sirina: 46rem;
  color-scheme: light;
}

[data-tema="noc"] {
  --pergament: #15131f;
  --pergament-2: #1e1b2b;
  --mastilo: #f1e6cf;
  --mastilo-2: #cbbd9f;
  --cinober: #e0766a;
  --bordo: #e48a7e;
  --lapis: #9fb4e8;
  --zlato: #dcb75e;
  --zlato-svetlo: #f0d68c;
  --zlato-tekst: #dcb75e;
  --linija: rgba(220,183,94,.26);
  --kartica: #1c1a29;
  --r-voda: #7fb0e6;
  --r-ulje: #e2bb5f;
  --r-riba: #7cc7b2;
  --r-mrsno: #cbbd9f;
  --r-belimrs: #e6a07c;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { font-size: 112.5%; /* 18px */ -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--tekst);
  line-height: 1.65;
  color: var(--mastilo);
  background: var(--pergament);
  min-height: 100vh;
  font-kerning: normal;
}
/* Небо које тамни пред Божић — слој иза садржаја */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(217,184,96,.18), transparent 60%),
    linear-gradient(180deg, #0e1430 0%, #1f2f5a 55%, #3a2a3a 100%);
  opacity: calc(var(--noc) * .9);
  transition: opacity 2s;
}
body.nebo.ima-pergament::before { opacity: 1; background: linear-gradient(rgba(10,13,30,.55), rgba(10,13,30,.75)), url("slike/noc-nebo.jpg") center / cover; }
[data-tema="noc"] body::before { opacity: 1; background: radial-gradient(ellipse at 50% 0%, rgba(220,170,90,.13), transparent 55%), linear-gradient(180deg, #100e18, #1a1726); }
body.ima-pergament::after {
  content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background: url("slike/pergament.jpg") repeat; background-size: 512px; opacity: .55;
}
[data-tema="noc"] body.ima-pergament::after { opacity: .05; z-index: -1; } /* фреска уз свећу: текстура остаје, једва видљива */

a { color: var(--cinober); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--bordo); }
:focus-visible { outline: 3px solid var(--zlato); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { font-family: var(--naslov); font-weight: 500; line-height: 1.2; color: var(--bordo); letter-spacing: .005em; }
h1 { font-size: clamp(2rem, 6vw, 2.9rem); margin: .2em 0 .3em; }
h2 { font-size: 1.65rem; margin: 1.6em 0 .5em; }
h3 { font-size: 1.3rem; margin: 1.2em 0 .4em; }
p { margin: 0 0 1em; text-wrap: pretty; }
h1, h2, h3, summary { text-wrap: balance; }
::placeholder { color: var(--mastilo-2); opacity: 1; }
.mali { font-size: .9rem; color: var(--mastilo-2); }
.skriveno { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Тамна позадина неба кад је ноћ дубока: текст светао */
body.nebo { --r-voda: #7fb0e6; --r-ulje: #e2bb5f; --r-riba: #7cc7b2; --r-mrsno: #cbbd9f; --r-belimrs: #e6a07c; --zlato: #dcb75e; --zlato-tekst: #e2c271; --mastilo: #f1e6cf; --mastilo-2: #d3c6aa; --bordo: #f0d68c; --cinober: #f2a093; --kartica: rgba(16,20,42,.78); --linija: rgba(217,184,96,.35); --lapis: #b9c8ef; }

/* ── Заглавље ───────────────────────── */
.zaglavlje {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--pergament) 97%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--zlato) 55%, transparent);
  box-shadow: 0 3px 0 -1px color-mix(in srgb, var(--pergament) 92%, transparent), 0 3px 0 0 color-mix(in srgb, var(--zlato) 35%, transparent); /* двострука златна линија */
}
body.nebo .zaglavlje { background: rgba(12,16,36,.85); }
.zaglavlje-red { max-width: 72rem; margin: 0 auto; display: flex; align-items: center; gap: .8rem; padding: .45rem 1rem; }
.logo { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--bordo); font-family: var(--naslov); font-size: 1.55rem; font-weight: 500; }
.logo svg { width: 30px; height: 40px; flex: none; }
.alatke { margin-left: auto; display: flex; gap: .4rem; align-items: center; }
.dugme-malo {
  font: inherit; font-size: .85rem; padding: .35rem .7rem; border-radius: 999px;
  border: 1px solid var(--linija); background: var(--kartica); color: var(--mastilo); cursor: pointer; min-height: 40px;
}
.dugme-malo:hover { border-color: var(--zlato); }
.dugme-malo[aria-pressed="true"] { background: var(--bordo); color: var(--pergament); border-color: var(--bordo); }
body.nebo .dugme-malo[aria-pressed="true"] { color: #10142a; }
.pismo-prekidac { display: inline-flex; border: 1px solid var(--linija); border-radius: 999px; overflow: hidden; }
.pismo-prekidac button { border: 0; border-radius: 0; min-width: 3.2rem; }

.meni { max-width: 72rem; margin: 0 auto; padding: 0 1rem .35rem; display: flex; gap: .2rem 1.1rem; flex-wrap: wrap; font-size: .95rem; }
.meni a { position: relative; color: var(--mastilo-2); text-decoration: none; padding: .25rem 0; }
.meni a:hover, .meni a[aria-current="page"] { color: var(--bordo); }
.meni a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: -.1rem; width: 5px; height: 5px; background: var(--zlato); transform: translateX(-50%) rotate(45deg); } /* мали златни ромб уместо подвлаке */
/* Телефон: заглавље се не лепи (чува екран), мени у две уредне врсте уместо скривеног скроловања */
@media (max-width: 640px) {
  html { font-size: 106.25%; }
  .zaglavlje { position: static; }
  .zaglavlje-red { gap: .5rem; padding: .4rem .75rem; }
  .logo { font-size: 1.3rem; gap: .4rem; }
  .logo svg { width: 24px; height: 32px; }
  .alatke { gap: .3rem; }
  .dugme-malo { padding: .3rem .6rem; font-size: .8rem; }
  .pismo-prekidac button { min-width: 2.6rem; }
  .meni { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 0 .6rem; padding: 0 .75rem .4rem; font-size: .88rem; }
  .meni a { white-space: nowrap; padding: .45rem 0; }
  .meseci { top: 0; }
  .mesec-blok { scroll-margin-top: 3.5rem; }
  main { padding: 1rem .9rem 3rem; }
  .kartica { padding: 1rem 1rem; }
  h2 { font-size: 1.45rem; }
  .uvod { min-height: min(64vh, 30rem); }
  .uvod-tekst { padding: 2rem 1rem; }
  .uvod-datum { font-size: .9rem; letter-spacing: .03em; padding: .4rem .9rem; }
  .rezim { gap: .7rem; padding: .8rem .9rem; }
  .rezim svg { width: 42px; height: 42px; }
  .rezim .naziv { font-size: 1.6rem; }
  dl.podaci { grid-template-columns: 1fr; gap: 0; }
  dl.podaci dd { margin-bottom: .5rem; }
  .rec-okvir { padding: 1.6rem 1.1rem 1.3rem; }
  .rec-okvir .citat { font-size: 1.3rem; }
  .danas-crkva h2 { font-size: 1.6rem; }
}
@media (max-width: 340px) { .logo span { display: none; } }

/* ── Орнамент (плетер) ───────────── */
.ornament { display: block; width: 100%; height: 22px; color: var(--zlato); margin: 1.2rem 0; }
.ornament-sredina { display: flex; align-items: center; gap: .8rem; color: var(--zlato); margin: 1.6rem auto; max-width: 22rem; }
.ornament-sredina::before, .ornament-sredina::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, currentColor, transparent); }
.ornament-sredina svg { width: 26px; height: 26px; }
.crta-se path, .crta-se line, .crta-se circle { stroke-dasharray: var(--d, 300); stroke-dashoffset: var(--d, 300); animation: crtaj 2.4s ease-out .2s forwards; }
@keyframes crtaj { to { stroke-dashoffset: 0; } }

/* Злато које полако прелази преко наслова */
.zlatni { background: linear-gradient(100deg, var(--bordo) 0%, var(--bordo) 40%, var(--zlato-svetlo) 50%, var(--bordo) 60%, var(--bordo) 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: odsjaj 9s ease-in-out 2; }
@keyframes odsjaj { 0% { background-position: 100% 0; } 60%, 100% { background-position: -50% 0; } }

/* ── Распоред ───────────────────── */
main { max-width: var(--sirina); margin: 0 auto; padding: 1.2rem 1.1rem 4rem; }
main.siroko { max-width: 72rem; }
.kartica { background: var(--kartica); border: 1px solid var(--linija); border-radius: 4px; padding: 1.3rem 1.4rem; margin: 1rem 0; box-shadow: inset 0 0 0 4px var(--kartica), inset 0 0 0 5px color-mix(in srgb, var(--zlato) 40%, transparent); }
.kartica > h2:first-child, .kartica > h3:first-child { margin-top: 0; }
.oznaka { font-family: var(--naslov); font-style: italic; font-size: 1.15rem; line-height: 1.3; color: var(--cinober); margin: 0 0 .35rem; font-weight: 500; } /* рубрика, као црвено мастило у рукопису */
.mreza { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }

.hero { position: relative; border-radius: 50% 50% 4px 4px / 30% 30% 4px 4px; overflow: hidden; margin: 0 0 1rem; background: var(--lapis); min-height: 9rem; }
.hero img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.hero figcaption { position: absolute; inset: auto 0 0 0; padding: 2.5rem 1.2rem 1rem; color: #fbf3df; background: linear-gradient(transparent, rgba(10,12,30,.75)); font-family: var(--naslov); font-size: 1.25rem; }

/* ── Режим поста ─────────────────── */
.rezim { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; border-radius: 4px; border: 1px solid color-mix(in srgb, var(--rc) 55%, transparent); background: color-mix(in srgb, var(--rc) 7%, var(--kartica)); box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--rc) 7%, var(--kartica)), inset 0 0 0 5px color-mix(in srgb, var(--rc) 30%, transparent); color: var(--mastilo); }
.rezim svg { width: 52px; height: 52px; flex: none; color: var(--rc); }
.rezim .naziv { font-family: var(--naslov); font-size: 2rem; line-height: 1.1; color: var(--rc); font-weight: 600; }
.r-voda { --rc: var(--r-voda); } .r-ulje { --rc: var(--r-ulje); } .r-riba { --rc: var(--r-riba); } .r-mrsno { --rc: var(--r-mrsno); } .r-belimrs { --rc: var(--r-belimrs); }
.znacka { display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; padding: .1rem .55rem; border-radius: 999px; border: 1px solid var(--rc); color: var(--rc); background: color-mix(in srgb, var(--rc) 8%, transparent); white-space: nowrap; font-weight: 600; }
.znacka svg { width: 14px; height: 14px; }
.crveno { color: var(--cinober); font-weight: 600; }
h1.crveno, h2.crveno { font-weight: 500; }

/* ── Пут свећа ───────────────────── */
.svece { display: grid; grid-template-columns: repeat(20, 1fr); gap: 2px; margin: .6rem 0; }
.svece a { display: block; color: var(--linija); text-decoration: none; }
.svece svg { width: 100%; height: auto; display: block; }
.svece .upaljena { color: var(--zlato); }
.svece .upaljena .plamen { opacity: 1; }
.svece .plamen { opacity: 0; transform-origin: 50% 100%; transform-box: fill-box; }
.svece .upaljena .plamen { animation: upali .5s ease-out calc(var(--i, 0) * 60ms) both; }
.svece .danas .plamen { animation: upali .5s ease-out calc(var(--i, 0) * 60ms) both, treperi 3.2s ease-in-out calc(var(--i, 0) * 60ms + .5s) infinite; }
.otkrij:not(.vidljivo) .svece .plamen { animation-play-state: paused; }
@keyframes upali { from { opacity: 0; transform: scaleY(.3); } to { opacity: 1; transform: none; } }
.svece .zavet svg { animation: zavet 1.4s ease-out both; }
@keyframes zavet { 0% { filter: none; } 35% { filter: drop-shadow(0 0 9px rgba(242,179,61,.95)); } 100% { filter: drop-shadow(0 0 4px rgba(242,179,61,.6)); } }
.svece .danas .stub { fill: var(--cinober); }
.svece .propusten .stub { fill: var(--linija); }
.svece .bozic { grid-column: 1 / -1; justify-self: center; width: 2.4rem; margin-top: .3rem; color: var(--linija); }
.svece .bozic.upaljena { color: var(--zlato-svetlo); filter: drop-shadow(0 0 6px rgba(240,214,140,.8)); }
@keyframes treperi { 0%,100% { transform: scale(1, 1) skewX(0); } 30% { transform: scale(.94, 1.06) skewX(2deg); } 60% { transform: scale(1.04, .96) skewX(-2deg); } }
@media (max-width: 520px) { .svece { grid-template-columns: repeat(10, 1fr); } }

.napredak { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .3rem; }
.napredak strong { font-family: var(--naslov); font-size: 1.6rem; color: var(--bordo); font-weight: 600; }

/* ── Кандило у заглављу ───────────── */
.kandilo .plamen { transform-origin: 50% 100%; transform-box: fill-box; animation: treperi 3.6s ease-in-out infinite; }
.kandilo .sjaj { animation: sjaj 3.6s ease-in-out infinite; }
@keyframes sjaj { 0%,100% { opacity: .35; } 50% { opacity: .55; } }

/* ── Календар ───────────────────── */
.kalendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.kalendar .dn { font-size: .75rem; text-align: center; color: var(--mastilo-2); font-family: var(--naslov); letter-spacing: .08em; text-transform: uppercase; }
.kalendar a, .kalendar span.prazno { min-height: 4.6rem; border-radius: 3px; }
.kalendar a { display: flex; flex-direction: column; justify-content: space-between; padding: .35rem .4rem; text-decoration: none; color: var(--mastilo); border: 1px solid var(--linija); background: var(--kartica); transition: border-color .2s; }
.kalendar a:hover { border-color: var(--zlato); }
.kalendar .br { font-family: var(--naslov); font-size: 1.35rem; line-height: 1; display: inline-grid; place-items: center; min-width: 1.7em; height: 1.7em; margin: -.2em 0 0 -.25em; border-radius: 50%; }
/* недеља и црвено слово црвеним мастилом, велики празник и у двоструком раму */
.kalendar .crveno-slovo .br { color: var(--cinober); font-weight: 600; }
.kalendar .veliki { box-shadow: inset 0 0 0 3px var(--kartica), inset 0 0 0 4px color-mix(in srgb, var(--cinober) 70%, transparent); border-color: color-mix(in srgb, var(--cinober) 45%, var(--linija)); }
.kalendar .veliki .ime { color: var(--cinober); }
.kalendar .jul { font-size: .68rem; color: var(--mastilo-2); }
.kalendar .ime { font-size: .7rem; line-height: 1.3; color: var(--mastilo-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kalendar .danas { border-color: var(--zlato); }
.kalendar .danas .br { background: var(--zlato); color: var(--kartica); font-weight: 600; }
.kalendar svg { width: 16px; height: 16px; color: var(--rc); opacity: .8; }
.mesec { display: flex; flex-direction: column; align-items: center; text-align: center; font-family: var(--naslov); font-size: 1.9rem; font-weight: 500; color: var(--bordo); margin: 2.2rem 0 .9rem; line-height: 1.15; }
.mesec small { font-size: .95rem; font-style: italic; color: var(--cinober); margin-top: .25rem; font-weight: 400; }
.mesec::after { content: ""; width: min(16rem, 60%); height: 7px; margin-top: .55rem; background: linear-gradient(var(--zlato), var(--zlato)) center / 100% 1px no-repeat, radial-gradient(circle, var(--zlato) 0 3px, transparent 3.5px) center / 7px 7px no-repeat; }
.legenda { display: flex; flex-wrap: wrap; gap: .4rem .8rem; margin: .6rem 0 1rem; }
@media (max-width: 560px) { .kalendar svg { width: 15px; height: 15px; opacity: 1; align-self: flex-end; } .kalendar .ime { display: none; } .kalendar a { min-height: 3.6rem; padding: .3rem; } .kalendar .jul { display: block; font-size: .7rem; white-space: nowrap; } .kalendar .br { font-size: 1.2rem; } }

/* ── Листе и рецепти ─────────────── */
.filteri { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 1rem; }
.pretraga { width: 100%; font: inherit; padding: .65rem .9rem; border-radius: 8px; border: 1px solid var(--linija); background: var(--kartica); color: var(--mastilo); }
.recept-kartica { display: flex; flex-direction: column; text-decoration: none; color: var(--mastilo); background: var(--kartica); border: 1px solid var(--linija); border-radius: 4px; overflow: hidden; box-shadow: inset 0 0 0 4px var(--kartica), inset 0 0 0 5px color-mix(in srgb, var(--zlato) 40%, transparent); transition: border-color .3s; }
.recept-kartica:hover { border-color: var(--zlato); }
.recept-kartica .sl { margin: .7rem .7rem 0; }
.recept-kartica .sl img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: 50% 50% 4px 4px / 30% 30% 4px 4px; }

.recept-kartica .tx { padding: .7rem .9rem 1rem; }
.recept-kartica h2, .recept-kartica h3 { margin: .2rem 0; font-size: 1.2rem; }
ul.sastojci { list-style: none; padding: 0; }
ul.sastojci li { padding: .35rem 0; border-bottom: 1px dotted var(--linija); display: flex; gap: .6rem; }
ul.sastojci .kol { min-width: 5.5rem; font-weight: 600; color: var(--bordo); }
ol.koraci li { margin-bottom: .6rem; padding-left: .2rem; }
ol.koraci li::marker { font-family: var(--naslov); color: var(--cinober); font-size: 1.15em; font-weight: 600; }
.porcije { display: inline-flex; align-items: center; gap: .4rem; }
.porcije button { width: 40px; height: 40px; font-size: 1.2rem; }
.dugme { display: inline-flex; align-items: center; gap: .5rem; font: inherit; padding: .65rem 1.1rem; border-radius: 8px; border: 1px solid var(--bordo); background: var(--bordo); color: #fbf3df; cursor: pointer; text-decoration: none; min-height: 44px; }
.dugme:hover { background: var(--cinober); border-color: var(--cinober); color: #fff; }
.dugme.tiho { background: transparent; color: var(--bordo); }
.dugme.tiho:hover { background: color-mix(in srgb, var(--bordo) 8%, transparent); color: var(--bordo); }
.red-dugmadi { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.lista-kupovine li { display: flex; gap: .6rem; align-items: center; padding: .4rem 0; border-bottom: 1px dotted var(--linija); }
.lista-kupovine input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--bordo); }
.lista-kupovine .kupljeno span { text-decoration: line-through; color: var(--mastilo-2); }
.lista-kupovine { list-style: none; padding: 0; }
textarea { width: 100%; min-height: 8rem; font: inherit; padding: .7rem; border-radius: 8px; border: 1px solid var(--linija); background: var(--kartica); color: var(--mastilo); }

.molitva { white-space: pre-line; font-size: 1.1rem; line-height: 1.8; }
.amin { color: var(--cinober); }
.krstic { width: .62em; height: .95em; margin-right: .45em; vertical-align: -.05em; color: var(--zlato); }
.citat { font-family: var(--naslov); font-size: 1.35rem; line-height: 1.45; font-style: italic; margin: 0; }
.citat::before { content: '„'; color: var(--cinober); margin-left: -.45em; padding-right: .05em; }
.citat::after { content: '“'; color: var(--cinober); }
.rec-okvir .citat::before { margin-left: 0; }
.citat + .izvor { margin-top: .5rem; color: var(--mastilo-2); font-size: .9rem; }
details { border-bottom: 1px solid var(--linija); padding: .6rem 0; }
summary { cursor: pointer; font-family: var(--naslov); font-size: 1.2rem; color: var(--bordo); }
.napomena { border: 1px solid color-mix(in srgb, var(--zlato) 50%, transparent); padding: .6rem .9rem; background: color-mix(in srgb, var(--zlato) 8%, transparent); border-radius: 8px; }

.odbrojavanje { text-align: center; font-family: var(--naslov); }
.odbrojavanje strong { display: block; font-size: 3rem; line-height: 1; color: var(--bordo); font-weight: 500; }

/* ── Звезда и бадњи призор ────────── */
.zvezda { position: fixed; top: 4.5rem; right: 8vw; width: 70px; height: 70px; z-index: -1; pointer-events: none; opacity: var(--zv, 0); filter: drop-shadow(0 0 calc(var(--zv, 0) * 22px) rgba(255,230,160,.9)); animation: zvezda 6s ease-in-out infinite; }
@keyframes zvezda { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.zvezdice { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: calc(var(--noc) * 1); }
.zvezdice i { position: absolute; width: 2px; height: 2px; background: #fff7dc; border-radius: 50%; animation: trep 4s ease-in-out infinite; }
@keyframes trep { 0%,100% { opacity: .25; } 50% { opacity: 1; } }
.badnji-prizor { position: relative; overflow: hidden; text-align: center; padding: 1.4rem 1rem; border-radius: 12px; background: radial-gradient(ellipse at 50% 110%, rgba(240,150,60,.5), transparent 60%), rgba(14,16,36,.7); color: #fbefd2; border: 1px solid rgba(217,184,96,.4); }
.badnji-prizor h2 { color: #f0d68c; margin-top: 0; font-size: 2.1rem; }
.badnji-prizor .odgovor { color: #e9d9b5; font-style: italic; }

/* ── Појављивање при скроловању ───── */
.otkrij { opacity: 0; transform: translateY(14px); transition: opacity .9s ease, transform .9s ease; }
.otkrij.vidljivo { opacity: 1; transform: none; }

/* ── Подножје ───────────────────── */
.podnozje { border-top: 1px solid var(--linija); padding: 1.5rem 1rem 2.5rem; text-align: center; color: var(--mastilo-2); font-size: .9rem; }
.kolofon { font-family: var(--naslov); font-style: italic; font-size: 1.35rem; color: var(--cinober); margin: .4rem 0 .8rem; }
.podnozje-veze { display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem 1.4rem; margin: 0 0 1.2rem; font-family: var(--naslov); font-size: 1.05rem; }
.podnozje-veze a { color: var(--mastilo); text-decoration: none; padding: .35rem 0; }
.podnozje-veze a:hover { color: var(--cinober); }

/* ── Иницијал, као у рукописима ───── */
.inicijal::first-letter { float: left; font-family: var(--naslov); font-size: 3.4em; line-height: .8; padding: .08em .12em 0 0; margin-top: .04em; color: var(--cinober); font-weight: 500; }
.inicijal.praznicni::first-letter { padding: .1em .14em .02em; margin: .06em .22em 0 0; border: 1px solid var(--zlato); box-shadow: inset 0 0 0 2px var(--kartica), inset 0 0 0 3px color-mix(in srgb, var(--zlato) 55%, transparent); background: color-mix(in srgb, var(--zlato) 8%, var(--kartica)); }

/* ── Искре над бадњаком (Бадњи дан и Божић) ───── */
.iskre { position: absolute; inset: auto 0 0; height: 100%; pointer-events: none; }
.iskre i { position: absolute; bottom: -6px; width: 4px; height: 4px; border-radius: 50%; background: #ffc46b; box-shadow: 0 0 6px 1px rgba(255,170,70,.8); opacity: 0; animation: iskra 6s ease-out infinite; }
.iskre i:nth-child(1) { left: 18%; animation-delay: 0s; }
.iskre i:nth-child(2) { left: 31%; animation-delay: 1.7s; animation-duration: 7s; }
.iskre i:nth-child(3) { left: 44%; animation-delay: 3.1s; }
.iskre i:nth-child(4) { left: 53%; animation-delay: .8s; animation-duration: 5.4s; }
.iskre i:nth-child(5) { left: 64%; animation-delay: 2.4s; animation-duration: 6.6s; }
.iskre i:nth-child(6) { left: 76%; animation-delay: 4.2s; }
.iskre i:nth-child(7) { left: 86%; animation-delay: 1.2s; animation-duration: 7.2s; }
@keyframes iskra { 0% { opacity: 0; transform: translate(0, 0) scale(1); } 12% { opacity: 1; } 100% { opacity: 0; transform: translate(10px, -110px) scale(.4); } }

/* ── Меки прелаз између страна ───── */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-group(root) { animation-duration: .45s; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .otkrij { opacity: 1; transform: none; }
  .crta-se path, .crta-se line, .crta-se circle { stroke-dashoffset: 0; }
  .zlatni { color: var(--bordo); background: none; }
  .uvod .zlatni { color: #f3dc9c; }
  .uvod-slika img { transform: none; }
  .iskre { display: none; }
}

@media print {
  .zaglavlje, .podnozje, .red-dugmadi, .ne-stampaj, .zvezda, .zvezdice, .ornament { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  body::before, body::after { display: none; }
  main { padding: 0; max-width: none; }
  .kartica { border: 0; box-shadow: none; padding: 0; background: none; }
  a { color: #000; text-decoration: none; }
}

/* ── Увод на почетној ─────────────── */
.uvod { position: relative; min-height: min(78vh, 40rem); display: grid; place-items: center; text-align: center; overflow: hidden; color: #fbf1d8; isolation: isolate; }
.uvod-slika { position: absolute; inset: 0; z-index: -1; background: #1f2f5a; }
.uvod-slika img { width: 100%; height: 100%; object-fit: cover; animation: priblizi 28s ease-out both; }
.uvod-slika::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, rgba(14,16,36,.25), rgba(14,16,36,.72) 75%), linear-gradient(180deg, rgba(14,16,36,.35), transparent 30%, rgba(14,16,36,.55)); }
@keyframes priblizi { from { transform: scale(1.12); } to { transform: scale(1); } }
.uvod-tekst { padding: 3rem 1.2rem; max-width: 40rem; }
.uvod-krst { width: 64px; height: 64px; margin: 0 auto .6rem; color: #e9c977; filter: drop-shadow(0 0 10px rgba(240,200,110,.5)); }
.uvod-krst svg { width: 100%; height: 100%; }
.uvod-krst path { --d: 220; stroke-width: 1.4; }
.uvod h1 { font-size: clamp(3rem, 11vw, 5.6rem); margin: 0; font-weight: 500; letter-spacing: .02em; --bordo: #f3dc9c; text-shadow: none; animation: izroni 1.2s ease-out .15s both, odsjaj 9s ease-in-out 1.5s 2; }
.uvod .zlatni { background-image: linear-gradient(100deg, #e9c977 0%, #e9c977 40%, #fff6d6 50%, #e9c977 60%, #e9c977 100%); }
.uvod .podnaslov { font-family: var(--naslov); font-size: clamp(1.15rem, 3.4vw, 1.45rem); font-style: italic; margin: .4rem 0 1.2rem; color: #f3e7c9; animation: izroni 1.2s ease-out .45s both; }
.uvod-datum { display: inline-block; font-family: var(--naslov); letter-spacing: .03em; font-size: 1rem; padding: .4rem 1.1rem; border: 1px solid rgba(233,201,119,.55); border-radius: 999px; background: rgba(14,16,36,.35); animation: izroni 1.2s ease-out .75s both; min-height: 1em; }
@keyframes izroni { from { opacity: 0; transform: translateY(12px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
.zaglavlje + .uvod { margin-top: 0; }

.pozdrav { font-family: var(--naslov); font-size: 1.35rem; font-style: italic; text-align: center; color: var(--mastilo-2); margin: .6rem 0 1.2rem; }
.danas-crkva h2 { margin: .1rem 0 .6rem; font-size: 1.9rem; }
.rec-kartica { text-align: center; background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--zlato) 14%, transparent), transparent 70%), var(--kartica); }
.rec-kartica .citat { font-size: 1.45rem; }
.post { margin-top: 2.4rem; }
.naslov-reda { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.naslov-reda h2 { margin: 0; }
.dva-stuba { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.kvacica { display: inline-flex; gap: .55rem; align-items: center; cursor: pointer; }
.kvacica input { width: 22px; height: 22px; accent-color: var(--bordo); }
.badnji-prizor .badnjak { width: 6rem; height: 6rem; object-fit: cover; margin: 0 auto .6rem; border-radius: 50%; box-shadow: 0 0 30px rgba(240,160,70,.5); }
.molitve-poziv { text-align: center; }

ul.godina { list-style: none; padding: 0; margin: .5rem 0 1rem; }
ul.godina li { display: grid; grid-template-columns: 8.5rem 1fr; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--linija); }
ul.godina.listovi li { grid-template-columns: 3.6rem 1fr; gap: 1rem; align-items: start; padding: .9rem 0; }
.list { display: flex; flex-direction: column; align-items: center; padding: .35rem 0 .4rem; background: var(--kartica); border: 1px solid var(--linija); border-top: 4px solid var(--cinober); border-radius: 0 0 3px 3px; font-family: var(--naslov); line-height: 1; }
.list b { font-size: 1.9rem; font-weight: 500; color: var(--cinober); }
.list small { font-size: .78rem; color: var(--mastilo-2); margin-top: .2rem; }
.g-datum { font-family: var(--naslov); font-size: 1.1rem; color: var(--bordo); }
@media (max-width: 520px) { ul.godina:not(.listovi) li { grid-template-columns: 1fr; gap: .1rem; } }

.teme { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.tema { display: block; padding: 1.1rem 1.2rem; border: 1px solid var(--linija); border-radius: 4px; box-shadow: inset 0 0 0 4px var(--kartica), inset 0 0 0 5px color-mix(in srgb, var(--zlato) 40%, transparent); background: var(--kartica); color: var(--mastilo); text-decoration: none; transition: border-color .3s; }
.tema:hover { border-color: var(--zlato); color: var(--mastilo); }
.tema h2, .tema h3 { margin: 0 0 .3rem; font-size: 1.3rem; }
.tema p { margin: 0; color: var(--mastilo-2); font-size: .95rem; }

/* ── Реч за данас (искачући прозор) ── */
.rec-dana { border: 0; padding: 0; background: transparent; max-width: min(34rem, 92vw); color: var(--mastilo); }
.rec-dana::backdrop { background: rgba(10,12,28,.55); backdrop-filter: blur(3px); }
.rec-dana[open] { animation: rec-ulaz .9s cubic-bezier(.2,.7,.2,1) both; }
.rec-dana[open]::backdrop { animation: rec-pozadina .9s ease both; }
@keyframes rec-ulaz { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes rec-pozadina { from { opacity: 0; } to { opacity: 1; } }
.rec-okvir { position: relative; text-align: center; padding: 2rem 1.8rem 1.6rem; background: var(--kartica); border-radius: 14px; border: 1px solid var(--zlato); box-shadow: 0 0 0 6px color-mix(in srgb, var(--kartica) 80%, transparent), 0 0 0 7px color-mix(in srgb, var(--zlato) 45%, transparent), 0 30px 60px -20px rgba(0,0,0,.5); }
.rec-krst { width: 44px; height: 44px; color: var(--zlato); display: block; margin: 0 auto .4rem; }
.rec-okvir .citat { font-size: 1.5rem; margin: .4rem 0 .2rem; white-space: pre-line; }
.rec-okvir form { margin: 1.2rem 0 0; }

/* ── Календар: месеци ─────────────── */
.meseci { position: sticky; top: 5.6rem; z-index: 5; display: flex; gap: .35rem; overflow-x: auto; padding: .5rem 0; background: var(--pergament); scrollbar-width: thin; }
body.nebo .meseci { background: rgba(12,16,36,.9); }
.meseci a { white-space: nowrap; font-size: .85rem; padding: .3rem .7rem; border: 1px solid var(--linija); border-radius: 999px; text-decoration: none; color: var(--mastilo-2); background: var(--kartica); }
.meseci a.tekuci { border-color: var(--zlato); color: var(--bordo); font-weight: 600; }
@media (min-width: 641px) { .slova { flex-wrap: wrap; overflow: visible; } }
/* празници: слика у луку лево, текст десно (на телефону слика горе) */
.praznik-kartica { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1.2rem; align-items: center; text-decoration: none; color: inherit; transition: border-color .3s; }
.praznik-kartica:hover { border-color: var(--zlato); color: inherit; }
.praznik-kartica img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 50% 50% 4px 4px / 28% 28% 4px 4px; }
.praznik-kartica h2 { margin: .15em 0 .2em; }
.praznik-kartica .datum-linija { display: block; margin: 0; }
@media (max-width: 520px) { .praznik-kartica { grid-template-columns: 6.5rem 1fr; gap: .9rem; } .praznik-kartica h2 { font-size: 1.3rem; } }
.mesec-blok { scroll-margin-top: 9rem; }
.legenda .znacka svg { width: 16px; height: 16px; }
.rezim-mali { display: inline-flex; align-items: center; gap: .4rem; color: var(--rc); font-weight: 600; margin-bottom: .5rem; }
.rezim-mali svg { width: 26px; height: 26px; }
.slava-danas { padding: .6rem .9rem; border-radius: 8px; background: color-mix(in srgb, var(--cinober) 7%, transparent); }
.zanimljivost { border-style: dashed; }
dl.recnik { margin: 0; }
.slovo-blok h2 { margin: 1.4rem 0 .4rem; }
.pojam { padding: .5rem 0; border-bottom: 1px dotted var(--linija); }
.pojam dt { font-family: var(--naslov); font-size: 1.2rem; color: var(--bordo); }
.pojam dd { margin: .1rem 0 0; }
.slova a { min-width: 2.2rem; text-align: center; }
dl.podaci { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; }
dl.podaci dt { color: var(--mastilo-2); }
dl.podaci dd { margin: 0; }

.izvor-molitve { overflow-wrap: anywhere; }
.izvor-molitve a { color: inherit; }
/* Датум/врста изнад наслова: тихо курзивом, не великим словима */
.datum-linija { font-family: var(--naslov); font-style: italic; font-size: 1.05rem; color: var(--mastilo-2); margin: 0 0 .2rem; }
/* Фотографије и фреске са Commons-а: потпис аутора испод слике */
.foto { margin: 0 0 1.2rem; }
.foto img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: 50% 50% 4px 4px / 30% 30% 4px 4px; background: var(--pergament-2); }
.freska img { aspect-ratio: auto; width: auto; max-width: 100%; max-height: 75vh; margin: 0 auto; object-fit: contain; }
.potpis { font-size: .78rem; line-height: 1.45; color: var(--mastilo-2); margin-top: .4rem; text-align: center; }
.potpis a { color: inherit; }
.tema-sl { width: 100%; margin: 0 0 .8rem; aspect-ratio: 3/2; object-fit: cover; border-radius: 50% 50% 4px 4px / 30% 30% 4px 4px; } /* лук као прозор цркве */
.tema:has(.tema-sl) { overflow: hidden; }
/* Додир на телефону: без кашњења и сивог бљеска, већа поља за штиклирање */
a, button, summary, label, input { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
input[type=checkbox] { min-width: 24px; min-height: 24px; }

/* ── Почетна на широком екрану: главна колона и страна ───── */
@media (min-width: 1000px) {
  .pocetna { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 2.2rem; align-items: start; }
  .sa-strane > :first-child { margin-top: 0; }
  .sa-strane .citat { font-size: 1.25rem; }
  .pocetna ~ section .teme { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 999px) { #danas { max-width: var(--sirina); margin: 0 auto; } }
#danas > .pozdrav { text-align: center; }

/* ── Ходочашће: претходни и следећи манастир ───── */
.hodocasce { display: grid; grid-template-columns: 1fr auto 1fr; gap: .8rem; align-items: center; margin: 1rem 0; }
.hodocasce a { display: flex; flex-direction: column; text-decoration: none; font-family: var(--naslov); font-size: 1.15rem; color: var(--bordo); }
.hodocasce a[rel="next"] { text-align: right; }
.hodocasce .mali { font-family: var(--tekst); color: var(--mastilo-2); }
.hodocasce .svi { font-size: .95rem; color: var(--cinober); text-decoration: underline; }
@media (max-width: 520px) { .hodocasce { grid-template-columns: 1fr 1fr; } .hodocasce .svi { grid-column: 1 / -1; grid-row: 2; justify-self: center; } }

/* ── 404 ───── */
.nema-strane { text-align: center; padding: 3rem 0 2rem; }
.nema-strane .uvod-krst { width: 3.2rem; margin: 0 auto 1rem; color: var(--zlato); }
.nema-strane .red-dugmadi { justify-content: center; }

/* ── Дугме за ноћни режим: месец дању, сунце ноћу ───── */
.tema-dugme { display: inline-grid; place-items: center; width: 40px; padding: 0; }
.tema-dugme svg { width: 18px; height: 18px; grid-area: 1 / 1; transition: opacity .4s, transform .6s ease; }
.tema-dugme .ik-mesec { color: var(--bordo); }
.tema-dugme .ik-sunce { color: var(--zlato); opacity: 0; transform: rotate(-90deg) scale(.6); }
[data-tema="noc"] .tema-dugme .ik-mesec { opacity: 0; transform: rotate(90deg) scale(.6); }
[data-tema="noc"] .tema-dugme .ik-sunce { opacity: 1; transform: none; }
.tema-dugme[aria-pressed="true"] { background: var(--kartica); border-color: var(--zlato); }

/* Закон Божји: садржај и нумерисане заповести */
.sadrzaj { display: flex; flex-wrap: wrap; gap: .4rem .5rem; margin: 1.2rem 0 1.6rem; }
.sadrzaj a { font-size: .92rem; padding: .3rem .75rem; border: 1px solid var(--linija); border-radius: 999px; text-decoration: none; color: var(--mastilo); background: var(--kartica); }
.sadrzaj a:hover { border-color: var(--zlato); color: var(--bordo); }
.zakon { scroll-margin-top: 8.5rem; }
.zakon h2 { text-align: center; }
ol.zapovesti { counter-reset: z; list-style: none; padding: 0; margin: 1rem 0; }
ol.zapovesti li { counter-increment: z; display: grid; grid-template-columns: 2.4rem 1fr; gap: .6rem; align-items: baseline; padding: .55rem 0; border-bottom: 1px solid color-mix(in srgb, var(--linija) 60%, transparent); font-size: 1.08rem; line-height: 1.6; margin: 0; }
ol.zapovesti li:last-child { border-bottom: 0; }
ol.zapovesti li::before { content: counter(z) "."; font-family: var(--naslov); color: var(--cinober); font-size: 1.35rem; font-weight: 600; text-align: right; }

/* Подножје: Инстаграм и пошта */
.kontakt { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1.6rem; margin: 0 0 1rem; }
.kontakt a { display: inline-flex; align-items: center; gap: .45rem; color: var(--mastilo); text-decoration: none; padding: .35rem 0; overflow-wrap: anywhere; }
.kontakt a:hover { color: var(--cinober); }
.kontakt svg { width: 20px; height: 20px; flex: none; color: var(--zlato); }
.kontakt a:hover svg { color: var(--cinober); }

/* Датум у уводу: стари календар после тачке, на телефону у свом реду */
.po-starom::before { content: "· "; }
@media (max-width: 640px) {
  .uvod { min-height: min(58vh, 27rem); }
  .uvod-slika img { object-position: 76% 55%; }
  .uvod-slika::after { background: linear-gradient(180deg, rgba(14,16,36,.2), rgba(14,16,36,.45) 45%, rgba(14,16,36,.7)); }
  .po-starom { display: block; font-size: .92em; opacity: .9; }
  .po-starom::before { content: ""; }
  .uvod-datum { border-radius: 1.2rem; }
}

/* Телефон: без скупих ефеката при скроловању (непокретни слојеви на свој слој, без бескрајних анимација) */
body::before, body.ima-pergament::after, .zvezdice { transform: translateZ(0); }
@media (max-width: 760px), (hover: none) {
  .zvezda, .zvezdice i, .uvod-slika img { animation: none; }
  .uvod h1 { animation: izroni 1s ease-out .1s both; }
  @keyframes izroni { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  .zvezda { filter: none; }
  .uvod-krst { filter: none; }
}
/* Календар на телефону: трака са месецима лепи се уз врх екрана (заглавље се тамо не лепи) */
@media (max-width: 640px) {
  .meseci { top: 0; margin: 0 -.9rem; padding: .5rem .9rem; box-shadow: 0 1px 0 var(--linija); }
  .mesec-blok { scroll-margin-top: 3.4rem; }
}
.meseci a.vidim { background: var(--bordo); border-color: var(--bordo); color: var(--kartica); }

/* ── Телефон: мирнији ритам текста, сажетије картице, манастири прегледније ── */
@media (max-width: 640px) {
  main { padding: 1.1rem 1.1rem 3rem; }
  main p, main li { line-height: 1.68; }
  main > p { margin: 0 0 1rem; }
  h1 { font-size: 2.05rem; line-height: 1.12; margin: .3rem 0 .7rem; }
  h2 { line-height: 1.2; }
  .teme { gap: .75rem; }
  .tema { padding: .95rem 1rem; }
  .tema h2, .tema h3 { font-size: 1.2rem; }
  .tema p { font-size: .92rem; line-height: 1.5; }
  /* манастири у листи: слика лево у луку, текст десно */
  .tema:has(.tema-sl) { display: grid; grid-template-columns: 6.2rem 1fr; column-gap: .95rem; align-items: center; padding: .7rem; }
  .tema:has(.tema-sl) .tema-sl { grid-row: 1 / span 4; margin: 0; aspect-ratio: 4/5; border-radius: 50% 50% 3px 3px / 26% 26% 3px 3px; }
  .tema:has(.tema-sl) .datum-linija { margin: 0; font-size: .82rem; }
  .tema:has(.tema-sl) h2 { margin: .05rem 0 .15rem; font-size: 1.25rem; }
  .tema:has(.tema-sl) .mali { margin-top: .2rem; font-size: .78rem; color: var(--zlato-tekst); }
  /* страна манастира: подаци као уредна картица */
  .potpis, figcaption.potpis { font-size: .72rem; line-height: 1.4; opacity: .8; }
  dl.podaci { grid-template-columns: 5.2rem 1fr; gap: 0; margin: 1rem 0 .4rem; padding: .3rem .95rem; background: var(--kartica); border: 1px solid var(--linija); border-radius: 4px; }
  dl.podaci dt, dl.podaci dd { margin: 0; padding: .55rem 0; border-top: 1px solid color-mix(in srgb, var(--linija) 70%, transparent); }
  dl.podaci dt:first-of-type, dl.podaci dt:first-of-type + dd { border-top: 0; }
  dl.podaci dt { font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; padding-top: .72rem; }
  .inicijal { line-height: 1.72; }
  /* претходни / следећи као два дугмета */
  .hodocasce { gap: .6rem; }
  .hodocasce a[rel] { padding: .65rem .8rem; border: 1px solid var(--linija); border-radius: 4px; background: var(--kartica); font-size: 1.08rem; }
  .hodocasce .svi { margin-top: .4rem; }
  .praznik-kartica .datum-linija { font-size: .82rem; }
  .praznik-kartica h2 { line-height: 1.15; }
}
