/* MARZES d.o.o. - zajednički stilovi */

:root {
  --color01: #0a1725;      /* zaglavlje, hero, podnožje */
  --color02: #12263b;      /* traka s činjenicama, padajući izbornik */
  --color03: #8ea3b8;      /* sekundarni tekst na tamnoj podlozi */
  --color04: #f4f6f8;      /* svijetla siva pozadina sekcija */
  --color05: #ffffff;      /* bijela boja */
  --color06: #14202e;      /* tekst */
  --color07: #168eea;      /* akcent: gumbi, linkovi, naglasci */
  --color08: #0c78ca;      /* akcent pri prelasku miša */
  --color09: #d5d5d5;      /* siva traka na dnu stranice ("Trebate pouzdanog izvođača?") */
  --maxw: 1120px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color06);
  background: var(--color05);
}

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

a { color: inherit; }

:focus-visible { outline: 3px solid var(--color07); outline-offset: 3px; }

.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.narrow { max-width: 46rem; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--color07); color: var(--color01); padding: .6rem 1rem; z-index: 100;
}
.skip:focus { left: 0; }

/* Zaglavlje */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--color01); color: var(--color05);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 4.25rem; gap: 1rem; }

/* Logo i naziv tvrtke */
.brand { font-weight: 800; font-size: 1.35rem; letter-spacing: .02em; text-decoration: none; }
.brand span:not(.brand-text) { font-weight: 400; color: var(--color03); font-size: .9em; }

.site-header .brand { display: flex; align-items: center; gap: .85rem; }
.site-header .brand img { width: 3rem; height: 3rem; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.brand-text { display: block; line-height: 1.15; }
.brand-text strong { display: block; font-size: 1.25rem; font-weight: 800; letter-spacing: .03em; color: var(--color05); }
.brand-text small { display: block; margin-top: .2rem; font-size: .7rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--color03); }

.menu-toggle {
  display: none;
  background: transparent; color: var(--color05);
  border: 1px solid rgba(255,255,255,.35); border-radius: 6px;
  padding: .45rem .9rem; font: inherit; cursor: pointer;
}

.nav { display: flex; align-items: center; gap: 1.5rem; font-size: .98rem; }
.nav a, .sub-toggle { text-decoration: none; color: var(--color05); }
.nav a:hover, .sub-toggle:hover { color: var(--color07); }
.nav a[aria-current="page"] { color: var(--color07); }

.sub-toggle { background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
.sub-toggle::after { content: ""; display: inline-block; width: .45em; height: .45em; margin-left: .45em;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-.15em) rotate(45deg); }

.has-sub { position: relative; }
.sub {
  display: none; position: absolute; top: 100%; left: -1rem; min-width: 14rem;
  background: var(--color02); padding: .6rem 0; border-radius: 6px;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}
.sub a { display: block; padding: .5rem 1.1rem; }
.has-sub.open .sub { display: block; }

.nav .call {
  background: var(--color07); color: var(--color01); font-weight: 700;
  padding: .5rem 1rem; border-radius: 6px;
}
.nav .call:hover { background: var(--color08); color: var(--color01); }

/* Hero */
.hero { background: var(--color01); color: var(--color05); padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem); }
.since { margin: 0 0 1.25rem; color: var(--color07); font-weight: 600; }
.hero h1 {
  margin: 0; max-width: 28ch;
  font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.06; letter-spacing: -.02em; font-weight: 800;
}
.lead { max-width: 38rem; margin: 1.5rem 0 0; font-size: 1.2rem; color: #c9d4df; }

.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 2rem 0 0; }

.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: .85rem 1.4rem; border-radius: 6px; border: 2px solid transparent;
}
.btn-primary { background: var(--color07); color: var(--color01); }
.btn-primary:hover { background: var(--color08); }
.btn-ghost { border-color: rgba(255,255,255,.4); color: var(--color05); }
.btn-ghost:hover { border-color: var(--color05); }
.btn-dark { background: var(--color01); color: var(--color05); }
.btn-dark:hover { background: var(--color02); }
.btn-outline-dark { border-color: var(--color01); color: var(--color01); }
.btn-outline-dark:hover { background: rgba(10,23,37,.08); }

