/* Metalelektro — stil sajta
   Boje su preuzete iz standardnih boja provodnika: braon (faza), plava (nula),
   žuto-zelena (uzemljenje). Žuto-zelena traka je jedini dekorativni element. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-var.woff2") format("woff2-variations"),
       url("/assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 100% 125%;
  font-display: swap;
}

:root {
  --steel: #eceeec;
  --paper: #ffffff;
  --ink: #1c2428;
  --muted: #53606a;
  --line: #cfd4d3;
  --wire-brown: #7b4b2a;
  --wire-blue: #1b5ba1;
  --wire-blue-dark: #134477;
  --wire-black: #262626;
  --wire-grey: #8a9197;
  --earth-yellow: #f2c418;
  --earth-green: #2d8a45;
  --radius-s: 3px;
  --radius-m: 6px;
  --wrap: 1180px;
  --font: "Archivo", "Helvetica Neue", Arial, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--steel);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--wire-blue); text-underline-offset: 3px; }
a:hover { color: var(--wire-blue-dark); }
:focus-visible { outline: 3px solid var(--wire-blue); outline-offset: 2px; }

h1, h2, h3 {
  font-stretch: 125%;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.3rem + 3.2vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem); font-weight: 750; }
h3 { font-size: 1.125rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: 68ch; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Traka uzemljenja */
.earth {
  height: 14px;
  background: repeating-linear-gradient(-45deg, var(--earth-yellow) 0 16px, var(--earth-green) 16px 32px);
}
.earth--thin { height: 6px; }

/* Gornja traka */
.topbar { background: var(--ink); color: #dfe4e6; font-size: .875rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 1rem; padding-block: .45rem; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.topbar a:hover { text-decoration: underline; }
.topbar__hours span + span::before { content: ""; display: inline-block; width: 1px; height: .8em; background: #6b777e; margin: 0 .7rem; vertical-align: -1px; }

/* Zaglavlje */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1; margin-right: auto; }
.brand__name { font-stretch: 125%; font-weight: 800; font-size: 1.45rem; letter-spacing: -.01em; }
.brand__name b { color: var(--wire-brown); font-weight: 800; }
.brand__sub { font-size: .75rem; color: var(--muted); margin-top: .3rem; letter-spacing: .01em; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; }
.nav a { display: block; padding: .55rem .7rem; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; border-radius: var(--radius-s); }
.nav a:hover { background: var(--steel); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--wire-brown); border-radius: 0; }
.nav-toggle { display: none; }

