/* ========================================
   ADISOFT HOMEPAGE STYLES - REFACTORED
   Modern CSS with Nesting & Better Organization
   ======================================== */

/* ========== BASE ========== */
:root {
  /* Surfaces */
  --surface: #fff;
  --surface-muted: #f7f7f9;
  --surface-inverse: #111;

  /* Text */
  --text: #1a202c;
  --text-muted: #718096;
  --text-subtle: #777;
  --text-on-accent: #fff;
  --text-on-dark: #fff;
  --text-on-dark-muted: rgba(255, 255, 255, 0.65);

  /* Borders */
  --border: #e2e8f0;
  --border-subtle: #eee;
  --border-on-dark: rgba(255, 255, 255, 0.1);

  /* Accent */
  --accent: #d20000;
  --accent-hover: #b80000;
  --accent-gradient-end: #764ba2;

  /* Spacing */
  --space-2xs: clamp(0.25rem, 0.2rem + 0.3vw, 0.5rem); /* ~4–8px  */
  --space-xs: clamp(0.5rem, 0.4rem + 0.35vw, 0.75rem); /* ~8–12px */
  --space-sm: clamp(0.75rem, 0.6rem + 0.4vw, 1rem); /* ~12–16px */
  --space-md: clamp(1rem, 0.8rem + 0.6vw, 1.5rem); /* ~16–24px */
  --space-lg: clamp(1.5rem, 1.2rem + 0.8vw, 2rem); /* ~24–32px */
  --space-xl: clamp(2rem, 1.6rem + 1vw, 3rem); /* ~32–48px */
  --space-2xl: clamp(3rem, 2.4rem + 1.2vw, 4rem); /* ~48–64px */
  --space-3xl: clamp(4rem, 3.2rem + 1.6vw, 6rem); /* ~64–96px */

  /* Layout */
  --container-max-width: 1200px;
  --content-max: 900px;
  --navbar-height: 74px;

  /* Typography — fontovi */
  --font-header: 'Barlow', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Typography — type scale (modular, ratio ~1.250) */
  --font-2xs: 0.75rem; /* 12px — caption / uppercase label */
  --font-xs: 0.875rem; /* 14px — helper, fine print, secondary text */
  --font-sm: 1rem; /* 16px — body, input, button, form label */
  --font-md: 1.125rem; /* 18px — subtitle, lead */
  --font-lg: 1.25rem; /* 20px — large body, emphasis */
  --font-xl: 1.5rem; /* 24px — h4, card heading */
  --font-2xl: 1.875rem; /* 30px — h3 */
  --font-3xl: 2.25rem; /* 36px — h2 (section title min) */
  --font-4xl: 3rem; /* 48px — hero h1 max, stat number */

  /* Typography — fluid presets */
  --font-h1: clamp(2rem, 5vw, 3.5rem); /* 32-56px, hero */
  --font-h2: clamp(1.875rem, 4vw, 2.5rem); /* 30-40px, section */
  --font-h2-column: clamp(1.5rem, 3vw, 2rem); /* 24-32px, column heading */
  --font-h3: clamp(1.375rem, 3vw, 1.75rem); /* 22-28px */
  --font-h4: clamp(1.125rem, 2vw, 1.25rem); /* 18-20px */

  /* Typography — uppercase label standard */
  --label-letter-spacing: 0.1em;

  --transition: all 0.3s ease;
}

@media (max-width: 900px) {
  :root {
    --navbar-height: 54px;
  }
}

