/* =====================================================================
   motion.css — strat „Fier și Munte” (încărcat DUPĂ style.css; îl suprascrie)
   FAZA 1: tokens + hero (creste/oră/jar) + intro + titlu pe litere
   Reguli: animații doar transform/opacity (+stroke-dashoffset pentru SVG);
   progresiv — se ascunde DOAR sub html.js; prefers-reduced-motion → instant.
   ===================================================================== */

/* ---------- TOKENS (peste :root din style.css) ---------- */
:root{
  --night:#0b1a14;            /* albastru-noapte (hero/subsol) */
  --mountain:#0f5132;         /* verde-munte (existent --accent) */
  --brass:#b0893f;            /* auriu industrial (existent --accent-2) */
  --ember:#ff7a1a;            /* jar */
  --ember-soft:#ffb347;
  --river:#7fb0c9;            /* Bârzava */
  --hero-ink:#f4efe6;
  --ease-out:cubic-bezier(.6,.05,.2,1);
  --ease-spring:cubic-bezier(.34,1.4,.44,1);
}


/* ---------- HERO: compoziție proprie (SVG), fără foto externă ---------- */
.hero{ background:var(--night); }   /* suprascrie Unsplash din style.css */
/* NU suprascriem position pe .side-widget/.hero__scroll (sunt absolute în style.css); doar stratificare */
.hero__content{ position:relative; z-index:2 }
.side-widget, .hero__scroll{ z-index:5 }
/* sub 900 px widgetul devine static (style.css), iar .hero e flex pe rând: îl punem SUB text, nu lângă el */
@media (max-width:900px){
  .hero{ flex-direction:column; }
  .hero__content{ width:100%; }
  .side-widget{ position:relative; z-index:2; }
}

/* ---------- TITLU PE LITERE (stagger, doar transform/opacity) ---------- */
html.js .hero__title{ display:inline-block; }
.hero__title .lt{ display:inline-block; will-change:transform,opacity }
html.js:not(.rm) .hero__title .lt{ opacity:0; transform:translateY(0.6em) }
/* kicker + sub: fade-up */
html.js:not(.rm) .hero__kicker,
html.js:not(.rm) .hero__sub{ opacity:0; transform:translateY(16px) }

