/* Ekocentar 97, v4: page CSS on top of the tasteskill kit (/kit/system.css and friends).
   Only what the kit lacks: the long-form inner pages, the waste-code table, the client-logo row.
   Every size, gap, colour and radius is a kit token. */

.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav__logo img { display: block; width: 150px; height: auto; }
.hero__kicker a { color: inherit; }
.hero__kicker a:hover { color: var(--action); }

/* home: client logos, the last element of the permits section */
.clients { margin-top: var(--s-8); display: grid; gap: var(--s-4); }
.clients ul { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s-5); align-items: center; margin: 0; padding: 0; list-style: none; }
.clients img { display: block; max-height: 40px; width: auto; max-width: 100%; filter: grayscale(1); opacity: .75; }
@media (max-width: 1023px) { .clients ul { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 639px) { .clients ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* footer-visit: one nav row between the visit row and the legal row */
.footer__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-5); margin-top: var(--s-7); }
.footer__nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; font-weight: 500; }
.footer__nav a:hover { color: var(--action); }
.footer__nav .nav__logo img { width: 120px; }
.credits summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; }
.credits p { max-width: 62ch; margin: var(--s-3) 0 0; font-size: var(--t-small); }

/* phone: list links are 44px targets; the logo steps down so name, button and menu share one bar */
@media (max-width: 639px) {
  .rows__name a { display: inline-flex; align-items: center; min-height: 44px; }
  .nav__bar .nav__logo img { width: 104px; }
}
@media (max-width: 379px) { .nav:not(.is-open) .nav__actions { display: none; } }

/* inner pages: one long reading section under the hero; not held to one section per screen */
.page-body { height: auto !important; min-height: 0 !important; }
.tabs { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-8); }
.tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-4); border-radius: var(--r-btn); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: var(--t-small); font-weight: 500; }
.tabs a:hover { border-color: var(--ink); }
.tabs a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.prose { max-width: 1060px; }
.page-body.wide .prose { max-width: none; }
.prose > * + * { margin-top: var(--s-5); }
.prose p { max-width: 62ch; font-size: var(--t-body); line-height: 1.65; }
.prose > p:first-child { font-size: var(--t-lead); line-height: 1.5; }
.prose h2 { font-size: var(--t-h2); margin-top: var(--s-9); }
.prose > h2:first-child { margin-top: 0; }
.prose p a { color: var(--action); text-decoration: underline; text-underline-offset: 3px; }

.split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: start; margin-top: var(--s-7); }
.split figure { grid-column: span 5; margin: 0; border-radius: var(--r-lg); overflow: hidden; }
.split-text { grid-column: 7 / span 6; }
.split.flip figure { order: 0; }
.split img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.split-text > * + * { margin-top: var(--s-4); }

.note { display: grid; grid-template-columns: 24px 1fr; gap: var(--s-4); padding: var(--s-5); border-radius: var(--r-md); background: var(--surface); margin-top: var(--s-6); }
.note .i { color: var(--action); margin-top: 2px; }
.note p { font-weight: 500; }
.contact-box { padding: var(--s-6); border-radius: var(--r-lg); background: var(--surface); margin-top: var(--s-7); }
.contact-box p { font-family: var(--font-display); font-size: var(--t-h3); line-height: 1.3; letter-spacing: var(--display-tracking); margin-bottom: var(--s-5); max-width: 32ch; }
.contact-box .btns { display: flex; flex-wrap: wrap; gap: var(--s-3); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); margin: var(--s-6) 0 0; padding: 0; list-style: none; }
.steps li { display: flex; flex-direction: column; gap: var(--s-5); min-height: 200px; padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); }
.steps .num { font-family: var(--font-display); font-size: var(--t-h3); color: var(--action); }
.steps p { font-weight: 500; }
.check { display: grid; gap: 0; margin: var(--s-5) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.check li { display: grid; grid-template-columns: 24px 1fr; gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.check .i { color: var(--action); }
.tags { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gutter); margin: var(--s-5) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.tags li { padding: var(--s-4) 0; border-bottom: 1px solid var(--line); font-size: var(--t-card); font-weight: 500; }
.tags .num { display: none; }

.timeline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-7) var(--gutter); margin: var(--s-7) 0 0; padding: 0; list-style: none; }
.timeline li { padding-top: var(--s-4); border-top: 1px solid var(--ink); }
.timeline .year { display: block; font-family: var(--font-display); font-size: var(--t-stat); line-height: 1; letter-spacing: var(--display-tracking); }
.timeline .what { display: block; margin-top: var(--s-3); color: var(--muted); }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); margin-top: var(--s-9); }
.duo section { padding: var(--s-6); border-radius: var(--r-lg); background: var(--surface); }
.duo h2 { margin: 0 0 var(--s-4); font-size: var(--t-h3); }
.defs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); margin-top: var(--s-5); }
.defs > div { padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); }
.defs dt { font-weight: 500; margin-bottom: var(--s-2); }
.defs dd { margin: 0; }

