/* ==========================================================
   MGM FAQ Sekcija
   ========================================================== */

/* Work Sans Light (300), lokalno sa servera - bez Google Fonts poziva */
@font-face {
	font-family: 'MGM Work Sans';
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url('../fonts/work-sans-latin-ext-300-normal.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: 'MGM Work Sans';
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url('../fonts/work-sans-latin-300-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Sekcija centrirana na stranici, sirina iz podesavanja plugina */
.wp-block-group.mgm-faq,
.mgm-faq {
	box-sizing: border-box;
	width: 100%;
	max-width: var(--mgm-faq-max-width, 900px) !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: 1.25rem;
	padding-right: 1.25rem;
	--mgm-faq-line: #d9d9d9;
	--mgm-faq-text: #5A5A5A;
	--mgm-faq-text-hover: #2f2f2f;
	interpolate-size: allow-keywords;
	color: var(--mgm-faq-text);
}

/* Jaci selektor: pobedjuje pravila teme/drugog CSS-a koja guraju sekciju levo */
html body .wp-site-blocks .wp-block-group.mgm-faq,
html body .wp-block-group.mgm-faq {
	max-width: var(--mgm-faq-max-width, 900px) !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: 1.25rem !important;
	padding-right: 1.25rem !important;
}

/* Svi elementi zauzimaju punu sirinu centrirane kolone */
.mgm-faq > * {
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	width: 100%;
}

/* Sav tekst u sekciji: Work Sans Light */
.mgm-faq,
.mgm-faq * {
	font-family: 'MGM Work Sans', 'Work Sans', sans-serif !important;
	font-weight: 300 !important;
}

/* Naslov sekcije */
.mgm-faq h2 {
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-align: center;
	color: var(--mgm-faq-text);
	margin-bottom: 2rem;
}

/* Jedno pitanje + odgovor, razdvojeno sivim linijama */
.mgm-faq .wp-block-details {
	border-bottom: 1px solid var(--mgm-faq-line);
	padding: 1.35rem 0;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

.mgm-faq .wp-block-details:first-of-type {
	border-top: 1px solid var(--mgm-faq-line);
}

/* Pitanje */
.mgm-faq summary {
	list-style: none;
	cursor: pointer;
	position: relative;
	padding-right: 3rem;
	font-size: 1.15rem;
	line-height: 1.45;
	color: var(--mgm-faq-text);
	transition: color 0.2s ease;
}

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

.mgm-faq summary:hover {
	color: var(--mgm-faq-text-hover);
}

.mgm-faq summary:focus-visible {
	outline: 1px solid var(--mgm-faq-text);
	outline-offset: 6px;
}

/* Tanki plus desno: dve linije, vertikalna se okrene i postane minus */
.mgm-faq summary::before,
.mgm-faq summary::after {
	content: "";
	position: absolute;
	right: 0.5rem;
	top: 50%;
	width: 16px;
	height: 1.5px;
	margin-top: -0.75px;
	background-color: currentColor;
	transition: transform 0.3s ease;
}

.mgm-faq summary::after {
	transform: rotate(90deg);
}

.mgm-faq details[open] > summary::after {
	transform: rotate(0deg);
}

/* Odgovor */
.mgm-faq details > :not(summary) {
	margin-top: 0.9rem;
	margin-bottom: 0;
	font-size: 1rem;
	line-height: 1.75;
}

.mgm-faq details a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

.mgm-faq details a:hover {
	color: var(--mgm-faq-text-hover);
}

/* Glatko otvaranje (novi Chrome/Edge; ostali pregledaci otvaraju odmah) */
.mgm-faq details::details-content {
	height: 0;
	overflow: clip;
	transition: height 0.35s ease, content-visibility 0.35s allow-discrete;
}

.mgm-faq details[open]::details-content {
	height: auto;
}

@media (prefers-reduced-motion: reduce) {
	.mgm-faq summary::before,
	.mgm-faq summary::after,
	.mgm-faq details::details-content {
		transition: none;
	}
}