/* ---------- INTRO (siglumul „B” + cortină) ---------- */
.intro{
  position:fixed; inset:0; z-index:1000;
  display:grid; place-items:center;
  background:var(--night);
  color:var(--brass);
  opacity:0;
}
html.js .intro{ opacity:1; }
.intro__mark{ width:min(46vw,220px); height:auto; }
.intro__mark path{ stroke:currentColor }
.intro__curtain{
  position:absolute; inset:0;
  background:linear-gradient(180deg,var(--night) 0%, #0e241c 60%, #07140f 100%);
  transform:translateY(0);
  will-change:transform;
}
.intro--skip .intro__mark path{ opacity:0 }
.intro--skip{ transition:opacity .25s ease }
.intro--out{ transition:opacity .3s ease; opacity:0 !important }

/* intro deja văzut în sesiune: nu apare deloc */
html.intro-seen .intro{ display:none }

/* PLASĂ DE SIGURANȚĂ (CSS pur): dacă scripturile de mișcare nu pornesc (404, blocate, eroare),
   intro-ul dispare singur după 3 s și textul din hero devine vizibil după 2 s. */
@keyframes bm-intro-fail{ to{ opacity:0; visibility:hidden; pointer-events:none } }
@keyframes bm-show{ to{ opacity:1; transform:none } }
html.js:not(.has-motion) .intro{ animation:bm-intro-fail .01s 3s forwards }
html.js:not(.has-motion) .hero__title .lt,
html.js:not(.has-motion) .hero__kicker,
html.js:not(.has-motion) .hero__sub{ animation:bm-show .01s 2s forwards }

/* ---------- prefers-reduced-motion: instant, fără mișcare ---------- */
html.rm .hero__title .lt,
html.rm .hero__kicker,
html.rm .hero__sub{ opacity:1 !important; transform:none !important }
html.rm .intro{ display:none !important }
@media (prefers-reduced-motion: reduce){
  html .hero__title .lt,
  html .hero__kicker,
  html .hero__sub{ opacity:1 !important; transform:none !important }
  .intro{ display:none !important }
}

/* ================= FAZA 2 (design hero, cerut de utilizator) ================= */




/* ================= FAZA 2: defilare (nav / reveal / carduri / timeline / râu) ================= */

/* nav: compactare la scroll + pastilă aurie */
.nav{ transition:background .3s, backdrop-filter .3s }
.nav--scrolled{ background:rgba(247,245,240,.92); box-shadow:0 6px 24px -18px rgba(20,24,34,.6) }
.nav__links a.is-active{ color:var(--accent) }
.nav__pill{
  position:absolute; left:0; bottom:0; height:2.5px; border-radius:2px;
  background:var(--brass); will-change:transform; transform-origin:left center;
  box-shadow:0 0 10px 1px rgba(176,137,63,.6);
}
.nav__links{ position:relative }

/* titluri pe cuvinte: vizibil fără Motion; sub has-motion pornesc de la opacity 0 doar la trigger */
html.js.has-motion:not(.rm) .section__title .rvw{ opacity:0 }
/* carduri/tarife/util: sub has-motion pornesc de la ascuns (reveals la inView) */
html.js.has-motion:not(.rm) .cards .card,
html.js.has-motion:not(.rm) .tarife .tarife__item,
html.js.has-motion:not(.rm) .util .util__item,
html.js.has-motion:not(.rm) .about__card,
html.js.has-motion:not(.rm) .about__text p{ opacity:0 }
/* un modul de mișcare a eșuat (clasa pusă de motion-ui.js): tot conținutul rămâne vizibil */
html.bm-fail .section__title .rvw,
html.bm-fail .cards .card,
html.bm-fail .tarife .tarife__item,
html.bm-fail .util .util__item,
html.bm-fail .about__card,
html.bm-fail .about__text p{ opacity:1 !important; transform:none !important }

/* carduri: tilt + strălucire care urmărește cursorul */
.card,.util__item,.tarife__item,.about__card{ position:relative; transform-style:preserve-3d }
.card.tilt-on,.util__item.tilt-on{ will-change:transform }
.card::after,.util__item::after,.tarife__item::after,.about__card::after{
  content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background:radial-gradient(220px circle at var(--gx,50%) var(--gy,50%), rgba(255,255,255,.22), transparent 60%);
  opacity:0; transition:opacity .25s;
}
.card.tilt-on::after,.util__item.tilt-on::after,.tarife__item.tilt-on::after,.about__card.tilt-on::after{ opacity:1 }
@media (hover:none){
  .card:active,.util__item:active,.tarife__item:active{ transform:scale(.98); transition:transform .12s }
}

/* timeline: linie desenată (overlay) + noduri */
.timeline{ position:relative }
.timeline__progress{
  position:absolute; left:7px; top:0; width:2px; height:100%;
  background:linear-gradient(180deg,var(--brass),var(--accent));
  transform:scaleY(0); transform-origin:top center; will-change:transform; pointer-events:none;
}
.timeline__item--key .timeline__year{ color:var(--ember) }
@keyframes bm-dotpulse{ 0%{transform:scale(1)} 40%{transform:scale(1.55)} 100%{transform:scale(1)} }
.timeline__item--pulse::before{ animation:bm-dotpulse .8s ease-out; background:var(--ember) }
html.rm .timeline__progress{ transform:scaleY(1) !important }
html.rm .timeline__item::before{ animation:none }

/* linia-râu (Bârzava) = bară de progres, pe marginea dreaptă */
.river{
  position:fixed; right:0; top:0; height:100vh; width:8px; z-index:40; pointer-events:none;
  overflow:hidden;
}
.river svg{ width:8px; height:100vh; display:block }
.river path{ stroke:var(--brass); stroke-width:2.2; stroke-linecap:round; filter:drop-shadow(0 0 4px rgba(176,137,63,.7)) }
.river circle{ fill:var(--ember-soft); filter:drop-shadow(0 0 6px var(--ember)) }
@media (max-width:600px){ .river{ right:-1px; width:6px } .river svg{ width:6px } }
html.rm .river path{ transition:none }

/* reduced-motion: fără tilt, fără strălucire, fără pastilă animată */
html.rm .card.tilt-on::after,
html.rm .util__item.tilt-on::after{ opacity:0 }
@media (prefers-reduced-motion: reduce){
  .nav__pill{ box-shadow:none }
  .card::after,.util__item::after,.tarife__item::after,.about__card::after{ opacity:0 !important }
  .timeline__progress{ transform:scaleY(1) !important }
}

/* ================= FAZA 3: finisaje (subsol jar, Sus ↑, micro, reduced complet, fără puncte moarte) ================= */

/* subsol: jar discret la baza paginii (linia-râu se termină în el) */
.footer{ position:relative; overflow:hidden }
.footer::before{
  content:""; position:absolute; left:0; right:0; bottom:0; height:120px; pointer-events:none;
  background:
    radial-gradient(220px 60px at 18% 100%, rgba(255,122,26,.16), transparent 70%),
    radial-gradient(180px 50px at 46% 100%, rgba(255,179,71,.12), transparent 70%),
    radial-gradient(240px 60px at 78% 100%, rgba(255,122,26,.10), transparent 70%);
  opacity:.55;
}
/* pâlpâit foarte discret al jarului (doar opacity; nu la reduced) */
@keyframes bm-footer-ember{ 0%,100%{opacity:.4} 50%{opacity:.7} }
html.js.has-motion:not(.rm) .footer::before{ animation:bm-footer-ember 6s ease-in-out infinite }
.footer__grid,.footer__bottom{ position:relative; z-index:1 }

/* buton „Sus ↑" — apare după 600px (top.js) */
.to-top{
  position:fixed; right:max(16px, env(safe-area-inset-right)); bottom:max(18px, env(safe-area-inset-bottom));
  z-index:45; width:46px; height:46px; border-radius:50%;
  display:grid; place-items:center; cursor:pointer;
  background:rgba(15,25,20,.82); color:var(--brass);
  border:1.5px solid rgba(176,137,63,.6);
  font-size:1.15rem; line-height:1;
  opacity:0; transform:translateY(10px); pointer-events:none;
  visibility:hidden;                                   /* ascuns și pentru tastatură/cititor de ecran când nu e activ */
  transition:opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
  box-shadow:0 10px 26px -14px rgba(0,0,0,.7);
}
.to-top::before{ content:"\2191"; }   /* ↑ */
.to-top.is-on{ opacity:1; transform:translateY(0); pointer-events:auto; visibility:visible; transition-delay:0s }
.to-top:hover{ background:rgba(15,25,20,.95) }
@media (max-width:600px){ .to-top{ width:44px; height:44px } }

/* micro: subliniere animată pe link-urile din text + focus clare */
a{ text-underline-offset:3px }
/* în text (nu butoanele): subliniere care crește la hover */
.section p a, .about__text a, .footer__grid a, .section__lead a{
  background-image:linear-gradient(var(--brass),var(--brass));
  background-repeat:no-repeat; background-size:0% 2px; background-position:0 100%;
  transition:background-size .3s ease;
}
.section p a:hover, .about__text a:hover, .footer__grid a:hover, .section__lead a:hover{ background-size:100% 2px }
:where(a,button,input,textarea,.to-top,.gal):focus-visible{
  outline:2px solid var(--brass); outline-offset:3px; border-radius:4px;
}
/* smooth-scroll DOAR când nu e reduced-motion (style.css are html{scroll-behavior:smooth}) */
html.rm{ scroll-behavior:auto !important }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior:auto !important } }

