/* ============================================================
   odvetnik.com — design system
   Minimal & modern: one sans (Inter), small type scale, white +
   cool grays + one blue. Self-hosted fonts (GDPR-safe).
   ============================================================ */

/* ---- fonts ---- */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* ---- tokens ---- */
:root {
  --paper:      #FFFFFF;
  --paper-2:    #F5F7F9;
  --card:       #FFFFFF;
  --ink:        #16191E;
  --muted:      #5A626D;
  --faint:      #939AA4;
  --brand:      #22557E;
  --brand-700:  #17415F;
  --accent:     #22557E;
  --accent-2:   #7FA3C0;
  --accent-bg:  #EAF1F7;
  --line:       #E4E7EB;
  --line-2:     #EEF0F3;
  --ok:         #1E7A52;
  --ok-bg:      #E6F3EC;
  --err:        #B23B2E;
  --err-bg:     #F8EAE8;
  --ring:       0 0 0 3px rgba(34,85,126,.18);
  --sh-sm:      0 1px 2px rgba(20,30,45,.05);
  --sh:         0 1px 2px rgba(20,30,45,.04), 0 10px 30px -14px rgba(20,30,45,.14);
  --sh-lg:      0 2px 4px rgba(20,30,45,.04), 0 24px 48px -20px rgba(20,30,45,.18);
  --r-xs: 6px; --r-sm: 9px; --r: 12px; --r-lg: 18px;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1080px;
}

/* ---- reset / base ---- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4 { font-family: var(--sans); font-weight: 600; line-height: 1.3; letter-spacing: -.015em; color: var(--ink); margin: 0 0 .5rem; }
h1 { font-size: clamp(1.3rem, 1.15rem + .6vw, 1.6rem); }
h2 { font-size: 1.1rem; margin-top: 0; }
h3 { font-size: 1rem; }
p { margin: 0 0 1rem; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-xs); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.3rem; }
main.wrap { padding-top: 2.4rem; padding-bottom: 4rem; min-height: 62vh; }
.lede { font-size: .98rem; color: var(--muted); max-width: 52ch; }
.meta { color: var(--muted); font-size: .9rem; }
.meta a { color: var(--brand); }

/* ---- buttons ---- */
.btn, button.btn, .cta {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--sans); font-size: .96rem; font-weight: 600; line-height: 1;
  padding: .72rem 1.15rem; border-radius: var(--r-sm); border: 1px solid transparent;
  background: var(--brand); color: #fff; cursor: pointer; transition: background .15s, box-shadow .15s, transform .05s;
  box-shadow: var(--sh-sm);
}
.btn:hover, .cta:hover { background: var(--brand-700); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.ghost, button.ghost { background: transparent; color: var(--brand); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover, button.ghost:hover { background: var(--paper-2); color: var(--brand-700); }
.btn.small, button.small { padding: .5rem .8rem; font-size: .88rem; }
/* any bare <button> in a form still reads as an intentional primary button */
button:not(.linklike):not(.nav-burger):not(.ghost) {
  font-family: var(--sans); font-size: .96rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; line-height: 1;
  padding: .72rem 1.15rem; border: 1px solid transparent; border-radius: var(--r-sm);
  background: var(--brand); color: #fff; box-shadow: var(--sh-sm); transition: background .15s;
}
button:not(.linklike):not(.nav-burger):not(.ghost):hover { background: var(--brand-700); }
button.linklike { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
button.linklike:hover { color: var(--ink); }
form.inline { display: inline; }
form.inline button { padding: .42rem .8rem; font-size: .85rem; margin-left: .4rem; }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85); backdrop-filter: saturate(120%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--sans); font-size: 1.06rem; font-weight: 650; color: var(--ink); letter-spacing: -.015em; }
.brand:hover { color: var(--ink); }
.brand .seal { width: 24px; height: 24px; flex: none; }
.brand .dot { color: var(--faint); font-weight: 400; }
nav.mainnav { display: flex; align-items: center; gap: .3rem; }
nav.mainnav a { color: var(--ink); font-size: .95rem; font-weight: 500; padding: .5rem .7rem; border-radius: var(--r-xs); }
nav.mainnav a:hover { background: var(--paper-2); color: var(--brand); }
nav.mainnav .cta { margin-left: .35rem; color: #fff; }
nav.mainnav .cta:hover { color: #fff; }
.nav-burger { display: none; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--line); margin-top: 4rem; }
.site-footer .wrap { padding-top: 2.2rem; padding-bottom: 2.4rem; }
.foot-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.5rem; }
.foot-brand { display: flex; align-items: center; gap: .5rem; font-size: .95rem; font-weight: 650; letter-spacing: -.015em; }
.foot-brand .seal { width: 20px; height: 20px; }
.foot-brand .dot { color: var(--faint); font-weight: 400; }
.foot-nav { display: flex; flex-wrap: wrap; gap: .3rem 1.5rem; }
.foot-nav a { color: var(--muted); font-size: .86rem; }
.foot-nav a:hover { color: var(--ink); }
.foot-note { color: var(--faint); font-size: .82rem; line-height: 1.6; max-width: 74ch; margin: 0 0 .5rem; }
.foot-copy { color: var(--faint); font-size: .82rem; margin: 0; }

/* ---- flashes ---- */
.flash { display: flex; gap: .55rem; align-items: flex-start; background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--ok); border-radius: var(--r-sm); padding: .7rem 1rem; margin: .5rem 0 1rem; box-shadow: var(--sh-sm); }
.flash.error { border-left-color: var(--err); background: var(--err-bg); }
.flash.ok { border-left-color: var(--ok); }

