/*
Theme Name: RK Recepti
Description: Tema za Recepti za kolače: brza, pregledna i prilagođena mobitelima. Radi zajedno s dodatkom RK Recepti.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.0
Author: Recepti za kolače
Text Domain: rk-recepti
License: GPL-2.0-or-later
Fonts: Bricolage Grotesque and Inter, SIL Open Font License 1.1, self-hosted.
*/

:root {
	--c-green: #1F6B3A;
	--c-dark: #12432A;
	--c-ink: #1A1F1C;
	--c-text: #3E4742;
	--c-muted: #5C6560;
	--c-line: #E4E0D8;
	--c-border: #D9D4CA;
	--c-surface: #F5F3EE;
	--c-mint: #E7F0EA;
	--c-saffron: #F0A830;
	--f-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
	--f-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
	--wrap: 1240px;
	--gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--c-ink); font-family: var(--f-body); font-size: 16px; line-height: 1.5; }
img { max-width: 100%; height: auto; }
a { color: var(--c-green); }
a:hover { color: var(--c-dark); }
:focus-visible { outline: 3px solid var(--c-green); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--f-display); letter-spacing: -0.02em; line-height: 1.15; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; left: 16px; top: 16px; z-index: 1000; width: auto; height: auto; clip: auto; background: #fff; padding: 12px 16px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Header */
.site-header { border-bottom: 1px solid var(--c-line); background: #fff; }
.site-header__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding-top: 16px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--c-ink); }
.brand img { width: 44px; height: 44px; }
.brand__name { font-family: var(--f-display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.header-search { flex: 1 1 280px; }
.site-header__bar .rkz-account-nav { order: 5; }
.search-pill { display: flex; align-items: center; gap: 8px; background: var(--c-surface); border-radius: 999px; padding: 0 6px 0 18px; min-height: 48px; }
.search-pill svg { flex: none; color: var(--c-muted); }
.search-pill input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--c-ink); }
.search-pill input:focus { outline: none; }
.search-pill:focus-within { outline: 3px solid var(--c-green); outline-offset: 1px; }
.search-pill button { border: 0; background: transparent; color: var(--c-green); font: inherit; font-weight: 600; min-height: 40px; padding: 0 12px; border-radius: 999px; cursor: pointer; }
.menu-toggle { display: none; }
.cat-nav ul { list-style: none; margin: 0; padding: 0 0 8px; display: flex; flex-wrap: wrap; gap: 0 24px; font-size: 15px; font-weight: 500; }
.cat-nav a { display: block; padding: 10px 0; color: var(--c-ink); text-decoration: none; }
.cat-nav a:hover, .cat-nav .current-cat > a, .cat-nav .current-menu-item > a { color: var(--c-green); box-shadow: inset 0 -2px 0 var(--c-green); }

/* Buttons and chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 10px; border: 1px solid var(--c-border); background: #fff; color: var(--c-ink); font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--c-green); color: var(--c-ink); }
.btn--primary { background: var(--c-green); border-color: var(--c-green); color: #fff; }
.btn--primary:hover { background: var(--c-dark); border-color: var(--c-dark); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; text-decoration: none; color: var(--c-ink); background: #fff; border: 1px solid var(--c-border); border-radius: 999px; padding: 10px 16px; font-size: 14px; font-weight: 500; }
.chip:hover { border-color: var(--c-green); color: var(--c-green); }
.label { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--c-green); text-decoration: none; }

/* Sections */
.section { padding-top: 64px; }
.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 24px; }
.section__title { margin: 0; font-weight: 800; font-size: 32px; }
.section__more { font-weight: 600; font-size: 15px; }

