/* ============================================================
   Pages — generic inner pages, archives, blog grid (starter)
   Expanded with bespoke archive/single templates in later phases.
   ============================================================ */

.container--narrow { --container: 920px; }

.page-head { margin-bottom: clamp(24px, 4vw, 48px); }
.page-thumb { border-radius: var(--radius-img); overflow: hidden; margin-bottom: clamp(24px, 4vw, 40px); }
.page-thumb img { width: 100%; height: auto; }

.page-content { font-size: var(--fs-body-lg); line-height: 1.5; }

/* Generic post / archive grid — boxed cards per design */
.post-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
}
.post-card {
	display: flex; flex-direction: column; gap: 16px;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius-card);
	padding: 24px;
	transition: box-shadow 0.25s;
}
.post-card:hover { box-shadow: var(--shadow-card); }
.post-card__img { aspect-ratio: 400 / 240; border-radius: var(--radius-img); overflow: hidden; background: var(--placeholder); }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; }
.post-card__excerpt { font-size: var(--fs-body); }

.pagination { margin-top: 48px; display: flex; justify-content: center; }
.pagination .nav-links { display: flex; gap: 8px; align-items: center; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 44px; height: 44px; padding: 0 10px;
	border: 1px solid var(--line); border-radius: var(--radius-pill);
	color: var(--ink);
}
.pagination .page-numbers.current { background: var(--rose); color: #fff; border-color: var(--rose); }

@media (max-width: 980px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Inner pages — shared
   ============================================================ */

/* Heading utilities */
.h-48 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.12; letter-spacing: 0.04em; text-transform: uppercase; color: var(--rose); }
.h-32 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.15; letter-spacing: 0.04em; text-transform: uppercase; color: var(--rose); }
.h-24 { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h4); line-height: 1.2; letter-spacing: 0.04em; text-transform: uppercase; color: var(--rose); }

.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--rose); font-weight: 600; margin-bottom: 16px; }
.back-link .icon { width: 20px; height: 20px; transform: rotate(180deg); }
.back-link:hover { opacity: 0.8; }

.tag { display: inline-flex; align-items: center; padding: 6px 16px; border-radius: var(--radius-pill); font-size: var(--fs-xs); }
.tag--cat { background: var(--sage); color: #fff; }

/* Inner-page hero (marquee band) */
.page-hero { position: relative; min-height: clamp(280px, 38vw, 640px); background: var(--tan); display: flex; align-items: flex-end; overflow: hidden; }
.page-hero__img { position: absolute; inset: 0; }
.page-hero__img img { width: 100%; height: 100%; object-fit: cover; }
.page-hero__marquee { position: relative; width: 100%; padding-block: clamp(16px, 2.5vw, 40px); }
/* Plain variant (Tretmani): cream marquee on white, shorter band */
.page-hero--plain { background: var(--white); align-items: center; min-height: clamp(200px, 30vw, 520px); }

/* Rich text (single content) */
.rich-text { font-size: var(--fs-body-lg); line-height: 1.55; color: var(--ink); }
.rich-text > * + * { margin-top: 1.1em; }
.rich-text h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.12; letter-spacing: 0.04em; text-transform: uppercase; color: var(--rose); margin-top: 1.6em; scroll-margin-top: 120px; }
.rich-text h2:first-child { margin-top: 0; }
.rich-text h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.2; letter-spacing: 0.04em; text-transform: uppercase; color: var(--sage); margin-top: 1.5em; display: flex; align-items: center; gap: 24px; }
.rich-text h3::before { content: ""; flex: 0 0 auto; width: 48px; height: 1px; background: var(--sage); }
.rich-text p, .rich-text ul, .rich-text ol { font-size: var(--fs-body-lg); }
.rich-text ul { list-style: disc; padding-left: 1.25em; }
.rich-text ol { list-style: decimal; padding-left: 1.25em; }
.rich-text li { margin-top: 0.4em; }
.rich-text a { color: var(--rose); text-decoration: underline; text-underline-offset: 2px; }
.rich-text img { border-radius: var(--radius-card); }
.rich-text figure { margin-top: 1.4em; }
.rich-text figcaption { font-size: var(--fs-sm); color: var(--sage); margin-top: 8px; text-align: center; }
.rich-text blockquote { background: var(--cream); border-radius: var(--radius-card); padding: clamp(28px, 4vw, 40px) clamp(20px, 3vw, 40px); text-align: center; margin-top: 1.6em; }
.rich-text blockquote p { font-size: var(--fs-body-lg); }
.rich-text blockquote cite, .rich-text blockquote footer { display: block; margin-top: 16px; font-style: normal; font-weight: 600; }
/* Galleries — responsive grid that handles any number of images (client-managed) */
.rich-text .wp-block-gallery { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 1.4em 0; }
.rich-text .wp-block-gallery .wp-block-image { width: auto !important; max-width: none !important; margin: 0 !important; }
.rich-text .wp-block-gallery .wp-block-image img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; border-radius: var(--radius-img); }

