/* ==========================================================================
   KOSMAJ KOMERC DOO — Corporate website styles
   Hand-written, framework-free. Single source of truth for the whole site.

   Structure:
   1.  Design tokens (CSS custom properties)
   2.  Reset & base
   3.  Typography
   4.  Layout helpers (container, section, grid)
   5.  Buttons
   6.  Header & navigation (+ mobile menu)
   7.  Logo component
   8.  Hero
   9.  4E strip
   10. Highlights / feature rows
   11. Cards (product categories, products, services, values)
   12. Partners strip
   13. Timeline
   14. CTA band
   15. Contact / forms / map
   16. Footer
   17. Utilities & motion
   18. Responsive breakpoints
   ========================================================================== */

/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */
:root {
  /* Brand palette — Industrial blue base + logo ORANGE accent.
     Blue = trust/structure, orange = energy/action (from the KOSMAJ KOMERC logo
     and the company's own brochure design). */
  --color-primary: #0b4f8a;          /* deep industrial blue */
  --color-primary-dark: #083c69;     /* darker shade for gradients/hover */
  --color-primary-darker: #062c4d;   /* deepest — hero base */
  --color-accent: #1e88e5;           /* secondary accent blue */
  --color-accent-soft: #e7f1fb;      /* tinted blue surface */

  /* Logo orange — primary accent/action colour */
  --color-orange: #f26a21;           /* vivid brand orange — fills, icons, slogan, decorative */
  --color-orange-dark: #d9531a;      /* hover/active for orange fills */
  --color-orange-deep: #c2470f;      /* AA-safe orange for TEXT on light + solid CTA bg with white text (~5:1) */
  --color-orange-deep-h: #a63d0b;    /* hover for the solid orange CTA */
  --color-orange-soft: #fdeee4;      /* light orange surface (icon chips) */
  --color-orange-light: #ffbf99;     /* light orange for text on dark backgrounds */

  /* Energy tokens kept as aliases so existing rules pick up the orange automatically */
  --color-energy: #f26a21;           /* was amber — now brand orange */
  --color-energy-dark: #d9531a;

  /* Neutrals */
  --color-ink: #1a2229;              /* primary text */
  --color-steel: #5b6770;            /* secondary text / muted */
  --color-steel-light: #eef1f4;      /* light surface */
  --color-border: #dfe4e9;           /* subtle steel-gray border */
  --color-border-strong: #c8d0d8;
  --color-white: #ffffff;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f7fa;           /* alternating section background */

  /* Semantic */
  --color-success: #1f9d55;
  --color-error: #d64545;

  /* Typography */
  --font-heading: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-xs: 0.8125rem;   /* 13px */
  --fs-sm: 0.9375rem;   /* 15px */
  --fs-base: 1rem;      /* 16px */
  --fs-md: 1.125rem;    /* 18px */
  --fs-lg: 1.375rem;    /* 22px */
  --fs-xl: 1.75rem;     /* 28px */
  --fs-2xl: 2.25rem;    /* 36px */
  --fs-3xl: 3rem;       /* 48px */

  /* Spacing scale (4/8 based) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(16, 34, 51, 0.06);
  --shadow-sm: 0 2px 8px rgba(16, 34, 51, 0.07);
  --shadow-md: 0 8px 24px rgba(16, 34, 51, 0.09);
  --shadow-lg: 0 18px 48px rgba(11, 44, 77, 0.16);

  /* Layout */
  --container: 1200px;
  --container-narrow: 900px;
  --header-h: 76px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 220ms;

  /* Z-index scale */
  --z-header: 100;
  --z-menu: 200;
  --z-overlay: 190;
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  /* Must clip on BOTH html and body: root overflow propagates to the viewport,
     so clipping the off-screen fixed drawer requires both (see body rule). */
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* The off-canvas mobile drawer (position:fixed) parks off-screen to the
     right. Root-level overflow can't clip fixed descendants, but clipping on
     <body> does. `clip` avoids making <body> a scroll container (which would
     disturb the sticky header); `hidden` is the fallback for older Safari. */
  overflow-x: hidden;
  overflow-x: clip;
}

img,
svg,
picture {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

a:hover {
  color: var(--color-orange-deep);
}

ul,
ol {
  margin: 0;
  padding: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* Accessible focus ring for keyboard users */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Screen-reader-only helper */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 1000;
  background: var(--color-primary);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--color-ink);
  line-height: 1.18;
  margin: 0 0 var(--space-4);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 5vw, var(--fs-3xl));
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, var(--fs-2xl));
}

