:root{
  --bg:#07090c;
  --panel:#0b0e13;
  --line:rgba(255,255,255,.10);
  --text:#eef3fb;
  --muted:rgba(238,243,251,.72);
  --muted2:rgba(238,243,251,.55);

  --red:#A73423;
  --red2:#8F2A1E;

  --radius:18px;
  --shadow:0 18px 60px rgba(0,0,0,.55);
  --max:1120px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,Helvetica,Arial,sans-serif;
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(167,52,35,.16), transparent 60%),
    radial-gradient(900px 520px at 85% 18%, rgba(245,230,200,.08), transparent 55%),
    linear-gradient(180deg, #06080b, var(--bg));
  color:var(--text);
  line-height:1.6;
}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
.container{max-width:var(--max);margin:0 auto;padding:0 18px}

/* TOPBAR */
.topbar{
  position:sticky;top:0;z-index:50;
  background: rgba(7,9,12,.72);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.nav{
  display:flex;align-items:center;justify-content:space-between;
  gap:16px;padding:10px 0;
}

/* LOGO */
.brand{display:flex;align-items:center;gap:12px; min-width:220px}
.logo-frame{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
  padding: 8px 12px;
  line-height: 0;
}
.logo-frame img{
  height: 194px;
  width: auto;
  max-width: 760px;
  filter: drop-shadow(0 14px 34px rgba(0,0,0,.60));
}

/* MENU */
.menu{display:flex;gap:14px;flex-wrap:wrap;align-items:center}
.menu a{
  padding:10px 12px;
  border-radius:12px;
  color:var(--muted);
  white-space:nowrap;
  font-size:18px;
  font-weight:800;
  letter-spacing:.2px;
}
.menu a:hover{background: rgba(255,255,255,.06); color:var(--text)}

/* CTA */
.cta{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  gap:10px;
  padding:11px 14px;border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color:var(--text);
  font-weight:800;
  white-space:nowrap;
}
.btn:hover{background: rgba(255,255,255,.07)}
.btn.primary{
  border:0;
  background: linear-gradient(135deg, var(--red), var(--red2));
  color:#fff;
  box-shadow: 0 14px 34px rgba(167,52,35,.22);
}
.btn .icon{
  width:18px;height:18px;flex:0 0 18px;
  display:inline-block;
}
.btn.phone .icon path{ fill: var(--red); }
.btn.phone{ background: rgba(255,255,255,.03); }

/* LAYOUT */
.hero{padding:0 0 18px}
.grid{
  display:grid;gap:16px;
  grid-template-columns: 1.15fr .85fr;
  align-items:stretch;
}
.card{
  background: rgba(11,14,19,.78);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.p-hero{padding:30px}
.p-side{padding:18px}

.kicker{color:var(--muted);font-weight:800;letter-spacing:.2px}
h1{margin:10px 0 12px;font-size:clamp(30px,3.2vw,48px);line-height:1.08}
.lead{margin:0 0 18px;color:var(--muted);font-size:1.08rem;max-width:70ch}

/* BADGES */
.badges{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0 6px}
.badge{
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background: linear-gradient(135deg, var(--red), var(--red2));
  color:#fff;
  font-weight:900;
  font-size:.92rem;
  letter-spacing:.2px;
  box-shadow: 0 12px 28px rgba(167,52,35,.22);
}

.notice{
  margin-top:14px;
  padding:14px 16px;border-radius:16px;
  border:1px dashed rgba(255,255,255,.16);
  background: rgba(255,255,255,.03);
  color: var(--muted);
}
.notice strong{color:var(--text)}

/* IMAGES (obecné foto boxy mimo reference) */
.photos{display:grid;gap:12px}
.photo{
  border-radius:16px; overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.02);
}
.photo img{height:200px;width:100%;object-fit:cover}

/* SECTIONS */
.section{padding:22px 0}
h2{margin:0 0 10px;font-size:clamp(20px,2.2vw,28px)}
.cols3{display:grid;gap:16px;grid-template-columns:repeat(3,1fr)}
.cols2{display:grid;gap:16px;grid-template-columns:repeat(2,1fr)}
.box{padding:18px}
.box h3{margin:0 0 6px;font-size:1.05rem}
.box p{margin:0;color:var(--muted)}
ul.clean{margin:10px 0 0; padding-left:18px; color:var(--muted)}
ul.clean li{margin:6px 0}

/* =========================
   GALLERY (REFERENCE)
   - popisek overlay
   - žádný spodní rámeček
   - hover preview uprostřed (bez ořezu)
   ========================= */
.gallery{display:grid;gap:16px;grid-template-columns:repeat(4,1fr)}
.figure{margin:0}

/* DŮLEŽITÉ: .card má padding jinde, ale reference figure ho nesmí mít (jinak vzniká prázdný rám dole) */
.gallery .figure.card{ padding:0; }

/* baseline gap pryč + klikací obrázek */
.gallery .photo{ line-height:0; position:relative; overflow:hidden; border-radius:inherit; }
.gallery .photo a{ display:block; }
.gallery .photo img{
  display:block;
  width:100%;
  height:200px;
  object-fit:cover;
}

/* popisek jako overlay dole (místo boxu pod fotkou) */
.gallery .figcap{
  margin:0;
  padding:12px 14px;
  position:absolute;
  left:0; right:0; bottom:0;
  color:#fff;
  background:linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,0));
  transform:translateY(8px);
  opacity:.95;
  transition:transform 160ms ease, opacity 160ms ease;
  pointer-events:none;
  line-height:1.2;
  font-weight:800;
  font-size:.92rem;
}
.gallery .figure{ position:relative; overflow:hidden; }
.gallery .figure:hover .figcap{ transform:translateY(0); opacity:1; }