/* Consecutive single images grouped side by side (see jajetic_group_images) */
.rich-text .rich-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 1.4em 0; align-items: start; }
.rich-text .rich-images .wp-block-image { margin: 0 !important; }
.rich-text .rich-images img { width: 100%; height: auto; border-radius: var(--radius-img); }
@media (max-width: 600px) { .rich-text .rich-images { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }

/* Classic-editor image paragraphs: 2+ images in one <p> sit side by side and
   fill the width instead of stacking (the global img{display:block} reset). */
.rich-text p:has(> img + img) { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.rich-text p:has(> img + img) > img { flex: 1 1 200px; width: auto; height: auto; max-width: 100%; margin: 0; border-radius: var(--radius-img); }

/* FAQ built from native details blocks — styled to match the site accordion */
.rich-text .wp-block-details { border-bottom: 1px solid var(--line); }
.rich-text .wp-block-details + .wp-block-details { margin-top: 0; }
.rich-text .wp-block-details summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 0;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: var(--fs-h4);
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--rose);
}
.rich-text .wp-block-details summary::-webkit-details-marker { display: none; }
.rich-text .wp-block-details summary::after {
	content: "";
	flex: 0 0 auto;
	width: 48px; height: 48px;
	border-radius: 50%;
	background: var(--rose) url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'><path d='M6.5 9.5h11L12 15.2z'/></svg>") center / 24px no-repeat;
	transition: transform 0.3s var(--ease), background-color 0.3s var(--ease);
}
.rich-text .wp-block-details[open] summary::after {
	background-color: var(--cream);
	background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23B38F87'><path d='M6.5 9.5h11L12 15.2z'/></svg>");
	transform: rotate(180deg);
}
.rich-text .wp-block-details p { font-size: var(--fs-body); margin-top: 0; padding-bottom: 20px; }

/* ============================== PROBLEMS (rješenja archive) ============== */
.problems__head { text-align: center; max-width: 960px; margin: 0 auto clamp(40px, 6vw, 88px); display: flex; flex-direction: column; gap: 24px; }
.problems__sub { font-size: var(--fs-lead); line-height: 1.25; }
/* Equal-height aligned grid (per Arijana — no masonry) */
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; align-items: stretch; }
.problem-card { height: 100%; display: flex; flex-direction: column; gap: 16px; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); }
.problem-card__img { display: block; width: 240px; height: 240px; max-width: 100%; margin: 0 auto; border-radius: 50%; overflow: hidden; background: var(--placeholder); }
.problem-card__img img { width: 100%; height: 100%; object-fit: cover; }
.problem-card__title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h4); letter-spacing: 0.04em; text-transform: uppercase; color: var(--rose); }
.problem-card__text { display: flex; flex-direction: column; gap: 16px; flex: 1 1 auto; }
.problem-card__text p { font-size: var(--fs-body); }
.problem-card__cta { border-top: 1px solid var(--line); padding-top: 12px; margin-top: auto; }