h3 {
  font-size: var(--fs-lg);
}

h4 {
  font-size: var(--fs-md);
}

p {
  margin: 0 0 var(--space-4);
}

.lead {
  font-size: var(--fs-md);
  color: var(--color-steel);
  line-height: 1.7;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-orange-deep);
  margin-bottom: var(--space-3);
}

.text-muted {
  color: var(--color-steel);
}

/* ==========================================================================
   4. LAYOUT HELPERS
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: clamp(var(--space-7), 8vw, var(--space-9));
}

.section--alt {
  background: var(--color-bg-alt);
}

.section--tight {
  padding-block: var(--space-7);
}

.section-head {
  max-width: 720px;
  margin-bottom: var(--space-7);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.grid {
  display: grid;
  gap: var(--space-5);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ==========================================================================
   5. BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-sm);
  line-height: 1;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), color var(--dur) var(--ease),
    transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  min-height: 48px;
  cursor: pointer;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

/* Primary CTA — brand orange with white text (deep enough to clear WCAG AA ~5:1) */
.btn--primary {
  background: var(--color-orange-deep);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--color-orange-deep-h);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-border-strong);
}

.btn--secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-accent-soft);
}

/* Energy CTA — vivid brand orange with dark text, the strongest call to action
   (used on dark hero/CTA backgrounds). Dark text keeps it above WCAG AA. */
.btn--energy {
  background: var(--color-energy);
  color: #2a1100;
  box-shadow: var(--shadow-sm);
}

.btn--energy:hover {
  background: var(--color-energy-dark);
  color: #2a1100;
  box-shadow: var(--shadow-md);
}

.btn--ghost-light {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.btn--ghost-light:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #fff;
  color: #fff;
}

.btn--block {
  width: 100%;
}

.btn .btn__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ==========================================================================
   6. HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  height: var(--header-h);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.main-nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
}

.main-nav__link {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--color-ink);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.main-nav__link:hover {
  background: var(--color-steel-light);
  color: var(--color-orange-deep);
}

.main-nav__link[aria-current="page"] {
  color: var(--color-orange-deep);
  background: var(--color-orange-soft);
  box-shadow: inset 0 -2px 0 var(--color-orange);
}

/* In-nav CTA is only for the mobile drawer; the desktop CTA lives in
   .header-actions. Hide the in-nav one on desktop to avoid a duplicate. */
.main-nav > .btn {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Hamburger toggle — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-ink);
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* In-drawer header (logo + close button) — only visible inside the mobile drawer */
.main-nav__head {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.main-nav__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-ink);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.main-nav__close:hover {
  background: var(--color-steel-light);
  border-color: var(--color-border-strong);
}

.main-nav__close svg {
  width: 24px;
  height: 24px;
}

/* ==========================================================================
   7. LOGO COMPONENT
   ==========================================================================
   Reusable wordmark. To swap in a real logo image later, replace the inner
   markup of .brand with:  <img src="assets/logo.svg" alt="KOSMAJ KOMERC" ...>
   ========================================================================== */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.brand__mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand__name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  color: var(--color-primary);
}

.brand__name b {
  font-weight: 800;
}

.brand__name span {
  font-weight: 400;
  color: var(--color-steel);
}

.brand__tag {
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-steel);
  font-weight: 600;
}

/* Footer variant on dark background */
.brand--light .brand__name span {
  color: #b9c6d3;
}
.brand--light .brand__name {
  color: #fff;
}
.brand--light .brand__tag {
  color: #8fa3b5;
}

/* ==========================================================================
   8. HERO
   ========================================================================== */
.hero {
  position: relative;
  color: #fff;
  /* Pure-CSS brand background (no product photos): deep-blue diagonal gradient
     kept dark on the left/top for text legibility, brighter toward bottom-right. */
  background:
    radial-gradient(120% 110% at 15% 18%, rgba(3, 22, 40, 0.62) 0%, rgba(3, 22, 40, 0) 58%),
    linear-gradient(125deg, #0b4f8a 0%, #0e5c9e 48%, #1e88e5 100%);
  overflow: hidden;
  /* Full viewport height minus the sticky header, so header + hero == one
     screen. 100svh avoids the mobile address-bar jump; 100vh is the fallback. */
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center; /* vertically center the content; grows + scrolls if taller */
}

/* Large translucent hexagon motif — abstract, low-contrast brand decoration */
.hero__shape {
  position: absolute;
  right: -90px;
  bottom: -130px;
  width: min(560px, 70vw);
  height: auto;
  color: rgba(255, 255, 255, 0.05);
  z-index: 2;
  pointer-events: none;
}

/* Crossfading background slider (3 images, ~5s hold + ~1s fade, infinite loop) */
.hero__slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  will-change: opacity;
  animation: heroSlide 18s linear infinite;
}

