/*
Theme Name: Njega Sesvete
Description: Lagana klasična tema za privatnu praksu zdravstvene njege Vesna Koščević. Bez page buildera, bez vanjskih resursa.
Author: Initia Web Studio
Version: 1.0.0
Requires PHP: 8.0
Text Domain: njega-sesvete
License: GPL-2.0-or-later
*/

:root {
	--paper: #F7EEE6;      /* pozadina */
	--sand: #E0D3C7;
	--mist: #C7D6D0;
	--teal-line: #5A9A98;  /* ukrasne linije, ikone */
	--teal: #2F6F6D;       /* gumbi, linkovi — bijeli tekst 5,8:1 (AA) */
	--teal-dark: #245755;
	--ink: #243433;        /* tekst */
	--white: #FFFFFF;
	--mark: #FFE45C;

	--font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
	--font-sans: "Source Sans 3", "Segoe UI", Roboto, Arial, sans-serif;

	--wrap: 1120px;
	--gutter: clamp(16px, 4vw, 32px);
	--radius: 10px;
	--section-y: clamp(56px, 8vw, 96px);
	--header-h: 76px;
}

/* ---------- Fontovi (self-hosted, SIL OFL 1.1 — vidi assets/fonts/OFL-*.txt) ---------- */
@font-face {
	font-family: "Source Serif 4";
	src: url("assets/fonts/source-serif-4-latin-ext.woff2") format("woff2");
	font-weight: 200 900; font-style: normal; font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Source Serif 4";
	src: url("assets/fonts/source-serif-4-latin.woff2") format("woff2");
	font-weight: 200 900; font-style: normal; font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Source Sans 3";
	src: url("assets/fonts/source-sans-3-latin-ext.woff2") format("woff2");
	font-weight: 200 900; font-style: normal; font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Source Sans 3";
	src: url("assets/fonts/source-sans-3-latin.woff2") format("woff2");
	font-weight: 200 900; font-style: normal; font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Osnova ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 112.5%; /* 18 px */ -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.65;
	overflow-wrap: break-word;
}
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 {
	font-family: var(--font-serif);
	font-weight: 600;
	line-height: 1.2;
	color: var(--ink);
	margin: 0 0 .6em;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.65rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p, ul, ol, dl, table { margin: 0 0 1.1em; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--teal-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
[id] { scroll-margin-top: 24px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 8px; top: -100px; z-index: 100; background: var(--ink); color: var(--white); padding: 12px 18px; border-radius: 6px; }
.skip-link:focus { top: 8px; color: var(--white); }

/* Oznaka za sadržaj koji treba dopuniti — lako naći: grep "DOPUNITI" */
.dopuniti {
	background: var(--mark);
	color: var(--ink);
	font-weight: 600;
	padding: .05em .35em;
	border-radius: 4px;
	outline: 1px dashed #8a6d00;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}

/* ---------- Gumbi ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .55em;
	min-height: 54px; padding: .7em 1.4em;
	border: 2px solid var(--teal); border-radius: var(--radius);
	font: 600 1.05rem/1.2 var(--font-sans);
	text-decoration: none; cursor: pointer;
	transition: background-color .15s, color .15s, border-color .15s;
}
.btn svg { width: 1.3em; height: 1.3em; flex: none; }
.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: var(--white); text-decoration: none; }
.btn-secondary { background: var(--white); color: var(--teal); }
.btn-secondary:hover { background: var(--mist); color: var(--ink); text-decoration: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Gornja traka (desktop) ---------- */
.topbar { background: var(--teal); color: var(--white); font-size: .9rem; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 40px; gap: 16px; }
.topbar a { color: var(--white); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: .4em; }
.topbar a:hover { text-decoration: underline; color: var(--white); }
.topbar svg { width: 1.1em; height: 1.1em; }
.topbar :focus-visible { outline-color: var(--white); }

/* ---------- Zaglavlje ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--sand); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; line-height: 1.15; }
.brand:hover { color: var(--ink); }
.brand-name { font-family: var(--font-serif); font-weight: 600; font-size: 1.35rem; }
.brand-sub { font-size: .85rem; color: var(--teal); font-weight: 600; letter-spacing: .02em; }

.nav-desktop ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav-desktop a { display: block; padding: 10px 12px; color: var(--ink); text-decoration: none; font-weight: 600; border-radius: 6px; }
.nav-desktop a:hover { background: var(--sand); color: var(--ink); }

.nav-mobile { display: none; position: relative; }
.nav-mobile summary {
	list-style: none; cursor: pointer; min-height: 48px; padding: 0 16px;
	display: inline-flex; align-items: center; gap: .5em;
	border: 2px solid var(--teal); border-radius: var(--radius); color: var(--teal); font-weight: 600; background: var(--white);
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile summary svg { width: 1.2em; height: 1.2em; }
.nav-mobile ul {
	list-style: none; margin: 8px 0 0; padding: 8px;
	position: absolute; right: 0; z-index: 20; min-width: 230px;
	background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius);
	box-shadow: 0 10px 30px rgba(36, 52, 51, .15);
}
.nav-mobile a { display: block; padding: 12px 14px; color: var(--ink); font-weight: 600; text-decoration: none; border-radius: 6px; }
.nav-mobile a:hover { background: var(--paper); }

/* ---------- Sekcije ---------- */
.section { padding: var(--section-y) 0; position: relative; }
.section-alt { background: rgba(224, 211, 199, .35); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.eyebrow { display: block; font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-bottom: .5em; }
.lead { font-size: 1.15rem; }

/* EKG razdjelnik */
.ekg { display: flex; align-items: center; gap: 0; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); color: var(--teal-line); }
.ekg::before, .ekg::after { content: ""; flex: 1; height: 1.5px; background: currentColor; opacity: .7; }
.ekg svg { width: 150px; height: 44px; flex: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--paper); }
.hero-bg, .koraci-bg { position: absolute; inset: 0; margin: 0; }
.hero-bg img, .koraci-bg img { width: 100%; height: 100%; object-fit: cover; object-position: right center; display: block; }
.hero .wrap { position: relative; z-index: 1; min-height: 600px; display: flex; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.hero-content { max-width: 600px; }
.hero h1 { margin-bottom: .45em; }
.hero .lead { max-width: 34em; margin-bottom: 1.6em; }

/* ---------- O meni ---------- */
.o-meni-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.portret { margin: 0; position: relative; }
.portret img { display: block; width: 100%; border-radius: 14px; box-shadow: 0 18px 40px rgba(36, 52, 51, .14); }
.portret::after { content: ""; position: absolute; inset: 16px -16px -16px 16px; border: 2px solid var(--teal-line); border-radius: 14px; z-index: -1; }
.o-meni-ime { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; margin-bottom: .2em; }
.o-meni-titula { color: var(--teal); font-weight: 600; margin-bottom: 1.2em; }

/* ---------- Usluge ---------- */
.usluge-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.usluga {
	background: rgba(255, 255, 255, .6); border: 1px solid var(--sand); border-radius: 14px;
	padding: 28px 28px 12px;
}
.usluga-ikona { width: 64px; height: 64px; border-radius: 50%; background: var(--mist); display: grid; place-items: center; margin-bottom: 16px; color: var(--teal); }
.usluga-ikona svg { width: 36px; height: 36px; }
.usluga ul { padding-left: 1.2em; }
.usluga li { margin-bottom: .35em; }
.usluga li::first-letter { text-transform: uppercase; }
.usluga li::marker { color: var(--teal-line); }

/* ---------- Kako do njege ---------- */
.koraci { position: relative; overflow: hidden; }
.koraci .wrap { position: relative; z-index: 1; }
.koraci-content { max-width: 640px; }
.koraci-lista { list-style: none; padding: 0; margin: 0 0 28px; counter-reset: korak; }
.koraci-lista li { counter-increment: korak; position: relative; padding: 0 0 26px 76px; }
.koraci-lista li::before {
	content: counter(korak); position: absolute; left: 0; top: -4px;
	width: 54px; height: 54px; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--teal); color: var(--white);
	font: 600 1.4rem/1 var(--font-serif);
}
.koraci-lista li:not(:last-child)::after { content: ""; position: absolute; left: 26px; top: 56px; bottom: 4px; width: 2px; background: var(--teal-line); opacity: .6; }
.koraci-lista h3 { margin-bottom: .25em; }
.koraci-lista p { margin: 0; }
.napomena { background: rgba(255, 255, 255, .75); border-left: 4px solid var(--teal-line); padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; }

/* ---------- Cjenik: sažetak ---------- */
.cjenik-sazetak { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 28px; }
.cijena-kartica { background: var(--white); border: 1px solid var(--sand); border-top: 4px solid var(--teal-line); border-radius: 12px; padding: 22px 24px 8px; }
.cijena-kartica h3 { font-size: 1.15rem; }
.cijena-kartica dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; }
.cijena-kartica dt { color: var(--ink); }
.cijena-kartica dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Cjenik: tablica (stranica /cjenik/) ---------- */
.cjenik-grupa { margin-bottom: 44px; }
.cjenik-tablica { width: 100%; table-layout: fixed; border-collapse: collapse; background: var(--white); border: 1px solid var(--sand); border-radius: 12px; overflow: hidden; }
.cjenik-grupa > h2 { text-align: left; font: 600 1.35rem/1.25 var(--font-serif); margin: 0; padding: 0 0 12px; }
.cjenik-tablica th, .cjenik-tablica td { padding: 14px 18px; border-bottom: 1px solid var(--sand); vertical-align: top; }
.cjenik-tablica thead th { background: var(--teal); color: var(--white); font-weight: 600; text-align: left; font-size: .95rem; }
.cjenik-tablica thead th.cijena { width: 11em; } /* isti stupci u svim tablicama; novi stupac samo dodaje još jedan */
.cjenik-tablica thead th.cijena, .cjenik-tablica td.cijena { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cjenik-tablica tbody th { text-align: left; font-weight: 400; }
.cjenik-tablica tbody tr:nth-child(even) { background: rgba(247, 238, 230, .55); }
.cjenik-tablica tbody tr:last-child th, .cjenik-tablica tbody tr:last-child td { border-bottom: 0; }
.cjenik-napomene { max-width: 760px; }

/* ---------- Cjenik: popis (stranica /cjenik/) ---------- */
.cjenik-popis { list-style: none; padding: 0; margin: 0 0 44px; background: var(--white); border: 1px solid var(--sand); border-radius: 12px; overflow: hidden; }
.cjenik-popis li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--sand); }
.cjenik-popis li:nth-child(even) { background: rgba(247, 238, 230, .55); }
.cjenik-popis li:last-child { border-bottom: 0; }
.cjenik-popis .cijena { font-weight: 700; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Cijena na referentni datum (ispod svake cijene) ---------- */
/* 0,8 rem = 14,4 px; boja --ink na bijeloj/papiru > 11:1 */
.cijena-ref { display: block; font-size: .8rem; font-weight: 400; line-height: 1.4; color: var(--ink); font-variant-numeric: tabular-nums; }
.cjenik-popis .cijena-blok { display: flex; flex-direction: column; align-items: flex-end; text-align: right; flex-shrink: 0; }
.cjenik-popis .cijena-blok .cijena-ref { white-space: nowrap; }
.cijena-kartica .cijena-ref { margin-top: .15em; }
.cjenik-napomene .cijena-ref, #cjenik > .wrap > p > .cijena-ref { margin-top: .2em; }
@media (max-width: 600px) {
	.cjenik-popis li { flex-direction: column; align-items: flex-start; gap: 2px; }
	.cjenik-popis .cijena-blok { align-items: flex-start; text-align: left; }
}

/* ---------- Arhiva cjenika ---------- */
.arhiva-popis { list-style: none; padding: 0; margin: 0 0 32px; background: var(--white); border: 1px solid var(--sand); border-radius: 12px; overflow: hidden; }
.arhiva-popis li { padding: 14px 18px; border-bottom: 1px solid var(--sand); }
.arhiva-popis li:last-child { border-bottom: 0; }
.arhiva-popis a { word-break: break-all; }
.arhiva-meta { display: block; font-size: .85rem; }

@media (max-width: 720px) {
	/* kartice po usluzi — bez vodoravnog skrolanja */
	.cjenik-tablica, .cjenik-tablica tbody, .cjenik-tablica tr, .cjenik-tablica th, .cjenik-tablica td { display: block; }
	.cjenik-tablica { background: transparent; border: 0; border-radius: 0; overflow: visible; }
	.cjenik-tablica thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.cjenik-tablica tbody tr { background: var(--white) !important; border: 1px solid var(--sand); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
	.cjenik-tablica tbody th { font-weight: 600; background: rgba(199, 214, 208, .45); border-bottom: 1px solid var(--sand) !important; }
	.cjenik-tablica td { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 10px 18px; min-height: 44px; }
	.cjenik-tablica td.cijena { text-align: right; }
	.cjenik-tablica td::before { content: attr(data-label); text-align: left; font-weight: 400; color: var(--ink); }
	.cjenik-tablica tbody tr td:last-child { border-bottom: 0; }
}

/* ---------- Područje rada / Kontakt ---------- */
.dvije-kolone { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5vw, 64px); align-items: start; }
.mjesta { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.mjesta li { background: var(--white); border: 1px solid var(--sand); border-radius: 999px; padding: 8px 18px; font-weight: 600; }
.kontakt-lista { list-style: none; padding: 0; margin: 0 0 1.2em; }
.kontakt-lista li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--sand); }
.kontakt-lista li:last-child { border-bottom: 0; }
.kontakt-ikona { width: 44px; height: 44px; border-radius: 50%; background: var(--mist); color: var(--teal); display: grid; place-items: center; flex: none; }
.kontakt-ikona svg { width: 22px; height: 22px; }
.kontakt-lista .oznaka { display: block; font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--teal); }
.kontakt-lista a { font-weight: 600; font-size: 1.1rem; }
.kontakt-kartica { background: rgba(255, 255, 255, .7); border: 1px solid var(--sand); border-radius: 14px; padding: 8px 28px; }