/* ============================== SINGLE (cpt + article) ================== */
/* Title + hero live INSIDE the left column; the sidebar tops out level with the title. */
.single-article__head { text-align: center; }
.single-cpt__head .back-link, .single-article__head .back-link { align-self: flex-start; }
/* rješenje / tretman single: title left-aligned per Figma (41:1279) */
.single-cpt__head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; }
.single-cpt__title, .single-article__title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h1); line-height: 1.1; letter-spacing: 0.04em; text-transform: uppercase; color: var(--rose); }
.single-article__head { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.single-article__meta { display: flex; align-items: center; gap: 16px; color: var(--sage); }
.single-cpt__hero, .single-article__hero { margin: clamp(24px, 4vw, 40px) 0 clamp(24px, 4vw, 40px); border-radius: var(--radius-card); overflow: hidden; }
.single-cpt__hero img, .single-article__hero img { width: 100%; height: auto; aspect-ratio: 928 / 560; object-fit: cover; }

.single-cpt__grid, .single-article__grid { display: grid; grid-template-columns: minmax(0, 1fr) 416px; gap: clamp(32px, 3vw, 48px); align-items: start; }
.single-cpt__aside, .single-article__aside { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 24px; }
.single-cpt__cta { padding-top: 24px; }
.cpt-faq { margin-top: clamp(32px, 5vw, 56px); }
.cpt-faq .h-48 { margin-bottom: 16px; }

/* TOC */
.toc__title, .other-posts__title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: var(--fs-h4);
	line-height: 1.35;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--rose);
}
.toc__title { margin-bottom: 8px; }
.toc ul { display: flex; flex-direction: column; }
.toc li { border-bottom: 1px solid var(--line); }
.toc a { display: block; padding: 12px; font-size: var(--fs-body); color: var(--ink); }
.toc a.is-active { text-decoration: underline; text-underline-offset: 3px; color: var(--rose); }
.toc a:hover { color: var(--rose); }

/* Booking box (sticky CTA) */
.booking-box { background: var(--rose); color: #fff; border-radius: var(--radius-card); padding: 40px 24px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.booking-box__title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h3); line-height: 1.15; letter-spacing: 0.04em; text-transform: uppercase; color: #fff; }

/* ============================== TRETMANI ARCHIVE ======================= */
.tretmani-archive__grid { display: grid; grid-template-columns: 416px minmax(0, 1fr); gap: 32px; align-items: start; }
.filter-rail { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 48px; }
.filter-rail__intro { font-size: var(--fs-body); }
.filters { display: flex; flex-wrap: wrap; gap: 24px; }
.filter { padding: 12px 40px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: #fff; font-size: var(--fs-body-lg); line-height: 1.34; color: var(--ink); white-space: nowrap; transition: background 0.2s, border-color 0.2s, color 0.2s; }
.filter:hover { border-color: var(--rose); }
.filter.is-active { background: var(--cream); border-color: var(--cream); }
.treatment-rows { display: flex; flex-direction: column; gap: 32px; }
.treatment-row { display: flex; gap: 16px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); transition: box-shadow 0.25s; }
.treatment-row:hover { box-shadow: var(--shadow-card); }
.treatment-row__img { flex: 0 0 clamp(160px, 22vw, 320px); aspect-ratio: 1; border-radius: var(--radius-img); overflow: hidden; background: var(--placeholder); }
.treatment-row__img img { width: 100%; height: 100%; object-fit: cover; }
.treatment-row__body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 16px; padding: 24px 16px; }
.treatment-row__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.75rem, 3vw, 3rem); line-height: 1.1; letter-spacing: 0.04em; text-transform: uppercase; color: var(--rose); }
.treatment-row__body p { font-size: var(--fs-body); flex: 1 1 auto; }
.treatment-row__cta { border-top: 1px solid var(--line); padding-top: 12px; }