.hero__slide:nth-child(1) { animation-delay: 0s; }
.hero__slide:nth-child(2) { animation-delay: -6s; }
.hero__slide:nth-child(3) { animation-delay: -12s; }

@keyframes heroSlide {
  0%     { opacity: 1; }  /* visible */
  27.78% { opacity: 1; }  /* hold ~5s */
  33.33% { opacity: 0; }  /* crossfade out ~1s */
  94.44% { opacity: 0; }  /* wait while others show */
  100%   { opacity: 1; }  /* crossfade back in ~1s */
}

/* Brand-blue overlay — lighter than a flat wash so more of the photo shows.
   Stronger on the left (behind the text), lighter on the right, plus a subtle
   darkening at the very bottom so the stats row stays readable. */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to top, rgba(5, 26, 45, 0.55) 0%, rgba(5, 26, 45, 0) 26%),
    linear-gradient(100deg,
      rgba(11, 79, 138, 0.85) 0%,
      rgba(11, 79, 138, 0.74) 44%,
      rgba(11, 79, 138, 0.44) 76%,
      rgba(11, 79, 138, 0.26) 100%);
}

/* Abstract industrial motif — layered radial + line pattern via SVG background */
.hero__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  pointer-events: none;
  z-index: 2;
}

.hero__glow {
  position: absolute;
  width: 620px;
  height: 620px;
  top: -180px;
  right: -140px;
  background: radial-gradient(circle, rgba(30, 136, 229, 0.4) 0%, rgba(30, 136, 229, 0) 68%);
  pointer-events: none;
  z-index: 2;
}

.hero__inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
  align-items: center;
  /* Modest padding — vertical centering does most of the spacing work, and
     smaller padding lets tall content sit closer to one screen on phones. */
  padding-block: clamp(var(--space-5), 5vw, var(--space-8));
}

.hero__content {
  max-width: 640px;
}

.hero__eyebrow {
  color: var(--color-orange-light);
}

.hero h1 {
  color: #fff;
  margin-bottom: var(--space-4);
}

.hero__slogan {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5ch;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  color: var(--color-energy);
  margin-bottom: var(--space-5);
}

.hero__slogan .plus {
  color: #7fb4e6;
  font-weight: 500;
}

.hero__value {
  font-size: var(--fs-md);
  color: #d5e3f1;
  max-width: 46ch;
  margin-bottom: var(--space-6);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  margin-top: var(--space-7);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-stat__num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--fs-xl);
  color: #fff;
  display: block;
}

.hero-stat__label {
  font-size: var(--fs-xs);
  color: #a9c3da;
  letter-spacing: 0.04em;
}

/* Hero media slot — drop a real photo in the marked <img> later */
.hero__media {
  position: relative;
}

.hero__media-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(160deg, #0e5c9e, #06345c);
  aspect-ratio: 4 / 3;
}

.hero__media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder visual shown until a real photo is added */
.hero__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: var(--space-5);
}

.hero__placeholder svg {
  width: 64px;
  height: 64px;
  opacity: 0.6;
}

.hero__badge {
  position: absolute;
  left: -18px;
  bottom: 28px;
  background: #fff;
  color: var(--color-ink);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-width: 240px;
}

.hero__badge svg {
  width: 34px;
  height: 34px;
  color: var(--color-energy-dark);
  flex-shrink: 0;
}

.hero__badge b {
  font-family: var(--font-heading);
  display: block;
  font-size: var(--fs-sm);
}

.hero__badge span {
  font-size: var(--fs-xs);
  color: var(--color-steel);
}

/* ==========================================================================
   9. 4E STRIP
   ========================================================================== */
.fourE {
  position: relative;
  z-index: 2;
  margin-top: calc(-1 * var(--space-7));
}

.fourE__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.eCard {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.eCard:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-strong);
}