body {
  background-color: var(--surface-muted);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--font-sm);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  margin: 0 auto;
  max-width: var(--container-max-width);
  padding: 0 2rem;

  &.text {
    max-width: 80ch;

    h2 {
      font-size: var(--font-h2-column);
      margin-block: var(--space-2xl) calc(var(--space-2xl) * 0.75);

      &:first-of-type {
        margin-top: 0;
      }
    }

    p + p,
    p + ul,
    ul + p,
    ul + ul {
      margin-top: var(--space-md);
    }

    p + ul {
      margin-top: calc(var(--space-md) * 0.75);
      padding: 0;
    }

    ul {
      padding-left: 1.5rem;
    }

    .legal-meta {
      color: var(--text-muted);
      font-size: var(--font-xs);
      margin-bottom: var(--space-xl);
    }
  }

  @media (max-width: 900px) {
    padding: 0 5vw;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

/* ========== NAVIGATION ========== */
.navbar {
  background-color: var(--surface);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  font-weight: 400;
  left: 0;
  padding: 1rem 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;

  & .nav-wrapper {
    align-items: center;
    display: flex;
    justify-content: space-between;
  }

  & .logo {
    color: var(--text-on-dark);
    font-size: var(--font-xl);
    font-weight: 700;
    letter-spacing: -0.5px;
    width: 200px;

    @media (max-width: 900px) {
      width: 180px;
    }
  }

  & .nav-menu {
    align-items: center;
    display: flex;
    gap: 2rem;

    @media (max-width: 900px) {
      background: var(--surface-inverse);
      flex-direction: column;
      gap: 1rem;
      left: 0;
      opacity: 0;
      padding: 2rem;
      pointer-events: none;
      position: absolute;
      top: 100%;
      transform: translateY(-100%);
      transition: var(--transition);
      width: 100%;

      &.active {
        opacity: 1;
        pointer-events: all;
        transform: translateY(0);
      }
    }
  }

  #languages {
    display: flex;
    font-size: 0.95em;
    gap: 1rem;
    list-style: none;
    margin-left: clamp(2rem, 4vw, 4rem);
    padding-left: 0;

    a {
      color: var(--text-muted);
    }

    @media (max-width: 900px) {
      margin-left: 0;
      margin-top: 1rem;
      justify-content: center;

      a {
        color: var(--text-on-dark-muted);
      }
    }
  }

  & .nav-link {
    color: var(--text);
    opacity: 0.9;
    transition: var(--transition);

    @media (max-width: 900px) {
      color: var(--text-on-dark);
    }

    &:hover {
      color: var(--accent);
      opacity: 1;
    }

    &.nav-link-cta {
      background-color: var(--accent);
      border-radius: 6px;
      color: var(--text-on-accent);
      opacity: 1;
      padding: 0.5rem 1.25rem;

      &:hover {
        background-color: var(--accent-hover);
        color: var(--text-on-accent);
      }
    }
  }

  & .mobile-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: none;
    flex-direction: column;
    gap: 4px;

    @media (max-width: 900px) {
      display: flex;
    }

    & span {
      background: var(--text);
      border-radius: 2px;
      height: 3px;
      transition: var(--transition);
      width: 25px;
    }
  }
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-header);
  font-weight: 300;
}

h2 {
  font-size: var(--font-h2);
  margin-bottom: var(--space-2xl);
}

h3 {
  font-size: var(--font-h3);
  margin-bottom: var(--space-xl);
}

h4 {
  font-size: var(--font-h4);
  text-transform: uppercase;
}

section {
  padding-block: var(--space-3xl);
}

/* Brand focus ring (overrides reset.css currentColor outline) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary:focus-visible,
.nav-link-cta:focus-visible,
.hero-usluge :focus-visible,
.cta-section :focus-visible {
  outline-color: var(--text-on-accent);
}

/* ========== BUTTONS ========== */
.btn {
  /* Layout */
  display: inline-block;
  padding: 1rem 2rem;

  /* Typography */
  font-size: 1rem;
  font-weight: 600;

  /* Appearance */
  /* 2px transparent border osigurava istu visinu kao .btn-secondary (koji ima 2px solid) */
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);

  @media (max-width: 768px) {
    text-align: center;
    width: 100%;
  }

  &.btn-primary {
    background-color: var(--accent);
    color: var(--text-on-accent);

    &:hover {
      background-color: var(--accent-hover);
    }
  }

  &.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--btn-secondary-border, var(--accent));
    color: var(--btn-secondary-color, var(--accent));

    &:hover {
      background-color: var(--btn-secondary-hover-bg, rgba(0, 0, 0, 0.04));
      border-color: var(--btn-secondary-border-hover, var(--btn-secondary-border, var(--accent-hover)));
      color: var(--btn-secondary-color-hover, var(--btn-secondary-color, var(--accent-hover)));
    }
  }

  &.btn-large {
    font-size: var(--font-md);
    padding: 1.125rem 2.5rem;
  }
}

/* btn-secondary theming po kontekstu */
.hero,
.why-us-section {
  --btn-secondary-border: rgba(255, 255, 255, 0.8);
  --btn-secondary-color: var(--text-on-dark);
  --btn-secondary-hover-bg: rgba(255, 255, 255, 0.1);
  --btn-secondary-border-hover: #fff;
}

.cta-section,
.hero-usluge {
  --btn-secondary-border: #fff;
  --btn-secondary-color: var(--text-on-accent);
  --btn-secondary-hover-bg: rgba(255, 255, 255, 0.15);
}

/* Shared button group */
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ========== SECTION TITLES (Shared) ========== */
.section-title {
  font-size: var(--font-h2);
  margin-inline: auto;
  max-width: var(--content-max);
  text-align: center;
}

.section-subtitle {
  color: var(--text-subtle);
  font-size: var(--font-md);
  margin-bottom: var(--space-2xl);
  margin-inline: auto;
  max-width: var(--content-max);
  text-align: center;
}

