/*
Theme Name: Zmajica
Theme URI: https://www.zmajica.com/
Description: Tema za Psihološko-edukativni centar Zmajica. Naslovnica, stranice sadržaja i obrazac za upit.
Version: 1.5.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zmajica
*/

:root {
	--cream: #F7F2EA;
	--ink: #2B2A26;
	--muted: #5E5A52;
	--sage: #3E6B5A;
	--sage-dark: #2C4F42;
	--sage-light: #E4EBE3;
	--sage-soft: #E8EFE9;
	--terra: #A4552F;
	--terra-dark: #8A4526;
	--terra-light: #F3E6DA;
	--line: #E6DDCF;
	--field: #CFC6B8;
	--white: #FFFFFF;
	--serif: 'Fraunces', Georgia, 'Times New Roman', serif;
	--sans: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--gutter: 24px;
	--section: 64px;
}

@media (min-width: 900px) {
	:root { --gutter: 48px; --section: 96px; }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--cream);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

main { flex: 1 0 auto; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--sage); }
a:hover { color: var(--sage-dark); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; }

p { margin: 0; }

.wrap { width: 100%; max-width: 1344px; margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
	position: absolute; left: -9999px; top: 8px; z-index: 100;
	background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--terra); outline-offset: 3px; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 48px; padding: 0 24px; border-radius: 999px;
	font-family: var(--sans); font-weight: 700; font-size: 16px; line-height: 1;
	text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}
.btn-lg { min-height: 56px; padding: 0 32px; font-size: 17px; }
.btn-primary { background: var(--sage); color: var(--white); }
.btn-primary:hover { background: var(--sage-dark); color: var(--white); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: #000; color: var(--white); }

.eyebrow {
	display: block; font-size: 13px; font-weight: 700; letter-spacing: .1em;
	text-transform: uppercase; color: var(--terra);
}

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--cream); position: relative; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand svg { width: 34px; height: auto; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1; }
.brand-sub { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }

.header-cta { flex-shrink: 0; }
@media (max-width: 520px) {
	.brand-sub { display: none; }
	.header-cta { min-height: 44px; padding: 0 16px; font-size: 15px; }
}
@media (max-width: 380px) {
	:root { --gutter: 16px; }
	.header-inner { gap: 10px; }
	.brand { gap: 8px; }
	.brand-name { font-size: 21px; }
	.header-cta { padding: 0 12px; font-size: 14px; }
}

/* Hero */
.hero { padding: 48px 0 var(--section); }
.hero-grid { display: grid; gap: 48px; align-items: center; }
.hero-text { display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.05; letter-spacing: -.01em; }
.hero-lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-top: 4px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 15px; color: var(--muted); }
.hero-badges li { display: flex; align-items: center; gap: 8px; }
.hero-visual { position: relative; max-width: 540px; width: 100%; justify-self: center; }
.hero-visual svg { width: 100%; height: auto; display: block; }
.hero-photo img { width: 100%; aspect-ratio: 540 / 520; object-fit: cover; border-radius: 280px 280px 32px 32px; }
.hero-quote {
	position: relative; margin: -20px 0 0 16px; width: min(300px, 85%);
	background: var(--white); border-radius: 20px; padding: 20px 22px;
	box-shadow: 0 12px 32px rgba(43, 42, 38, .08);
	display: flex; flex-direction: column; gap: 6px; margin: 0;
}
.hero-quote p { font-family: var(--serif); font-size: 19px; font-weight: 600; line-height: 1.3; }
.hero-quote cite { font-style: normal; font-size: 14px; color: var(--muted); }

@media (min-width: 900px) {
	.hero { padding-top: 88px; }
	.hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 72px; }
	.hero-visual { justify-self: end; padding-bottom: 40px; }
	.hero-quote { position: absolute; left: -40px; bottom: 0; margin: 0; width: 280px; }
}

/* Sections */
.section { padding: var(--section) 0; }
.section-white { background: var(--white); }
.section-sage { background: var(--sage-light); }
.section-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(32px, 3.6vw, 46px); }
.section-head-split { display: grid; gap: 20px; align-items: end; margin-bottom: 40px; }
.section-head-split .section-head { margin-bottom: 0; max-width: 640px; }
.section-note { font-size: 17px; color: var(--muted); max-width: 420px; }
@media (min-width: 900px) {
	.section-head-split { grid-template-columns: 1fr auto; gap: 48px; }
}

/* Topics (chips) */
.topics { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0 0 48px; padding: 0; }
.topics li { padding: 10px 20px; border-radius: 999px; background: var(--terra-light); font-weight: 600; font-size: 16px; }
.topics li:nth-child(even) { background: var(--sage-light); }