/* galeria: hover subtil (zoom lent pe imagine) — doar pointer:fine/hover */
@media (hover:hover) and (pointer:fine){
  .gal img{ transition:transform .9s cubic-bezier(.2,.7,.2,1) }
  .gal:hover img{ transform:scale(1.05) }
}

/* ---------- reduced-motion complet: fără jar animat, fără zoom, fără subliniere animată ---------- */
html.rm .footer::before{ animation:none }
@media (prefers-reduced-motion: reduce){
  .footer::before{ animation:none }
  .to-top{ transition:none }
  .section p a, .about__text a, .footer__grid a, .section__lead a{ background-size:100% 2px; transition:none }
  .gal img{ transition:none }
  .gal:hover img{ transform:none }
}

/* ---------- FĂRĂ PUNCTE MOARTE pe telefon (reguli de dezvăluire) ----------
   1) html.bm-fail (pus de motion-ui.js la eroare): totul vizibil.
   2) Fără Motion (nu .has-motion): nu ascundem nimic (toate regulile de ascundere sunt sub .has-motion).
   3) reduced-motion (.rm): nu ascundem nimic.
   4) Fallback CSS: dacă Motion e present dar un reveal nu s-a declanșat, .bm-fail + timeout plasează
      vizibilitatea. Acoperim aici toate elementele ascunse sub has-motion. */