.eCard__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--color-orange-soft);
  color: var(--color-orange-deep);
  margin-bottom: var(--space-4);
}

.eCard__icon svg {
  width: 28px;
  height: 28px;
}

.eCard h3 {
  margin-bottom: var(--space-2);
  font-size: var(--fs-md);
}

.eCard p {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--color-steel);
}

/* ==========================================================================
   10. HIGHLIGHTS
   ========================================================================== */
.highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.highlight {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.highlight__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
}

.highlight__icon svg {
  width: 26px;
  height: 26px;
}

.highlight h3 {
  font-size: var(--fs-md);
  margin-bottom: var(--space-1);
}

.highlight p {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--color-steel);
}

/* ==========================================================================
   11. CARDS
   ========================================================================== */
/* Category card (home overview + links) */
.cat-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
  height: 100%;
  color: var(--color-ink);
}

a.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
  color: var(--color-ink);
}

.cat-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: linear-gradient(140deg, var(--color-orange), var(--color-orange-dark));
  color: #fff;
  margin-bottom: var(--space-4);
}

.cat-card__icon svg {
  width: 30px;
  height: 30px;
}

.cat-card h3 {
  font-size: var(--fs-md);
  margin-bottom: var(--space-2);
}

.cat-card p {
  color: var(--color-steel);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-4);
}

.cat-card__more {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--color-primary);
}

.cat-card__more svg {
  width: 16px;
  height: 16px;
  transition: transform var(--dur) var(--ease);
}

a.cat-card:hover .cat-card__more svg {
  transform: translateX(4px);
}

/* Product card */
.product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
  height: 100%;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  border-color: var(--color-border-strong);
}

.product-card__code {
  align-self: flex-start;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  color: var(--color-primary);
  background: var(--color-accent-soft);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-3);
}

.product-card h3 {
  font-size: var(--fs-md);
  margin-bottom: var(--space-2);
}

.product-card p {
  color: var(--color-steel);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-4);
}

.product-card__app {
  margin-top: auto;
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  color: var(--color-steel);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--color-border);
}

.product-card__app svg {
  width: 16px;
  height: 16px;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 1px;
}

.product-card__app b {
  color: var(--color-ink);
  font-weight: 600;
}

/* Category block on the products page */
.cat-block {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.cat-block + .cat-block {
  margin-top: var(--space-8);
}

.cat-block__head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--color-steel-light);
}

.cat-block__index {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
}

.cat-block__head h2 {
  margin: 0;
  font-size: var(--fs-xl);
}

.cat-block__benefit {
  margin: 0.35rem 0 0;
  font-size: var(--fs-sm);
  color: var(--color-steel);
}

/* Value / why-choose cards */
.value-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-orange);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-xs);
  height: 100%;
}

.value-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--color-orange-soft);
  color: var(--color-orange-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
}

.value-card__icon svg {
  width: 24px;
  height: 24px;
}

.value-card h3 {
  font-size: var(--fs-md);
  margin-bottom: var(--space-2);
}

.value-card p {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--color-steel);
}

/* Service card */
.service-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  height: 100%;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.service-card__icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: linear-gradient(140deg, var(--color-primary), var(--color-accent));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
}

.service-card__icon svg {
  width: 32px;
  height: 32px;
}

.service-card h3 {
  margin-bottom: var(--space-3);
}

.service-card p {
  color: var(--color-steel);
  margin-bottom: var(--space-4);
}

.service-card__list {
  list-style: none;
  margin-top: auto;
  display: grid;
  gap: var(--space-2);
}

.service-card__list li {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  font-size: var(--fs-sm);
  color: var(--color-ink);
}

.service-card__list svg {
  width: 18px;
  height: 18px;
  color: var(--color-success);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ==========================================================================
   12. PARTNERS STRIP
   ========================================================================== */
.partners__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.partner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-xs);
}

/* Placeholder logo box — swap for a real <img> when logos are provided */
.partner__logo {
  width: 100%;
  height: 72px;
  border-radius: var(--radius-sm);
  background: var(--color-steel-light);
  border: 1px dashed var(--color-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-steel);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-md);
  letter-spacing: 0.02em;
}

.partner__role {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-orange-deep);
  font-weight: 700;
}

.partner p {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--color-steel);
}

/* ==========================================================================
   13. TIMELINE
   ========================================================================== */
.timeline {
  position: relative;
  display: grid;
  gap: var(--space-6);
  padding-left: var(--space-6);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--color-accent), var(--color-border));
}