/* ========== HERO SECTION ========== */
.hero {
  align-items: center;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.85) 50%, rgba(0, 0, 0, 0.9) 100%);
  display: flex;
  justify-content: center;
  margin-top: var(--navbar-height);
  min-height: calc(100vh - var(--navbar-height));
  position: relative;

  & .hero-content {
    color: var(--text-on-dark);
    margin: 0 auto;
    max-width: var(--content-max);
    position: relative;
    text-align: center;
    z-index: 10;

    p {
      margin-inline: auto;
      max-width: 780px;
    }

    em {
      font-style: normal;
      font-weight: 500;
    }
  }

  & #typing-text {
    font-family: var(--font-header);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    min-height: 2.4em;

    /* Sprječava lomljenje riječi - riječi prelaze u novi red samo na razmacima */
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: none;
    white-space: normal;

    /* Osigurava da se tekst lijepo prelama */
    display: inline-block;
    width: 100%;
    max-width: 100%;

    @media (max-width: 768px) {
      font-size: 1.75rem;
    }

    &::after {
      animation: blink 1s infinite;
      content: '|';
      margin-left: 2px;
    }
  }

  & .hero-subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    font-weight: 300;
    margin-bottom: 2.5rem;
  }

  & .cta-buttons {
    margin-bottom: 3rem;

    @media (max-width: 768px) {
      flex-direction: column;
      gap: 0.75rem;
    }
  }

  & .trust-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;

    @media (max-width: 768px) {
      align-items: center;
      flex-direction: column;
      gap: 1rem;
    }
  }

  & .trust-item {
    align-items: center;
    display: flex;
    gap: 0.5rem;
  }

  & .trust-icon {
    color: var(--accent);
    font-weight: 700;
  }
}

/* Hero entrance animacije — samo kad JS može flipati .active */
.js-enabled .hero #typing-text {
  visibility: hidden;
}

.js-enabled .hero .hero-subtitle,
.js-enabled .hero .cta-buttons,
.js-enabled .hero .trust-indicators {
  opacity: 0;
  transform: translateY(20px);
}

.js-enabled .hero .hero-subtitle {
  transition: all 1.5s ease 0.75s;
}
.js-enabled .hero .cta-buttons {
  transition: all 1.5s ease 1.25s;
}
.js-enabled .hero .trust-indicators {
  transition: all 1.5s ease 1.75s;
}

.js-enabled .hero .hero-subtitle.active,
.js-enabled .hero .cta-buttons.active,
.js-enabled .hero .trust-indicators.active {
  opacity: 1;
  transform: translateY(0);
}

.hero-usluge {
  align-items: center;
  background-color: var(--accent);
  display: flex;
  padding-block: var(--space-3xl);
  margin-top: var(--navbar-height);
  min-height: 60vh;

  .hero-content {
    color: var(--text-on-accent);
    margin: 0 auto;
    max-width: var(--content-max);
    position: relative;
    text-align: center;
    z-index: 10;
  }

  h1 {
    color: var(--text-on-accent);
    display: inline-block;
    font-family: var(--font-header);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 400;
    hyphens: none;
    line-height: 1.2;
    margin-block: 0 3rem;
    max-width: 100%;
    min-height: 2.4em;
    overflow-wrap: break-word;
    text-align: center;
    white-space: normal;
    width: 100%;
    word-wrap: break-word;
  }

  .hero-subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  }
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

/* ========== SECTION VARIANTS ========== */
.section-muted {
  background-color: var(--surface-muted);
}

.problem-content {
  margin: 0 auto;
  max-width: var(--content-max);
  text-align: center;

  & h2 {
    font-size: var(--font-h2);
  }

  & h3 {
    margin-top: 3rem;
  }

  & p {
    font-size: var(--font-md);
    display: inline-block;
    width: min(780px, 100%);

    & + p {
      margin-top: var(--space-md);
    }

    &.normal {
      font-size: 1rem;
      text-align: left;
    }
  }

  & ul {
    font-size: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin-top: var(--space-xl);
    text-align: left;

    @media (max-width: 768px) {
      grid-template-columns: 1fr;

      & li {
        max-width: 480px;
        margin-inline: auto;
        width: 100%;
      }
    }

    li {
      align-items: center;
      border: 1px solid rgba(0, 0, 0, 0.1);
      border-radius: 0.5rem;
      display: flex;
      flex-direction: column;
      gap: 1.5rem;
      justify-content: center;
      text-align: center;
      padding: 2rem;

      span {
        align-items: center;
        color: var(--accent);
        display: flex;
        height: 3rem;
        justify-content: center;
        margin-inline: auto;
        width: 3rem;

        svg {
          aspect-ratio: 1;
          width: 2.5rem;
        }
      }
    }
  }
}