/* Činjenice */
.facts { background: var(--color02); color: var(--color05); }
.facts-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; padding-block: 1.6rem; }
.facts p { margin: 0; color: #c9d4df; }
.facts strong { display: block; font-size: 1.6rem; color: var(--color05); line-height: 1.2; }

/* Sekcije */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section.alt { background: var(--color04); }
.section h2 { margin: 0 0 .8rem; font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.15; letter-spacing: -.01em; }
.section-lead { max-width: 42rem; margin: 0 0 2.5rem; color: #3d4b5b; }
.section-lead .textlink { display: block; width: fit-content; margin-top: .5rem; }
.section-lead, .intro, .lead { text-wrap: pretty; }

.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #d5dce3; border: 1px solid #d5dce3; }
.services li { background: var(--color04); padding: 1.6rem 1.5rem 1.8rem; }
.services h3 { margin: 0 0 .5rem; font-size: 1.2rem; }
.services h3 a { text-decoration: underline; text-decoration-color: var(--color07); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.services h3 a:hover { color: var(--color08); text-decoration-color: currentColor; }
.services p { margin: 0; color: #3d4b5b; }

.audiences { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-bottom: 2rem; }
.audiences h3 { margin: 0 0 .4rem; font-size: 1.15rem; }
.audiences p { margin: 0; color: #3d4b5b; }

.textlink { font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--color07); }

/* Proizvod */
.product { background: var(--color04); }
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.photo-slot {
  min-height: 18rem; display: grid; place-items: center; text-align: center; padding: 1rem;
  border: 2px dashed var(--color03); color: #5b6c7e; background: var(--color05);
}

/* Poziv na akciju */
.cta { background: var(--color09); color: var(--color01); padding: clamp(2.5rem, 6vw, 4rem) 0; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.cta h2 { margin: 0 0 .3rem; font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
.cta p { margin: 0; }
.cta .actions { margin: 0; }

/* Podnožje */
.site-footer { background: var(--color01); color: #c9d4df; padding: 2.5rem 0; }
.foot p { margin: 0 0 .6rem; }
.foot .brand { color: var(--color05); }
.foot a { text-decoration-color: var(--color07); }
.small { font-size: .9rem; color: var(--color03); }

/* Podstranice */
.page-hero { background: var(--color01); color: var(--color05); padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2.2rem, 5vw, 3.5rem); }
.page-hero h1 { margin: 0; font-size: clamp(2rem, 5.5vw, 3.4rem); line-height: 1.08; letter-spacing: -.015em; max-width: 20ch; }
.page-hero .lead { margin-top: 1.1rem; }
.crumbs { margin: 0 0 1rem; font-size: .95rem; color: var(--color03); }
.crumbs a { text-decoration-color: var(--color07); }

.content-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.content-grid h2 { margin-top: 0; }

.checks { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.checks li { position: relative; padding: .55rem 0 .55rem 1.6rem; border-bottom: 1px solid #e1e6eb; }
.checks li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: .8rem; height: .45rem;
  border-left: 3px solid var(--color08); border-bottom: 3px solid var(--color08); transform: rotate(-45deg); }

.side { background: var(--color04); padding: 1.5rem; border-left: 4px solid var(--color07); }
.side h3 { margin: 0 0 .5rem; font-size: 1.2rem; }
.side p { margin: 0 0 1rem; }

/* Veličina telefonskog broja i email adrese na kontakt stranici */
.bigphone, .bigemail { font-size: clamp(1.8rem, 6vw, 2.8rem); font-weight: 800; line-height: 1.3; margin: 0 0 .1rem; overflow-wrap: anywhere; }
.bigphone a, .bigemail a { text-decoration-color: var(--color07); text-underline-offset: 6px; text-decoration-thickness: 3px; }

/* Galerija: male sličice, klik otvara povećani prikaz */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 11rem)); gap: .75rem; justify-content: start; }
.gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; background: var(--color04); cursor: zoom-in; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.gallery a:hover img, .gallery a:focus-visible img { transform: scale(1.05); }

/* Sličice za visoke (portretne) slike, npr. stupić */
.gallery-tall { grid-template-columns: repeat(auto-fill, minmax(5.5rem, 8rem)); }
.gallery-tall a { aspect-ratio: 3 / 4; }

/* Proizvod: jedna velika slika + sličice ispod nje */
.product-media > a { display: block; overflow: hidden; border-radius: 6px; cursor: zoom-in; }
.product-media > a img { width: 100%; }
.product-media .gallery { margin-top: .75rem; }

/* Povećani prikaz slike (lightbox) */
html.lb-open { overflow: hidden; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; color: var(--color05); }
.lightbox::backdrop { background: rgba(5, 12, 20, .93); }
.lightbox-inner { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 3.5rem 1rem 1rem; }
.lightbox-figure { margin: 0; text-align: center; }
.lightbox-figure img { display: block; margin: 0 auto; width: auto; height: auto; max-width: min(92vw, 1400px); max-height: calc(100vh - 9rem); max-height: calc(100dvh - 9rem); border-radius: 4px; }
.lightbox-figure figcaption { margin-top: .75rem; font-size: .95rem; color: var(--color03); }
.lightbox button { position: absolute; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: var(--color05); font-size: 1.7rem; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.28); }
.lightbox-close { top: .75rem; right: .75rem; }
.lightbox-prev { left: .75rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: .75rem; top: 50%; transform: translateY(-50%); }

/* Projekti (reference) */
.project { padding: 1.75rem 0; border-top: 1px solid #d5dce3; }
.project:first-of-type { border-top: 0; padding-top: 0; }
.project-meta { margin: 0 0 .3rem; font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #5b6c7e; }
.project h3 { margin: 0 0 .5rem; font-size: 1.35rem; }
.project p:not(.project-meta) { max-width: 42rem; margin: 0 0 1rem; color: #3d4b5b; }

/* Tipografija sadržaja */
.section h2:not(:first-child) { margin-top: 2.5rem; }
.intro { margin: 0 0 1.25rem; font-size: 1.25rem; font-weight: 600; line-height: 1.45; }

/* Podnaslovi u tekstu. :where() drži specifičnost nultom, pa pravila komponenti
   (.services h3, .audiences h3, .side h3, .project h3) imaju prednost. */
:where(.section) h3 { margin: 2rem 0 .5rem; font-size: clamp(1.2rem, 2.4vw, 1.45rem); line-height: 1.25; }
:where(.section) h4 { margin: 1.5rem 0 .4rem; font-size: 1.05rem; line-height: 1.3; }
:where(.section) :is(h3, h4):first-child { margin-top: 0; }

/* Mobitel */
@media (max-width: 860px) {
  .menu-toggle { display: inline-block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--color01); padding: .5rem 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .nav.open { display: flex; }
  .nav > a, .sub-toggle { padding: .8rem 0; border-bottom: 1px solid rgba(255,255,255,.08); text-align: left; width: 100%; }
  .nav .call { margin-top: .9rem; text-align: center; }
  .sub { position: static; box-shadow: none; background: transparent; padding: 0 0 0 1rem; }
  .facts-row, .services, .audiences, .product-grid, .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .brand-text strong { font-size: 1.05rem; }
  .brand-text small { font-size: .62rem; }
}

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

/* Galerija na mobitelu: sličice u mreži od 3 stupca (manje skrolanja) */
@media (max-width: 600px) {
  .gallery, .gallery-tall { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
}

/* Prijelom teksta u dva jednaka dijela */
h1, h2, h3 { text-wrap: balance; }


/* Podaci o tvrtki */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: .85rem 1rem .85rem 0; border-bottom: 1px solid #e1e6eb; }
.data-table th { width: 12rem; font-weight: 700; color: #3d4b5b; }
.data-table td a { text-decoration-color: var(--color07); text-underline-offset: 3px; }
@media (max-width: 600px) {
  .data-table, .data-table tbody, .data-table tr, .data-table th, .data-table td { display: block; width: 100%; }
  .data-table tr { padding: .8rem 0; border-bottom: 1px solid #e1e6eb; }
  .data-table th, .data-table td { padding: 0; border: 0; }
  .data-table th { font-size: .9rem; margin-bottom: .15rem; }
}