/* ---- hero ---- */
.hero { text-align: center; padding: clamp(1.8rem, 1.2rem + 3vw, 3.4rem) 0 1rem; }
.hero h1 { margin: 0 auto; max-width: 44ch; font-weight: 550; color: var(--ink); }
.hero-count { margin: 1.4rem auto 0; color: var(--faint); font-size: .84rem; }

/* home filter — the shared imenik filter card, embedded in the centered hero */
.home-filter { text-align: left; margin: 2.2rem auto 0; }
.home-filter .filters { margin: 0; }
.quicklinks { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; align-items: center; margin: 1.2rem auto 0; font-size: .9rem; }
.quicklinks .lbl { color: var(--muted); }
.quicklinks a { padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: #fff; }
.quicklinks a:hover { border-color: var(--brand); color: var(--brand); }
.quicklinks a.more { border-color: transparent; color: var(--brand); padding-left: .4rem; }

/* ---- inputs ---- */
input, select, textarea {
  font: inherit; color: var(--ink); background: #fff; width: 100%;
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: .62rem .8rem;
  transition: border-color .15s, box-shadow .15s;
}
select { -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' fill='none' stroke='%235D6A72' stroke-width='1.5' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right .7rem center; padding-right: 2rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
textarea { resize: vertical; min-height: 6rem; line-height: 1.6; }
::placeholder { color: #9aa4ab; }

.stack { display: grid; gap: 1rem; max-width: 540px; margin: 1.4rem 0; }
.stack label { display: grid; gap: .35rem; font-size: .9rem; font-weight: 500; }
.check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400; font-size: .92rem; color: var(--muted); }
.check input { width: auto; margin-top: .2rem; accent-color: var(--brand); }

/* ---- plain functional links (no marketing cards) ---- */
.util-links { display: flex; flex-wrap: wrap; gap: 1rem 2.4rem; margin: 2.6rem 0; padding: 1.4rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.util-links a { font-size: .98rem; font-weight: 500; }

/* section heading */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 2.6rem 0 1rem; }
.section-head h2 { margin: 0; }
.section-head a { font-size: .9rem; font-weight: 500; }

/* ---- field list — plain text links, no boxes ---- */
.fields-grid ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 2.6rem; }
.fields-grid li { border-bottom: 1px solid var(--line-2); }
.fields-grid a { display: block; padding: .85rem .1rem; color: var(--ink); transition: color .12s; }
.fields-grid a:hover { color: var(--brand); }
.fields-grid a:hover strong { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent-2); }
.fields-grid strong { display: block; font-family: var(--sans); font-size: .95rem; font-weight: 600; }
.fields-grid span { display: block; color: var(--muted); font-size: .82rem; margin-top: .1rem; }