.timeline__item {
  position: relative;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-6) + 1px);
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--color-accent);
}

.timeline__year {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--color-primary);
  font-size: var(--fs-md);
}

.timeline__item h3 {
  font-size: var(--fs-md);
  margin: var(--space-1) 0 var(--space-2);
}

.timeline__item p {
  margin: 0;
  color: var(--color-steel);
  font-size: var(--fs-sm);
}

/* ==========================================================================
   14. CTA BAND
   ========================================================================== */
.cta-band {
  position: relative;
  background: linear-gradient(120deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 5vw, var(--space-8));
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.cta-band__glow {
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  top: -160px;
  background: radial-gradient(circle, rgba(242, 106, 33, 0.4) 0%, rgba(242, 106, 33, 0) 70%);
  pointer-events: none;
}

.cta-band__inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.cta-band h2 {
  color: #fff;
  margin-bottom: var(--space-2);
}

.cta-band p {
  color: #d5e3f1;
  margin: 0;
  max-width: 52ch;
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* ==========================================================================
   15. CONTACT / FORMS / MAP
   ========================================================================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-7);
  align-items: start;
}

.contact-info {
  display: grid;
  gap: var(--space-4);
}

.info-item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-xs);
}

.info-item__icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--color-orange-soft);
  color: var(--color-orange-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.info-item__icon svg {
  width: 24px;
  height: 24px;
}

.info-item h3 {
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-steel);
  margin-bottom: var(--space-1);
}

.info-item p,
.info-item a {
  margin: 0;
  font-size: var(--fs-base);
  color: var(--color-ink);
  line-height: 1.5;
}

.info-item a:hover {
  color: var(--color-accent);
}

/* Form */
.form-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-5), 4vw, var(--space-7));
  box-shadow: var(--shadow-md);
}

.form-grid {
  display: grid;
  gap: var(--space-5);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--color-ink);
}

.field .req {
  color: var(--color-error);
}

.field input,
.field textarea {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--color-ink);
  padding: 0.75rem 0.9rem;
  min-height: 48px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  width: 100%;
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.18);
}

.field input:user-invalid,
.field.has-error input,
.field.has-error textarea {
  border-color: var(--color-error);
}

.field__error {
  font-size: var(--fs-xs);
  color: var(--color-error);
  min-height: 1em;
  display: none;
}

.field.has-error .field__error {
  display: block;
}

.field__help {
  font-size: var(--fs-xs);
  color: var(--color-steel);
}

/* Form status message */
.form-status {
  display: none;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
}

.form-status.is-visible {
  display: flex;
}

.form-status--success {
  background: #e8f6ee;
  color: #146c3a;
  border: 1px solid #b6e0c6;
}

.form-status svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Map */
.map-embed {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  line-height: 0;
}

.map-embed iframe {
  width: 100%;
  height: 380px;
  border: 0;
  display: block;
}

/* ==========================================================================
   16. FOOTER
   ========================================================================== */
.site-footer {
  background: var(--color-primary-darker);
  color: #c3d2e0;
  padding-block: var(--space-8) var(--space-6);
}

.site-footer a {
  color: #c3d2e0;
}

.site-footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: var(--space-7);
  padding-bottom: var(--space-7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-about p {
  margin: var(--space-4) 0 0;
  font-size: var(--fs-sm);
  color: #9fb3c6;
  max-width: 38ch;
}

.footer-col h4 {
  color: #fff;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-4);
}

.footer-col ul {
  list-style: none;
  display: grid;
  gap: var(--space-3);
}

.footer-col ul a {
  font-size: var(--fs-sm);
}

.footer-contact {
  display: grid;
  gap: var(--space-3);
  font-size: var(--fs-sm);
}

.footer-contact .row {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.footer-contact svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-5);
  font-size: var(--fs-xs);
  color: #8ba1b6;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
}

/* ==========================================================================
   17. UTILITIES & MOTION
   ========================================================================== */
.page-hero {
  background: linear-gradient(135deg, var(--color-primary-darker), var(--color-primary));
  color: #fff;
  padding-block: clamp(var(--space-7), 8vw, var(--space-9)) clamp(var(--space-7), 8vw, var(--space-8));
  position: relative;
  overflow: hidden;
}

