/* modern-effects.css
   Jemné moderní efekty (hover/click/focus) bez zásahu do layoutu a barevnosti.
   Cíl: zachovat vzhled, jen dodat "živost".
*/

/* Respektuje nastavení uživatele (snížený pohyb) */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Lepší fokus pro klávesnici */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid rgba(142, 191, 68, .55);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Odkazy – jemný podtrh + pohyb */
a {
  transition: color .18s ease, transform .18s ease, filter .18s ease;
  text-decoration: none; /* původně je často bez podtrhu */
}
a.fx-link {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  transition: color .18s ease, transform .18s ease, background-size .22s ease;
}
a.fx-link:hover, a.fx-link:focus-visible {
  background-size: 100% 2px;
  transform: translateY(-1px);
  filter: brightness(1.05);
}
a.fx-link:active {
  transform: translateY(0px) scale(0.99);
  background-size: 100% 2px;
}

/* Tlačítka – "lift" + lepší click feedback */
.btn,
button,
input[type="submit"],
input[type="button"]{
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
  will-change: transform;
}
.btn:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover{
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
}
.btn:active,
button:active,
input[type="submit"]:active,
input[type="button"]:active{
  transform: translateY(0px) scale(0.98);
  box-shadow: 0 6px 14px rgba(0,0,0,.10);
}

/* Obrázky – moderní zoom + stín, ale jen pro ty označené třídou */
img.fx-img{
  transition: transform .22s ease, filter .22s ease, box-shadow .22s ease;
  will-change: transform;
}
a:hover img.fx-img,
a:focus-visible img.fx-img{
  transform: scale(1.02);
  filter: saturate(1.03) contrast(1.02);
  box-shadow: 0 18px 36px rgba(0,0,0,.18);
}
a:active img.fx-img{
  transform: scale(0.99);
  box-shadow: 0 10px 22px rgba(0,0,0,.14);
}

/* Jemné "efektní rámečky" pro boxy – používá se jen když JS přidá fx-frame */
.fx-frame{
  position: relative;
  border-radius: 4px; /* minimální, aby se nic nerozbilo */
  transition: transform .18s ease, box-shadow .18s ease;
}
.fx-frame::before{
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, rgba(142,191,68,.55), rgba(43,0,22,.30));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .0;
  transition: opacity .22s ease;
  pointer-events: none;
}
.fx-frame:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(0,0,0,.14);
}
.fx-frame:hover::before{ opacity: 1; }

/* Navigace – underline animace (nenásilně) */
.navbar a.fx-link:hover,
.navbar a.fx-link:focus-visible{
  transform: translateY(-1px);
}

/* Carousel caption box – aby působila "moderněji" bez změny barvy */
.caption-box.fx-frame{
  backdrop-filter: blur(2px);
}


/* --------------------------------------------------
   "Více moderní" micro-interactions (stále decentní)
-------------------------------------------------- */

/* Odkazy: animovaná linka + jemný highlight */
a {
  transition: transform 180ms ease, filter 180ms ease, color 180ms ease, background-size 220ms ease;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
}
a:hover, a:focus-visible {
  background-size: 100% 2px;
  transform: translateY(-1px);
  filter: brightness(1.05);
}

/* Tlačítka: jemná "ripple" vlna (bez zásahu do barvy) */
.btn {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
}
.btn::after{
  content:"";
  position:absolute;
  inset:auto;
  left:50%;
  top:50%;
  width:10px;
  height:10px;
  border-radius:999px;
  transform:translate(-50%,-50%) scale(0);
  background: rgba(255,255,255,.35);
  opacity:0;
  pointer-events:none;
}
.btn:active::after{
  animation: modernRipple 420ms ease-out;
}
@keyframes modernRipple{
  0%{ transform:translate(-50%,-50%) scale(0); opacity:.55; }
  100%{ transform:translate(-50%,-50%) scale(18); opacity:0; }
}

/* Karty/boxy: moderní obrys jen při hoveru */
.well, .thumbnail, .panel, .caption-box, .box, .contentBox {
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.well:hover, .thumbnail:hover, .panel:hover, .caption-box:hover, .box:hover, .contentBox:hover {
  transform: translateY(-3px);
}

/* --------------------------------------------------
   Galerie: moderní náhledy + modernější Swipebox modal
-------------------------------------------------- */

/* Thumbnaily (a.swipebox img) – hezčí rohy, stín, "glass" border */
a.swipebox img,
.rez-thumb,
.ref-thumb,
.gallery img {
  border-radius: 14px;
  transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
  box-shadow: 0 10px 26px rgba(0,0,0,.18);
  will-change: transform;
}

/* Overlay ikonka "zoom" (bez změny HTML) */
a.swipebox {
  position: relative;
  display: block;
  border-radius: 14px;
  overflow: hidden;
}
a.swipebox::before{
  content: "⌕";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.75);
  color: rgba(0,0,0,.72);
  box-shadow: 0 10px 20px rgba(0,0,0,.18);
  transform: translateY(6px);
  opacity: 0;
  transition: transform 200ms ease, opacity 200ms ease, filter 200ms ease;
  backdrop-filter: blur(8px);
}
a.swipebox:hover::before,
a.swipebox:focus-visible::before{
  transform: translateY(0);
  opacity: 1;
}

a.swipebox:hover img,
a.swipebox:focus-visible img{
  transform: scale(1.035);
  filter: saturate(1.02) contrast(1.02);
}