/* ---- filters (imenik) ---- */
.filters { margin: 1.4rem 0 1.6rem; }
.filter-card { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r); box-shadow: none; padding: 1rem 1.1rem; }
.filter-row { display: grid; grid-template-columns: 1.2fr 1.2fr .9fr auto; gap: .7rem; align-items: end; }
.filter-row .gf { display: grid; gap: .35rem; }
.filter-row .cap { font-size: .74rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); padding-left: .1rem; }
.filter-row button { height: 44px; }
.more-filters { margin-top: .9rem; border-top: 1px solid var(--line-2); padding-top: .8rem; }
.more-filters summary { cursor: pointer; color: var(--brand); font-size: .88rem; font-weight: 500; list-style: none; display: inline-flex; align-items: center; gap: .4rem; }
.more-filters summary::-webkit-details-marker { display: none; }
.more-filters summary::before { content: "+"; font-weight: 600; }
.more-filters[open] summary::before { content: "–"; }
.more-filters .grid3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: .6rem; margin-top: .7rem; }
.result-meta { margin: 0 0 1rem; }

/* ---- lawyer list ---- */
.lawyer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .1rem; }
.lawyer-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center;
  padding: 1rem .3rem; border-bottom: 1px solid var(--line-2); }
.lawyer-list li.empty { display: block; color: var(--muted); padding: 1.4rem .3rem; }
.mono { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-family: var(--sans); font-weight: 600; font-size: .92rem; color: #fff; text-transform: uppercase; flex: none; letter-spacing: .02em; }
.mono.lg { width: 64px; height: 64px; font-size: 1.4rem; }
.tone-0 { background: #22557E; } .tone-1 { background: #37627F; } .tone-2 { background: #4A5D70; }
.tone-3 { background: #2C6E66; } .tone-4 { background: #566476; }
.ll-main { min-width: 0; }
.ll-main .name { display: block; font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--ink); line-height: 1.35; }
.ll-main:hover .name { color: var(--brand); }
.ll-main .firm { display: block; color: var(--muted); font-size: .92rem; margin-top: .05rem; }
.ll-main .sub { display: block; color: var(--faint); font-size: .84rem; margin-top: .25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ll-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; }
.dist { display: inline-block; background: var(--brand); color: #fff; border-radius: 999px; padding: .2rem .6rem; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.dist.here { background: var(--accent-bg); color: var(--accent); }
.chevron { color: var(--faint); }

/* ---- pager ---- */
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 2rem 0; }
.pager a { padding: .5rem .9rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); font-size: .9rem; font-weight: 500; }
.pager a:hover { border-color: var(--brand); }
.pager span { color: var(--muted); font-size: .9rem; }

/* ---- profile ---- */
.crumb { font-size: .88rem; color: var(--muted); margin-bottom: 1rem; }
.profile-head { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: center; }
.profile-head h1 { margin: 0; }
.profile-head .firm { color: var(--muted); font-size: 1.02rem; margin-top: .15rem; }
.badge { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 600; padding: .28rem .65rem; border-radius: 999px; }
.badge.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #CDE3D6; margin-top: .5rem; }
.profile-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 3rem; margin-top: 2.2rem; padding-top: 1.8rem; border-top: 1px solid var(--line); align-items: start; }
.panel h2 { font-size: 1.05rem; }
.panel h2:first-child { margin-top: 0; }
/* the details column is open (no box); the contact column is one soft tinted panel */
aside.panel { background: var(--paper-2); border-radius: var(--r); padding: 1.3rem 1.4rem; position: relative; }
aside.panel::before { content: ""; position: absolute; left: -1.5rem; top: 0; bottom: 0; width: 1px; background: var(--line); }
@media (max-width: 860px) { aside.panel::before { display: none; } }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.1rem; margin: 0; }
dl.facts dt { color: var(--muted); font-size: .88rem; }
dl.facts dd { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { display: inline-block; background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px; padding: .22rem .7rem; font-size: .85rem; }
.tag.spec { background: var(--accent-bg); border-color: #D3E1EE; color: var(--accent); font-weight: 500; }
.contact-actions { display: grid; gap: .55rem; }
.contact-actions .btn { width: 100%; }
.src-note { color: var(--faint); font-size: .82rem; margin-top: 1.4rem; }

/* ---- Q&A ---- */
.qa { max-width: 760px; }
.qa .body, .answer .body { white-space: pre-line; }
.qa > .body { font-size: 1.02rem; line-height: 1.7; color: var(--ink); padding: 0 0 1.6rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.answer { margin-top: 1.8rem; border-left: 2px solid var(--accent-2); padding-left: 1.3rem; }
.byline { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .9rem; margin-bottom: .5rem; }
.answer-form { margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.qa-list { list-style: none; padding: 0; margin: 0; }
.qa-list li { padding: .95rem .2rem; border-bottom: 1px solid var(--line-2); }
.qa-list li a { font-family: var(--sans); font-size: .98rem; font-weight: 600; }
.disclaimer { color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 2.4rem; }
.pill { display: inline-block; font-size: .78rem; font-weight: 600; color: var(--accent); background: var(--accent-bg); padding: .16rem .6rem; border-radius: 999px; }

/* ---- misc ---- */
.roles { border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; display: grid; gap: .6rem; background: var(--card); }
.roles .check { font-weight: 500; color: var(--ink); }
.hint-odvetnik { font-weight: 400; }
.center-narrow { max-width: 420px; margin: 1.5rem auto 0; }
.center-narrow h1 { text-align: center; }
.center-narrow .stack { margin-left: auto; margin-right: auto; }
.center-narrow > .meta { text-align: center; }
.big-num { font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---- auth (prijava / registracija) ---- */
.auth { max-width: 400px; margin: clamp(1.5rem, 6vh, 3.5rem) auto 0; }
.auth h1 { text-align: center; font-size: clamp(1.6rem, 1.35rem + 1vw, 1.95rem); margin-bottom: .4rem; }
.auth-sub { text-align: center; color: var(--muted); font-size: 1.02rem; margin: 0 0 2rem; }
.auth-form { display: grid; gap: 1.2rem; }
.auth-form > label { display: grid; gap: .45rem; font-size: 1rem; font-weight: 600; }
.auth-form .lbl-hint { font-weight: 400; color: var(--muted); font-size: .9rem; }
.auth-form input { font-size: 1.05rem; padding: .85rem 1rem; }
.auth-form .roles { gap: .8rem; }
.auth-form .check { font-size: 1rem; }
.auth-form .check input { width: auto; }
/* must out-specify the bare-button rule above (0,3,1) */
.auth .auth-form button.btn { width: 100%; font-size: 1.05rem; padding: .95rem 1.2rem; margin-top: .35rem; }
.auth-alt { text-align: center; color: var(--muted); font-size: .98rem; margin-top: 1.8rem; padding-top: 1.5rem; border-top: 1px solid var(--line-2); }
.auth-alt a { font-weight: 600; }

/* ---- responsive ---- */
@media (max-width: 860px) {
  .geo-search, .filter-row { grid-template-columns: 1fr 1fr; }
  .geo-search button, .filter-row button { grid-column: 1 / -1; }
  .profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .more-filters .grid3 { grid-template-columns: 1fr; }
  .geo-search, .filter-row { grid-template-columns: 1fr; }
  .nav-burger { display: inline-grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); cursor: pointer; color: var(--ink); }
  nav.mainnav {
    position: absolute; top: 100%; right: 1.3rem; left: 1.3rem;
    flex-direction: column; align-items: stretch; gap: .15rem;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
    box-shadow: var(--sh-lg); padding: .5rem; margin-top: .4rem;
    max-height: 0; overflow: hidden; opacity: 0; pointer-events: none; transform: translateY(-6px);
    transition: opacity .16s, transform .16s, max-height .16s;
  }
  .nav-toggle:checked ~ nav.mainnav { max-height: 26rem; opacity: 1; pointer-events: auto; transform: none; }
  nav.mainnav a { padding: .7rem .8rem; }
  nav.mainnav .cta { margin: .3rem 0 0; }
  .lawyer-list li { grid-template-columns: auto 1fr; }
  .ll-right { grid-column: 2; flex-direction: row; align-items: center; }
  .profile-head { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}