.docs { margin: var(--s-5) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.docs li { display: grid; grid-template-columns: 24px 1fr auto; gap: var(--s-4); align-items: center; padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.docs li > .i { color: var(--action); }
.docs p { max-width: none; }
.doc-btn { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-4); border-radius: var(--r-btn); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: var(--t-small); font-weight: 500; white-space: nowrap; }
.doc-btn:hover { border-color: var(--ink); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s-3); margin-top: var(--s-5); }
.gallery a { display: block; border-radius: var(--r-md); overflow: hidden; }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* sectors overview (sektori page) */
.cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gutter); }
.cards .card { grid-column: span 2; position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 440px; padding: var(--s-5); border-radius: var(--r-lg); overflow: hidden; color: #fff; text-decoration: none; isolation: isolate; }
.cards .card:nth-child(-n+2) { grid-column: span 3; }
.cards .card img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.cards .card::before { content: ""; position: absolute; inset: 40% 0 0; z-index: -1; background: var(--p-inv-bg); opacity: .82; }
.cards .card strong { font-family: var(--font-display); font-weight: 400; font-size: var(--t-h3); line-height: 1.2; }
.cards .card-text { margin-top: var(--s-2); }
.cards .card-go { display: none; }

/* waste codes */
.codes-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface); }
.search { position: relative; flex: 1 1 280px; display: flex; align-items: center; }
.search .i { position: absolute; left: var(--s-4); color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 48px; padding: 0 var(--s-4) 0 48px; border: 1px solid var(--line); border-radius: var(--r-btn); background: var(--bg); font: 400 16px var(--font-text); color: var(--ink); }
.chips-f { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip { min-height: 44px; padding: 0 var(--s-4); border-radius: var(--r-btn); border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 500 var(--t-small) var(--font-text); cursor: pointer; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.codes-meta { margin: var(--s-4) 0; color: var(--muted); max-width: none; }
.codes-head, .group li { display: grid; grid-template-columns: 120px minmax(0, 1fr) 150px 150px; gap: var(--s-4); align-items: center; }
.codes-head { padding: var(--s-3) var(--s-4); font-size: var(--t-label); font-weight: 500; color: var(--muted); }
.codes-head span:nth-child(n+3) { text-align: center; }
.chapter { border-top: 1px solid var(--line); }
.chapter summary { display: grid; grid-template-columns: 40px 1fr 20px; gap: var(--s-4); align-items: center; min-height: 56px; padding: var(--s-3) var(--s-4); cursor: pointer; font-weight: 500; list-style: none; }
.chapter summary::-webkit-details-marker { display: none; }
.chapter summary .num { color: var(--action); font-variant-numeric: tabular-nums; }
.chapter[open] summary .i { transform: rotate(180deg); }
.group h3 { display: flex; gap: var(--s-4); padding: var(--s-3) var(--s-4); background: var(--surface); font: 500 var(--t-body)/1.4 var(--font-text); letter-spacing: 0; margin: 0; }
.group ul { margin: 0; padding: 0; list-style: none; }
.group li { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); }
.code { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.code.haz { justify-self: start; padding: 2px var(--s-2); border-radius: var(--r-sm); background: #ffd23f; }
.cell { display: grid; place-items: center; }
.yn { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; }
.yn .i { width: 16px; height: 16px; }
.yn.y { background: var(--action); color: var(--p-action-ink); }
.yn.n { border: 1px solid var(--line); color: var(--muted); }
.codes-empty { padding: var(--s-7) 0; color: var(--muted); }

@media (max-width: 1023px) {
  .cards .card, .cards .card:nth-child(-n+2) { grid-column: span 3; }
  .cards .card:last-child { grid-column: span 6; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .split, .duo, .defs, .steps, .tags, .timeline { grid-template-columns: minmax(0, 1fr); }
  .split figure, .split-text { grid-column: 1 / -1; }
  .split img { aspect-ratio: 4 / 3; }
  .cards .card, .cards .card:nth-child(-n+2), .cards .card:last-child { grid-column: span 6; min-height: 320px; }
  .docs li { grid-template-columns: 24px 1fr; }
  .doc-btn { grid-column: 2; justify-self: start; }
  .codes-head { display: none; }
  .group li { grid-template-columns: 1fr 1fr; gap: var(--s-2) var(--s-4); }
  .group li .desc, .group li .code { grid-column: 1 / -1; }
  .cell { grid-template-columns: 28px 1fr; gap: var(--s-2); place-items: center start; font-size: var(--t-label); color: var(--muted); }
  .cell::after { content: attr(data-l); }
}
@media print {
  .nav, .closing, .codes-bar, .tabs, .hero { display: none !important; }
  .page-body { padding: 0 !important; }
}

/* the kit writes its credits toggle in English; on Macedonian pages it reads in Macedonian */
html[lang="mk"] .credits > summary::after { content: "Прикажи"; }
html[lang="mk"] .credits[open] > summary::after { content: "Сокриј"; }