/* hover preview (fixní overlay) – bere obrázek z inline CSS proměnné --ref:url(...) */
.gallery .figure::before{
  content:"";
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  opacity:0;
  pointer-events:none;
  transition:opacity 160ms ease;
  z-index:9998;
}
.gallery .figure::after{
  content:"";
  position:fixed;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:min(92vw, 1100px);
  height:min(82vh, 820px);
  background-image:var(--ref);
  background-size:contain;
  background-repeat:no-repeat;
  background-position:center;
  opacity:0;
  pointer-events:none;
  transition:opacity 160ms ease;
  z-index:9999;
  border-radius:14px;
}
.gallery .figure:hover::before{ opacity:1; }
.gallery .figure:hover::after{ opacity:1; }

/* focus */
.gallery .figure a:focus-visible{
  outline:3px solid rgba(255,255,255,.55);
  outline-offset:3px;
  border-radius:12px;
}

/* FORM */
.form{padding:22px}
.field{display:flex;flex-direction:column;gap:6px;margin:12px 0}
label{font-weight:900; color:var(--text)}
input, select, textarea{
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.12);
  border-radius:14px;
  padding:12px 12px;
  color:var(--text);
  outline:none;
}
textarea{min-height:120px;resize:vertical}
.hint{color:var(--muted2); font-size:.95rem}
.row{display:grid;gap:12px;grid-template-columns:1fr 1fr}
.checkline{display:flex;gap:10px;align-items:flex-start;color:var(--muted)}
.checkline input{margin-top:4px}
.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}

/* FOOTER */
.footer{
  margin-top:18px;
  padding:22px 0 28px;
  border-top:1px solid var(--line);
  color:var(--muted);
}
.footer a{ text-decoration:underline; text-decoration-color: rgba(167,52,35,.45) }

/* RESPONSIVE */
@media (max-width: 1100px){
  .nav{flex-direction:column; align-items:flex-start}
  .cta{width:100%}
}
@media (max-width: 960px){
  .grid{grid-template-columns: 1fr}
  .cols3,.cols2{grid-template-columns: 1fr}
  .gallery{grid-template-columns: 1fr 1fr}

  /* reference fotky na menších displejích */
  .gallery .photo img{height:230px}

  .logo-frame img{height:99px; max-width:520px;}
  .menu a{font-size:16px; padding:9px 10px;}
  .row{grid-template-columns:1fr}
}

.gallery .figure.card { padding: 0 !important; }
.gallery .photo img { height: 200px !important; width: 100% !important; object-fit: cover !important; display:block !important; }

/* === DEFINITIVNÍ FIX: figcap jako overlay jen v referencích === */
body .gallery .card.figure > .figcap{
  position:absolute;
  left:0; right:0; bottom:0;
  margin:0;
  padding:12px 14px;
  color:#fff;
  background:linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,0));
  pointer-events:none;
  transform:translateY(8px);
  opacity:.95;
  transition:transform 160ms ease, opacity 160ms ease;
}
body .gallery .card.figure:hover > .figcap{
  transform:translateY(0);
  opacity:1;
}
body .gallery .card.figure{
  position:relative;
  overflow:hidden;
  padding:0;              /* aby nevznikal spodní „pruh“ */
}
body .gallery .card.figure > .photo{ line-height:0; }
body .gallery .card.figure > .photo img{
  display:block;
  width:100%;
  height:200px;
  object-fit:cover;
}