/* ============================== O NAMA / TIM ARCHIVE =================== */
.about-hero__inner { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; min-height: clamp(420px, 50vw, 840px); }
.about-hero__text { display: flex; flex-direction: column; justify-content: center; gap: 24px; padding-block: clamp(40px, 5vw, 80px); padding-inline: var(--gutter-l, var(--pad)) clamp(24px, 4vw, 64px); }
.about-hero__title { color: var(--rose); }
.about-hero__body { font-size: var(--fs-body-lg); }
.about-hero__media { position: relative; min-height: 320px; background: var(--placeholder); }
.about-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* TIM band (O nama + Tim archive) — tan section with white member cards */
.about-tim, .team-archive { background: var(--tan); padding-block: var(--section-y); }
.about-tim .section__title, .team-archive .section__title { margin-bottom: 40px; }
.about-tim .tim__cta, .team-archive .tim__cta { margin-top: 40px; }
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.member-card { background: #fff; border-radius: var(--radius-card); padding: 48px 32px; display: flex; flex-direction: column; gap: 16px; }
.member-card__avatar { width: 240px; max-width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--placeholder); margin: 0 auto 8px; }
.member-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-card__name { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h3); line-height: 1.15; letter-spacing: 0.04em; text-transform: uppercase; color: var(--rose); }
.member-card__role { font-size: var(--fs-body); }
.team-archive__more, .blog-list__more { display: flex; justify-content: center; margin-top: 40px; }
.about-tim { margin-top: 0; }

/* ============================== O NAMA (story page) ==================== */
.onama__wrap { max-width: 928px; margin: 0 auto; }
.onama__title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h1); line-height: 1.1; letter-spacing: 0.04em; text-transform: uppercase; color: var(--rose); }
.onama__hero { margin: clamp(24px, 4vw, 40px) 0; border-radius: var(--radius-card); overflow: hidden; }
.onama__hero img { width: 100%; height: auto; aspect-ratio: 928 / 560; object-fit: cover; }
.onama__body { margin-top: clamp(24px, 4vw, 40px); }
.onama__cta { margin-top: clamp(32px, 5vw, 56px); }

/* "Razvoj kroz godine" — interactive vertical timeline (native details) */
.rich-text .onama-timeline { position: relative; margin: clamp(28px, 4vw, 48px) 0; padding-left: 36px; }
.rich-text .onama-timeline::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px; background: var(--tan); }
.rich-text .onama-timeline .wp-block-details { border-bottom: 0; position: relative; margin: 0; }
.rich-text .onama-timeline .wp-block-details + .wp-block-details { margin-top: 4px; }
.rich-text .onama-timeline .wp-block-details summary { padding: 10px 0; font-size: var(--fs-h4); justify-content: flex-start; gap: 12px; }
.rich-text .onama-timeline .wp-block-details summary::before {
	content: "";
	position: absolute;
	left: -36px; top: 50%; transform: translateY(-50%);
	width: 16px; height: 16px; border-radius: 50%;
	background: var(--rose); box-shadow: 0 0 0 4px var(--white), 0 0 0 6px var(--tan);
	transition: background-color 0.25s var(--ease);
}
.rich-text .onama-timeline .wp-block-details[open] summary::before { background: var(--sage); }
.rich-text .onama-timeline .wp-block-details summary::after {
	width: 28px; height: 28px; background-size: 16px;
	background-color: transparent;
	background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23B38F87'><path d='M6.5 9.5h11L12 15.2z'/></svg>");
	box-shadow: none;
}
.rich-text .onama-timeline .wp-block-details[open] summary::after { background-color: transparent; }
.rich-text .onama-timeline .wp-block-details p { font-size: var(--fs-body); padding-bottom: 12px; }

@media (max-width: 600px) {
	.rich-text .onama-timeline { padding-left: 28px; }
	.rich-text .onama-timeline .wp-block-details summary::before { left: -28px; width: 14px; height: 14px; }
}

/* ============================== BLOG =================================== */
.blog-featured__inner { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; min-height: clamp(420px, 50vw, 840px); }
.blog-list__intro { max-width: 760px; margin: 0 auto clamp(32px, 5vw, 74px); text-align: center; font-size: var(--fs-body); }
.blog-featured__text { display: flex; flex-direction: column; justify-content: center; gap: 24px; padding-block: clamp(40px, 5vw, 80px); padding-inline: var(--gutter-l, var(--pad)) clamp(24px, 4vw, 64px); }
.blog-featured__meta { display: flex; align-items: center; gap: 16px; color: var(--sage); }
.blog-featured__excerpt { font-size: var(--fs-body-lg); }
.blog-featured__media { position: relative; min-height: 320px; background: var(--placeholder); }
.blog-featured__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.blog-filters { justify-content: center; margin-bottom: clamp(32px, 5vw, 56px); }
.post-card__text { display: flex; flex-direction: column; gap: 16px; }
.post-card__cta { border-top: 1px solid var(--line); padding-top: 12px; }