.section-nav {
  display: grid;
  font-family: var(--font-header);
  font-size: var(--font-xl);
  gap: 2rem;
  grid-template-columns: 1fr 1fr;

  @media (max-width: 768px) {
    font-size: var(--font-lg);
    gap: 1rem;
    grid-template-columns: 1fr;
  }

  &.reference {
    grid-template-columns: 1fr 1fr 1fr;

    @media (max-width: 768px) {
      grid-template-columns: 1fr;
    }

    li {
      border: 1px solid var(--border);
      padding: 1rem;
      text-align: center;
    }
  }

  a {
    border: 1px solid var(--border);
    color: var(--text);
    display: block;
    padding: 1rem 2.5rem 1rem 1rem;
    position: relative;
    text-align: center;
    transition: var(--transition);

    @media (max-width: 768px) {
      padding: 1rem;

      &::after {
        display: none;
      }
    }

    &::after {
      content: '→';
      font-family: var(--font-body);
      opacity: 0;
      position: absolute;
      right: 1.25rem;
      top: 50%;
      transform: translate(-6px, -50%);
      transition: var(--transition);
    }

    &:hover {
      border-color: var(--accent);
      color: var(--accent);

      &::after {
        opacity: 1;
        transform: translate(0, -50%);
      }
    }
  }
}

/* ========== LOGO WALL ========== */
.logos-section {
  background: var(--surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding-block: var(--space-2xl);

  & .logos-label {
    color: var(--text-subtle);
    font-size: var(--font-2xs);
    font-weight: 600;
    letter-spacing: var(--label-letter-spacing);
    margin-bottom: 2rem;
    text-align: center;
    text-transform: uppercase;
  }

  & .logos-grid {
    align-items: center;
    display: grid;
    gap: 2.5rem 3rem;
    grid-template-columns: repeat(6, 1fr);

    @media (max-width: 900px) {
      grid-template-columns: repeat(3, 1fr);
    }

    @media (max-width: 480px) {
      grid-template-columns: repeat(2, 1fr);
    }

    & li {
      border: 1px solid var(--border);
      display: flex;
      justify-content: center;
    }

    & img {
      filter: grayscale(100%);
      max-height: 48px;
      max-width: 100%;
      opacity: 0.65;
      transition: var(--transition);
      width: auto;

      &:hover {
        filter: grayscale(0);
        opacity: 1;
      }
    }
  }
}

/* ========== SERVICES SECTION ========== */
.services-section {
  background: var(--surface);

  & + .services-section {
    border-top: 1px solid var(--border-subtle);
  }

  & .services-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
  }

  & .service-card {
    align-items: center;
    background: var(--surface);
    display: flex;
    gap: 8rem;
    opacity: 0;
    transition: var(--transition);

    @media (max-width: 900px) {
      flex-direction: column;
      gap: 2rem;
    }

    & .service-icon {
      align-self: flex-start;
      flex: 0 0 calc(50% - 4rem);
      font-size: 3rem;

      span {
        aspect-ratio: 1;
        border: 1px solid var(--border);
        border-radius: 0.5rem;
        display: block;
        padding: 4rem;
      }
    }

    & .service-body {
      ul {
        padding-left: clamp(1rem, 3vw, 2rem);
      }

      h3.result {
        margin-top: var(--space-xl);
      }
    }

    & > p {
      margin-bottom: 1.5rem;
      color: var(--text-muted);
    }

    & .service-features {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      margin-block: 1.5rem;

      & li {
        padding: 0;
        padding-left: 1.5rem;
        position: relative;
        font-size: var(--font-sm);

        &::before {
          content: '→';
          position: absolute;
          left: 0;
          color: var(--accent);
          font-weight: 700;
        }
      }
    }

    & .service-link {
      color: var(--accent);
      font-weight: 600;
      transition: var(--transition);
      display: inline-block;
      margin-top: 1rem;

      &:hover {
        color: var(--accent-hover);
        transform: translateX(5px);
      }
    }

    &:nth-child(even) {
      flex-direction: row-reverse;

      @media (max-width: 900px) {
        flex-direction: column;
      }
    }
  }
}

/* ========== WHY US SECTION ========== */
.why-us-section {
  background: var(--surface-inverse);
  color: var(--text-on-dark);

  & .why-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-block: 4rem;

    @media (max-width: 900px) {
      grid-template-columns: 1fr;
    }
  }

  & .why-card {
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-on-dark);
    border-radius: 0.5rem;
    transition: var(--transition);

    &:hover {
      background: rgba(255, 255, 255, 0);
      border-color: var(--accent);
      transform: translateY(-5px);
    }

    & h3 {
      font-size: var(--font-xl);
      margin-bottom: 1.5rem;
      color: var(--text-on-dark);
    }

    & p {
      color: rgba(255, 255, 255, 0.8);
    }
  }

  & .text-center {
    text-align: center;
    margin-top: 2rem;
  }
}

