/*
Theme Name: MCP — Mladinski center Prlekije
Theme URI: https://mladinskicenterprlekije.si
Author: Simon Belcl (imnos.si)
Author URI: https://imnos.si
Description: Custom Block Theme za Mladinski center Prlekije (PC NVO, so.p.). Full Site Editing, brez page builderja, dostopnost WCAG 2.1 AA.
Version: 0.1.0
Requires at least: 6.6
Tested up to: 6.6
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mcp-theme
Tags: full-site-editing, block-theme, accessibility-ready, nonprofit, one-column, custom-colors, custom-menu, editor-style, featured-images, threaded-comments, translation-ready
*/

/*
 * Slog v tej datoteki je rezerviran SAMO za:
 * 1) WCAG osnove (focus, skip link, sr-only, reduced motion)
 * 2) high-contrast toggle (preko data-mcp-contrast atributa)
 * 3) drobne popravke, ki jih theme.json ne pokriva
 *
 * VES ostali design (barve, pisave, razmaki) gre v theme.json.
 * Brez hard-coded HEX vrednosti tukaj — vse preko `var(--wp--preset--*)`.
 */

/* ====================================================================
 * 1. Dostopnost — focus + skip link
 * ==================================================================== */

:focus {
	outline: none;
}

:focus-visible {
	outline: 3px solid var(--wp--preset--color--gold);
	outline-offset: 2px;
	border-radius: 3px;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 0;
	z-index: 100000;
	display: inline-block;
	padding: 0.75rem 1.25rem;
	background-color: var(--wp--preset--color--brand-dark);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	text-decoration: none;
	border-radius: 0 0 6px 0;
}

.skip-link:focus-visible {
	top: 0;
	outline: 3px solid var(--wp--preset--color--gold);
	outline-offset: -3px;
}

/* Skrivanje za vid, ohranjeno za screen reader */
.screen-reader-text,
.sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.screen-reader-text:focus,
.sr-only:focus {
	position: static !important;
	width: auto;
	height: auto;
	margin: 0;
	clip: auto;
	clip-path: none;
	white-space: normal;
}

/* ====================================================================
 * 2. Reduced motion — spoštujemo uporabnikove preference
 * ==================================================================== */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* ====================================================================
 * 3. High-contrast toggle (skripta v assets/js/accessibility.js)
 * Aktivira se z gumbom data-mcp-contrast-toggle, ki dodaja
 * data-mcp-contrast="high" na <html>.
 * ==================================================================== */

html[data-mcp-contrast="high"] {
	background-color: #000000;
	color: #FFFF00;
}

html[data-mcp-contrast="high"] body,
html[data-mcp-contrast="high"] .wp-site-blocks {
	background-color: #000000 !important;
	color: #FFFF00 !important;
}

html[data-mcp-contrast="high"] a {
	color: #00FFFF !important;
	text-decoration: underline !important;
}

html[data-mcp-contrast="high"] a:hover,
html[data-mcp-contrast="high"] a:focus-visible {
	color: #FFFFFF !important;
	background-color: #000000 !important;
}

html[data-mcp-contrast="high"] .wp-element-button,
html[data-mcp-contrast="high"] .wp-block-button__link {
	background-color: #FFFF00 !important;
	color: #000000 !important;
	border: 2px solid #FFFFFF !important;
}

html[data-mcp-contrast="high"] img,
html[data-mcp-contrast="high"] .wp-block-cover {
	filter: grayscale(100%) contrast(120%);
}

/* ====================================================================
 * 4. Logo v glavi (svg style override)
 * ==================================================================== */

.mcp-logo {
	display: inline-block;
	height: 56px;
	width: auto;
}

.mcp-logo svg,
.mcp-logo img {
	display: block;
	height: 100%;
	width: auto;
}

/* ====================================================================
 * 5. Gold CTA — Daruj 1%, Postani prostovoljec
 * Razred za hitro uporabo na Gutenberg gumbih.
 * ==================================================================== */

.is-style-gold .wp-block-button__link,
.wp-block-button.is-style-gold .wp-block-button__link {
	background-color: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--ink);
	font-weight: 700;
}

.is-style-gold .wp-block-button__link:hover,
.is-style-gold .wp-block-button__link:focus-visible {
	background-color: var(--wp--preset--color--gold-dark);
	color: var(--wp--preset--color--white);
}

/* ====================================================================
 * 6. Hero — citat overlay (Grossman)
 * ==================================================================== */

.mcp-hero-quote {
	font-family: var(--wp--preset--font-family--heading);
	font-style: italic;
	color: var(--wp--preset--color--white);
	max-width: 32rem;
}