/* Hero */
.hero { background: var(--c-surface); }
.hero__inner { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.hero__text { flex: 1 1 440px; display: flex; flex-direction: column; gap: 24px; }
.hero__title { margin: 0; font-weight: 800; font-size: clamp(40px, 6vw, 64px); line-height: 1.02; letter-spacing: -0.035em; }
.hero__lead { margin: 0; font-size: 19px; line-height: 1.55; color: var(--c-text); max-width: 30em; }
.hero-search { display: flex; gap: 8px; background: #fff; border: 1px solid var(--c-border); border-radius: 16px; padding: 8px; max-width: 560px; }
.hero-search input { flex: 1; min-width: 0; border: 0; font: inherit; font-size: 17px; padding: 0 12px; background: transparent; }
.hero-search input:focus { outline: none; }
.hero-search:focus-within { outline: 3px solid var(--c-green); outline-offset: 1px; }
.feature { flex: 1 1 480px; position: relative; display: block; border-radius: 24px; overflow: hidden; color: #fff; text-decoration: none; min-height: 440px; background: var(--c-dark); }
.feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 120px 28px 28px; background: linear-gradient(to top, rgba(10,20,14,.85), rgba(10,20,14,0)); }
.badge { display: inline-block; background: var(--c-saffron); color: var(--c-ink); font-size: 13px; font-weight: 600; border-radius: 999px; padding: 6px 12px; }
.feature__title { display: block; margin-top: 12px; font-family: var(--f-display); font-weight: 800; font-size: clamp(26px, 3vw, 34px); line-height: 1.1; letter-spacing: -0.02em; }
.feature__meta { display: block; margin-top: 8px; font-size: 15px; color: #E9EFEA; }
.feature:hover { color: #fff; }
.feature:hover .feature__title { text-decoration: underline; text-underline-offset: 4px; }

/* Category tiles */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.cat-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.cat-tile { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--c-ink); border: 1px solid var(--c-line); border-radius: 16px; padding: 12px 16px 12px 12px; transition: border-color .15s, box-shadow .15s; }
.cat-tile:hover { border-color: var(--c-green); box-shadow: 0 4px 16px rgba(18, 67, 42, .08); color: var(--c-ink); }
.cat-tile__img { width: 64px; height: 64px; flex: none; border-radius: 12px; object-fit: cover; background: var(--c-surface); }
.cat-tile__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cat-tile strong { font-weight: 600; font-size: 16px; }
.cat-tile:hover strong { color: var(--c-green); }
.cat-tile__text span { font-size: 14px; color: var(--c-muted); }

/* Recipe cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 32px 24px; }
.cards--3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 10px; }
.card__img { display: block; position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--c-surface); }
.card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.card:hover .card__img img { transform: scale(1.03); }
.card__video { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.95); color: var(--c-dark); font-size: 13px; font-weight: 600; border-radius: 999px; padding: 6px 10px; }
.card__title { margin: 0; font-weight: 600; font-size: 20px; line-height: 1.25; letter-spacing: -0.01em; }
.card__title a { color: var(--c-ink); text-decoration: none; }
.card__title a:hover { color: var(--c-green); }
.card__meta { font-size: 14px; color: var(--c-muted); }

/* Video band */
.video-band { background: var(--c-dark); color: #fff; border-radius: 24px; padding: 40px; }
.video-band .section__head a, .video-band .card__title a { color: #fff; }
.video-band .card__meta, .video-band .label { color: #CFE0D5; }
.video-band .card__img { aspect-ratio: 16 / 10; }

/* Archive */
.page-head { padding-top: 24px; }
.crumbs { font-size: 14px; color: var(--c-muted); display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs a { color: var(--c-green); }
.page-head__row { margin-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.page-title { margin: 0; font-weight: 800; font-size: clamp(36px, 5vw, 52px); letter-spacing: -0.03em; }
.page-lead { margin: 8px 0 0; font-size: 17px; color: var(--c-text); max-width: 46em; }
.sort { display: flex; align-items: center; gap: 8px; }
.sort label { font-size: 14px; color: var(--c-text); }
.sort select { font: inherit; font-size: 15px; min-height: 44px; border: 1px solid var(--c-border); border-radius: 10px; padding: 0 12px; background: #fff; }
.listing { padding-top: 32px; padding-bottom: 64px; }
.pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border-radius: 10px; border: 1px solid var(--c-border); color: var(--c-ink); text-decoration: none; font-weight: 600; }
.pagination .page-numbers.current { background: var(--c-dark); border-color: var(--c-dark); color: #fff; }
.pagination .page-numbers.dots { border: 0; }
.empty { padding: 48px 0; font-size: 18px; color: var(--c-text); }

/* Single recipe */
.recipe { padding-bottom: 64px; }
.recipe__top { display: flex; flex-wrap: wrap; gap: 48px; margin-top: 24px; align-items: flex-start; }
.recipe__head { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.recipe__title { margin: 0; font-weight: 800; font-size: clamp(34px, 4.6vw, 52px); line-height: 1.05; letter-spacing: -0.03em; }
.recipe__lead { margin: 0; font-size: 18px; line-height: 1.6; color: var(--c-text); }
.recipe__date { font-size: 14px; color: var(--c-muted); }
.recipe__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.recipe__media { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.recipe__photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 24px; display: block; background: var(--c-surface); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 0; }
.facts div { background: var(--c-surface); border-radius: 14px; padding: 14px 16px; }
.facts dt { font-size: 13px; color: var(--c-muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; font-size: 17px; }
.recipe__intro, .recipe__video, .entry { max-width: 760px; margin: 48px 0 0; }
.recipe__intro { font-size: 18px; line-height: 1.7; color: var(--c-ink); }
.recipe__intro > :first-child { margin-top: 0; }
.recipe__intro h2, .recipe__intro h3, .recipe__intro h4 { font-family: var(--f-display); }
.recipe__intro img, .entry img { border-radius: 14px; }
.entry { font-size: 17px; line-height: 1.7; }
.entry h2, .entry h3, .entry h4 { margin: 1.6em 0 .5em; }
.entry ul, .entry ol { padding-left: 1.4em; }
.entry li { margin: .3em 0; }
.entry iframe { max-width: 100%; }
.tags { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tags__label { font-size: 14px; color: var(--c-muted); margin-right: 4px; }
.tags a { font-size: 14px; text-decoration: none; background: var(--c-surface); color: var(--c-ink); border-radius: 999px; padding: 8px 12px; }
.tags a:hover { background: var(--c-mint); color: var(--c-dark); }

/* Footer */
.site-footer { background: var(--c-dark); color: #E3EDE6; margin-top: 80px; font-size: 15px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-footer :focus-visible { outline-color: var(--c-saffron); }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 48px 64px; padding-top: 56px; padding-bottom: 48px; }
.site-footer__about { flex: 1 1 320px; max-width: 420px; display: flex; flex-direction: column; gap: 16px; }
.brand--light, .brand--light:hover { color: #fff; text-decoration: none !important; }
.brand__icon { width: 44px; height: 44px; border-radius: 12px; }
.site-footer__about p { margin: 0; line-height: 1.6; color: #CFE0D5; }
.site-footer__search .search-pill { background: rgba(255, 255, 255, .1); }
.site-footer__search .search-pill input { color: #fff; }
.site-footer__search .search-pill input::placeholder { color: #B5C9BC; }
.site-footer__search .search-pill svg { color: #B5C9BC; }
.site-footer__search .search-pill button { color: var(--c-saffron); }
.site-footer__search .search-pill:focus-within { outline-color: var(--c-saffron); }
.site-footer__nav { flex: 999 1 480px; display: flex; flex-wrap: wrap; gap: 40px 56px; }
.site-footer__col h2 { margin: 0 0 16px; font-family: var(--f-display); font-size: 17px; font-weight: 700; letter-spacing: 0; color: #fff; }
.site-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.site-footer__col a { color: #E3EDE6; }
.site-footer__col a:hover { color: #fff; }
.site-footer__col--wide ul { display: grid; grid-template-columns: repeat(2, minmax(0, auto)); gap: 12px 40px; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); }
.site-footer__bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 24px; font-size: 14px; color: #B5C9BC; }
.site-footer__bar a { color: #E3EDE6; }

.page-count { margin: 6px 0 0; font-size: 15px; font-weight: 600; color: var(--c-green); }
.notfound { padding-bottom: 64px; }
.notfound .page-title { margin-top: 20px; }
.notfound__search { margin: 20px 0 24px; max-width: 560px; }
.empty p { margin: 0 0 8px; }

/* Phones */
@media (max-width: 700px) {
	:root { --gutter: 16px; }
	.site-header__bar { gap: 12px; }
	.brand__name { font-size: 19px; }
	.brand img { width: 38px; height: 38px; }
	.site-header__bar { flex-wrap: wrap; gap: 12px 8px; }
	.brand { flex: 1 1 0; min-width: 0; gap: 10px; } /* shrinks before the buttons wrap */
	.brand__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.brand img { flex: none; }
	.menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1px solid var(--c-border); border-radius: 12px; background: #fff; cursor: pointer; color: var(--c-ink); }
	.menu-toggle[aria-expanded="true"] { background: var(--c-mint); border-color: var(--c-green); }
	.crumbs [aria-current], .crumbs span[aria-hidden]:nth-last-child(2) { display: none; }
	.facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
	.facts div { padding: 12px; }
	.facts dd { font-size: 15px; }
	.header-search { order: 10; flex-basis: 100%; }
	.site-header__bar .rkz-account-nav { order: 2; }
	.menu-toggle { order: 3; }
	.cat-nav { display: none; }
	.cat-nav.is-open { display: block; }
	.cat-nav ul { flex-direction: column; gap: 0; padding-bottom: 12px; }
	.cat-nav a { padding: 12px 0; border-bottom: 1px solid var(--c-line); }
	.hero__inner { padding-top: 32px; padding-bottom: 32px; gap: 28px; }
	.hero__lead { font-size: 17px; }
	.feature { min-height: 340px; flex-basis: 100%; }
	.section { padding-top: 48px; }
	.section__title { font-size: 26px; }
	.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
	.card__title { font-size: 16px; }
	.card__meta { font-size: 13px; }
	.video-band { padding: 24px 16px; border-radius: 18px; }
	.video-band .cards { grid-template-columns: 1fr; }
	.recipe__top { gap: 24px; margin-top: 16px; }
	.cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.cat-tile { gap: 10px; padding: 8px 10px 8px 8px; border-radius: 14px; }
	.cat-tile__img { width: 44px; height: 44px; border-radius: 10px; }
	.cat-tile strong { font-size: 15px; line-height: 1.25; }
	.cat-tile__text span { font-size: 13px; }
	.site-footer { margin-top: 56px; }
	.site-footer__inner { padding-top: 40px; padding-bottom: 32px; gap: 36px; }
	.site-footer__nav { gap: 32px 40px; }
	.site-footer__col--wide { flex-basis: 100%; }
	.recipe__photo { border-radius: 18px; }
	.recipe__actions .btn { flex: 1 1 auto; }
	.recipe__intro { font-size: 17px; margin-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
	.card__img img { transition: none; }
	.card:hover .card__img img { transform: none; }
}

@media print {
	.site-header, .site-footer, .recipe__actions, .related, .tags, .recipe__video { display: none !important; }
}

/* Narrow phones with the bell and account button in the header */
@media (max-width: 400px) {
	.brand__name { font-size: 16px; }
	.brand img { width: 34px; height: 34px; }
	.menu-toggle { width: 44px; height: 44px; }
}
