/*
Theme Name: Digitalni euro
Description: Podređena tema za Twenty Twenty-Five, prilagođena blogu o digitalnom euru, digitalnom bankarstvu, novčanicima i EU regulativi.
Template: twentytwentyfive
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: digitalni-euro
*/

/* Base */

/* Header, main and footer sit flush; sections set their own spacing. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

a {
	text-underline-offset: 0.18em;
}

::selection {
	background: var(--wp--preset--color--accent-2);
	color: var(--wp--preset--color--contrast);
}

:where(.wp-site-blocks *:focus-visible) {
	outline-color: var(--wp--preset--color--accent-3);
}

/* Labels: eyebrow text and small uppercase section headings */

.de-nadnaslov {
	color: var(--wp--preset--color--accent-3);
	font-family: var(--wp--preset--font-family--fira-sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-transform: uppercase;
}

.wp-block-post-terms.de-nadnaslov a {
	text-decoration: none;
}

.wp-block-post-terms.de-nadnaslov a:hover {
	text-decoration: underline;
}

.wp-block-heading.de-naslov-odjeljka {
	font-family: var(--wp--preset--font-family--fira-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-transform: uppercase;
}

/* Page intros (homepage, categories, search) */

h1.de-naslovnica-naslov {
	font-size: clamp(2.25rem, 1.5rem + 2.8vw, 3.75rem);
	letter-spacing: -0.02em;
	line-height: 1.08;
	max-width: 22ch;
	text-wrap: balance;
}

.de-naslovnica-opis {
	color: var(--wp--preset--color--accent-4);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
	max-width: 60ch;
}

/* Topic pills (Categories block, style "Pilule") */

.wp-block-categories.is-style-de-pilule {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	margin-top: var(--wp--preset--spacing--40);
	padding: 0;
}

.wp-block-categories.is-style-de-pilule li {
	margin: 0;
}

.wp-block-categories.is-style-de-pilule a {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--accent-6);
	border-radius: 999px;
	color: var(--wp--preset--color--contrast);
	display: inline-block;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	line-height: 1.3;
	padding: 0.45rem 0.95rem;
	text-decoration: none;
}

.wp-block-categories.is-style-de-pilule a:hover {
	border-color: var(--wp--preset--color--accent-3);
	color: var(--wp--preset--color--accent-3);
}

/* Post meta row: author · date · updated · reading time */

.de-meta {
	color: var(--wp--preset--color--accent-4);
}

.de-meta > * {
	font-size: inherit;
}

.de-meta > * + *::before {
	content: "·";
	margin-inline-end: 0.5em;
}

.de-meta .wp-block-post-author-name {
	color: var(--wp--preset--color--contrast);
	font-weight: 500;
}

.de-oznaka-datuma {
	font-weight: 500;
}

.wp-block-post-excerpt.de-uvod {
	color: var(--wp--preset--color--accent-4);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
}

.wp-block-post-excerpt.de-uvod .wp-block-post-excerpt__excerpt {
	margin: 0;
}

/* Article cards */

.de-kartica-clanka .wp-block-post-featured-image {
	margin-bottom: var(--wp--preset--spacing--30);
	overflow: hidden;
}

.de-kartica-clanka .wp-block-post-title a:hover {
	color: var(--wp--preset--color--accent-3);
}

.de-kartica-clanka .wp-block-post-excerpt__excerpt {
	margin: 0;
}

/* Homepage: the newest post spans the full grid width on page 1 */

@media (min-width: 782px) {
	body:not(.paged) .de-istaknuti-prvi .wp-block-post-template > li:first-child {
		grid-column: 1 / -1;
	}

	body:not(.paged) .de-istaknuti-prvi .wp-block-post-template > li:first-child .de-kartica-clanka:has(> .wp-block-post-featured-image) {
		align-items: center;
		display: grid;
		gap: var(--wp--preset--spacing--50);
		grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
		padding-bottom: var(--wp--preset--spacing--40);
		border-bottom: 1px solid var(--wp--preset--color--accent-6);
	}

	body:not(.paged) .de-istaknuti-prvi .wp-block-post-template > li:first-child .de-kartica-clanka > * {
		margin-block: 0;
	}

	body:not(.paged) .de-istaknuti-prvi .wp-block-post-template > li:first-child .wp-block-post-title {
		font-size: var(--wp--preset--font-size--x-large);
	}

	body:not(.paged) .de-istaknuti-prvi .wp-block-post-template > li:first-child .wp-block-post-excerpt {
		font-size: var(--wp--preset--font-size--medium);
	}
}

.wp-block-query-pagination {
	border-top: 1px solid var(--wp--preset--color--accent-6);
	padding-top: var(--wp--preset--spacing--30);
}

/* Related posts: hide the whole section when there is nothing to show */

.de-povezani-omotac:not(:has(.wp-block-post)) {
	display: none;
}

/* Footer */

.de-podnozje .wp-block-site-tagline,
.de-podnozje .de-sitno,
.de-podnozje .wp-block-heading.de-naslov-odjeljka {
	color: inherit;
	opacity: 0.72;
}

.de-podnozje .wp-block-categories {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	list-style: none;
	margin-bottom: 0;
	padding: 0;
}

.de-podnozje .wp-block-categories li + li {
	margin-top: 0.6rem;
}

/* Tables */

.wp-block-table table {
	border-collapse: collapse;
	font-size: var(--wp--preset--font-size--small);
}

.wp-block-table th,
.wp-block-table td {
	border: 1px solid var(--wp--preset--color--accent-6);
	padding: 0.6rem 0.8rem;
	text-align: left;
	vertical-align: top;
}

.wp-block-table thead {
	border-bottom: 2px solid var(--wp--preset--color--contrast);
}

.wp-block-table thead th {
	background: var(--wp--preset--color--accent-5);
	font-weight: 600;
}

/* FAQ (Details block) */

.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
	padding-block: var(--wp--preset--spacing--30);
}

.wp-block-details summary {
	cursor: pointer;
	font-weight: 600;
}

/* Footnotes */

.wp-block-footnotes {
	border-top: 1px solid var(--wp--preset--color--accent-6);
	color: var(--wp--preset--color--accent-4);
	font-size: var(--wp--preset--font-size--small);
	padding-top: var(--wp--preset--spacing--30);
}

/* Timeline pattern */

.de-vremenska-crta {
	border-left: 2px solid var(--wp--preset--color--accent-2);
	padding-left: 1.75rem;
}

.de-vremenska-crta > .wp-block-group {
	position: relative;
}

.de-vremenska-crta > .wp-block-group::before {
	background: var(--wp--preset--color--accent-3);
	border-radius: 50%;
	box-shadow: 0 0 0 4px var(--wp--preset--color--base);
	content: "";
	height: 12px;
	left: calc(-1.75rem - 7px);
	position: absolute;
	top: 0.3rem;
	width: 12px;
}

.de-vremenska-crta .wp-block-heading {
	margin-top: 0.25rem;
}

/* Glossary pattern */

.de-pojmovnik .wp-block-heading {
	scroll-margin-top: 1.5rem;
}
