/* ==========================================================================
   TOMBA s.r.o. – moderný dizajn
   Stavebné rezivo · Palivové drevo · Zrubový profil
   ========================================================================== */

:root {
  --wood-dark: #3d2b1f;
  --wood: #6b4a2b;
  --wood-light: #a9784f;
  --green: #4a6b2f;
  --green-dark: #35521f;
  --green-light: #7ba05b;
  --cream: #f7f2ea;
  --sand: #efe6d8;
  --ink: #2c2620;
  --muted: #6f665b;
  --white: #ffffff;
  --shadow: 0 12px 30px rgba(45, 33, 20, 0.12);
  --shadow-lg: 0 20px 50px rgba(45, 33, 20, 0.22);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1200px;
  --font: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-head: 'Ubuntu', 'Poppins', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; transition: color .2s ease; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; font-weight: 700; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

.section { padding: 90px 0; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 55px; }
.section-head .eyebrow {
  display: inline-block;
  font-size: .8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 12px;
}
.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  color: var(--wood-dark);
  margin-bottom: 16px;
}
.section-head h2 span { color: var(--green); }
.section-head p { color: var(--muted); font-size: 1.05rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 10px 22px rgba(74, 107, 47, .35); }
.btn-primary:hover { background: var(--green-dark); transform: translateY(-3px); box-shadow: 0 14px 28px rgba(74, 107, 47, .45); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-outline:hover { background: #fff; color: var(--wood-dark); transform: translateY(-3px); }
.btn-wood { background: var(--wood); color:#fff; box-shadow: 0 10px 22px rgba(107,74,43,.3); }
.btn-wood:hover { background: var(--wood-dark); transform: translateY(-3px); }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--wood-dark);
  color: #e8dcc9;
  font-size: .9rem;
}
.topbar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  align-items: center;
  justify-content: center;
  padding-top: 9px;
  padding-bottom: 9px;
}
.topbar a { display: inline-flex; align-items: center; gap: 7px; }
.topbar a:hover { color: #fff; }
.topbar .sep { opacity: .35; }
.topbar svg { width: 15px; height: 15px; fill: var(--green-light); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(247, 242, 234, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(107, 74, 43, .12);
  transition: box-shadow .3s ease;
}
.site-header.scrolled { box-shadow: 0 8px 26px rgba(45,33,20,.12); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { height: 56px; width: auto; }
.logo .logo-text strong { display: block; font-family: var(--font-head); font-size: 1.25rem; color: var(--wood-dark); letter-spacing: 1px; }
.logo .logo-text small { display: block; font-size: .72rem; color: var(--green); letter-spacing: 1.5px; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-links a {
  padding: 10px 18px;
  border-radius: 50px;
  font-weight: 600;
  font-size: .95rem;
  color: var(--wood-dark);
}
.nav-links a:hover, .nav-links a.active { background: var(--green); color: #fff; }
.nav-cta { margin-left: 10px; }

.nav-toggle {
  display: none;
  position: relative;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  pointer-events: auto;
}
.nav-toggle span { width: 26px; height: 3px; background: var(--wood-dark); border-radius: 3px; transition: .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero slider ---------- */
.hero { position: relative; height: 82vh; min-height: 520px; overflow: hidden; }
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.2s ease, transform 6s ease;
  background-size: cover;
  background-position: center;
}
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, rgba(35,26,15,.78), rgba(35,26,15,.35) 60%, rgba(35,26,15,.15)); }
.slide.active { opacity: 1; transform: scale(1); z-index: 2; }
.hero-content {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
}
.hero-content .container { width: 100%; }
.hero-text { max-width: 640px; color: #fff; }
.hero-text .badge {
  display: inline-block;
  background: rgba(123, 160, 91, .3);
  border: 1px solid rgba(255,255,255,.35);
  padding: 7px 18px;
  border-radius: 50px;
  font-size: .8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.hero-text h2 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  margin-bottom: 20px;
  text-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.hero-text p { font-size: 1.2rem; margin-bottom: 32px; opacity: .95; max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-dots {
  position: absolute;
  bottom: 28px;
  left: 0; right: 0;
  z-index: 6;
  display: flex;
  justify-content: center;
  gap: 12px;
}
.hero-dots button {
  width: 40px; height: 5px;
  border: none; border-radius: 5px;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  transition: background .3s;
}
.hero-dots button.active { background: var(--green-light); }

.hero-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 6;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background .25s;
  display: flex; align-items: center; justify-content: center;
}
.hero-arrow:hover { background: var(--green); }
.hero-arrow.prev { left: 22px; }
.hero-arrow.next { right: 22px; }

/* ---------- Features strip ---------- */
.features { background: var(--white); margin-top: -60px; position: relative; z-index: 20; }
.features .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.feature {
  padding: 30px 26px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-right: 1px solid rgba(107,74,43,.08);
}
.feature:last-child { border-right: none; }
.feature .ico {
  flex-shrink: 0;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--sand);
  display: flex; align-items: center; justify-content: center;
}
.feature .ico svg { width: 26px; height: 26px; fill: var(--green); }
.feature strong { display: block; font-family: var(--font-head); color: var(--wood-dark); font-size: 1.02rem; }
.feature span { font-size: .88rem; color: var(--muted); }

/* ---------- Products cards ---------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.product-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.product-card .media {
  height: 220px;
  background: var(--sand);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.product-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product-card:hover .media img { transform: scale(1.07); }
.product-card .body { padding: 26px; flex: 1; display: flex; flex-direction: column; }
.product-card h3 { color: var(--wood-dark); font-size: 1.35rem; margin-bottom: 12px; }
.product-card ul { list-style: none; margin-bottom: 20px; }
.product-card ul li { padding: 5px 0 5px 26px; position: relative; color: var(--muted); }
.product-card ul li::before {
  content: ""; position: absolute; left: 0; top: 12px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--green-light);
  box-shadow: 0 0 0 4px rgba(123,160,91,.2);
}
.product-card .btn { margin-top: auto; align-self: flex-start; }

/* Product image gallery (no featured item) */
.pgallery { display: grid; gap: 14px; padding: 0 34px 34px; }
.pgallery.cols-3 { grid-template-columns: repeat(3, 1fr); }
.pgallery.cols-2 { grid-template-columns: repeat(2, 1fr); }
.pgallery .g-item {
  position: relative; overflow: hidden; border-radius: var(--radius-sm);
  cursor: pointer; aspect-ratio: 4/3; box-shadow: var(--shadow);
}
.pgallery .g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.pgallery .g-item:hover img { transform: scale(1.08); }
.pgallery .g-item::after {
  content: "+"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; background: rgba(53,82,31,.55);
  opacity: 0; transition: opacity .3s;
}
.pgallery .g-item:hover::after { opacity: 1; }
@media (max-width: 700px) {
  .pgallery { padding: 0 22px 26px; }
  .pgallery.cols-3, .pgallery.cols-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 440px) {
  .pgallery.cols-3, .pgallery.cols-2 { grid-template-columns: 1fr; }
}

/* ---------- About / stamp ---------- */
.about { background: var(--wood-dark); color: #f0e7d8; position: relative; overflow: hidden; padding: 110px 0; }
.about::before {
  content: ""; position: absolute; inset: 0;
  background: url('../../images/referencie/zrub.jpg') center/cover;
  opacity: .12;
}
.about .container { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.about .eyebrow { color: var(--green-light); letter-spacing: 3px; text-transform: uppercase; font-size: .8rem; font-weight: 600; }
.about h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 12px 0 20px; color: #fff; }
.about p { color: #d8cbb6; margin-bottom: 16px; }
.about .stats { display: flex; gap: 40px; margin-top: 30px; }
.about .stats .num { font-family: var(--font-head); font-size: 2.4rem; color: var(--green-light); font-weight: 700; }
.about .stats small { color: #c9bba3; }
.about .visual {
  background: #fff;
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.about .visual img { margin: 0 auto 20px; max-width: 260px; }
.about .visual h3 { color: var(--wood-dark); margin-bottom: 8px; }
.about .visual p { color: var(--muted); margin: 3px 0; }
.product-rezivo { padding: 72px 0; }

/* ---------- Gallery / references ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery .g-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  cursor: pointer;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow);
}
.gallery .g-item:nth-child(6n+1) { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.gallery .g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery .g-item:hover img { transform: scale(1.1); }
.gallery .g-item::after {
  content: "+"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  background: rgba(53,82,31,.55);
  opacity: 0; transition: opacity .3s;
}
.gallery .g-item:hover::after { opacity: 1; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(20,14,7,.94);
  display: none;
  align-items: center; justify-content: center;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 8px; box-shadow: var(--shadow-lg); }
.lightbox .lb-close, .lightbox .lb-nav {
  position: absolute; background: rgba(255,255,255,.12); color:#fff;
  border: none; width: 52px; height: 52px; border-radius: 50%;
  font-size: 1.5rem; cursor: pointer; transition: background .25s;
  display: flex; align-items: center; justify-content: center;
}
.lightbox .lb-close:hover, .lightbox .lb-nav:hover { background: var(--green); }
.lightbox .lb-close { top: 24px; right: 24px; }
.lightbox .lb-nav.prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-nav.next { right: 24px; top: 50%; transform: translateY(-50%); }

/* ---------- Contact ---------- */
.contact { background: var(--sand); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.contact-info h3 { color: var(--wood-dark); font-size: 1.6rem; margin-bottom: 20px; }
.info-row { display: flex; gap: 16px; margin-bottom: 22px; align-items: flex-start; }
.info-row .ico {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px;
  background: var(--green); display: flex; align-items: center; justify-content: center;
}
.info-row .ico svg { width: 22px; height: 22px; fill: #fff; }
.info-row strong { display: block; color: var(--wood-dark); font-family: var(--font-head); }
.info-row a, .info-row span { color: var(--muted); }
.info-row a:hover { color: var(--green); }

.contact-form {
  background: #fff;
  padding: 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.contact-form h3 { color: var(--wood-dark); margin-bottom: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; color: var(--wood-dark); margin-bottom: 6px; }
.form-group input, .form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid #e2d6c3;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .95rem;
  background: var(--cream);
  transition: border .2s, box-shadow .2s;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(74,107,47,.12);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.checkbox-group label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .88rem;
  line-height: 1.45;
  color: var(--muted);
}
.checkbox-group input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--green);
  flex-shrink: 0;
}
.form-note { font-size: .82rem; color: var(--muted); margin-top: 12px; }

.map-embed { margin-top: 30px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.map-embed iframe { width: 100%; height: 320px; border: 0; display: block; }

/* ---------- Invoice band ---------- */
.invoice-band { background: var(--white); border-top: 1px solid rgba(107,74,43,.1); }
.invoice-band .container { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; align-items: center; }
.invoice-band h4 { color: var(--wood-dark); margin-bottom: 6px; }
.invoice-band p { color: var(--muted); font-size: .95rem; }

/* ---------- Page hero (subpages) ---------- */
.page-hero {
  position: relative;
  padding: 90px 0 70px;
  background: url('../../images/referencie/drevenica-1.jpg') center/cover;
  text-align: center;
  color: #fff;
}
.page-hero::after { content:""; position:absolute; inset:0; background: linear-gradient(rgba(53,40,25,.72), rgba(53,40,25,.82)); }
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 12px; }
.page-hero .crumbs { font-size: .9rem; opacity: .85; }
.page-hero .crumbs a:hover { color: var(--green-light); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff; text-align: center;
}
.cta-band h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 14px; }
.cta-band p { opacity: .92; margin-bottom: 28px; max-width: 560px; margin-inline: auto; }

/* ---------- Footer ---------- */
.site-footer { background: var(--wood-dark); color: #cdbfa8; padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.site-footer .f-logo { display:flex; align-items:center; gap: 12px; margin-bottom: 18px; }
.site-footer .f-logo img { height: 54px; }
.site-footer .f-logo strong { font-family: var(--font-head); font-size: 1.2rem; color: #fff; letter-spacing: 1px; }
.site-footer h4 { color: #fff; margin-bottom: 18px; font-size: 1.1rem; }
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 10px; }
.site-footer a:hover { color: var(--green-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; text-align: center; font-size: .85rem; color: #a3937b; }
.footer-bottom a { color: var(--green-light); }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; bottom: 26px; right: 26px; z-index: 800;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--green); color: #fff; border: none;
  font-size: 1.3rem; cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--green-dark); transform: translateY(-4px); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .features .container { grid-template-columns: repeat(2, 1fr); }
  .feature:nth-child(2) { border-right: none; }
  .about .container, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .nav { padding: 12px 30px; }
  .logo img { height: 46px; }
  .about { padding: 76px 0; }
  .product-rezivo { padding: 56px 0; }
  .nav-links {
    position: fixed;
    top: -105px; left: 0; right: 0;
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 430px;
    background: var(--cream);
    flex-direction: column;
    align-items: stretch;
    padding: 120px 28px 28px;
    gap: 6px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-110%);
    transition: transform .35s ease;
    z-index: 950;
  }
  .nav-links { pointer-events: none; }
  .nav-links.open { transform: translateY(0); pointer-events: auto; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    width: 100%;
    padding: 15px 18px;
    font-size: 1.1rem;
    border-radius: var(--radius-sm);
    border-bottom: 1px solid rgba(107,74,43,.1);
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-toggle { display: flex; z-index: 960; }
  .nav-cta { display: none; }
  .products-grid { grid-template-columns: 1fr; gap: 22px; }
  .hero { height: 78vh; }
  .hero-arrow { display: none; }
  .features { margin-top: -40px; }
  .features .container { border-radius: var(--radius); }
}

@media (max-width: 560px) {
  .container { padding-left: 24px; padding-right: 24px; }
  .nav { padding-left: 28px; padding-right: 28px; }
  .features .container { grid-template-columns: 1fr; }
  .feature { border-right: none; border-bottom: 1px solid rgba(107,74,43,.08); }
  .form-row { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery .g-item:nth-child(6n+1) { grid-column: span 2; grid-row: auto; aspect-ratio: 4/3; }
  .about .stats { flex-direction: column; gap: 18px; }
  .footer-grid { grid-template-columns: 1fr; }
}