/* ---------- Obične stranice ---------- */
.page-header { padding: clamp(40px, 6vw, 72px) 0 12px; }
.entry-content { max-width: 780px; padding-bottom: var(--section-y); }
.entry-content h2 { font-size: 1.55rem; margin-top: 1.6em; }
.entry-content h3 { font-size: 1.2rem; margin-top: 1.4em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .35em; }
.entry-content dl { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr); gap: 10px 24px; border-top: 1px solid var(--sand); padding-top: 14px; }
.entry-content dt { font-weight: 700; }
.entry-content dd { margin: 0; }
@media (max-width: 640px) { .entry-content dl { grid-template-columns: 1fr; gap: 2px; } .entry-content dd { margin-bottom: 12px; } }

/* ---------- Podnožje ---------- */
.site-footer { background: var(--ink); color: var(--paper); padding: 56px 0 32px; font-size: .95rem; }
.site-footer a { color: var(--paper); }
.site-footer a:hover { color: var(--white); }
.site-footer :focus-visible { outline-color: var(--paper); }
.footer-grid { display: grid; grid-template-columns: 2fr 1.4fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-naziv { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600; margin-bottom: .4em; color: var(--white); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45em; }
.footer-dno { border-top: 1px solid rgba(247, 238, 230, .25); padding-top: 20px; font-size: .9rem; }

/* ---------- Plutajući gumbi (mobitel) ---------- */
.mobile-cta { display: none; }

/* ---------- Responzivno ---------- */
@media (max-width: 1000px) {
	.nav-desktop { display: none; }
	.nav-mobile { display: block; }
}
@media (max-width: 860px) {
	.topbar { display: none; }
	.usluge-grid, .cjenik-sazetak, .dvije-kolone, .footer-grid { grid-template-columns: 1fr; }
	.o-meni-grid { grid-template-columns: 1fr; }
	.portret { max-width: 420px; }
	body { padding-bottom: 84px; }
	.mobile-cta {
		display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
		padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
		background: var(--paper); border-top: 1px solid var(--sand);
		box-shadow: 0 -6px 20px rgba(36, 52, 51, .12);
	}
	.mobile-cta .btn { min-height: 56px; padding: .6em .8em; }
	/* pozadinski akvareli ne smiju smanjiti čitljivost */
	.hero-bg::after, .koraci-bg::after { content: ""; position: absolute; inset: 0; background: rgba(247, 238, 230, .82); }
	.hero .wrap { min-height: 0; padding-top: 48px; padding-bottom: 48px; }
}
@media (max-width: 480px) {
	.btn-row .btn { width: 100%; }
	.usluga { padding: 22px 20px 8px; }
	.portret { margin-right: 10px; }
	.portret::after { inset: 10px -10px -10px 10px; }
	.kontakt-kartica { padding: 4px 18px; }
	.ekg svg { width: 110px; }
}

@media print {
	.topbar, .mobile-cta, .nav-desktop, .nav-mobile, .hero-bg, .koraci-bg { display: none !important; }
	body { background: #fff; padding: 0; }
}