.page-hero__glow {
  position: absolute;
  width: 500px;
  height: 500px;
  top: -160px;
  right: -120px;
  background: radial-gradient(circle, rgba(30, 136, 229, 0.5) 0%, rgba(30, 136, 229, 0) 70%);
  pointer-events: none;
}

.page-hero__inner {
  position: relative;
  max-width: 760px;
}

.page-hero .eyebrow {
  color: var(--color-orange-light);
}

.page-hero h1 {
  color: #fff;
}

.page-hero p {
  color: #d5e3f1;
  font-size: var(--fs-md);
  margin: 0;
  max-width: 60ch;
}

.breadcrumb {
  font-size: var(--fs-xs);
  color: #a9c3da;
  margin-bottom: var(--space-4);
}

.breadcrumb a {
  color: #cfe0f0;
}

.breadcrumb span {
  margin-inline: 0.4rem;
  opacity: 0.6;
}

/* Filter buttons (products page) */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-7);
}

.filter-btn {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-sm);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-strong);
  background: #fff;
  color: var(--color-ink);
  transition: all var(--dur) var(--ease);
  min-height: 44px;
}

.filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.filter-btn[aria-pressed="true"] {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* Split content layout (image + text) */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: center;
}

.media-slot {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: linear-gradient(150deg, var(--color-steel-light), #dbe3ec);
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-sm);
}

.media-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-slot__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  color: var(--color-steel);
  text-align: center;
  padding: var(--space-5);
}

.media-slot__placeholder svg {
  width: 56px;
  height: 56px;
  opacity: 0.7;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  margin-top: var(--space-6);
}

.stat {
  text-align: center;
  padding: var(--space-5);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.stat__num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--fs-2xl);
  color: var(--color-primary);
  display: block;
  line-height: 1;
}

.stat__label {
  font-size: var(--fs-sm);
  color: var(--color-steel);
  margin-top: var(--space-2);
}

.mt-6 { margin-top: var(--space-6); }
.mt-7 { margin-top: var(--space-7); }

/* Reveal-on-scroll (progressive enhancement — content visible without JS) */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* No-JS / reduced-motion safety: always show content */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .btn:hover {
    transform: none;
  }
}

/* ==========================================================================
   18. RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* Large tablets / small desktops */
@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .hero__media {
    max-width: 520px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-about {
    grid-column: 1 / -1;
  }
}

/* Tablets */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .fourE__grid { grid-template-columns: repeat(2, 1fr); }
  .partners__grid { grid-template-columns: 1fr; }
  .highlights { grid-template-columns: 1fr; gap: var(--space-4); }
  .contact-layout { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: var(--space-6); }
  .split--reverse .media-slot { order: -1; }
  .stat-row { grid-template-columns: repeat(3, 1fr); }
  .fourE { margin-top: var(--space-6); }
}

/* Mobile nav breakpoint */
@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: min(340px, 86vw);
    /* Solid, fully opaque surface — nothing shows through, no scrim behind it */
    background: var(--color-white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-4) var(--space-4) var(--space-6);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform var(--dur) var(--ease);
    z-index: var(--z-menu);
    /* Scroll vertically only; clip any minor horizontal overflow so the panel
       never shows its own horizontal scrollbar. */
    overflow-x: hidden;
    overflow-y: auto;
  }

  .main-nav.is-open {
    transform: translateX(0);
  }

  /* Show the in-drawer header (logo + close) inside the open panel */
  .main-nav__head {
    display: flex;
  }

  .main-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-1);
    width: 100%;
  }

  .main-nav__link {
    display: block;
    padding: 0.9rem 1rem;
    font-size: var(--fs-md);
    border-radius: var(--radius-sm);
  }

  .main-nav > .btn {
    display: inline-flex;
    margin-top: var(--space-4);
    width: 100%;
  }

  .header-actions .btn--desktop {
    display: none;
  }
}

/* Small phones */
@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .fourE__grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
  .hero__stats { gap: var(--space-4); }
  .hero__badge { position: static; margin-top: var(--space-4); max-width: none; }
  .cta-band__inner { flex-direction: column; align-items: flex-start; }
  .cta-band__actions { width: 100%; }
  .cta-band__actions .btn { flex: 1; }
  .container { padding-inline: var(--space-4); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   19. IMAGE SLOTS (support for temporary filler photos)
   Added when real product photos are dropped in. Every image also carries a
   `<!-- TODO: zameniti pravom fotografijom -->` comment in the HTML.
   ========================================================================== */

/* --- Page hero background image + brand overlay (o-nama, proizvodi, usluge, kontakt) --- */
.page-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.page-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Strong brand-blue wash keeps white heading text well above AA contrast */
  background: linear-gradient(135deg, rgba(6, 44, 77, 0.94) 0%, rgba(11, 79, 138, 0.84) 55%, rgba(8, 60, 105, 0.9) 100%);
}

