/* =============================================
   TRIBYT - Modern Responsive Stylesheet
   ============================================= */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-black: #1a1a1a;
  --color-dark: #2d2d2d;
  --color-gray: #6b6b6b;
  --color-light: #f5f3f0;
  --color-lighter: #faf9f7;
  --color-white: #ffffff;
  --color-accent: #c8956c;
  --color-accent-dark: #a87650;
  --color-border: #e5e2de;
  --font-thin: "Normalidad Thin Var", sans-serif;
  --font-light: "Normalidad Light Var", sans-serif;
  --font-regular: "Normalidad Regular Var", sans-serif;
  --font-medium: "Normalidad Medium Var", sans-serif;
  --font-bold: "Normalidad Bold Var", sans-serif;
  --max-width: 1200px;
  --nav-height: 70px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-thin);
  color: var(--color-black);
  background: var(--color-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-accent-dark);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-accent);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Topbar ---- */
.topbar {
  background: var(--color-black);
  color: var(--color-white);
  font-size: 14px;
  padding: 10px 0;
}

.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar a {
  color: var(--color-white);
  transition: opacity 0.2s;
}

.topbar a:hover {
  opacity: 0.7;
  color: var(--color-white);
}

.topbar-sep {
  margin: 0 12px;
  opacity: 0.4;
}

.topbar-social a {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-social svg {
  width: 16px;
  height: 16px;
}

/* ---- Navigation ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  transition: box-shadow 0.3s;
  height: var(--nav-height);
}

.nav.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo img {
  height: 24px;
  width: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 40px;
}

.nav-links a {
  font-family: var(--font-light);
  font-size: 15px;
  color: var(--color-black);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.3s;
}

.nav-links a:hover {
  color: var(--color-accent-dark);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-black);
  transition:
    transform 0.3s,
    opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- Hero ---- */
.hero {
  min-height: calc(100vh - var(--nav-height) - 37px);
  display: flex;
  align-items: center;
  padding: 60px 0;
  overflow: hidden;
}

.hero-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}

.hero-image-card {
  position: relative;
}

.hero-badge {
  width: 96px;
  position: absolute;
  top: -20px;
  left: -20px;
  z-index: 2;
}

.hero h1 {
  font-family: var(--font-medium);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: normal;
  line-height: 1.15;
  margin-bottom: 32px;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--color-black);
  color: var(--color-white);
  font-family: var(--font-light);
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 4px;
  transition:
    background 0.3s,
    transform 0.2s;
}

.btn:hover {
  background: var(--color-dark);
  color: var(--color-white);
  transform: translateY(-1px);
}

.hero-images {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.hero-images > img:not(.hero-sk-badge) {
  flex: 1;
  min-width: 0;
  height: 320px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-sk-badge {
  position: absolute;
  bottom: -10px;
  right: -10px;
  width: 100px;
}

/* ---- Section commons ---- */
.section {
  padding: 100px 0;
}

#o-nas,
#sortiment,
#kontakt {
  scroll-margin-top: calc(var(--nav-height) + 20px);
}

.section-title {
  font-family: var(--font-regular);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.section-title::after {
  content: "";
  display: block;
  width: 50px;
  height: 2px;
  background: var(--color-accent);
  margin-top: 16px;
}

/* No line under Sortiment */
.section-products .section-title::after {
  display: none;
}

.section-subtitle {
  font-family: var(--font-light);
  color: var(--color-gray);
  font-size: 16px;
  margin-bottom: 50px;
  max-width: 600px;
}

.section-subtitle a {
  font-family: var(--font-medium);
}

/* Price notice bubble */
.price-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-accent);
  color: var(--color-white);
  padding: 14px 24px;
  border-radius: 8px;
  margin-bottom: 50px;
  font-family: var(--font-light);
  font-size: 16px;
  line-height: 1.5;
}

.price-notice svg {
  flex-shrink: 0;
}

.price-notice a {
  color: var(--color-white);
  font-family: var(--font-medium);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.price-notice a:hover {
  color: var(--color-white);
  opacity: 0.85;
}

/* ---- About ---- */
.section-about {
  background: var(--color-lighter);
}

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
  margin-top: 40px;
  align-items: start;
}

.about-text p {
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.8;
}

.about-text strong {
  font-family: var(--font-medium);
  font-weight: normal;
}

.about-aside {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-card {
  background: var(--color-white);
  padding: 32px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.about-card-number {
  font-family: var(--font-regular);
  font-size: 48px;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 8px;
}

.about-card-label {
  font-family: var(--font-light);
  font-size: 15px;
  color: var(--color-gray);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---- Products ---- */
.section-products {
  background: var(--color-white);
}

.products-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

/* Subgrid: each card spans 5 rows aligned with its neighbor */
.product-card {
  display: grid;
  grid-row: span 5;
  grid-template-rows: subgrid;
  background: var(--color-lighter);
  border-radius: 12px;
  overflow: hidden;
  row-gap: 0;
}

/* display:contents makes children direct grid items for subgrid */
.product-info {
  display: contents;
}

/* Row 1: Name */
.product-name {
  font-family: var(--font-bold);
  font-size: 22px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 28px 28px 0;
}

/* Row 2: Subtitle */
.product-subtitle {
  font-family: var(--font-medium);
  font-size: 14px;
  font-weight: normal;
  color: var(--color-accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 28px 0;
}

/* Row 3: Description */
.product-desc {
  font-size: 15px;
  color: var(--color-gray);
  line-height: 1.7;
  padding: 12px 28px 0;
  align-self: start;
}


/* Row 4: PDFs */
.product-pdfs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 28px 0;
  align-self: end;
  min-height: 0;
}

.product-pdfs:empty {
  padding: 0 28px;
}

.product-pdfs a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  font-family: var(--font-light);
  font-size: 13px;
  color: var(--color-dark);
  transition:
    border-color 0.2s,
    color 0.2s;
}

.product-pdfs a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-dark);
}

