/* ============================================================
   Obi Pal v3 — TEMELJ REDIZAJNA (foundation layer)
   Učitava se POSLEDNJI, posle svih v215/v218/v219 patch fajlova.
   Ovo je override sloj: ne prepisuje postojeće fajlove, samo ih
   suptilno dotera — tipografija, spacing, senke, fokus, footer,
   WhatsApp dugme. BEZ promene layouta i funkcionalnosti.
   ============================================================ */

/* ---------- 1. Tipografija: Manrope (next/font → --font-sans) ---------- */
:root {
  font-family: var(--font-sans, "Manrope"), Inter, ui-sans-serif, system-ui,
    -apple-system, "Segoe UI", sans-serif;
}
body,
button,
input,
select,
textarea,
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans, "Manrope"), Inter, ui-sans-serif, system-ui,
    -apple-system, "Segoe UI", sans-serif;
}
/* Manrope je nešto širi od Intera — blago stegni display naslove da
   postojeće veličine (clamp iz v215) ostanu u istom prostoru. */
h1, h2, h3 { letter-spacing: -0.015em; }

/* ---------- 1b. Gate look (30.07.): javni sajt nosi isti „private club"
   identitet kao /login — grafitno-plava osnova + zlato. Boje su prefarbane
   kroz ceo kaskadni CSS; ovde ide samo potpis: bledi blueprint raster preko
   celog viewporta (isti motiv kao .gate-shell::before u gate.css). ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* ---------- 2. Globalna doterivanja ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

::selection {
  background: rgba(201, 163, 92, 0.35); /* --teal */
  color: #eef2f7;
}

/* Uglađen fokus: teal ring umesto default outline-a, samo za tastaturu */
:where(a, button, input, select, textarea, summary, [role="button"], [tabindex]):focus-visible {
  outline: 2px solid var(--teal, #c9a35c);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(201, 163, 92, 0.18);
}

/* ---------- 3. Blaže senke (isti raspored, mekši ton) ---------- */
:root { --shadow: 0 18px 56px rgba(0, 0, 0, 0.26); }
.unit, .project, .saved-empty {
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.16);
}
.btn:hover { box-shadow: 0 0 0 3px rgba(201, 163, 92, 0.1); }

/* ---------- 4. Konzistentniji spacing sekcija ---------- */
.section { padding: 38px 0; }
.section-head { margin-bottom: 20px; }
#home .home-section { margin: 26px 0; }