/* ========== TESTIMONIALS SECTION ========== */
.testimonials-section {
  background: var(--surface);

  /* Kad testimonijali dolaze odmah iza bijele .about-section (npr. tehnologije na o-nama),
     dodaj suptilan divider — inače dvije bijele sekcije nemaju vizualnu pauzu.
     Na home stranici testimonijali su iza tamne .why-us-section, pa je tamo prijelaz već jasan. */
  .about-section + & {
    border-top: 1px solid var(--border);
  }

  & .testimonials-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr 1fr;
    margin-top: 3rem;

    @media (max-width: 900px) {
      grid-template-columns: 1fr;
    }
  }

  & .testimonial-card {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: var(--space-lg);
    transition: var(--transition);

    @media (max-width: 768px) {
      padding-inline: var(--space-md);
    }

    &:hover {
      border-color: var(--accent);
      transform: translateY(-5px);
    }
  }

  & .testimonial-quote {
    margin: 0 0 1.5rem;

    & p {
      color: var(--text);
      font-size: var(--font-md);
      font-style: italic;
      line-height: 1.6;
    }
  }

  & .testimonial-author {
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-top: 1.25rem;

    & strong {
      color: var(--text);
      font-size: 1rem;
    }

    & span {
      color: var(--text-subtle);
      font-size: var(--font-xs);
    }
  }
}

/* ========== PROCESS SECTION ========== */
.process-section {
  background: var(--surface-muted);

  & .process-timeline {
    counter-reset: step-counter;
    display: flex;
    gap: 2rem;
    flex-direction: column;
    margin: 3rem auto 0;
    max-width: var(--content-max);

    @media (max-width: 768px) {
      gap: 0;
    }
  }

  & .process-step {
    align-items: center;
    counter-increment: step-counter;
    display: flex;
    gap: 3rem;
    opacity: 0;
    position: relative;

    @media (max-width: 768px) {
      align-items: flex-start;

      &:not(:first-child) {
        border-top: 1px solid var(--border-subtle);
        margin-top: 1rem;
        padding-top: 2rem;
      }
    }

    & .step-number {
      align-items: center;
      aspect-ratio: 0.8;
      border-right: 0.25rem solid rgba(0, 0, 0, 0.05);
      color: var(--text-muted);
      display: flex;
      flex: 0 0 30%;
      font-family: var(--font-header);
      font-weight: 200;
      font-size: clamp(2.5rem, 8vw, 4rem);
      justify-content: center;

      @media (max-width: 768px) {
        display: none;
      }
    }

    & .step-content {
      @media (max-width: 768px) {
        & h3 {
          padding-left: 2.25rem;
          position: relative;
        }

        & h3::before {
          content: counter(step-counter) '. ';
          color: var(--accent);
          font-weight: 700;
          left: 0;
          position: absolute;
          top: 0;
        }
      }

      & span.step-result-label {
        font-family: var(--font-header);
        font-size: var(--font-lg);
        display: block;
        margin-block: 1.75rem 0.75rem;
        text-transform: uppercase;
      }

      & p {
        margin-bottom: 1rem;
      }

      & .step-result {
        border-radius: 4px;
        margin-top: 1rem;
      }
    }

    &:hover {
      & .step-number {
        background-color: transparent;
        border-right: 0.25rem solid transparent;
        color: var(--text);
        transition: var(--transition);
      }
    }
  }
}

/* ========== PROJECTS SECTION ========== */
.projects-section {
  background: var(--surface);

  & .projects-grid {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: 1fr 1fr;
    margin: 3rem 0;

    @media (max-width: 768px) {
      grid-template-columns: 1fr;
    }
  }

  & .project-card {
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition);

    &:hover {
      & .project-image img {
        transform: scale(1.05);
      }
    }

    & .project-image {
      aspect-ratio: 1.5;
      overflow: hidden;
      background: var(--surface-muted);

      & img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: var(--transition);
      }
    }

    & .project-content {
      border-top: 1px solid var(--border);
      flex: 1;
      padding: var(--space-lg);

      & h3 {
        font-size: var(--font-xl);
        margin-bottom: 1.5rem;
      }

      & .project-description {
        margin-bottom: 1.25rem;
      }

      & .project-stats {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-bottom: 0;

        & span {
          font-size: var(--font-2xs);
          background: var(--surface-muted);
          padding: 0.4rem 0.875rem;
          border-radius: 1rem;
          font-weight: 500;
        }
      }

      & .project-link {
        color: var(--accent);
        display: none;
        font-weight: 600;
        transition: var(--transition);

        &:hover {
          color: var(--accent-hover);
          transform: translateX(5px);
        }
      }
    }
  }

  & .text-center {
    text-align: center;
    margin-top: 2rem;
  }
}