.pdf-icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #c0392b;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Row 5: Images grid */
.product-images {
  --product-img-height: 130px;
  --product-img-gap: 4px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--product-img-gap, 4px);
  padding: 16px 28px 28px;
  align-self: end;
}

/* Single image: span full width */
.product-images img:only-child {
  grid-column: 1 / -1;
  height: calc(var(--product-img-height, 130px) * 2 + var(--product-img-gap, 4px));
}

/* Optional: 3 images stacked vertically within the same height as a 2x2 grid */
.product-images.three-vertical {
  grid-template-columns: 1fr;
}

.product-images.three-vertical img {
  height: calc(
    (2 * var(--product-img-height, 130px) - var(--product-img-gap, 4px)) / 3
  );
}

/* 3 images: first one spans full width */
.product-images img:first-child:nth-last-child(3) {
  grid-column: 1 / -1;
}

.product-images img {
  width: 100%;
  height: var(--product-img-height, 130px);
  object-fit: cover;
  border-radius: 6px;
}

/* ---- Contact ---- */
.section-contact {
  background: var(--color-lighter);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 40px;
}

.contact-info h3 {
  font-family: var(--font-regular);
  font-size: 24px;
  font-weight: normal;
  margin-bottom: 30px;
}

.contact-block {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.contact-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
}

.contact-block a {
  color: var(--color-black);
  font-size: 16px;
  line-height: 1.8;
}

.contact-block a:hover {
  color: var(--color-accent);
}

.contact-block div:last-child {
  font-size: 16px;
}

.contact-visit {
  margin-top: 36px;
  padding: 24px;
  background: var(--color-white);
  border-radius: 12px;
  border-left: 3px solid var(--color-accent);
}

.contact-visit h4 {
  font-family: var(--font-medium);
  font-size: 17px;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.contact-visit p {
  font-size: 15px;
  color: var(--color-gray);
  line-height: 1.7;
}

.contact-gps {
  margin-top: 12px;
  font-size: 14px !important;
  color: var(--color-dark) !important;
}

.contact-gps strong {
  font-family: var(--font-medium);
  font-weight: normal;
}

.contact-map {
  min-height: 400px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.contact-map iframe {
  display: block;
}

/* ---- Footer ---- */
.footer {
  background: var(--color-black);
  color: var(--color-white);
  padding: 60px 0 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: center;
  padding-bottom: 40px;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-contacts {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 15px;
}

.footer-contacts a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s;
}

.footer-contacts a:hover {
  color: var(--color-white);
}

.footer-sep {
  color: rgba(255, 255, 255, 0.4);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 24px;
}

.footer-bottom p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
}

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 1024px) {
  .hero-content {
    gap: 40px;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .about-aside {
    flex-direction: row;
  }

  .about-card {
    flex: 1;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
  }

  .topbar-inner {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }

  /* Nav mobile */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: 20px 24px;
    gap: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 16px;
  }

  .nav-links a::after {
    display: none;
  }

  /* Hero mobile */
  .hero {
    min-height: auto;
    padding: 40px 0 60px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-text {
    text-align: center;
  }

  .hero-badge {
    width: 80px;
    top: -16px;
    left: -16px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .hero-images {
    max-width: 400px;
    margin: 0 auto;
  }

  .hero-images > img:not(.hero-sk-badge) {
    height: 200px;
  }

  .hero-sk-badge {
    width: 70px;
  }

  .price-notice {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  /* Sections mobile */
  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 28px;
  }

  .about-aside {
    flex-direction: column;
  }

  /* Products: single column on mobile */
  .products-list {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .product-name {
    font-size: 20px;
    padding: 20px 20px 0;
  }

  .product-subtitle {
    padding: 4px 20px 0;
  }

  .product-desc {
    padding: 10px 20px 0;
  }

  .product-pdfs {
    padding: 10px 20px 0;
  }

  .product-pdfs:empty {
    padding: 0 20px;
  }

  .product-images {
    padding: 12px 20px 20px;
    --product-img-height: 110px;
  }

  .product-images img {
    height: var(--product-img-height, 110px);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contact-map {
    min-height: 300px;
  }

  /* Footer mobile */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .footer-contacts {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .hero-images > img:not(.hero-sk-badge) {
    height: 160px;
  }

  .product-name {
    padding: 16px 16px 0;
  }

  .product-subtitle {
    padding: 4px 16px 0;
  }

  .product-desc {
    padding: 8px 16px 0;
  }

  .product-pdfs {
    padding: 8px 16px 0;
  }

  .product-pdfs:empty {
    padding: 0 16px;
  }

  .product-images {
    padding: 10px 16px 16px;
    --product-img-height: 90px;
  }

  .product-images img {
    height: var(--product-img-height, 90px);
  }

  .contact-visit {
    padding: 20px;
  }
}