.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font: inherit; font-weight: 700; font-size: 1rem;
  padding: .8rem 1.2rem; border-radius: var(--radius-s);
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  line-height: 1.1; white-space: nowrap;
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn--call { background: var(--wire-blue); color: #fff; }
.btn--call:hover { background: var(--wire-blue-dark); color: #fff; }
.btn--line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--ink); color: #fff; }

/* Početni hero */
.hero { background: var(--paper); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); padding-block: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.hero__lead { font-size: 1.2rem; color: #33403f; max-width: 52ch; }
.hero__actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.75rem; }

/* Deklaracija — panel sa podacima o radnji, kao nalepnica na polici */
.tag {
  background: var(--steel);
  border: 2px solid var(--ink);
  border-radius: var(--radius-m);
  padding: 1.4rem 1.5rem 1.2rem;
  position: relative;
}
.tag::before {
  content: ""; position: absolute; top: 14px; right: 16px;
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--ink); background: var(--paper);
}
.tag__title { font-stretch: 125%; font-weight: 750; font-size: 1.15rem; margin: 0 0 .9rem; }
.tag dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .55rem 1rem; }
.tag dt { color: var(--muted); font-size: .9rem; padding-top: .1rem; }
.tag dd { margin: 0; font-weight: 600; }
.tag dd a { color: var(--ink); text-decoration-color: var(--wire-blue); text-decoration-thickness: 2px; }
.tag__foot { margin-top: 1rem; padding-top: .9rem; border-top: 1px dashed #9aa3a8; font-size: .9rem; color: var(--muted); }
.tag__foot a { font-weight: 600; }

/* Sekcije */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--paper { background: var(--paper); }
.section__head { max-width: 720px; margin-bottom: 2.25rem; }
.section__head p { color: var(--muted); font-size: 1.1rem; }

/* Imenik odeljenja — kao table nad policama u radnji */
.aisles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.aisle { border-bottom: 1px solid var(--line); }
.aisle:nth-child(odd) { border-right: 1px solid var(--line); }
.aisle a { display: grid; grid-template-columns: 10px 1fr; gap: 1.1rem; padding: 1.35rem 1.25rem 1.35rem 0; text-decoration: none; color: var(--ink); height: 100%; }
.aisle:nth-child(even) a { padding-left: 1.25rem; }
.aisle__wire { border-radius: 5px; background: var(--wire, var(--wire-brown)); }
.aisle h3 { font-size: 1.3rem; margin-bottom: .3rem; }
.aisle p { margin: 0; color: var(--muted); font-size: .98rem; }
.aisle__more { display: inline-block; margin-top: .6rem; color: var(--wire-blue); font-weight: 600; font-size: .95rem; text-decoration: underline; text-decoration-thickness: 1px; }
.aisle a:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.aisle a:hover { background: linear-gradient(90deg, transparent, rgba(236,238,236,.7)); }

/* O nama */
.about { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.facts { margin: 0; padding: 0; list-style: none; border-left: 4px solid var(--wire-brown); }
.facts li { padding: .9rem 0 .9rem 1.25rem; border-bottom: 1px solid var(--line); }
.facts li:last-child { border-bottom: 0; }
.facts strong { display: block; font-stretch: 125%; font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.facts span { color: var(--muted); font-size: .95rem; }

/* Kako do nas */
.visit { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem; align-items: stretch; }
.map { border: 2px solid var(--ink); border-radius: var(--radius-m); overflow: hidden; background: #d9ddd9; min-height: 340px; position: relative; }
.map iframe { border: 0; width: 100%; height: 100%; min-height: 340px; display: block; }
.hours { width: 100%; border-collapse: collapse; margin: .5rem 0 1.5rem; }
.hours th, .hours td { text-align: left; padding: .6rem 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.hours td { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.contact-lines { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.contact-lines li { padding: .35rem 0; }
.contact-lines a { font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration-color: var(--wire-blue); text-decoration-thickness: 2px; }
.contact-lines small { display: block; color: var(--muted); font-size: .85rem; }

/* Podstranice */
.crumbs { font-size: .9rem; color: var(--muted); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.crumbs li + li::before { content: "/"; margin-right: .35rem; color: #9aa3a8; }
.crumbs a { color: var(--muted); }
.page-head { background: var(--paper); }
.page-head .wrap { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); padding-block: 1.5rem clamp(2rem, 5vw, 3.5rem); align-items: start; }
.page-head h1 { margin-top: 1rem; }
.page-head__wire { display: block; width: 72px; height: 10px; border-radius: 5px; background: var(--wire, var(--wire-brown)); margin-top: 1.25rem; }

.groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.group { padding: 1.4rem 1.5rem 1.5rem 0; border-bottom: 1px solid var(--line); }
.group h3 { font-size: 1.15rem; }
.group ul { margin: 0; padding: 0; list-style: none; }
.group li { padding: .3rem 0 .3rem 1.1rem; position: relative; }
.group li::before { content: ""; position: absolute; left: 0; top: .85em; width: 8px; height: 3px; border-radius: 2px; background: var(--wire, var(--wire-brown)); }
.brands { margin-top: 1.5rem; color: var(--muted); }
.brands strong { color: var(--ink); }

.prose { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); }
.prose h2 { margin-top: 0; }
.prose h3 { margin-top: 1.6em; }

.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 2px solid var(--ink); }
.faq summary { cursor: pointer; padding: 1rem 2rem 1rem 0; font-weight: 700; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: .8rem; font-size: 1.4rem; line-height: 1; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: #33403f; padding-bottom: .8rem; }

.related { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.related a { display: inline-flex; align-items: center; gap: .6rem; padding: .6rem 1rem .6rem .75rem; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius-s); color: var(--ink); text-decoration: none; font-weight: 600; }
.related a::before { content: ""; width: 6px; height: 1.1em; border-radius: 3px; background: var(--wire, var(--wire-brown)); }
.related a:hover { border-color: var(--ink); }

.cta { background: var(--ink); color: #fff; }
.cta .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding-block: 2.25rem; }
.cta h2 { margin: 0 0 .25rem; font-size: clamp(1.35rem, 1.1rem + 1vw, 1.85rem); }
.cta p { margin: 0; color: #c9d1d4; }
.cta .btn--line { border-color: #fff; color: #fff; }
.cta .btn--line:hover { background: #fff; color: var(--ink); }
.cta__actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* Podnožje */
.site-footer { background: #151b1e; color: #b8c1c5; font-size: .95rem; padding-top: 3rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem; }
.site-footer h2 { font-size: 1rem; color: #fff; margin-bottom: .8rem; }
.site-footer a { color: #fff; text-decoration-color: #5d6a70; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: .2rem 0; }
.site-footer address { font-style: normal; }
.footer-bottom { border-top: 1px solid #2b3438; }
.footer-bottom .wrap { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1rem; font-size: .85rem; grid-template-columns: none; flex-wrap: wrap; }

/* Mobilna traka za poziv */
.callbar { display: none; }

/* 404 */
.notfound { padding-block: clamp(3rem, 10vw, 7rem); }

@media (max-width: 1080px) {
  .nav a { padding: .5rem .5rem; font-size: .9rem; }
  .site-header .btn--call span { display: none; }
}

@media (max-width: 900px) {
  .hero .wrap, .page-head .wrap, .about, .visit, .prose { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .site-footer .wrap > :first-child { grid-column: 1 / -1; }

  .nav-toggle {
    display: inline-flex; align-items: center; gap: .5rem;
    font: inherit; font-weight: 700; background: none; border: 2px solid var(--ink);
    border-radius: var(--radius-s); padding: .5rem .8rem; cursor: pointer; color: var(--ink);
  }
  .nav-toggle svg { width: 1.2em; height: 1.2em; }
  .site-header .btn--call { display: none; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 2px solid var(--ink); }
  .js .nav { display: none; }
  .js .nav.is-open { display: block; }
  .nav ul { flex-direction: column; padding: .5rem 1.25rem 1rem; }
  .nav a { padding: .8rem .25rem; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--wire-brown); padding-left: .9rem; }

  .callbar {
    display: grid; grid-template-columns: 1.4fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    border-top: 2px solid var(--ink); background: var(--paper);
  }
  .callbar a { display: flex; justify-content: center; align-items: center; gap: .5rem; padding: .95rem .5rem; font-weight: 700; text-decoration: none; color: var(--ink); }
  .callbar a:first-child { background: var(--wire-blue); color: #fff; }
  .callbar svg { width: 1.15em; height: 1.15em; }
  body { padding-bottom: 58px; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .topbar .wrap { justify-content: center; text-align: center; }
  .topbar__phone { display: none; }
  .aisles { grid-template-columns: 1fr; }
  .aisle:nth-child(odd) { border-right: 0; }
  .aisle:nth-child(even) a { padding-left: 0; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .brand__name { font-size: 1.25rem; }
  .hero__actions .btn { flex: 1 1 100%; justify-content: center; }
  .map, .map iframe { min-height: 280px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media print {
  .topbar, .site-header, .callbar, .map, .cta, .earth { display: none !important; }
  body { background: #fff; }
}