/* Service cards */
.cards { display: grid; gap: 20px; }
@media (min-width: 900px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
.card { background: var(--cream); border-radius: 24px; padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.card h3 { font-size: 25px; }
.card p { color: var(--muted); }
.card .more { margin-top: auto; padding-top: 6px; font-weight: 700; }
.cards.has-open { align-items: start; }
.card { transition: box-shadow .25s ease; }
.card.is-open { box-shadow: 0 16px 40px rgba(43, 42, 38, .12); background: var(--white); outline: 1.5px solid var(--line); }
.card-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.card.is-open .card-more { grid-template-rows: 1fr; }
.card-more-inner { overflow: hidden; display: flex; flex-direction: column; gap: 12px; }
.card-more-inner p { color: var(--ink); font-size: 16px; }
.card-more-inner p:first-child { margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.card-toggle {
	align-self: flex-start; background: none; border: 0; padding: 6px 0 0; margin-top: auto;
	font: inherit; font-weight: 700; color: var(--sage); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.card-toggle:hover { color: var(--sage-dark); }
.card-toggle .t-close { display: none; }
.card.is-open .card-toggle .t-open { display: none; }
.card.is-open .card-toggle .t-close { display: inline; }
@media (prefers-reduced-motion: reduce) { .card-more { transition: none; } }
.card-icon { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--sage-light); }
.card-icon.is-terra { background: var(--terra-light); }
.also { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 32px; color: var(--muted); font-size: 16px; }
.also strong { color: var(--ink); }

/* Steps */
.steps { display: grid; gap: 32px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; } }
.steps li { border-top: 2px solid var(--ink); padding-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.step-num { font-family: var(--serif); font-size: 40px; line-height: 1; color: var(--terra); }
.steps h3 { font-size: 24px; }
.steps p { color: var(--muted); }

/* Team */
.team-grid { display: grid; gap: 32px; }
.team-intro { display: flex; flex-direction: column; gap: 20px; }
.team-intro h2 { font-size: clamp(32px, 3.6vw, 46px); }
.team-intro p { color: #3F4A43; }
@media (min-width: 700px) { .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .team-intro { grid-column: 1 / -1; } }
@media (min-width: 1100px) { .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; } .team-intro { grid-column: auto; } }
.person { background: var(--white); border-radius: 24px; overflow: hidden; display: flex; flex-direction: column; }
.person-photo img, .person-photo .placeholder { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.person-photo .placeholder {
	display: flex; align-items: center; justify-content: center;
	font-family: var(--serif); font-size: 56px; color: var(--sage); background: #D5DFD4;
}
.person-photo .placeholder.is-terra { color: var(--terra); background: #EADCCD; }
.person-body { padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.person-body h3 { font-size: 26px; }
.person-role { font-size: 15px; font-weight: 700; color: var(--terra); }
.person-body p { color: var(--muted); font-size: 16px; }
.person-body .more { font-weight: 700; margin-top: 6px; }

/* Contact */
.contact { padding: 0 0 var(--section); }
.contact-box {
	background: var(--sage); color: var(--white); border-radius: 32px;
	padding: 40px 24px; display: grid; gap: 40px;
}
@media (min-width: 900px) { .contact-box { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; padding: 72px; } }
.contact-info { display: flex; flex-direction: column; gap: 20px; }
.contact-info h2 { font-size: clamp(36px, 4vw, 50px); line-height: 1.1; color: var(--white); }
.contact-info > p { font-size: 19px; color: var(--sage-soft); }
.contact-lines { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; font-size: 18px; }
.contact-lines a { color: var(--white); }
.contact-lines .tel { font-weight: 700; text-decoration: none; }
.contact-lines span { color: var(--sage-soft); }

.contact-form { background: var(--white); color: var(--ink); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 900px) { .contact-form { padding: 36px; } }
.contact-form .form-title { font-family: var(--serif); font-size: 26px; font-weight: 600; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 700; }
.contact-form input[type="text"], .contact-form textarea {
	width: 100%; min-height: 48px; border: 1px solid var(--field); border-radius: 12px;
	padding: 12px 14px; font: inherit; font-weight: 400; font-size: 16px; color: var(--ink); background: var(--white);
}
.contact-form textarea { resize: vertical; min-height: 110px; }
.contact-form .consent { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 14px; color: var(--muted); line-height: 1.5; }
.contact-form .consent input { width: 20px; height: 20px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--sage); }
.contact-form .consent a { color: var(--sage); }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .btn { width: 100%; min-height: 52px; font-size: 17px; }
.form-msg { border-radius: 12px; padding: 12px 14px; font-size: 15px; font-weight: 600; }
.form-msg.ok { background: var(--sage-light); color: var(--sage-dark); }
.form-msg.err { background: var(--terra-light); color: var(--terra-dark); }

/* Footer */
.site-footer { background: var(--ink); color: #CFC8BC; padding: 48px 0; font-size: 15px; line-height: 1.7; }
.footer-inner { display: flex; flex-direction: column; gap: 28px; }
@media (min-width: 900px) { .footer-inner { flex-direction: row; justify-content: space-between; align-items: flex-start; } }
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-name { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--white); text-decoration: none; margin-bottom: 6px; }
.footer-name:hover { color: var(--white); }
.footer-name svg { width: 28px; height: auto; }
.footer-name svg path[stroke="#2B2A26"] { stroke: #F7F2EA; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-nav a { color: var(--white); text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; color: var(--white); }

/* Inner pages */
.page-wrap { max-width: 800px; margin: 0 auto; padding: 64px var(--gutter) var(--section); }
.page-title { font-size: clamp(34px, 4vw, 48px); margin-bottom: 32px; }
.entry { font-size: 18px; line-height: 1.7; }
.entry > * + * { margin-top: 1.1em; }
.entry h2 { font-size: 30px; margin-top: 1.8em; }
.entry h3 { font-size: 23px; margin-top: 1.5em; }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry img { border-radius: 16px; }
.entry .alignleft { float: left; margin: 0 24px 16px 0; }
.entry .alignright { float: right; margin: 0 0 16px 24px; }
.entry .aligncenter { margin-left: auto; margin-right: auto; }
.entry::after { content: ""; display: table; clear: both; }
.post-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 32px; }
.post-list h2 { font-size: 28px; margin-bottom: 8px; }
.post-list h2 a { color: var(--ink); text-decoration: none; }
.pagination { margin-top: 48px; display: flex; gap: 16px; }

/* Cjenik */
.price-hero { padding: 64px 0 8px; }
.price-hero .wrap { display: flex; flex-direction: column; gap: 14px; }
.price-hero h1 { font-size: clamp(38px, 5vw, 60px); }
.price-body { padding: 32px 0 var(--section); }
.price-card { background: var(--white); border-radius: 24px; padding: 24px; max-width: 960px; }
@media (min-width: 900px) { .price-card { padding: 48px 56px; } }
.price-card .entry { font-size: 17px; }
.price-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; margin-top: 40px; max-width: 960px; }
.price-cta p { font-size: 18px; color: var(--muted); }

/* Tablice (npr. cjenik) */
.entry .wp-block-table { margin: 0; overflow-x: auto; }
.entry table { width: 100%; border-collapse: collapse; font-size: 17px; }
.entry th, .entry td { text-align: left; padding: 16px 12px; border: 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.entry thead th { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--terra); border-bottom: 2px solid var(--ink); }
.entry td:first-child, .entry th:first-child { padding-left: 0; }
.entry td:last-child, .entry th:last-child { padding-right: 0; text-align: right; white-space: nowrap; font-weight: 700; }
.entry tbody tr:last-child td { border-bottom: 0; }
.entry .wp-block-table figcaption, .entry table caption { font-size: 14px; color: var(--muted); margin-top: 12px; text-align: left; }
.entry .wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: var(--cream); }

/* Cjenik – popis usluga (blok „Prilagođeni HTML” na stranici Cjenik) */
.cjenik-vrijedi { display: block; margin-bottom: 28px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--terra); }
.cjenik-grupa + .cjenik-grupa { margin-top: 48px; }
.entry .cjenik-grupa h2 { font-size: 28px; margin: 0; padding-bottom: 12px; border-bottom: 2px solid var(--sage); }
.cjenik-stavka { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.cjenik-stavka:last-child { border-bottom: 0; }
.cjenik-opis { flex: 1 1 320px; min-width: 0; }
.entry .cjenik-opis h3 { font-family: var(--sans); font-size: 18px; font-weight: 700; margin: 0; line-height: 1.4; }
.entry .cjenik-opis p { margin: 6px 0 0; font-size: 15px; color: var(--muted); line-height: 1.55; }
.cjenik-cijena { display: flex; flex-direction: column; align-items: flex-end; text-align: right; flex: 0 0 auto; }
.cjenik-iznos { font-size: 20px; font-weight: 700; white-space: nowrap; }
.cjenik-ref { font-size: 13px; color: var(--muted); white-space: nowrap; margin-top: 2px; }
.entry .cjenik-datum { margin-top: 40px; font-size: 16px; color: var(--muted); }
@media (max-width: 520px) {
	.cjenik-cijena { align-items: flex-start; text-align: left; }
}

.price-download { margin: 20px 0 0; max-width: 960px; }
.price-download a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; color: var(--sage); }
.price-download a:hover { color: var(--sage-dark); }

/* Captcha by BestWebSoft u obrascu */
.form-captcha { font-size: 15px; color: var(--ink); }
.form-captcha label { font-weight: 700; }
.form-captcha input[type="text"], .form-captcha input[type="number"] {
	width: 72px; min-height: 44px; border: 1px solid var(--field); border-radius: 10px;
	padding: 0 10px; font: inherit; font-size: 16px; text-align: center;
}
.form-captcha img { display: inline-block; vertical-align: middle; }