/* Bijeli card-wrapper koji odvaja counter od .section-muted pozadine.
   Kada je .projects-counter unutar .counter-card, uklanjamo gornji/donji border
   (jer card već daje vizualno omeđenje preko sjene + bg kontrasta). */
.counter-card {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 3rem 2rem;
  margin: 3rem 0;

  @media (max-width: 480px) {
    padding: 2rem 1rem;
  }

  & .counter-title {
    font-size: var(--font-xl);
    text-align: center;
    margin: 0 0 2rem;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
  }

  & .projects-counter {
    margin: 0;
    padding: 0;
    border-top: none;
    border-bottom: none;
  }
}

.projects-counter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin: 4rem 0;
  padding: 3rem 0;
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);

  @media (max-width: 768px) {
    grid-template-columns: repeat(2, 1fr);
  }

  @media (max-width: 480px) {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  & .stat-item {
    text-align: center;

    & .stat-number {
      font-size: 3rem;
      font-weight: 700;
      color: var(--accent);
      margin-bottom: 0.5rem;

      @media (max-width: 480px) {
        font-size: 2.25rem;
      }
    }

    & .stat-label {
      color: var(--text-muted);
      font-size: var(--font-xs);
    }
  }
}

/* ========== CTA SECTION ========== */
.cta-section {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-gradient-end) 100%);
  color: var(--text-on-accent);

  & .cta-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;

    & h2 {
      font-size: var(--font-h2);
    }

    & > p {
      font-size: var(--font-md);
      opacity: 0.95;
    }
  }

  & .cta-buttons {
    margin-block: 2rem;
  }

  & .btn-primary {
    background: var(--surface);
    color: var(--accent);

    &:hover {
      background: var(--surface-muted);
      color: var(--accent-hover);
    }
  }

  & .cta-note {
    font-size: var(--font-xs);
    opacity: 0.9;
    font-style: italic;
  }
}

/* ========== REFERENCES SECTION ========== */

.references-section {
  background-color: var(--surface);

  ul.references-list {
    display: grid;
    font-size: var(--font-sm);
    gap: 2rem;
    grid-template-columns: 1fr 1fr 1fr;

    li {
      border: 1px solid var(--border);
      padding: 1rem;
      text-align: center;
    }

    @media (max-width: 768px) {
      display: block;
      list-style: disc;
      padding-left: 1.5rem;

      li {
        border: none;
        margin-bottom: 0.5rem;
        padding: 0;
        text-align: left;
      }
    }
  }
}

/* ========== FOOTER ========== */
.footer {
  background: var(--surface-inverse);
  color: var(--text-on-dark);
  margin-top: 2px;
  padding: 3rem 0 1.5rem;

  & .footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
    margin-bottom: 3rem;

    @media (max-width: 900px) {
      grid-template-columns: repeat(2, 1fr);
    }

    @media (max-width: 600px) {
      grid-template-columns: 1fr;
    }
  }

  & .footer-col {
    & strong.footer-heading {
      color: var(--text-on-dark);
      display: block;
      font-size: var(--font-xs);
      font-weight: 600;
      letter-spacing: var(--label-letter-spacing);
      margin-bottom: 1.25rem;
      text-transform: uppercase;
    }

    & p {
      color: var(--text-on-dark-muted);
      font-size: var(--font-xs);
      margin-bottom: 0.5rem;
    }

    & .footer-contact {
      margin-top: 1.5rem;
    }
  }

  & .footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: var(--font-xs);

    & a {
      color: var(--text-on-dark-muted);
      text-decoration: underline;
      transition: var(--transition);

      &:hover {
        color: var(--accent);
        text-decoration: none;
      }
    }
  }

  & .footer-bottom {
    border-top: 1px solid var(--border-on-dark);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;

    @media (max-width: 768px) {
      flex-direction: column;
      text-align: center;
    }

    & p {
      color: var(--text-on-dark-muted);
      font-size: var(--font-2xs);
    }
  }

  & .footer-legal {
    display: flex;
    gap: 1.5rem;

    @media (max-width: 768px) {
      flex-direction: column;
      gap: 0.75rem;
    }

    & a {
      color: var(--text-on-dark-muted);
      font-size: var(--font-2xs);
      transition: var(--transition);

      &:hover {
        color: var(--text-on-dark);
      }
    }
  }

  strong {
    color: var(--text-on-dark);
    font-weight: 400;
  }
}

/* ========== UTILITY CLASSES ========== */
.hidden {
  display: none;
}

/* Inicijalno stanje - elementi su nevidljivi */
.fade-element {
  opacity: 0;
  transform: translateY(30px);
}