.page-hero__glow {
  z-index: 2;
}

.page-hero__inner {
  z-index: 3;
}

/* --- Category card image top (home category grid) --- */
.cat-card {
  overflow: hidden;
}

.cat-card__media {
  margin: calc(-1 * var(--space-6)) calc(-1 * var(--space-6)) var(--space-5);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-steel-light);
}

.cat-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}

a.cat-card:hover .cat-card__media img {
  transform: scale(1.06);
}

/* --- Category header thumbnail (products page) --- */
.cat-block__thumb {
  margin-left: auto;
  width: 168px;
  height: 70px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
}

.cat-block__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Section background image (partners strip) --- */
.section--imagebg {
  position: relative;
  isolation: isolate;
}

.section--imagebg > .container {
  position: relative;
  z-index: 2;
}

.section__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.1; /* faint industrial texture behind the light section */
}

.section__bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(245, 247, 250, 0.72) 0%, rgba(245, 247, 250, 0.9) 100%);
}

/* --- CTA band background image + brand overlay --- */
.cta-band__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.cta-band__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(120deg, rgba(11, 79, 138, 0.93) 0%, rgba(8, 60, 105, 0.9) 100%);
}

.cta-band__glow {
  z-index: 2;
}

.cta-band__inner {
  z-index: 3;
}

@media (max-width: 560px) {
  .cat-block__thumb {
    display: none; /* keep the category header uncramped on small phones */
  }
}

/* On small screens the hero text spans full width, so use a stronger, more
   uniform brand overlay (still lighter than before) to keep every line
   legible over the brightest of the three background photos. */
@media (max-width: 767px) {
  .hero__overlay {
    background:
      linear-gradient(to top, rgba(5, 26, 45, 0.5) 0%, rgba(5, 26, 45, 0) 30%),
      linear-gradient(165deg,
        rgba(11, 79, 138, 0.82) 0%,
        rgba(8, 60, 105, 0.74) 100%);
  }
  .hero__slide {
    object-position: 65% center; /* keep the product line-up in frame on mobile */
  }
}

/* Reduced motion: no crossfade — just show the first image. */
@media (prefers-reduced-motion: reduce) {
  .hero__slide {
    animation: none !important;
  }
  .hero__slide:first-child {
    opacity: 1 !important;
  }
  .hero__slide:not(:first-child) {
    opacity: 0 !important;
  }
}

/* ==========================================================================
   20. BRAND LOGO IMAGE (with graceful text-wordmark fallback)
   The real logo lives at assets/images/kosmaj-komerc-logo.png. Each .brand
   uses an <img> with an inline onerror that reveals the .brand__fallback
   wordmark, so the site never shows a broken image before the file is added.
   ========================================================================== */
.brand__logo {
  height: 44px;
  width: auto;
  object-fit: contain;
}

/* The fallback wordmark reuses .brand__text (display:flex), which would override
   the [hidden] attribute — force it hidden until the logo <img> actually fails. */
.brand__fallback[hidden] {
  display: none !important;
}

/* On the dark footer the orange logo sits inside a white rounded chip */
.brand--chip .brand__logo {
  background: #fff;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

@media (max-width: 560px) {
  .brand__logo { height: 38px; }
}

/* ==========================================================================
   21. PRELOADER
   Full-screen overlay shown while the page loads; fades out on window load
   with a 2.5s hard fallback (see js/main.js). Content lives in the DOM
   underneath, so SEO/crawling is unaffected. Hidden entirely without JS.
   ========================================================================== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f7fa;
  opacity: 1;
  transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}

.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Without JS there is nothing to hide the overlay, so never show it */
.no-js .preloader {
  display: none;
}

.preloader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
}

.preloader__img {
  width: clamp(150px, 40vw, 220px);
  height: auto;
  animation: preloaderPulse 1.4s var(--ease) infinite;
}

.preloader__fallback {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--fs-xl);
  letter-spacing: 0.04em;
  color: var(--color-primary);
  animation: preloaderPulse 1.4s var(--ease) infinite;
}

