/* В28 — насловна: панорама села, смена карикатура и видљив главни мени */
/* Desktop navigation: use the previously empty space on the left and never crop the rightmost village link. */
@media (min-width: 1151px) {
  #nav {padding-left:clamp(8px,1.15vw,24px);padding-right:clamp(8px,1.15vw,24px)}
  #nav .heritage-nav-row.nav-desktop {
    padding-left:0 !important;
    padding-right:0 !important;
    justify-content:space-between;
    gap:clamp(2px,.28vw,7px);
    min-width:0;
  }
  #nav .heritage-nav-row.nav-desktop a,
  #nav .heritage-nav-row.nav-desktop button {
    font-size:clamp(11px,.93vw,16px) !important;
    letter-spacing:0;
    padding:10px clamp(5px,.64vw,12px) !important;
    flex:0 1 auto;
    white-space:nowrap;
  }
  #nav .nav-house {bottom:calc(100% - 3px) !important; width:clamp(82px,9vw,150px); left:6px}
}
/* Between 761px and 1150px show the existing complete mobile menu instead of clipping a desktop label. */
@media (min-width:761px) and (max-width:1150px){
  #nav .heritage-nav-row.nav-desktop {display:none !important}
  #nav .heritage-nav-row.nav-mobile {display:flex !important;justify-content:space-between;gap:12px}
  #nav .heritage-nav-row.nav-mobile>*{flex:1;min-width:0}
  #nav .nav-mobile-shortcuts{display:flex;overflow-x:auto;padding:8px 5px;gap:9px}
  #nav .nav-mobile-shortcuts a{flex:0 0 auto;font-size:13px}
  #nav .nav-house{bottom:calc(100% - 5px) !important;width:76px;left:8px}
  #nav {padding:5px 14px;flex-direction:column}
}
/* Village panorama belongs to the 'Sela' item and also introduces the finder. */
.landing .treasure-card[href="#places"] img {object-fit:cover;object-position:center 57%;}
.landing #villages .village-finder{grid-template-columns:minmax(210px,.82fr) minmax(270px,1fr) minmax(360px,1.2fr);gap:24px;}
.finder-village-photo{margin:0;position:relative;z-index:1;min-width:0;height:100%;min-height:246px;max-height:350px;overflow:hidden;border-radius:8px;border:3px solid #e4d1ae;box-shadow:0 11px 20px #321f1130;}
.finder-village-photo img{width:100%;height:100%;display:block;object-fit:cover;object-position:center;}
@media (max-width:1180px){.landing #villages .village-finder{grid-template-columns:1fr 1.2fr}.finder-village-photo{grid-column:1/-1;min-height:230px;max-height:300px;}}
@media (max-width:760px){.landing #villages .village-finder{grid-template-columns:1fr}.finder-village-photo{min-height:175px;max-height:230px;}}
/* Illustrated stories: all text on the comic remains visible, never crop panels. */
.landing .weekly-showcase{grid-template-columns:49% 51%;}
.landing .weekly-photo{display:flex;flex-direction:column;align-items:stretch;justify-content:stretch;min-width:0;overflow:hidden;min-height:470px;background:#f2e5cb;isolation:isolate;z-index:1;}
.landing .weekly-comic-stage{position:relative;flex:1 1 auto;width:100%;height:clamp(410px,38vw,720px);min-height:410px;max-height:720px;overflow:hidden;perspective:1300px;background:radial-gradient(ellipse at center,#fcf1dc 0%,#ead6b4 100%)}
.landing .weekly-comic-slide {position:absolute;inset:0;display:flex;align-items:center;justify-content:center;overflow:hidden;width:100%;height:100%;opacity:0;visibility:hidden;pointer-events:none;z-index:0;transform-origin:center center;background:transparent;}
.landing .weekly-comic-slide img{display:block;width:100%;height:100%;object-fit:contain;object-position:center center;filter:drop-shadow(0 7px 8px #422a1e40);}
.landing .weekly-comic-slide[data-state="current"]{visibility:visible;opacity:1;pointer-events:auto;z-index:2;}
.landing .weekly-comic-slide[data-state="entering"]{visibility:visible;pointer-events:none;z-index:4;}
.landing .weekly-comic-slide[data-state="leaving"]{visibility:visible;pointer-events:none;z-index:3;}
.landing .weekly-comic-controls{flex:0 0 auto;display:flex;align-items:center;justify-content:center;gap:13px;flex-wrap:wrap;min-height:55px;padding:8px 12px;background:#1c4739;color:#f7e5c5;border-top:3px solid #c5a16a;}
.landing .weekly-comic-controls .comic-turn{border:1px solid #c5a16a;background:#2e6050;border-radius:50%;width:39px;height:39px;padding:0;font:28px/1 Georgia,serif;color:#fff2d8;display:grid;place-items:center;}
.landing .weekly-comic-controls .comic-turn:hover{background:#714135;}
.weekly-comic-counter{min-width:42px;text-align:center;white-space:nowrap;font:16px/1 Georgia,serif;}
.weekly-comic-dots{display:flex;align-items:center;gap:7px;}
.weekly-comic-dots .comic-dot{width:11px;height:11px;min-height:0;padding:0;border-radius:50%;border:1px solid #ead6ae;background:transparent;}
.weekly-comic-dots .comic-dot.active{background:#f6d79c;transform:scale(1.22);}
.comic-open-hint{font:12px/1.3 Georgia,serif;color:#e7d4b5;letter-spacing:.015em;}
.landing .weekly-comic-stage[data-effect="film"] [data-state="entering"]{animation:comicFilmIn .85s cubic-bezier(.2,.8,.2,1) both;}
.landing .weekly-comic-stage[data-effect="film"] [data-state="leaving"]{animation:comicFilmOut .85s ease both;}
.landing .weekly-comic-stage[data-effect="page"] [data-state="entering"]{animation:comicPageIn .9s cubic-bezier(.18,.8,.22,1) both;transform-origin:right center;backface-visibility:hidden;}
.landing .weekly-comic-stage[data-effect="page"] [data-state="leaving"]{animation:comicPageOut .9s ease both;transform-origin:left center;backface-visibility:hidden;}
.landing .weekly-comic-stage[data-effect="curtain"] [data-state="entering"]{animation:comicCurtainIn .95s ease both;}
.landing .weekly-comic-stage[data-effect="curtain"] [data-state="leaving"]{animation:comicCurtainOut .95s ease both;}
.landing .weekly-comic-stage[data-effect="dissolve"] [data-state="entering"]{animation:comicDissolveIn 1s ease both;}
.landing .weekly-comic-stage[data-effect="dissolve"] [data-state="leaving"]{animation:comicDissolveOut 1s ease both;}
@keyframes comicFilmIn {from{opacity:.2;transform:translateX(80%) scale(.85) rotate(4deg);filter:blur(8px)}to{opacity:1;transform:translateX(0) scale(1) rotate(0);filter:blur(0)}}
@keyframes comicFilmOut{from{opacity:1;transform:translateX(0) scale(1)}to{opacity:0;transform:translateX(-48%) scale(.9)}}
@keyframes comicPageIn {from{opacity:0;transform:rotateY(-85deg) scale(.97)}to{opacity:1;transform:rotateY(0) scale(1)}}
@keyframes comicPageOut {from{opacity:1;transform:rotateY(0)}to{opacity:0;transform:rotateY(70deg)}}
@keyframes comicCurtainIn {from{opacity:1;clip-path:inset(0 100% 0 0);transform:scale(1.04)}to{opacity:1;clip-path:inset(0 0 0 0);transform:scale(1)}}
@keyframes comicCurtainOut {from{opacity:1;clip-path:inset(0 0 0 0)}to{opacity:0;clip-path:inset(0 0 0 100%)}}
@keyframes comicDissolveIn{0%{opacity:0;transform:scale(1.17);filter:blur(18px) sepia(.4)}100%{opacity:1;transform:scale(1);filter:blur(0) sepia(0)}}
@keyframes comicDissolveOut{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.96);filter:blur(7px)}}
/* The cultural-announcement balloon flourish is shown only on an intentional click. */
.heritage-balloons {position:fixed;inset:0;z-index:9999;pointer-events:none;overflow:hidden;}
.heritage-balloon{position:absolute;bottom:-130px;width:clamp(32px,4vw,58px);aspect-ratio:.82;border-radius:51% 49% 49% 51%;background:var(--balloon-color,#cf867c);box-shadow:inset -13px -8px 17px #0002,inset 7px 8px 11px #fff7;opacity:0;animation:balloonRise 2.3s cubic-bezier(.22,.7,.32,1) both;animation-delay:var(--balloon-delay,0s)}
.heritage-balloon:after{content:"";position:absolute;left:50%;bottom:-42px;height:44px;width:1px;background:#725d54a0}
@keyframes balloonRise{0%{opacity:0;transform:translate3d(0,10px,0) rotate(-8deg)}20%{opacity:.95}80%{opacity:.88}100%{opacity:0;transform:translate3d(var(--drift,0px),-110vh,0) rotate(13deg)}}
@media (max-width:760px){
 .landing .weekly-showcase{grid-template-columns:1fr;}
 .landing .weekly-photo{min-height:0;}
 .landing .weekly-comic-stage{height:clamp(275px,78vw,570px);min-height:275px;max-height:570px;flex:none;}
 .landing .weekly-comic-controls{gap:9px;padding:8px;}
 .comic-open-hint{font-size:11px;}
}
@media (prefers-reduced-motion:reduce){
 .landing .weekly-comic-stage [data-state="entering"],.landing .weekly-comic-stage [data-state="leaving"]{animation:none !important;}
 .heritage-balloon{animation:none !important;display:none;}
}