/* Kada observer doda fade-in klasu, počinje glatka animacija */
.fade-in {
  animation: fadeInSmooth 0.8s ease-out forwards;
}

/* Keyframes za glatku animaciju bez blinka */
@keyframes fadeInSmooth {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== O NAMA — TEXT SEKCIJE ========== */
.about-section {
  background: #fff;
  padding-block: var(--space-2xl);

  &.about-section--alt {
    background: var(--surface-muted);
  }

  & .container.text {
    & ul {
      /* padding-left dolazi iz .container.text > ul baznog pravila */
      margin-top: var(--space-md);

      & li {
        margin-bottom: 0.5rem;
        line-height: 1.6;
      }
    }
  }
}

/* ========== LEGAL — TEXT SEKCIJE ========== */
/* Legal stranice (privatnost, opći uvjeti) preferiraju margin-left umjesto padding-left
   za bullete — bullets sjede izvan tekst-kolone, što se bolje vizualno odvaja od dugih
   paragrafa pravnih odredbi. */
.legal-section .container.text ul {
  padding-left: 0;
  margin-left: 1.5rem;
}

/* Testimonijal meta-naslov unutar blockquote (npr. "Stabilan i skalabilan...") */
.testimonial-quote {
  & .testimonial-meta {
    display: block;
    margin-top: 1rem;
    color: var(--accent);
    font-size: var(--font-2xs);
    font-style: normal;
    font-weight: 500;
    letter-spacing: var(--label-letter-spacing);
    text-transform: uppercase;
  }
}

/* ========== KONTAKT ========== */
.contact-section {
  background: var(--surface-muted);

  & .contact-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 4rem;
    margin-top: 1rem;

    @media (max-width: 900px) {
      grid-template-columns: 1fr;
      gap: 3rem;
    }
  }

  & .contact-form-wrapper {
    background: #fff;
    padding: 2.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);

    @media (max-width: 600px) {
      padding: 1.5rem;
    }

    & > h2 {
      font-size: var(--font-h2-column);
      margin-top: 0;
      margin-bottom: 0.75rem;
    }

    & .contact-form-intro {
      color: var(--text-muted);
      margin-bottom: 2rem;
    }
  }

  & .contact-info {
    padding-top: 2.5rem;

    @media (max-width: 900px) {
      padding-top: 0;
    }

    & h2 {
      font-size: var(--font-h2-column);
      margin-top: 0;
      margin-bottom: 0.75rem;
    }

    & .contact-info-intro {
      color: var(--text-muted);
      margin-bottom: 2rem;
    }
  }

  & .contact-info-block {
    margin-bottom: 1.75rem;

    & h3 {
      color: var(--text-subtle);
      font-size: var(--font-2xs);
      font-weight: 500;
      letter-spacing: var(--label-letter-spacing);
      margin-bottom: 0.5rem;
      text-transform: uppercase;
    }

    & p {
      margin: 0.25rem 0;
      font-size: var(--font-sm);
    }

    & a {
      color: var(--accent);

      &:hover {
        text-decoration: underline;
      }
    }

    & .contact-info-note {
      color: var(--text-subtle);
      font-size: var(--font-xs);
      margin-top: 0.5rem;
    }
  }

  & .working-hours {
    list-style: none;
    padding: 0;
    margin: 0;

    & li {
      display: flex;
      justify-content: space-between;
      padding: 0.5rem 0;
      border-bottom: 1px solid var(--border);
      font-size: var(--font-sm);

      &:last-child {
        border-bottom: none;
      }
    }
  }
}

/* ========== "ŠTO SLIJEDI" PROCESNI BLOK ========== */
.next-steps {
  background: var(--surface-muted);
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;

  & .next-steps-label {
    color: var(--text-subtle);
    font-size: var(--font-2xs);
    font-weight: 500;
    letter-spacing: var(--label-letter-spacing);
    margin: 0 0 0.5rem;
    text-transform: uppercase;
  }

  & .next-steps-list {
    list-style: none;
    margin: 0;
    padding: 0;

    & li {
      align-items: flex-start;
      display: flex;
      gap: 1rem;
      padding: 0.5rem 0;
    }

    & strong {
      color: var(--text);
      display: block;
      font-size: var(--font-sm);
      font-weight: 500;
      margin-bottom: 0.125rem;
    }

    & p {
      color: var(--text-subtle);
      font-size: var(--font-xs);
      margin: 0;
    }
  }

  /* Editorial "big number" style — match s .step-number na home/usluge stranicama */
  & .next-steps-number {
    color: var(--text-muted);
    flex-shrink: 0;
    font-family: var(--font-header);
    font-size: var(--font-xl);
    font-weight: 200;
    line-height: 1;
    min-width: 1.5rem;
  }
}