/* ============================== BLOG SINGLE SIDEBAR ==================== */
.share { display: flex; flex-direction: column; gap: 16px; }
.share__label { font-weight: 600; }
.share__icons { display: flex; gap: 16px; }
.share__icon { display: inline-flex; width: 24px; height: 24px; color: var(--ink); transition: color 0.2s, transform 0.2s; }
.share__icon:hover { color: var(--rose); transform: translateY(-1px); }
.share__icon.is-copied { color: var(--rose); }
.other-posts { display: flex; flex-direction: column; gap: 24px; }
.other-posts__list { display: flex; flex-direction: column; gap: 24px; }
.other-post { display: flex; gap: 16px; border-top: 1px solid var(--line); padding-top: 24px; }
.other-post__thumb { flex: 0 0 80px; width: 80px; height: 80px; border-radius: var(--radius-input); overflow: hidden; background: var(--placeholder); }
.other-post__thumb img { width: 100%; height: 100%; object-fit: cover; }
.other-post__body { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.other-post__title { font-family: var(--font-body); font-weight: 600; font-size: var(--fs-body-lg); line-height: 1.25; color: var(--ink); }
.other-post__title a:hover { color: var(--rose); }
.other-post__date { font-size: var(--fs-sm); color: var(--sage); }
.other-posts__all { display: flex; align-items: center; gap: 16px; border-top: 1px solid var(--line); padding-top: 12px; font-weight: 600; }
.other-posts__all .icon { width: 24px; height: 24px; color: var(--rose); }
.other-posts__all:hover { color: var(--rose); }

/* ============================== KONTAKT ================================ */
.contact__head { display: flex; flex-direction: column; gap: 16px; margin-bottom: clamp(32px, 4vw, 48px); }
.contact__sub { font-size: var(--fs-body-lg); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) 416px; gap: clamp(32px, 5vw, 64px); align-items: start; }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form__row { display: flex; gap: 16px; }
.contact-form__row .form-field { flex: 1 1 0; }
/* Design: roomy 76px-tall inputs, sage placeholders */
.contact-form .form-field input { padding: 24px; }
.contact-form .form-field textarea { padding: 16px 24px; }
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--sage); }
.contact-form__cta { margin-top: 8px; }
.contact-info { display: flex; flex-direction: column; gap: 48px; }
.contact-info__block { display: flex; flex-direction: column; gap: 8px; }
.contact-info__block p { font-size: var(--fs-body); line-height: 1.6; }
.contact-info__block a { text-decoration: underline; text-underline-offset: 2px; }
.contact-info__block a:hover { color: var(--rose); }
.contact-map { position: relative; height: clamp(360px, 40vw, 640px); background: var(--placeholder); }
.contact-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.contact-map__placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 24px; background: var(--cream); }
.contact-map.is-loaded .contact-map__placeholder { display: none; }

/* ============================== RESPONSIVE ============================= */
@media (max-width: 1024px) {
	.single-cpt__grid, .single-article__grid, .contact__grid { grid-template-columns: 1fr; }
	.single-cpt__aside, .single-article__aside, .filter-rail { position: static; }
	.tretmani-archive__grid { grid-template-columns: 1fr; }
	.problem-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
	.about-hero__inner, .blog-featured__inner { grid-template-columns: 1fr; }
	.about-hero__text, .blog-featured__text { padding-inline: var(--pad); order: 2; }
	.about-hero__media, .blog-featured__media { order: 1; min-height: 320px; }
}
@media (max-width: 720px) {
	.problem-grid { grid-template-columns: 1fr; }
	.team-grid { grid-template-columns: 1fr; }
	.treatment-row { flex-direction: column; }
	.treatment-row__img { flex-basis: auto; width: 100%; aspect-ratio: 16 / 10; }
	.contact-form__row { flex-direction: column; }
	.rich-text .wp-block-gallery { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
