/* Šablon "zanat" (IT Coban). Boje dolaze iz podataka: --primary, --accent. */
:root { --fg: #1d2420; --muted: #5d6862; --bg: #fff; --alt: #f4f6f3; --line: #e2e7e1; --radius: 14px; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--fg); background: var(--bg); font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }
.section { padding: 64px 0; }
.section.alt { background: var(--alt); }

/* zaglavlje */
.top { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 20px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); min-width: 0; }
.brand img { width: auto; height: 42px; max-width: 140px; object-fit: contain; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand strong { font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* dugmad */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  font-weight: 650; text-decoration: none; border: 2px solid transparent; cursor: pointer; font: inherit; font-weight: 650; transition: transform .1s, filter .15s; }
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #1d1606; }
.btn-light { background: rgba(255, 255, 255, .15); color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn-call { background: var(--primary); color: #fff; padding: 9px 16px; }
.show-s { display: none; }

/* naslovna */
.hero { position: relative; color: #fff; padding: clamp(80px, 14vw, 150px) 0 clamp(70px, 10vw, 120px);
  background: linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, .55)), var(--hero, linear-gradient(135deg, var(--primary), #111)) center / cover no-repeat; }
.hero h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); max-width: 18ch; text-shadow: 0 2px 16px rgba(0, 0, 0, .35); }
.hero p { font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 48ch; opacity: .95; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* usluge */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 26px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; border-top: 4px solid var(--primary); }
.card h3 { font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }

/* projekti */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 26px; }
.project { margin: 0; }
.project-cover { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; background: #ddd; }
.project-cover img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .3s; }
.project-cover:hover img { transform: scale(1.04); }
.count { position: absolute; right: 10px; bottom: 10px; background: rgba(0, 0, 0, .65); color: #fff; font-size: .8rem; padding: 3px 10px; border-radius: 999px; }
.project figcaption { padding: 8px 2px; color: var(--muted); }
.project figcaption strong { color: var(--fg); }

/* područje rada */
.chips { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 14px; border-radius: 999px; background: var(--alt); border: 1px solid var(--line); }

/* recenzije */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 26px; }
.review { margin: 0; background: #fff; border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); }
.review p { margin: 6px 0 10px; }
.review footer { color: var(--muted); font-size: .92rem; }
.stars { color: var(--accent); letter-spacing: 2px; }

/* forma */
.inquiry { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; background: #fff; padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); }
.inquiry label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .95rem; }
.inquiry input, .inquiry textarea { font: inherit; font-weight: 400; padding: 11px 13px; border: 1px solid #cdd5cc; border-radius: 10px; background: #fff; color: var(--fg); }
.inquiry input:focus, .inquiry textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.inquiry .check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; }
.inquiry .check input { margin-top: 5px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.hint { margin: 0; color: var(--muted); font-size: .9rem; }
.form-msg { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--alt); }
.form-msg.ok { background: #e5f4e8; color: #1d5a2a; }
.form-msg.err { background: #fbe7e7; color: #8a1f1f; }

/* pravne stranice */
.legal h1 { margin-bottom: .8em; }
.legal h2 { font-size: 1.2rem; margin-top: 1.6em; }
.todo { padding: 12px 14px; background: #fff4d6; border-radius: 10px; }

/* podnožje */
.foot { background: #151b17; color: #c9d1cb; padding: 40px 0 24px; font-size: .95rem; }
.foot a { color: #fff; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.foot-legal { margin-top: 26px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .12); color: #8f9a93; }

/* WhatsApp */
.wa { position: fixed; right: 18px; bottom: 18px; z-index: 20; background: #25d366; color: #fff; font-weight: 700; text-decoration: none;
  padding: 12px 18px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }

/* galerija preko cijelog ekrana */
.lightbox { border: 0; padding: 0; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; background: rgba(10, 12, 11, .95); color: #fff; }
.lightbox::backdrop { background: rgba(0, 0, 0, .8); }
.lightbox[open] { display: grid; grid-template-columns: 60px 1fr 60px; grid-template-rows: 1fr auto; align-items: center; }
.lightbox img { grid-column: 2; max-width: 100%; max-height: 82vh; margin: auto; object-fit: contain; }
.lightbox button { background: none; border: 0; color: #fff; font-size: 2.6rem; cursor: pointer; padding: 10px; }
.lb-prev { grid-column: 1; grid-row: 1; } .lb-next { grid-column: 3; grid-row: 1; }
.lb-close { position: absolute; top: 8px; right: 12px; font-size: 1.8rem !important; }
.lb-cap { grid-column: 1 / -1; text-align: center; margin: 8px 0 18px; opacity: .85; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 48px 0; }
  .row2 { grid-template-columns: 1fr; }
  .hide-s { display: none; } .show-s { display: inline; }
  .lightbox[open] { grid-template-columns: 40px 1fr 40px; }
  .wa { bottom: 14px; right: 14px; }
  .brand img + span { display: none; }   /* ime je već u logu */
  .foot { padding-bottom: 90px; }        /* mjesto za dugme WhatsApp */
}