/* Swipebox: modernější overlay (zůstává funkčnost) */
#swipebox-overlay{
  background: rgba(10, 10, 12, .74) !important;
  backdrop-filter: blur(10px);
}
#swipebox-container .slide{
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,.45);
}
#swipebox-action, #swipebox-caption{
  background: rgba(20, 20, 24, .45) !important;
  backdrop-filter: blur(12px);
}
#swipebox-close, #swipebox-prev, #swipebox-next{
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.35));
  opacity: .95;
  transition: transform 160ms ease, opacity 160ms ease;
}
#swipebox-close:hover, #swipebox-prev:hover, #swipebox-next:hover{
  transform: scale(1.08);
  opacity: 1;
}

/* Mobil: ať je to příjemné na tap */
@media (hover: none) {
  a:hover { transform: none; }
  a.swipebox::before{ opacity: 1; transform: none; }
}


a.swipebox.is-tapping img{ transform: scale(0.98); filter: brightness(0.98); }


/* ==================================================
   FACELIFT FIXES v2 – targeted tweaks (logo, refs, bagr)
   ================================================== */

/* Never round the original logo */
.site-logo{
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
}

/* Modern photo card (apply only where class is added) */
.modern-photo{
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 10px 25px rgba(0,0,0,.12),
    0 2px 6px rgba(0,0,0,.08);
  transition:
    transform .45s cubic-bezier(.2,.8,.2,1),
    box-shadow .45s ease;
  will-change: transform;

  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.modern-photo:hover{
  transform: scale(1.03);
  box-shadow:
    0 20px 45px rgba(0,0,0,.18),
    0 8px 16px rgba(0,0,0,.12);
}

.modern-photo--hero:hover{
  transform: scale(1.02);
}

/* Reference strip on homepage – make it breathe */
.reference{
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: center;
}

.reference img{
  display: block;
  width: clamp(180px, 28vw, 260px);
  height: auto;
  border-radius: 18px;
  box-shadow:
    0 10px 25px rgba(0,0,0,.12),
    0 2px 6px rgba(0,0,0,.08);
}

.reference .btn{
  flex: 0 0 100%;
  max-width: 280px;
  margin-top: 6px;
}

/* Carousel – prevent “white flash” and add a nicer transition */
.carousel{
  background: linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,0));
}

.carousel .item img{
  animation: none;
}

.carousel .item.active img{
  /* Ken Burns style: start bigger, slowly zoom out */
    /* Ken Burns (single smooth pass) */
  animation: prostavKenBurns 11s cubic-bezier(.2,.8,.2,1) both;
  will-change: transform, opacity;
}

@keyframes prostavKenBurns{
  0%   { opacity: 1; transform: scale(1.22); filter: saturate(1.02) contrast(1.02); }
  15%  { opacity: 1; }
  100% { opacity: 1; transform: scale(1.00); filter: none; }
}

/* anti-blikání při zvětšování */
.modern-photo img{
  display:block;
  width:100%;
  height:auto;
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
}



/* ==================================================
   Swipebox – velké šipky přes celou výšku (jako slider)
   - funguje i bez icons.png
   - klikací plocha je celá výška vlevo/vpravo
   ================================================== */

/* zvednout UI nad obrázek */
#swipebox-overlay{ background: rgba(10,10,12,.92) !important; }
#swipebox-action, #swipebox-caption{ z-index: 99999 !important; }

/* velké klikací zóny */
#swipebox-prev,
#swipebox-next{
  background-image: none !important;
  position: fixed !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 18vw !important;
  max-width: 180px !important;
  min-width: 74px !important;
  height: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  opacity: 1 !important;
  z-index: 99999 !important;
  transition: background .18s ease, opacity .18s ease;
}

/* levá / pravá strana */
#swipebox-prev{ left: 0 !important; background: linear-gradient(90deg, rgba(0,0,0,.35), rgba(0,0,0,0)); }
#swipebox-next{ right: 0 !important; background: linear-gradient(270deg, rgba(0,0,0,.35), rgba(0,0,0,0)); }

#swipebox-prev:hover{ background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,0)); }
#swipebox-next:hover{ background: linear-gradient(270deg, rgba(0,0,0,.55), rgba(0,0,0,0)); }

/* šipky uprostřed zóny */
#swipebox-prev:before,
#swipebox-next:before{
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  width:22px;
  height:22px;
  border-top: 3px solid rgba(255,255,255,.92);
  border-right: 3px solid rgba(255,255,255,.92);
  transform-origin:center;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.35));
}

#swipebox-prev:before{ transform: translate(-50%,-50%) rotate(-135deg); }
#swipebox-next:before{ transform: translate(-50%,-50%) rotate(45deg); }

/* zavírací křížek – zůstane nahoře vpravo, viditelný */
#swipebox-close{
  background-image: none !important;
  position: fixed !important;
  top: 14px !important;
  right: 14px !important;
  width: 46px !important;
  height: 46px !important;
  border-radius: 999px !important;
  background: rgba(20,20,24,.35) !important;
  z-index: 100000 !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
}

#swipebox-close:before,
#swipebox-close:after{
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  width:18px;
  height:2px;
  background: rgba(255,255,255,.92);
  transform-origin:center;
}
#swipebox-close:before{ transform: translate(-50%,-50%) rotate(45deg); }
#swipebox-close:after { transform: translate(-50%,-50%) rotate(-45deg); }

/* na mobilu trochu menší klikací zóny, ať nepřekáží */
@media (max-width: 767px){
  #swipebox-prev,
  #swipebox-next{
    width: 22vw !important;
    min-width: 64px !important;
    max-width: 120px !important;
  }
}