.mcp-hero-quote cite {
	display: block;
	margin-top: 0.5rem;
	font-style: normal;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--mint-darker);
	font-family: var(--wp--preset--font-family--body);
}

/* Gold pill badge — hero in podobni "outline" gumbi v zlati barvi. */
.mcp-pill-gold {
	display: inline-block;
	padding: 0.4rem 0.95rem;
	border: 1px solid rgba(245, 158, 11, 0.55);
	border-radius: 999px;
	background: rgba(245, 158, 11, 0.10);
	color: var(--wp--preset--color--gold);
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.2;
}

.mcp-pill-gold span {
	color: var(--wp--preset--color--gold);
}

/* ====================================================================
 * 7. Sponsor logo grid (patterns/sponsors.php)
 * Pri rest stanju logoti rahlo desaturirani in poltransparentni, na
 * hover/focus zoom-in (full color, full opacity).
 * ==================================================================== */

.mcp-sponsor {
	flex: 0 0 auto;
	max-width: 180px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mcp-sponsor img {
	max-width: 100%;
	max-height: 80px;
	width: auto;
	height: auto;
	display: block;
	filter: grayscale(0.15);
	opacity: 0.9;
	transition: filter 0.2s ease, opacity 0.2s ease;
}

.mcp-sponsor img:hover,
.mcp-sponsor img:focus {
	filter: grayscale(0);
	opacity: 1;
}

/* MSL ima crno ozadje — manjsi padding + bel border, da ne izgleda kot
 * tujek na svetli sekciji. Ko bo transparent PNG, lahko odstranimo. */
.mcp-sponsor-needs-transparent img {
	background: #FFFFFF;
	padding: 0.5rem;
	border-radius: 4px;
}

/* ====================================================================
 * 8. Casovnica na /o-nas/ (patterns/about-page.php)
 * Levo gold Georgia letnica (ali "?"), desno vsebina; med njimi vertikalna
 * tanka linija. Na mobilcu stack.
 * ==================================================================== */

.mcp-timeline {
	position: relative;
	max-width: 720px;
	margin: 0 auto;
	padding-left: 1rem;
}

.mcp-timeline-row {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 1.75rem;
	align-items: start;
	padding: 1.25rem 0;
	border-bottom: 1px solid var(--wp--preset--color--gray-light);
}

.mcp-timeline-row:last-child {
	border-bottom: 0;
}

.mcp-timeline-year {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--wp--preset--color--gold);
	line-height: 1;
	padding-top: 0.1em;
}

.mcp-timeline-body h3 {
	margin: 0 0 0.35rem 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--wp--preset--color--brand-dark);
	line-height: 1.25;
}

.mcp-timeline-body p {
	margin: 0;
	font-size: 0.975rem;
	line-height: 1.6;
	color: var(--wp--preset--color--gray-text);
}

@media (max-width: 600px) {
	.mcp-timeline-row {
		grid-template-columns: 1fr;
		gap: 0.5rem;
	}
	.mcp-timeline-year {
		font-size: 1.4rem;
	}
}

/* ====================================================================
 * 9. Ekipa placeholder na /o-nas/ (patterns/about-page.php)
 * 4 prazne kartice s krogcem + znakom, dokler nimamo realnih clanov.
 * ==================================================================== */

.mcp-team-placeholder {
	gap: 1.5rem;
}

.mcp-team-member {
	flex: 1 1 200px;
	max-width: 240px;
	background: var(--wp--preset--color--mint);
	border: 1px dashed var(--wp--preset--color--mint-darker);
	border-radius: 12px;
	padding: 1.75rem 1.25rem;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	opacity: 0.85;
}

.mcp-team-avatar {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--wp--preset--color--mint-darker);
	color: var(--wp--preset--color--brand);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2rem;
	font-weight: 300;
	line-height: 1;
}

.mcp-team-name,
.mcp-team-role {
	width: 70%;
	border-radius: 4px;
	background: var(--wp--preset--color--mint-darker);
	height: 0.85rem;
}

.mcp-team-role {
	width: 50%;
	height: 0.7rem;
}

/* ====================================================================
 * 10. FAQ na /daruj-1-procent/ (patterns/donate-page.php)
 * Native <details> + <summary>, stilizirana brez JS-a.
 * ==================================================================== */

.mcp-faq-item {
	border-bottom: 1px solid var(--wp--preset--color--gray-light);
	padding: 1rem 0;
}

.mcp-faq-item:first-of-type {
	border-top: 1px solid var(--wp--preset--color--gray-light);
}

.mcp-faq-item summary {
	cursor: pointer;
	list-style: none;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--wp--preset--color--brand-dark);
	padding: 0.5rem 2rem 0.5rem 0;
	position: relative;
}

