/*
Theme Name: HHO Portal
Description: Tema za portal Hrvatskog helsinškog odbora za ljudska prava. Radi zajedno s pluginom HHO Newsdesk.
Version: 0.1.0
Author: MG Solutions
Requires PHP: 8.0
Text Domain: hho
*/

:root {
	--ink: #1a1a18;
	--ink-2: #3c3d3a;
	--muted: #62666a;
	--line: #e2e5e5;
	--soft: #f2f6f6;
	--bg: #ffffff;
	--teal: #1ebebe;
	--teal-ink: #0a7474;
	--teal-deep: #0d4f50;
	--serif: "Source Serif 4", Georgia, "Times New Roman", serif;
	--sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
	--w: 1200px;
	--w-text: 720px;
	--gap: clamp(16px, 2.4vw, 28px);
	--radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--teal-ink); }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; margin: 0; font-weight: 700; letter-spacing: -.005em; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--w); margin: 0 auto; padding: 0 16px; }
@media (min-width: 800px) { .wrap { padding: 0 24px; } }
.wrap--text { max-width: calc(var(--w-text) + 48px); }
.wrap--wide { max-width: calc(980px + 48px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Gornja traka i zaglavlje ---------- */
.topbar { background: var(--ink); color: #c9cccc; font-size: 13px; }
.topbar__in { display: flex; gap: 16px; align-items: center; min-height: 34px; }
.topbar__date::first-letter { text-transform: uppercase; }
.topbar__org { margin-right: auto; display: none; }
.topbar__link { color: #fff; font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--teal); }
.topbar__link:hover { color: var(--teal); }
@media (min-width: 800px) { .topbar__org { display: inline; padding-left: 16px; border-left: 1px solid #44463f; } }
@media (max-width: 799px) { .topbar__in { justify-content: space-between; } }

.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.site-header__in { display: flex; align-items: center; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; margin-right: auto; }
.brand img { width: 64px; height: auto; }
.brand__text { display: flex; flex-direction: column; border-left: 1px solid var(--line); padding-left: 14px; }
.brand__name { font: italic 700 26px/1.05 var(--serif); }
.brand__tag { font-size: 13px; color: var(--muted); margin-top: 3px; }
.brand:hover { color: inherit; }
@media (min-width: 800px) { .brand img { width: 80px; } .brand__name { font-size: 32px; } .brand__tag { font-size: 14px; } }
@media (max-width: 420px) { .brand__tag { display: none; } .brand img { width: 52px; } .brand__name { font-size: 22px; } }

.search { display: flex; align-items: stretch; }
.search input { border: 1px solid var(--line); border-right: 0; padding: 8px 12px; font: inherit; font-size: 15px; min-width: 0; border-radius: var(--radius) 0 0 var(--radius); background: var(--soft); }
.search button { border: 1px solid var(--ink); background: var(--ink); color: #fff; padding: 0 12px; border-radius: 0 var(--radius) var(--radius) 0; display: grid; place-items: center; }
.search--header { display: none; }
@media (min-width: 900px) { .search--header { display: flex; } .search--header input { width: 220px; } }
.search--page { max-width: 560px; margin-top: 18px; }
.search--page input { flex: 1; padding: 12px 14px; font-size: 17px; }

.nav-toggle { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 20px; height: 2px; background: var(--ink); position: relative; transition: transform .2s; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; } .nav-toggle__bars::after { top: 6px; }
.nav-open .nav-toggle__bars { background: transparent; }
.nav-open .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

.main-nav { border-top: 1px solid var(--line); display: none; }
.nav-open .main-nav { display: block; }
.main-nav > .wrap > .menu { list-style: none; margin: 0; padding: 6px 0 12px; }
.main-nav a { display: block; padding: 10px 0; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--soft); }
.main-nav .current-menu-item > a, .main-nav .current-cat > a { color: var(--teal-ink); }
@media (min-width: 900px) {
	.nav-toggle { display: none; }
	.main-nav { display: block; }
	.main-nav .menu { display: flex; gap: 4px; padding: 0; overflow-x: auto; }
	.main-nav a { padding: 12px 14px; border-bottom: 3px solid transparent; font-size: 16px; }
	.main-nav li:first-child a { padding-left: 0; }
	.main-nav a:hover, .main-nav .current-menu-item > a { border-bottom-color: var(--teal); color: var(--ink); }
}

.theme-nav { background: var(--soft); border-top: 1px solid var(--line); }
.theme-nav__in { display: flex; align-items: center; gap: 12px; }
.theme-nav__label { font: 700 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); flex: none; }
.theme-nav .menu { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.theme-nav .menu::-webkit-scrollbar { display: none; }
.main-nav .theme-nav a { padding: 9px 10px; font-size: 14px; font-weight: 500; border: 0; white-space: nowrap; color: var(--ink-2); }
.main-nav .theme-nav a:hover { color: var(--teal-ink); }
@media (max-width: 899px) {
	.theme-nav { background: #fff; }
	.theme-nav__in { flex-direction: column; align-items: flex-start; gap: 0; padding-top: 8px; }
	.theme-nav .menu { flex-direction: column; width: 100%; }
	.main-nav .theme-nav a { padding: 8px 0; font-size: 15px; }
}

/* ---------- Kartice ---------- */
.kicker { display: inline-block; font: 700 12px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--teal-ink); text-decoration: none; margin: 0 0 8px; }
.kicker:hover { color: var(--ink); }
.meta { color: var(--muted); font-size: 14px; margin: 8px 0 0; }

.c { display: flex; flex-direction: column; min-width: 0; }
.c__img { display: block; overflow: hidden; border-radius: var(--radius); background: var(--soft); aspect-ratio: 16 / 9; margin-bottom: 12px; }
.c__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.c:hover .c__img img { transform: scale(1.03); }
.c__title { font-size: 21px; }
.c__title a { text-decoration: none; }
.c__title a:hover { text-decoration: underline; color: inherit; }
.c__excerpt { color: var(--ink-2); margin: 8px 0 0; font-size: 16px; }

.c--lead .c__title { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.12; }
.c--lead .c__excerpt { font-size: 18px; }

.c--row { flex-direction: row; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.c--row .c__img { flex: 0 0 120px; aspect-ratio: 3 / 2; margin: 0; align-self: flex-start; }
.c--row .ph span { display: none; }
.c--row .ph::after { font-size: 40px; }
.c--row .c__title { font-size: 18px; }
@media (min-width: 560px) { .c--row .c__img { flex-basis: 160px; } }

.c--text { padding: 14px 0; border-top: 1px solid var(--line); }
.c--text .c__title { font-size: 18px; }

/* Zamjena kad nema slike */
.ph { position: relative; display: grid; place-items: end start; width: 100%; height: 100%; padding: 12px 14px;
	background: radial-gradient(120% 140% at 100% 0%, var(--teal) 0%, var(--teal-deep) 55%, var(--ink) 100%); }
.ph::after { content: "HHO"; position: absolute; right: 10px; top: 0; font: italic 700 clamp(48px, 9vw, 120px)/1 var(--serif); color: rgba(255, 255, 255, .1); }
.ph span { color: #fff; font: 700 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Naslovnica ---------- */
.front-top { display: grid; gap: var(--gap); padding-top: var(--gap); padding-bottom: var(--gap); }
.front-top__side .c--row:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 900px) {
	.front-top { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
	.front-top__side { border-left: 1px solid var(--line); padding-left: var(--gap); }
	.front-top__side .c--row .c__img { flex-basis: 110px; }
}

.band { padding-top: 12px; padding-bottom: calc(var(--gap) * 1.4); }
.band__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-top: 3px solid var(--ink); padding-top: 10px; margin-bottom: 18px; }
.band__head h2 { font-size: 24px; }
.band__head a { font-size: 14px; font-weight: 600; color: var(--teal-ink); text-decoration: none; white-space: nowrap; }
.band--split { display: grid; gap: var(--gap); }
@media (min-width: 800px) { .band--split { grid-template-columns: 1fr 1fr; } }
.list .c--text:first-child, .list .c--row:first-child { border-top: 0; padding-top: 0; }

.grid { display: grid; gap: var(--gap); }
@media (min-width: 640px) { .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.themes { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.theme-tile { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: var(--radius); text-decoration: none; background: #fff; transition: border-color .2s, background .2s; }
.theme-tile:hover { background: var(--soft); border-color: var(--teal); color: inherit; }
.theme-tile__name { font: 700 19px/1.2 var(--serif); }
.theme-tile__last { font-size: 14px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.theme-tile__count { font-size: 13px; font-weight: 600; color: var(--teal-ink); margin-top: auto; }

/* ---------- Arhive ---------- */
.archive-head { padding-top: calc(var(--gap) * 1.4); padding-bottom: var(--gap); }
.archive-head h1 { font-size: clamp(32px, 4.4vw, 48px); }
.archive-head__desc { color: var(--ink-2); max-width: 680px; }
.list--archive { max-width: 860px; }
.list--archive .c--row { padding: 20px 0; }
.list--archive .c--row .c__title { font-size: 22px; }
@media (min-width: 560px) { .list--archive .c--row .c__img { flex-basis: 220px; } }
.empty { padding: 32px 0 64px; color: var(--muted); }

.pagination { margin: 28px 0 56px; }
.pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.pagination a, .pagination span { display: block; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Članak ---------- */
.article__head { padding-top: calc(var(--gap) * 1.6); }
.article__labels { margin: 0 0 8px; }
.article__labels .kicker { margin: 0; }
.kicker-sep { color: var(--line); margin: 0 8px; font-weight: 700; }
.article__title { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.1; }
.article__lead { font: 400 clamp(19px, 2vw, 22px)/1.45 var(--serif); color: var(--ink-2); margin: 16px 0 0; }
.article__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.article__author a { color: var(--ink); font-weight: 600; text-decoration: none; }
.article__figure { margin: 28px auto 0; }
.article__figure img { width: 100%; border-radius: var(--radius); }
.article__figure figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }

.entry { font: 400 19px/1.65 var(--serif); padding-top: 28px; }
.entry > * { margin: 0 0 1.1em; }
.entry h2 { font-size: 26px; margin-top: 1.6em; margin-bottom: .5em; }
.entry h3 { font-size: 22px; margin-top: 1.4em; margin-bottom: .4em; }
.entry a { color: var(--teal-ink); }
.entry blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--teal); font-style: italic; font-size: 21px; color: var(--ink-2); }
.entry blockquote p { margin: 0; }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry li { margin-bottom: .4em; }
.entry figure { margin: 1.6em 0; }
.entry figcaption { font: 14px/1.4 var(--sans); color: var(--muted); margin-top: 6px; }
.entry .alignwide { margin-left: -6vw; margin-right: -6vw; max-width: none; }
@media (max-width: 799px) { .entry { font-size: 18px; } .entry .alignwide { margin-left: 0; margin-right: 0; } }

.article__foot { padding-bottom: 36px; }
.sources { background: var(--soft); border-left: 4px solid var(--teal); padding: 16px 20px; margin: 12px 0 24px; border-radius: 0 var(--radius) var(--radius) 0; }
.sources h2 { font: 700 13px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.sources ol { margin: 0; padding-left: 1.2em; font-size: 15px; }
.sources li { margin: 4px 0; }
.sources a { color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.tags a { font-size: 14px; padding: 4px 10px; background: var(--soft); border-radius: 20px; text-decoration: none; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.share span { color: var(--muted); margin-right: 4px; }
.share a, .share button { padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-decoration: none; font-size: 14px; color: var(--ink); }
.share a:hover, .share button:hover { border-color: var(--ink); }
.related { border-top: 1px solid var(--line); padding-top: 28px; }

/* ---------- Gumbi, poziv, podnožje ---------- */
.btn { display: inline-block; padding: 12px 22px; background: var(--ink); color: #fff; border: 0; border-radius: var(--radius); font-weight: 700; text-decoration: none; }
.btn:hover { background: var(--teal-ink); color: #fff; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--ink); color: #fff; }

.cta { background: var(--teal); color: var(--ink); margin-top: 24px; }
.cta__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 32px; padding-bottom: 32px; }
.cta h2 { font-size: clamp(24px, 3vw, 32px); }
.cta p { margin: 6px 0 0; max-width: 620px; }

.site-footer { background: var(--ink); color: #c9cccc; font-size: 15px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--teal); }
.site-footer__grid { display: grid; gap: 28px; padding-top: 44px; padding-bottom: 32px; }
@media (min-width: 640px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .site-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-footer__about img { width: 72px; background: #fff; padding: 6px; border-radius: var(--radius); margin-bottom: 14px; }
.site-footer__about p { max-width: 420px; margin: 0; }
.site-footer h3 { font: 700 13px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #fff; margin-bottom: 12px; }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin-bottom: 6px; }
.site-footer__bottom { border-top: 1px solid #36372f; padding-top: 16px; padding-bottom: 24px; font-size: 13px; color: #9a9d9b; }
