:root {
  --bg: #ffffff;
  --surface: #fafafa;
  --surface-2: #f4f4f5;
  --text: #09090b;
  --text-muted: #3f3f46;
  --text-primary: #18181b;
  --primary: #E50914;
  --primary-hover: #f0111d;
  --border: rgba(0, 0, 0, 0.15);
  --border-hover: var(--primary);
  --radius: 6px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

::selection {
  background: var(--primary);
  color: #fff;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg);
  /* Structural subtle grid background */
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  background-attachment: fixed;
}

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

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(1440px, calc(100% - 2.5rem));
  margin: 0 auto;
}

/* anchor sekcije ne smiju zavrsiti ispod sticky headera */
section[id] {
  scroll-margin-top: 120px;
}

/* Typography Hierarchy */
h1, h2, h3, h4 {
  color: var(--text);
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.04em;
  margin-top: 0;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  line-height: 1.05;
}

h2 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  line-height: 1.2;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

p {
  line-height: 1.6;
  color: var(--text-primary);
}

.text-center {
  text-align: center;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* logo u headeru — dovoljno velik da je čitljiv, kompaktan za ne zauzima previše trake */
.brand-logo {
  width: 84px;
  height: auto;
  display: block;
}


.site-nav {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav a:active {
  color: var(--text);
  border-color: var(--primary);
}

/* na dodir (mobitel): bljesak pri tapu je crven, ne sivi default */
a,
button {
  -webkit-tap-highlight-color: rgba(229, 9, 20, 0.15);
}

/* Dropdown pod "Usluge" */
.has-dropdown {
  position: relative;
  display: inline-flex;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 60;
  min-width: 230px;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-nav .dropdown a {
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  border: none;
  white-space: nowrap;
}

.site-nav .dropdown a:hover,
.site-nav .dropdown a:focus {
  background: var(--surface-2);
  color: var(--text);
}

.header-phone {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.header-phone:hover {
  color: var(--primary-hover);
}

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.25rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
}

/* Hero Sections */
.hero-section,
.service-hero {
  display: flex;
  align-items: center;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

/* PCB pozadina (generirana: _source/generate-circuit.ps1), izblijedjela u sredini */
.hero-section {
  min-height: 60vh;
  background-image: url('../img/circuit-bg.svg?v=4');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* prvi ekran: hero + traka brendova stanu u viewport, kartice ispod folda */
  min-height: calc(100vh - 237px);
  min-height: calc(100svh - 237px);
}

/* Podstranice: kompaktna traka u brand crvenoj, bijeli tekst (izbor korisnika) */
.service-hero {
  padding: 4rem 0 4.5rem;
  background: linear-gradient(120deg, #c40712 0%, var(--primary) 55%, #f0111d 100%);
}

.service-hero .eyebrow {
  color: rgba(255, 255, 255, 0.9);
}

.service-hero h1 {
  color: #fff;
  max-width: 24ch;
}

.service-hero p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
}

.service-hero ::selection {
  background: #fff;
  color: var(--primary);
}

/* Hero content frame */
.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 4rem;
}

.eyebrow,
.section-label {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Actions & Buttons */
.hero-actions,
.action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.button.primary {
  background: var(--primary);
  color: #fff;
}

.button.primary:hover {
  background: var(--primary-hover);
}

.button.secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}

.button.secondary:hover {
  border-color: var(--text);
  background: rgba(0, 0, 0, 0.03);
}

.button.secondary:active {
  border-color: var(--primary);
  color: var(--primary);
}

/* Sections & Grids */
.section {
  padding: 6rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.section-header {
  max-width: 640px;
  margin-bottom: 3rem;
}

/* Čitljiva duljina retka (mjera) — do ~78 znakova */
.section-header p,
.hero-content p,
.about-panel p {
  max-width: 74ch;
}

.cards-grid,
.service-grid {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.split-grid {
  display: grid;
  gap: 4rem;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

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

/* Cards */
.card,
.service-card,
.about-panel {
  position: relative;
  padding: 2rem;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--border);
  transition: border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.service-card {
  text-decoration: none;
  color: inherit;
}

.service-card:hover,
.card:hover {
  border-color: var(--border-hover);
}

.service-card h3 {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.service-card p {
  margin: 0;
  font-size: 0.875rem;
}

/* Global Spacing for Stacked Cards */
.card,
.service-card,
.about-panel {
  margin-bottom: 15px;
}

.cards-grid .card,
.cards-grid .service-card,
.service-grid .service-card,
.split-grid .about-panel {
  margin-bottom: 0;
}

.cards-grid,
.service-grid,
.split-grid {
  margin-bottom: 15px;
}

/* Crisp Red Accent Line on Service Cards */
.service-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 1.5rem;
  width: 2rem;
  height: 1px;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.service-card:hover::before {
  opacity: 1;
}

.accent-card {
  background: var(--surface);
}

/* Stats / trust bar */
.stats-grid {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.stat {
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat-number {
  display: block;
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--primary);
  line-height: 1.1;
}

.stat-label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Ritam sekcija: naizmjenično bijela / nijansirana pozadina */
.section.alt {
  background: var(--surface);
}

/* CTA section (reused at bottom of pages) — tamna završna zona stranice */
.cta-section {
  background: #101014;
  border-top: none;
}

.cta-section h2 {
  color: #fff;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.85);
}

.cta-section .container {
  max-width: 720px;
}

.cta-section h2 {
  margin-bottom: 0.75rem;
}

.cta-section .action-group {
  justify-content: center;
}

/* Usluge: lijeva sticky navigacija kategorija (scrollspy) + sadržaj desno */
.usluge-layout {
  display: grid;
  gap: 4rem;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: start;
}

.cat-nav {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  border-left: 2px solid var(--border);
}

.cat-nav-title {
  margin: 0 0 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.cat-nav a {
  padding: 0.5rem 1rem;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.cat-nav a:hover {
  color: var(--text);
}

.cat-nav a.active {
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

.cat-section {
  padding-bottom: 4rem;
}

.cat-section + .cat-section {
  border-top: 1px solid var(--border);
  padding-top: 4rem;
}

.cat-section:last-child {
  padding-bottom: 0;
}

.cat-section .section-header {
  max-width: none;
  margin-bottom: 2rem;
}

/* naslov kategorije s tankom linijom do desnog ruba */
.cat-section .section-header h2 {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}

.cat-section .section-header h2::after {
  content: "";
  flex: 1 1 auto;
  min-width: 2rem;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--border) 30%, var(--border));
}

.cat-section .section-header p {
  max-width: 74ch;
  color: var(--text-muted);
  margin-bottom: 0;
}

.cat-section .service-card {
  background: var(--surface);
}

/* prazni eyebrow ne smije ostavljati prazninu iznad naslova */
.cat-section .eyebrow:empty {
  display: none;
}

@media (max-width: 980px) {
  .usluge-layout {
    display: block;
  }

  .cat-nav {
    display: none;
  }
}

/* Fotografija zgrade u sekciji "Gdje smo" (izrezana: bez neba i dalekovoda) */
.lokacija-photo {
  width: 100%;
  height: 230px;
  object-fit: cover;
  object-position: 38% 72%;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

/* Pravne stranice */
.legal-content {
  max-width: 820px;
}

.legal-content .card p,
.legal-content .card li {
  max-width: 74ch;
}

.legal-content .card h2 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.legal-content .card h3 {
  font-size: 1.05rem;
  margin: 1rem 0 0.25rem;
}

.legal-content .card p:last-child {
  margin-bottom: 0;
}

/* Napomena uz formu */
.form-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Karta lokacije (O nama) */
.map-grid {
  display: grid;
  gap: 15px;
  grid-template-columns: 2fr 1fr;
  align-items: stretch;
}

.map-embed {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.map-embed {
  min-height: 400px;
  background: var(--surface);
}

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

/* Fallback link (vidljiv samo bez JavaScripta; JS ubacuje gumb ili iframe) */
.map-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 400px;
  color: var(--primary);
  font-weight: 500;
}

/* Privola za kartu: prvi put klik (GDPR), izbor se pamti pa se ubuduće učitava sama */
.map-load {
  width: 100%;
  height: 100%;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: center;
}

.map-load strong {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.2s ease;
}

.map-load:hover strong {
  background: var(--primary-hover);
}

.map-load span {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 340px;
}

/* Traka privole za kolačiće (Google karta) */
.cookie-bar {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 80;
  max-width: 430px;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
}

.cookie-bar p {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

.cookie-bar-actions {
  display: flex;
  gap: 0.75rem;
}

.cookie-bar-actions .button {
  padding: 0.5rem 1.25rem;
}

@media (max-width: 720px) {
  .cookie-bar {
    left: 0.75rem;
    right: 0.75rem;
    max-width: none;
    bottom: 4rem; /* iznad fiksne "Pošaljite upit" trake */
  }
}

.map-grid .about-panel {
  margin-bottom: 0;
}

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

/* Photo gallery (O nama) */
.photo-grid {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.photo-grid figure {
  margin: 0;
}

.photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.photo-grid figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
  background: var(--surface);
}

/* Lists */
.feature-list {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
}

.feature-list li {
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.95rem;
}

.feature-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 600;
}

/* Forms */
.contact-grid {
  display: grid;
  gap: 4rem;
  grid-template-columns: 1fr 1fr;
}

.contact-form {
  display: grid;
  gap: 1.5rem;
  align-content: start;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.contact-form input,
.contact-form textarea {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* Honeypot: hidden from humans, visible to bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  display: none;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  border: 1px solid var(--border);
}

.form-status.visible {
  display: block;
}

.form-status.success {
  border-color: #16a34a;
  color: #166534;
  background: #f0fdf4;
}

.form-status.error {
  border-color: var(--primary);
  color: #991b1b;
  background: #fef2f2;
}

.contact-details p {
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

/* Kontakt: desni stupac kao istaknuti panel s crvenim rubom */
.contact-details {
  align-self: start;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius);
}

.contact-details h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.contact-details h3 {
  margin-top: 2rem;
}

/* Clients / Partners grid */
.clients-section {
  background: #fff;
  padding: 5rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.clients-header {
  text-align: center;
  margin-bottom: 3rem;
}

.clients-header .eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.clients-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.clients-header p {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}

.client-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.25rem 1.5rem;
  min-height: 96px;
  overflow: hidden;
}

.client-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.6);
  text-align: center;
  line-height: 1.45;
  letter-spacing: 0.01em;
  transition: color 0.25s ease;
}

@media (hover: hover) {
  .client-cell:hover .client-name { color: rgba(0, 0, 0, 0.8); }
}
.client-cell.tapped .client-name { color: rgba(0, 0, 0, 0.8); }

.client-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.client-img {
  max-height: 48px;
  max-width: 220px;
  width: auto;
  height: auto;
  opacity: 0.75;
  filter: grayscale(1);
  transition: opacity 0.25s ease, filter 0.25s ease;
  display: block;
  margin: 0 auto;
}

@media (hover: hover) {
  .client-cell:hover .client-img { opacity: 1; filter: none; }
}
.client-cell.tapped .client-img { opacity: 1; filter: none; }

/* IMC: 512×512 clean emblem — zoom in to fill cell */
.client-cell img[alt="International Medical Corps"] {
  transform: scale(1.95);
  max-height: 52px;
}

/* Luka Ploče: delicate thin design — zoom */
.client-cell img[alt="Luka Ploče"] {
  transform: scale(1.5);
  max-height: 44px;
}

/* RaST: logo small within composition image */
.client-cell img[alt="Razvojna agencija Split"] {
  transform: scale(1.75);
  max-height: 50px;
}

/* Vatrogasna zajednica: emblem — enlarge */
.client-cell img[alt="Vatrogasna zajednica Grada Splita"] {
  max-height: 66px;
  transform: scale(1.3);
}

/* Žnjan: round emblem */
.client-cell img[alt="Žnjan d.o.o."] {
  max-height: 60px;
}

/* Forte Solar: official SVG mark, recolored dark for the white bg */
.client-cell img[alt="Forte Solar"] {
  max-height: 60px;
  transform: scale(1.1);
}

/* Hotel President: delicate crest + wordmark — enlarge */
.client-cell img[alt="Hotel President"] {
  max-height: 68px;
  transform: scale(1.35);
}

/* Županijska liga: scale up the small badge */
.client-cell img[alt="Županijska liga protiv raka"] {
  max-height: 68px;
  transform: scale(1.6);
}

/* Maslina Resort: source is a WHITE wordmark on transparent —
   force it dark so it shows on the white page (grayscale can't darken white). */
.client-cell img[alt="Maslina Resort"] {
  filter: brightness(0);
  opacity: 0.7;
  transform: scale(1.5);
  max-height: 40px;
}
@media (hover: hover) {
  .client-cell:hover img[alt="Maslina Resort"] { filter: brightness(0); opacity: 1; }
}
.client-cell.tapped img[alt="Maslina Resort"] { filter: brightness(0); opacity: 1; }

@media (max-width: 900px) {
  .clients-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .client-img { max-width: 100%; }
}

@media (max-width: 560px) {
  .clients-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .client-cell {
    padding: 1.25rem 0.6rem;
    min-height: 76px;
  }
  /* Logotipi moraju stati unutar uže mobilne ćelije: ograniči širinu na ćeliju
     i ublaži agresivne desktop zoom-ove (inače ih overflow:hidden reže). */
  .client-img {
    max-width: 100%;
    max-height: 38px;
  }
  .client-cell img[alt="International Medical Corps"] { transform: scale(1.45); max-height: 40px; }
  .client-cell img[alt="Luka Ploče"] { transform: scale(1.2); max-height: 36px; }
  .client-cell img[alt="Razvojna agencija Split"] { transform: scale(1.3); max-height: 40px; }
  .client-cell img[alt="Vatrogasna zajednica Grada Splita"] { transform: scale(1.1); max-height: 48px; }
  .client-cell img[alt="Hotel President"] { transform: scale(1.15); max-height: 48px; }
  .client-cell img[alt="Županijska liga protiv raka"] { transform: scale(1.2); max-height: 48px; }
  .client-cell img[alt="Maslina Resort"] { transform: scale(1.25); max-height: 34px; }
  .client-cell img[alt="Žnjan d.o.o."] { max-height: 46px; }
  .client-cell img[alt="Forte Solar"] { transform: none; max-height: 44px; }
}

/* Footer — dio tamne završne zone */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #101014;
}


.footer-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.75rem 0 1.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.62);
}

.footer-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-col strong {
  display: block;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.footer-col p,
.footer-col a {
  display: block;
  margin: 0.2rem 0;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.85rem;
  line-height: 1.7;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.68);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

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

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


}

/* Mobile sticky call bar */
.mobile-call-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: var(--primary);
  text-align: center;
}

.mobile-call-bar a {
  display: block;
  padding: 0.85rem 1rem;
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

/* ===== Visual upgrade pass (v2) ===== */

/* Header: shadow appears on scroll */
.site-header {
  transition: box-shadow 0.25s ease;
}

.site-header.scrolled {
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.07);
}

/* Hero entrance animation (on load, not on scroll) */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.reveal-load {
  animation: riseIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.reveal-load.delay-1 { animation-delay: 0.1s; }
.reveal-load.delay-2 { animation-delay: 0.22s; }
.reveal-load.delay-3 { animation-delay: 0.34s; }

/* Hero H1 accent: red underline draws in */
.accent-mark {
  position: relative;
  display: inline-block;
}

.accent-mark::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.02em;
  width: 100%;
  height: 0.07em;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  animation: underlineIn 0.6s 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes underlineIn {
  to { transform: scaleX(1); }
}

/* Partner marquee strip (brand logos) */
.partner-strip-header {
  position: absolute;
  bottom: 1rem;
  left: 0;
  right: 0;
  text-align: center;
}

.partner-strip-label {
  display: inline-block;
  background: #fff;
  color: var(--text);
  border: 1.5px solid var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0.4rem 1.2rem;
  border-radius: var(--radius);
}

.partner-strip {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
  background: var(--surface);
}

.marquee-track {
  display: flex;
  gap: 4.5rem;
  width: max-content;
  animation: marqueeScroll 40s linear infinite;
}

.marquee-group {
  display: flex;
  gap: 4.5rem;
  align-items: center;
}

.marquee-group img {
  height: 52px;
  width: auto;
  opacity: 0.9;
}

/* Wordmark logos: their text fills only ~20% of the 24x24 viewBox,
   so they need more height to read as the same visual weight as icon logos */
.marquee-group img[src*="samsung"],
.marquee-group img[src*="sony"],
.marquee-group img[src*="lenovo"],
.marquee-group img[src*="cisco"],
.marquee-group img[src*="synology"],
.marquee-group img[src*="lg"] {
  height: 80px;
}

.marquee-group span {
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  opacity: 0.9;
  white-space: nowrap;
}

/* -50% minus half the inter-group gap keeps the loop seamless
   (track holds 4 identical groups, so one cycle = exactly 2 groups) */
@keyframes marqueeScroll {
  to { transform: translateX(calc(-50% - 2.25rem)); }
}

/* Hero particle canvas (antigravity engine) */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Header CTA button (top right) */
.header-cta {
  padding: 0.5rem 1.1rem;
}

/* Veliki zavrsni CTA */
.button.large {
  padding: 1.05rem 2.75rem;
  font-size: 1.1rem;
  font-weight: 600;
}

/* Card hover: lift + soft shadow */
.card,
.service-card {
  transition: border-color 0.2s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover,
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* Primary button: arrow slides on hover */
.button.primary::after {
  content: "→";
  margin-left: 0.5rem;
  transition: transform 0.2s ease;
}

.button.primary:hover::after {
  transform: translateX(3px);
}

/* Process steps */
.steps-grid {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.step {
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color 0.2s ease;
}

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

.step h3 {
  margin-bottom: 0.5rem;
}

.step p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Keyboard focus */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Skip link: hidden until keyboard focus */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  * {
    animation: none !important;
  }
}

/* Responsive */
@media (max-width: 860px) {
  .split-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-content {
    padding: 2rem 1.5rem;
  }

  /* fixed attachment tjera repaint na svaki scroll na mobitelu */
  body {
    background-attachment: scroll;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 0.35rem 0;
  }

  .brand-logo {
    width: 58px;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .header-phone,
  .header-cta {
    display: none;
  }

  .site-nav {
    width: 100%;
    flex-direction: column;
    gap: 1rem;
    display: none;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
  }

  .site-nav.open {
    display: flex;
  }

  /* dropdown na mobitelu nije potreban — "Usluge" vodi na pregled */
  .site-nav .dropdown {
    display: none;
  }

  .has-dropdown {
    display: contents;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column; /* tri crtice jedna ispod druge, ne u redu */
  }

  /* traka brendova vidljiva iznad "Pošaljite upit" trake na prvom ekranu */
  .hero-section {
    padding: 3rem 0;
    min-height: calc(100vh - 250px);
    min-height: calc(100svh - 250px);
  }

  .partner-strip {
    padding: 1.25rem 0;
  }

  .marquee-group img {
    height: 44px;
  }

  .marquee-group img[src*="samsung"],
  .marquee-group img[src*="sony"],
  .marquee-group img[src*="lenovo"],
  .marquee-group img[src*="cisco"],
  .marquee-group img[src*="synology"],
  .marquee-group img[src*="lg"] {
    height: 62px;
  }

  .marquee-group span {
    font-size: 1.4rem;
  }

  .mobile-call-bar {
    display: block;
  }

  /* Room for the sticky call bar */
  body {
    padding-bottom: 3.25rem;
  }
}