.preloader__bar {
  position: relative;
  width: 160px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--color-border);
  overflow: hidden;
}

.preloader__bar::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  border-radius: inherit;
  background: var(--color-orange);
  animation: preloaderBar 1.1s var(--ease) infinite;
}

@keyframes preloaderPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.72; transform: scale(0.97); }
}

@keyframes preloaderBar {
  0%   { left: -40%; }
  100% { left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .preloader__img,
  .preloader__fallback,
  .preloader__bar::before {
    animation: none !important;
  }
}

/* ==========================================================================
   22. PRODUCT CARDS — full catalogue (name + subtitle + description + effects)
   ========================================================================== */
.products-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.product-card__name {
  font-size: var(--fs-md);
  margin-bottom: var(--space-1);
}

.product-card__subtitle {
  font-style: italic;
  color: var(--color-steel);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-3);
}

.product-card__desc {
  color: var(--color-steel);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-4);
}

.product-card__effects {
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px dashed var(--color-border);
}

.product-card__effects-title,
.rep__list-title {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-orange-deep);
  margin-bottom: var(--space-3);
}

/* Reusable orange-check list */
.checklist {
  list-style: none;
  display: grid;
  gap: var(--space-2);
}

.checklist li {
  position: relative;
  padding-left: 1.7rem;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--color-ink);
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c2470f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ==========================================================================
   23. CERTIFICATES (kvalitet.html)
   ========================================================================== */
.cert-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.cert-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--color-primary);
  background: #fff;
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-orange);
  border-radius: var(--radius-pill);
  padding: 0.6rem 1.1rem;
  box-shadow: var(--shadow-xs);
}

.cert-badge svg {
  width: 18px;
  height: 18px;
  color: var(--color-orange-deep);
}

/* Placeholder for scanned certificate images/PDFs added later */
.cert-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-align: center;
  min-height: 180px;
  padding: var(--space-6);
  color: var(--color-steel);
  background: var(--color-bg-alt);
  border: 2px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
}

.cert-slot svg {
  width: 40px;
  height: 40px;
  opacity: 0.7;
}

/* ==========================================================================
   24. REPRESENTATIONS (zastupnistva.html)
   ========================================================================== */
.rep + .rep {
  margin-top: var(--space-8);
}

.rep__flag {
  display: inline-block;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--color-orange-deep);
  margin-bottom: var(--space-2);
}

/* Placeholder box for a partner logo added later */
.rep__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 200px;
  padding: var(--space-6);
  background: #fff;
  border: 2px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  color: var(--color-steel);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--fs-xl);
  box-shadow: var(--shadow-xs);
}

.rep .split {
  align-items: center;
}

/* Alternate the logo side on the second block for rhythm */
.rep--reverse .rep__logo {
  order: -1;
}

@media (max-width: 900px) {
  .rep--reverse .rep__logo {
    order: 0;
  }
}

/* ==========================================================================
   25. BRANDED MEDIA PLACEHOLDER (until real product photos arrive)
   Replaces the removed filler photos with a finished-looking brand panel.
   Drop a real <img> back into .media-slot later and it renders normally.
   ========================================================================== */
.media-slot--brand {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, #0e5c9e 0%, #06345c 100%);
}

.media-slot__ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6);
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
}

.media-slot__ph svg {
  width: 72px;
  height: 72px;
  color: rgba(255, 255, 255, 0.26);
}

.media-slot__ph span {
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

/* Single decorative brand panel (zastupništva OUVRIE, etc.) */
.brand-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, #0e5c9e 0%, #06345c 100%);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
}

.brand-panel svg {
  width: 40%;
  max-width: 160px;
  height: auto;
  color: rgba(255, 255, 255, 0.18);
}

/* ==========================================================================
   26. CERTIFICATE DOWNLOAD LINK (kvalitet.html)
   ========================================================================== */
.cert-download {
  margin-top: var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--color-orange-deep);
}

.cert-download svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.cert-download:hover {
  color: var(--color-orange-deep-h);
  text-decoration: underline;
}

/* Stat cell whose "number" is an icon (e.g. Sopstvena proizvodnja) */
.hero-stat__num--icon {
  display: inline-flex;
  align-items: center;
  min-height: var(--fs-xl);
}

.hero-stat__num--icon svg {
  width: 30px;
  height: 30px;
  color: var(--color-orange-light);
}