.mcp-faq-item summary::-webkit-details-marker {
	display: none;
}

.mcp-faq-item summary::after {
	content: '+';
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--wp--preset--color--mint);
	color: var(--wp--preset--color--brand);
	font-weight: 700;
	font-size: 1.2rem;
	transition: transform 0.2s ease, background 0.2s ease;
}

.mcp-faq-item[open] summary::after {
	content: '−';
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--ink);
}

.mcp-faq-item summary:focus-visible {
	outline: 3px solid var(--wp--preset--color--gold);
	outline-offset: 2px;
	border-radius: 3px;
}

.mcp-faq-item p {
	margin: 0.75rem 0 0 0;
	font-size: 0.975rem;
	line-height: 1.65;
	color: var(--wp--preset--color--gray-text);
	padding-right: 2rem;
}

/* ====================================================================
 * 11. Dogodki — kartice in empty state (patterns/events-archive.php)
 * ==================================================================== */

.mcp-event-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 2rem;
}

.mcp-event-card {
	background: #ffffff;
	border: 1px solid #E5E7EB;
	border-radius: 12px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.mcp-event-card:hover,
.mcp-event-card:focus-within {
	box-shadow: 0 6px 16px rgba(5, 80, 50, 0.12);
	transform: translateY(-2px);
}

.mcp-event-card-body {
	padding: 1.5rem;
}

.mcp-event-meta {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

.mcp-event-date {
	background: var(--wp--preset--color--mint);
	border-radius: 8px;
	padding: 0.5rem 0.75rem;
	min-width: 64px;
	text-align: center;
	line-height: 1;
}

.mcp-event-day {
	display: block;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--wp--preset--color--brand-dark);
}

.mcp-event-month {
	display: block;
	margin-top: 0.15rem;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	color: var(--wp--preset--color--brand);
}

.mcp-event-year {
	display: block;
	margin-top: 0.1rem;
	font-size: 0.65rem;
	color: var(--wp--preset--color--gray-text);
}

.mcp-event-badge {
	align-self: flex-start;
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--ink);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.25rem 0.6rem;
	border-radius: 4px;
}

.mcp-event-title {
	margin: 0 0 0.5rem 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.3;
}

.mcp-event-title a {
	color: var(--wp--preset--color--brand-dark);
	text-decoration: none;
}

.mcp-event-title a:hover {
	color: var(--wp--preset--color--brand);
}

.mcp-event-excerpt {
	margin: 0 0 1rem 0;
	font-size: 0.95rem;
	line-height: 1.55;
	color: var(--wp--preset--color--gray-text);
}

.mcp-event-venue {
	margin: 0 0 1.25rem 0;
	font-size: 0.85rem;
	line-height: 1.4;
	color: var(--wp--preset--color--gray-text);
}

.mcp-event-venue span {
	margin-right: 0.35rem;
}

.mcp-event-more {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 600;
}

.mcp-event-more a {
	color: var(--wp--preset--color--brand);
	text-decoration: none;
}

.mcp-events-empty {
	max-width: 520px;
	margin: 0 auto;
	text-align: center;
	padding: 2rem 1rem;
}

.mcp-events-empty-icon {
	font-size: 4rem;
	line-height: 1;
	margin-bottom: 1.25rem;
	opacity: 0.7;
}

.mcp-events-empty h2 {
	margin: 0 0 1rem 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--wp--preset--color--brand-dark);
}

.mcp-events-empty p {
	margin: 0 0 1.75rem 0;
	font-size: 1.025rem;
	line-height: 1.65;
	color: var(--wp--preset--color--gray-text);
}

.mcp-events-empty-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
}

.mcp-events-empty-actions .mcp-btn-primary,
.mcp-events-empty-actions .mcp-btn-secondary {
	padding: 0.75rem 1.5rem;
	border-radius: 6px;
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.mcp-events-empty-actions .mcp-btn-primary {
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--white);
}

.mcp-events-empty-actions .mcp-btn-primary:hover,
.mcp-events-empty-actions .mcp-btn-primary:focus-visible {
	background: var(--wp--preset--color--brand-dark);
}

.mcp-events-empty-actions .mcp-btn-secondary {
	background: transparent;
	color: var(--wp--preset--color--brand-dark);
	border: 2px solid var(--wp--preset--color--brand-dark);
}

.mcp-events-empty-actions .mcp-btn-secondary:hover,
.mcp-events-empty-actions .mcp-btn-secondary:focus-visible {
	background: var(--wp--preset--color--brand-dark);
	color: var(--wp--preset--color--white);
}