html.bm-fail .section__title .rvw,
html.bm-fail .cards .card,
html.bm-fail .tarife .tarife__item,
html.bm-fail .util .util__item,
html.bm-fail .about__card,
html.bm-fail .about__text p,
html.bm-fail .timeline__item{ opacity:1 !important; transform:none !important }
/* orice element de reveal care ar putea rămâne la opacity 0 prinde fallback la 2.5s dacă nu e .has-motion */
html.js:not(.has-motion):not(.rm) .section__title .rvw,
html.js:not(.has-motion):not(.rm) .cards .card,
html.js:not(.has-motion):not(.rm) .tarife .tarife__item,
html.js:not(.has-motion):not(.rm) .util .util__item,
html.js:not(.has-motion):not(.rm) .about__card,
html.js:not(.has-motion):not(.rm) .about__text p{ animation:bm-show .01s 2.5s forwards }
/* clip-path hartă: fără Motion nu aplicăm clip (map.js gate-uit); doar pe siguranță */
html.bm-fail .map{ clip-path:none !important }
html.js:not(.has-motion) .map{ clip-path:none !important }

/* FAZA 4: lightbox__close e acum <button> real (accesibil); reset ca să arate ca înainte (span) */
.lightbox__close{
  background:transparent; border:none; padding:0; font-family:inherit;
  color:#fff; cursor:pointer; line-height:1;
}
.lightbox__close:focus-visible{ outline:2px solid var(--brass); outline-offset:3px; border-radius:6px }


/* =====================================================================
   FAZA A — Primăria ca imagine principală (zi / amurg / noapte)
   Scene din fotografia reală: crossfade faze, ferestre aprinse (seed fix),
   ceas real, cer (nori/stele), Ken Burns + paralaxă. Doar transform/opacity.
   ===================================================================== */

/* Stage acoperă tot hero-ul; imaginile + SVG-ul sunt într-un container cu
   aspect-ratio corect (2048/1404), dimensionat să acopere + centrat. */
.hero__stage{ position:absolute; inset:0; z-index:0; overflow:hidden; pointer-events:none }
.hero__parallax{
  position:absolute; left:50%; top:50%;
  width:max(100%, calc(100vh*1.4586));
  aspect-ratio:2048/1404;
  transform:translate(-50%,-50%) translate(var(--plx-x,0px), var(--plx-y,0px));
  will-change:transform;
}
/* pe ecrane mici ancorăm pe centrul fațadei (~43% din lățime), nu pe mijlocul imaginii */
@media (max-width:700px){
  .hero__parallax{ transform:translate(-43%,-50%) translate(var(--plx-x,0px), var(--plx-y,0px)) }
}
.hero__kb{ position:absolute; inset:0; will-change:transform }
html.js.has-motion:not(.rm) .hero__kb{ animation:bm-kenburns 40s ease-in-out infinite alternate }
@keyframes bm-kenburns{ from{ transform:scale(1) } to{ transform:scale(1.04) } }