/* Primary kontakt blok — zadržan modifier za eventualnu kasniju emfaza, trenutno bez font override-a */
.contact-info-block--primary {
  & a {
    font-weight: 500;
  }
}

/* ========== FORMA ========== */
.contact-form {
  /* Honeypot — sakriven od ljudi i screen readera, ali botovi popunjavaju */
  & .hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }

  & .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;

    @media (max-width: 600px) {
      grid-template-columns: 1fr;
      gap: 0;
    }
  }

  & .form-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.25rem;

    & label {
      font-size: var(--font-xs);
      font-weight: 500;
      margin-bottom: 0.5rem;
    }

    & input,
    & textarea,
    & select {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 0.375rem;
      color: var(--text);
      font-family: inherit;
      font-size: var(--font-sm);
      padding: 0.75rem 1rem;
      transition: var(--transition);

      &:hover {
        border-color: var(--text-muted);
      }

      &:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(210, 0, 0, 0.1);
        outline: none;
      }
    }

    & textarea {
      resize: vertical;
      min-height: 120px;
    }
  }

  & .form-field-checkbox {
    align-items: center;
    flex-direction: row;
    gap: 0.75rem;
    margin-bottom: 1.75rem;

    & input[type='checkbox'] {
      cursor: pointer;
      flex-shrink: 0;
      height: 18px;
      width: 18px;
    }

    & label {
      font-size: var(--font-xs);
      font-weight: 400;
      line-height: 1.5;
      margin-bottom: 0;
    }
  }

  & .optional {
    color: var(--text-subtle);
    font-size: var(--font-xs);
    font-weight: 400;
  }
}

/* ========== KONTAKT FORMA — STATUS PORUKE ========== */
/* Prikazuje se nakon submit-a iz JS-a (success/error/empty). Korisnik vidi feedback
   bez page reload-a. role="status" + aria-live="polite" za screen readere. */
.contact-form-status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: var(--font-sm);
  line-height: 1.5;
}
.contact-form-status:empty {
  display: none;
}
.contact-form-status.success {
  background: #e6f9f0;
  color: #04722f;
  border: 1px solid #b6ecca;
}
.contact-form-status.error {
  background: #fdecec;
  color: #a01515;
  border: 1px solid #f4c4c4;
}

/* ========== FAQ (kontakt stranica) ========== */
.faq-section {
  background: var(--surface);

  & .faq-list {
    max-width: 80ch;
    margin: var(--space-xl) auto 0;
    list-style: none;
    padding: 0;
  }

  & .faq-item {
    border-bottom: 1px solid var(--border);

    &:last-child {
      border-bottom: none;
    }

    & details {
      padding: 1.25rem 0;
    }

    & summary {
      cursor: pointer;
      font-weight: 500;
      font-size: var(--font-md);
      list-style: none;
      position: relative;
      padding-right: 2.5rem;
      color: var(--text);

      &::-webkit-details-marker {
        display: none;
      }

      /* +/- indikator s desne strane */
      &::after {
        content: '+';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.5rem;
        line-height: 1;
        color: var(--text-muted);
        transition: transform 0.2s ease;
      }

      &:hover {
        color: var(--accent);
      }
    }

    & details[open] summary::after {
      content: '−';
    }

    & details p {
      margin-top: 0.75rem;
      color: var(--text-muted);
      line-height: 1.7;
    }
  }
}

/* ========== COOKIE CONSENT BANNER ========== */
/* Fiksiran na dnu ekrana, ne blokira sadržaj. JS upravlja vidljivošću preko hidden atributa
   na temelju localStorage stanja (cookie_consent: 'accepted' | 'rejected' | null). */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  padding: 1.25rem;
  z-index: 2000;

  &[hidden] {
    display: none;
  }

  & .cookie-banner-content {
    max-width: var(--container-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;

    @media (max-width: 768px) {
      flex-direction: column;
      align-items: stretch;
      gap: 1rem;
    }
  }

  & .cookie-banner-text {
    flex: 1;
    margin: 0;
    font-size: var(--font-xs);
    line-height: 1.5;

    & a {
      color: var(--accent);
      text-decoration: underline;
    }
  }

  & .cookie-banner-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;

    & .btn {
      padding: 0.6rem 1.25rem;
      font-size: var(--font-sm);
    }

    @media (max-width: 600px) {
      flex-direction: column;
    }
  }
}

/* Footer link za ponovno otvaranje banner-a — JS gleda click event */
#cookie-settings-trigger {
  cursor: pointer;
}

/* ========== PRINT STYLES ========== */
@media print {
  .navbar,
  .cta-section,
  .footer,
  .cookie-banner {
    display: none;
  }
}