/* ---------- 5. Footer (v3 redizajn, 3 kolone) ---------- */
.v3-footer {
  margin-top: 44px;
  border-top: 1px solid var(--line, rgba(255, 255, 255, 0.13));
  background: rgba(11, 16, 23, 0.6);
  color: var(--muted, #93a0b4);
  font-size: 14px;
}
.v3-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  padding: 34px 0 26px;
}
.v3-footer-brand { display: grid; gap: 12px; align-content: start; }
.v3-footer-brand .brand img { width: 34px; height: 34px; border-radius: 11px; }
.v3-footer-brand p { margin: 0; line-height: 1.55; }
.v3-footer-disclaimer { font-size: 12px; opacity: 0.85; }
.v3-footer-col { display: grid; gap: 9px; align-content: start; }
.v3-footer-col strong {
  color: var(--gold, #c9a35c);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 3px;
}
.v3-footer-col a {
  color: var(--muted, #93a0b4);
  text-decoration: none;
  width: fit-content;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.v3-footer-col a:hover {
  color: var(--text, #eef2f7);
  border-color: rgba(201, 163, 92, 0.45);
}
.v3-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 0 22px;
  font-size: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
}
@media (max-width: 860px) {
  .v3-footer-grid { grid-template-columns: 1fr; gap: 24px; padding: 28px 0 20px; }
}

/* ---------- 6. WhatsApp plutajuće dugme ---------- */
.v3-whatsapp-fab {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 85; /* ispod toast-a (90), iznad sadržaja */
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #25d366; /* zvanična WhatsApp zelena */
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.v3-whatsapp-fab:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.v3-whatsapp-fab:focus-visible { border-radius: 50%; }
@media (max-width: 560px) {
  .v3-whatsapp-fab {
    width: 52px;
    height: 52px;
    right: max(14px, env(safe-area-inset-right, 0px));
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }
}

/* Logo: izvorni odnos 699x529 — ne gurati u kvadrat; brand je link bez podvlačenja */
.brand img { width: auto !important; height: 40px !important; border-radius: 0 !important; object-fit: contain; }
a.brand { text-decoration: none; color: inherit; }

/* ---------- 7. Consent framework (PR 1, no analytics scripts) ---------- */
.v3-consent {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 13000;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(201, 163, 92, 0.55);
  background: rgba(11, 16, 23, 0.97);
  color: var(--text, #eef2f7);
  box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
}

.v3-consent__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.v3-consent__copy {
  display: grid;
  gap: 4px;
}

.v3-consent__copy strong {
  color: var(--text, #eef2f7);
  font-weight: 850;
}

.v3-consent__copy p {
  margin: 0;
  max-width: 84ch;
  color: var(--muted, #93a0b4);
  font-size: 13px;
  line-height: 1.5;
}

.v3-consent__copy a {
  color: var(--gold, #c9a35c);
  font-weight: 800;
  text-underline-offset: 3px;
}

.v3-consent__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.v3-consent__button {
  min-height: 42px;
  border-radius: 999px;
  padding: 10px 15px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

.v3-consent__button--primary {
  border: 1px solid var(--gold, #c9a35c);
  background: linear-gradient(135deg, var(--gold, #c9a35c), #a8823f);
  color: #16120a;
}

.v3-consent__button--secondary {
  border: 1px solid rgba(238, 242, 247, 0.55);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text, #eef2f7);
}

.v3-footer-link-button {
  appearance: none;
  width: fit-content;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 0;
  background: transparent;
  color: var(--muted, #93a0b4);
  font: inherit;
  text-align: start;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.v3-footer-link-button:hover {
  color: var(--text, #eef2f7);
  border-color: rgba(201, 163, 92, 0.45);
}

.consent-banner-open .v3-whatsapp-fab {
  bottom: calc(
    var(--obi-consent-height, 0px) + 16px + env(safe-area-inset-bottom, 0px)
  );
}

.consent-banner-open .v3u-mobile-cta {
  bottom: var(--obi-consent-height, 0px);
}

@media (max-width: 760px) {
  .v3-consent__inner {
    grid-template-columns: 1fr;
  }

  .v3-consent__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .v3-consent__button {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .v3-consent__actions {
    grid-template-columns: 1fr;
  }
}

/* ---------- 8. Privacy and Cookie Policy pages ---------- */
.v3-legal {
  max-width: 980px;
  margin-inline: auto;
  padding-top: clamp(42px, 7vw, 82px);
  padding-bottom: clamp(58px, 8vw, 96px);
}

.v3-legal__header {
  display: grid;
  gap: 12px;
  max-width: 780px;
  margin-bottom: 38px;
}

.v3-legal__header h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1;
}

.v3-legal__updated {
  margin: 0;
  color: var(--muted, #93a0b4);
  font-size: 12px;
}

.v3-legal__intro {
  margin: 0;
  color: var(--muted, #93a0b4);
  font-size: 17px;
  line-height: 1.65;
}

.v3-legal__content {
  display: grid;
  gap: 34px;
}

.v3-legal__content section {
  display: grid;
  gap: 12px;
}

.v3-legal__content h2 {
  margin: 0;
  color: var(--gold, #c9a35c);
  font-size: clamp(21px, 3vw, 29px);
}

.v3-legal__content p,
.v3-legal__content ul {
  margin: 0;
  color: var(--muted, #93a0b4);
  line-height: 1.75;
}

.v3-legal__content ul {
  padding-inline-start: 22px;
}

.v3-legal__table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.13));
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.v3-legal table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  color: var(--muted, #93a0b4);
  font-size: 13px;
}

.v3-legal th,
.v3-legal td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.13));
  text-align: start;
  vertical-align: top;
}

.v3-legal thead th {
  color: var(--text, #eef2f7);
  background: rgba(201, 163, 92, 0.09);
}

.v3-legal tbody th {
  color: var(--text, #eef2f7);
}

.v3-legal tbody tr:last-child > * {
  border-bottom: 0;
}

.v3-legal__related {
  width: fit-content;
  color: var(--gold, #c9a35c);
  font-weight: 850;
  text-underline-offset: 4px;
}

html.consent-banner-open body {
  padding-bottom: var(--obi-consent-height, 0px);
}

/* === Consent UX 2026 ? prominent privacy choice === */
.v3-consent {
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.32);
}

.v3-consent__inner {
  align-items: center;
  gap: 28px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.v3-consent__copy {
  flex: 1 1 auto;
}

.v3-consent__copy strong {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.25;
}

.v3-consent__copy p {
  max-width: 850px;
  margin: 0;
  line-height: 1.55;
}

.v3-consent__actions {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  min-width: 390px;
  gap: 10px;
}

.v3-consent__button {
  min-height: 50px;
  padding: 12px 20px;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}

.v3-consent__button--primary {
  border-color: var(--gold, #c9a35c);
  background: linear-gradient(135deg, var(--gold, #c9a35c), #a8823f);
  color: #16120a;
  box-shadow: 0 8px 24px rgba(201, 163, 92, 0.28);
}

@media (max-width: 860px) {
  .v3-consent__inner {
    align-items: stretch;
    gap: 16px;
  }

  .v3-consent__actions {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: 1fr 1fr;
  }

  .v3-consent__button {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .v3-consent__inner {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .v3-consent__actions {
    grid-template-columns: 1fr;
  }

  .v3-consent__button--primary {
    order: -1;
  }
}