/* Fazele (crossfade opacity 1.2s). Zi e încărcată implicit; amurg/noapte la cerere. */
.hero__frames{ position:absolute; inset:0 }
.hero__frame{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  opacity:0; transition:opacity 1.2s ease;
}
.hero__stage[data-phase="day"]   .hero__frame--day{ opacity:1 }
.hero__stage[data-phase="dusk"]  .hero__frame--dusk{ opacity:1 }
.hero__stage[data-phase="dawn"]  .hero__frame--dusk{ opacity:1; filter:brightness(1.14) saturate(.88) }
.hero__stage[data-phase="night"] .hero__frame--night{ opacity:1 }

/* SVG ferestre + ceas (viewBox 2048×1404, peste poze) */
.hero__svg{ position:absolute; inset:0; width:100%; height:100% }
/* ferestre: gradient radial cald, mix-blend screen (se văd și grilajele), opacitate 0.5–0.7 */
.hero__wins-halo path,
.hero__wins path{ fill:url(#winGrad); opacity:0; transition:opacity .9s ease }
.hero__wins path{ mix-blend-mode:screen }
.hero__wins-halo path{ mix-blend-mode:screen }
.hero__wins path.is-lit{ opacity:.62 }
.hero__wins-halo path.is-lit{ opacity:.34 }
/* 2–3 ferestre pâlpâie ușor (±6% opacity) — doar când sunt aprinse */
@keyframes bm-win-flicker{
  0%,100%{ opacity:.62 } 42%{ opacity:.55 } 68%{ opacity:.67 }
}
html.js.has-motion:not(.rm) .hero__wins path.is-flicker{ animation:bm-win-flicker 3.6s ease-in-out infinite }

/* Ceas: limbile se rotesc din JS; culoarea se adaptează fazei (înmchisă ziua, aurie noaptea) */
.hero__clock line{ stroke:#241d12; stroke-width:5; stroke-linecap:round; transition:stroke 1.2s ease }
.hero__clock circle{ fill:#241d12; transition:fill 1.2s ease }
.hero__clock line#clockS{ stroke-width:2.6 }
.hero__stage[data-phase="dusk"]  .hero__clock line,
.hero__stage[data-phase="night"] .hero__clock line,
.hero__stage[data-phase="dawn"]  .hero__clock line{ stroke:#f0d188 }
.hero__stage[data-phase="dusk"]  .hero__clock circle,
.hero__stage[data-phase="night"] .hero__clock circle,
.hero__stage[data-phase="dawn"]  .hero__clock circle{ fill:#f0d188 }

/* Cer / atmosferă (partea de sus, nu acoperă clădirea) */
.hero__atmo{ position:absolute; inset:0; pointer-events:none }
/* nori moi, doar în zi, se mișcă lent (translateX 90–140s) */
.hero__cloud{
  position:absolute; left:-10%; height:16%; width:42%;
  background:radial-gradient(ellipse at center, rgba(255,255,255,.6), rgba(255,255,255,0) 70%);
  filter:blur(4px); opacity:0; will-change:transform;
}
.hero__cloud--1{ top:7% }
.hero__cloud--2{ top:18%; width:34%; left:30% }
.hero__cloud--3{ top:3% ; width:28%; left:55% }
.hero__stage[data-phase="day"] .hero__cloud{ opacity:.42 }
html.js.has-motion:not(.rm) .hero__cloud--1{ animation:bm-cloud 120s linear infinite }
html.js.has-motion:not(.rm) .hero__cloud--2{ animation:bm-cloud 140s linear infinite reverse }
html.js.has-motion:not(.rm) .hero__cloud--3{ animation:bm-cloud 100s linear infinite }
@keyframes bm-cloud{ from{ transform:translateX(-8%) } to{ transform:translateX(150%) } }
/* stele fine (canvas) — doar noaptea */
#heroStars{ position:absolute; inset:0; width:100%; height:100%; opacity:0; transition:opacity 1.2s ease }
.hero__stage[data-phase="night"] #heroStars{ opacity:1 }

/* Voal pentru contrast AA pe text — centrul (fațada) rămâne cât mai curat */
.hero__veil{
  position:absolute; inset:0; pointer-events:none;
  background:
    radial-gradient(120% 88% at 50% 46%, rgba(6,14,11,.55) 0%, rgba(6,14,11,.16) 46%, rgba(6,14,11,0) 74%),
    linear-gradient(180deg, rgba(6,14,11,.4) 0%, rgba(6,14,11,0) 30%, rgba(6,14,11,0) 60%, rgba(6,14,11,.5) 100%);
}
/* textul hero: umbră discretă pentru contrast sigur pe fațada luminoasă (zi) */
.hero__kicker, .hero__sub{ text-shadow:0 2px 14px rgba(0,0,0,.5) }
.hero__title{ text-shadow:0 3px 26px rgba(0,0,0,.55) }

/* Comutator Zi·Amurg·Noapte·Auto (butoane accesibile) */
.hero__phase{ position:absolute; left:22px; bottom:22px; z-index:6; display:flex; gap:6px }
.hero__phase-btn{
  font:inherit; font-size:.8rem; letter-spacing:.02em; cursor:pointer;
  color:#f1ede4; background:rgba(11,26,20,.5); border:1px solid rgba(255,255,255,.28);
  padding:7px 13px; border-radius:999px; backdrop-filter:blur(6px);
  transition:background .2s ease, color .2s ease, border-color .2s ease;
}
.hero__phase-btn:hover{ background:rgba(11,26,20,.72) }
.hero__phase-btn[aria-pressed="true"]{
  background:var(--brass); color:#14201a; border-color:var(--brass); font-weight:600;
}
.hero__phase-btn:focus-visible{ outline:2px solid var(--brass); outline-offset:3px }

/* credit discret */
.hero__credit{
  position:absolute; right:16px; bottom:14px; z-index:6;
  font-size:.7rem; color:#fff; letter-spacing:.02em; text-shadow:0 1px 3px rgba(0,0,0,.8);
}
.hero__credit a{ color:#f4e4c4; text-decoration:none }
.hero__credit a:hover{ text-decoration:underline }
@media (max-width:700px){
  .hero__phase{ left:12px; bottom:12px }
  .hero__phase-btn{ padding:6px 10px; font-size:.74rem }
  .hero__credit{ display:none }
}

/* ---------- reduced-motion: imagine faza corectă, FĂRĂ Ken Burns / nori / stele mișcate / pâlpâit ---------- */
html.rm .hero__kb{ animation:none }
html.rm .hero__cloud{ display:none }
html.rm .hero__wins path.is-flicker{ animation:none }
html.rm .hero__parallax{ transform:translate(-50%,-50%) }
html.rm #heroStars{ transition:none }
@media (prefers-reduced-motion: reduce){
  .hero__kb{ animation:none }
  .hero__cloud{ display:none }
  .hero__wins path.is-flicker{ animation:none }
  .hero__frame{ transition:none }
  .hero__clock line, .hero__clock circle{ transition:none }
  #heroStars{ transition:none }
}

/* ---------- fără puncte moarte: fără JS/la eroare → imaginea de zi rămâne ---------- */
/* (data-phase="day" implicit în HTML + .hero__frame--day vizibil; restul opacity 0) */
html.bm-fail .hero__stage[data-phase="day"] .hero__frame--day{ opacity:1 }


/* =====================================================================
   FAZA B — pagina „Povestea Bocșei” (php/povestea.php)
   Stilizare pentru elementele noi: monograme, panouri SVG (foto=null),
   tabele de credite, foto în timeline. Doar layout + opacity/transform.
   ===================================================================== */

.povestea__intro .section__lead{ margin-bottom:14px }

/* eticheta sursei — discretă, sub fiecare intrare */
.src{ font-size:.76rem; color:var(--ink-soft); margin-top:8px; letter-spacing:.02em; opacity:.75 }
.tren .src{ display:block; margin-top:6px }

/* card de localitate / om: surse + ani */
.card .src{ margin-bottom:0 }
.om__ani{ font-family:'Playfair Display',serif; color:var(--accent); font-weight:700; margin:2px 0 6px }
.om__mono{
  display:grid; place-items:center; width:48px; height:48px; margin-bottom:12px;
  border-radius:50%; border:2px solid var(--brass); color:var(--brass);
  font-family:'Playfair Display',serif; font-weight:800; font-size:1.1rem;
  background:rgba(176,137,63,.08);
}
.oameni__src{ margin-top:18px }

/* foto în timeline: compactă, cu credit */
.locfoto{ margin:12px 0 0 }
.locfoto img{
  display:block; width:100%; max-height:320px; object-fit:cover;
  border-radius:var(--radius,10px); border:1px solid var(--line,rgba(0,0,0,.1));
}
.locfoto figcaption{ font-size:.72rem; color:var(--ink-soft); margin-top:6px; line-height:1.4 }
/* în cronologie: fără decupare (hărțile își pierdeau denumirile localităților) */
.timeline__item .locfoto img{ max-width:560px; max-height:none; height:auto; object-fit:contain }

/* panou SVG (foto = null) — pictogramă/monogramă, NU o poză */
.loc-panou{
  display:grid; place-items:center; height:130px; margin:6px 0 10px;
  color:var(--brass); background:rgba(176,137,63,.07); border-radius:var(--radius,10px);
}
.loc-panou svg{ width:90px; height:90px }

/* surse + credite */
.surse__h{ margin:26px 0 10px; font-size:1.2rem }
.surse{ list-style:none; padding:0; margin:0 0 6px; display:flex; flex-direction:column; gap:8px }
.surse li a{ color:var(--accent); text-decoration:none }
.surse li a:hover{ text-decoration:underline }
.credite-tbl{ overflow-x:auto; margin-top:8px }
.credite{ border-collapse:collapse; width:100%; font-size:.86rem }
.credite th,.credite td{ text-align:left; padding:9px 12px; border-bottom:1px solid var(--line,rgba(0,0,0,.12)); vertical-align:top }
.credite th{ background:rgba(0,0,0,.03); font-weight:600; white-space:nowrap }
.credite a{ color:var(--accent) }
.credite__file{ font-family:ui-monospace,Menlo,monospace; font-size:.78rem; opacity:.7 }

/* fără puncte moarte: fallback pentru elementele noi sub has-motion */
html.bm-fail .cards .om,
html.bm-fail .cards .card{ opacity:1 !important; transform:none !important }

/* reduced-motion: fără tranziții suplimentare (toate elementele nou sunt vizibile) */
@media (prefers-reduced-motion: reduce){
  .locfoto img{ transition:none }
}


/* =====================================================================
   FAZA C — Galerie catalogată + teaser + antet Primăria + filtre
   ===================================================================== */

/* --- Antet Primăria (povestea.php) --- */
.povestea__hero{
  position:relative; overflow:hidden;
  /* Corectură Claude: aspect-ratio + max-height îl făceau mic, în colț; acum ocupă toată lățimea */
  width:100%; box-sizing:border-box;
  height:clamp(380px,56vh,560px);
  display:flex; align-items:flex-end;
}
.povestea__hero img{
  position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; object-position:center 35%;
}
.povestea__hero-veil{
  position:absolute; inset:0;
  background:linear-gradient(transparent 40%,rgba(11,26,20,.78) 100%);
}
.povestea__hero-content{
  position:relative; z-index:2;
  padding:40px 24px; max-width:700px;
}
.povestea__hero-content .eyebrow{ color:#e9dcc0 }
.povestea__hero-content .section__title{ color:#fff; margin-bottom:8px }
.povestea__hero-sub{
  color:#f1ede4; font-size:1.05rem; font-weight:300; max-width:560px;
}
.povestea__hero-credit{
  position:absolute; bottom:14px; right:20px; z-index:2;
  font-size:.72rem; color:#fff; text-shadow:0 1px 3px rgba(0,0,0,.8);
}
.povestea__hero-credit a{ color:#f4e4c4; text-decoration:none }
.povestea__hero-credit a:hover{ text-decoration:underline }

/* --- Teaser „Povestea Bocșei" (index.php) --- */
.povestea-teaser{
  display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-bottom:28px;
}
.povestea-teaser__item{
  position:relative; border-radius:14px; overflow:hidden;
  aspect-ratio:4/3; background:var(--paper-2);
  display:block; margin:0;
}
.povestea-teaser__img{ display:block; width:100%; height:100% }
.povestea-teaser__item img{
  width:100%; height:100%; object-fit:cover;
  transition:transform .4s;
}
.povestea-teaser__item:hover img{ transform:scale(1.05) }
.povestea-teaser__cap{
  position:absolute; left:0; right:0; bottom:0;
  padding:10px 12px; font-size:.74rem; color:#fff;
  background:linear-gradient(transparent,rgba(0,0,0,.75));
  line-height:1.3;
}
.povestea-teaser__cap a{ color:#f4e4c4; text-decoration:none }
.povestea-teaser__cap a:hover{ text-decoration:underline }
.povestea-teaser__cta{ text-align:center; margin-bottom:8px }
@media(max-width:700px){
  .povestea-teaser{ grid-template-columns:1fr; max-width:400px; margin-left:auto; margin-right:auto }
}

/* --- Filtre galerie (chips) --- */
.gal-filters{
  display:flex; flex-wrap:wrap; gap:8px; margin-bottom:24px;
}
.gal-chip{
  padding:7px 16px; border-radius:999px;
  border:1.5px solid var(--line); background:var(--white);
  font-size:.84rem; font-weight:500; color:var(--ink-soft);
  cursor:pointer; transition:background .2s,color .2s,border-color .2s;
}
.gal-chip:hover{ border-color:var(--accent); color:var(--accent) }
.gal-chip.is-active{
  background:var(--accent); color:#fff; border-color:var(--accent);
}
.gal-chip:focus-visible{
  outline:2px solid var(--accent); outline-offset:2px;
}

/* --- Galerie catalogată (grilă) --- */
#galGrid{
  display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:16px;
}
#galGrid .gal{
  position:relative; border-radius:14px; overflow:hidden;
  aspect-ratio:4/3; background:var(--paper-2);
  cursor:pointer;
}
#galGrid .gal img{
  width:100%; height:100%; object-fit:cover;
  transition:transform .4s;
}
#galGrid .gal:hover img{ transform:scale(1.06) }
#galGrid .gal figcaption{
  position:absolute; left:0; right:0; bottom:0;
  padding:10px 12px; font-size:.76rem; color:#fff;
  background:linear-gradient(transparent,rgba(0,0,0,.75));
  line-height:1.3;
}
/* credite în lightbox */
.lightbox__cap a{ color:#f4e4c4; text-decoration:none }
.lightbox__cap a:hover{ text-decoration:underline }

/* reduced-motion: fără tranziții */
@media (prefers-reduced-motion: reduce){
  .povestea-teaser__item img,
  #galGrid .gal img{ transition:none }
  .gal-chip{ transition:none }
}

/* fallback: fără puncte moarte */
html.bm-fail .povestea__hero{ opacity:1 !important }

/* FAZA C: panou SVG în grila galeriei (locuri fără foto) */
.gal--noimg{ background:rgba(176,137,63,.08); cursor:default }
.gal__panel{
  position:absolute; inset:0; display:grid; place-items:center;
  color:var(--brass, #b0893f);
}
.gal__panel svg{ width:55%; max-width:120px; height:auto }

/* Embleme club (secțiunea Sport) */
.sport-embleme{ display:flex; gap:28px; align-items:flex-end; flex-wrap:wrap; margin:6px 0 26px }
.sport-emblema{ margin:0; text-align:center; max-width:200px }
.sport-emblema img{ height:140px; width:auto; max-width:100%; object-fit:contain; display:block; margin:0 auto 6px }
.sport-emblema figcaption{ font-size:.72rem; color:var(--ink-soft,#666); line-height:1.35 }
.sport-emblema a{ color:inherit }
