/* RFC Slider — головний слайдер за макетом Figma «UA-edu» (227:2635 — десктоп, 106:142 — мобільний). */
.rfc-slider {
	--rfc-blue: #0b1c80;
	--rfc-muted: #606bac;
	--rfc-bg: #f6f6f6;
	--rfc-card-left: 80px;
	--rfc-card-w: 500px;
	--rfc-media-left: 680px;
	position: relative;
	background: var(--rfc-bg);
	font-family: Inter, sans-serif;
	overflow: hidden;
}
.rfc-slider *, .rfc-slider *::before, .rfc-slider *::after { box-sizing: border-box; }
.rfc-slider__track { display: grid; }
.rfc-slide {
	grid-area: 1 / 1;
	position: relative;
	height: 490px;
	opacity: 0;
	visibility: hidden;
	transition: opacity .6s ease, visibility 0s linear .6s;
}
.rfc-slide.is-active { opacity: 1; visibility: visible; transition: opacity .6s ease; z-index: 1; }

/* картка з текстом */
.rfc-slide__card {
	position: absolute;
	z-index: 2;
	left: var(--rfc-card-left);
	top: 40px;
	width: var(--rfc-card-w);
	height: 360px;
	padding: 45px 80px 0 50px;
	background: #fff;
	box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
}
.rfc-slide__cat { margin: 0 0 8px; font-size: 13px; line-height: 16px; font-weight: 400; color: var(--rfc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rfc-slide__title { margin: 0 0 30px; font-size: 32px; line-height: 38px; font-weight: 700; letter-spacing: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.rfc-slide__title a { color: var(--rfc-blue); text-decoration: none; }
.rfc-slide__title a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.rfc-slide__excerpt { margin: 0; font-size: 16px; line-height: 24px; font-weight: 400; color: var(--rfc-blue); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.rfc-slide__meta { position: absolute; left: 50px; right: 88px; bottom: 46px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.rfc-slide__date { font-size: 14px; line-height: 17px; font-weight: 500; color: var(--rfc-blue); white-space: nowrap; text-transform: lowercase; }
.rfc-slide__more { display: inline-flex; color: var(--rfc-blue); line-height: 0; transition: transform .2s; }
.rfc-slide__more:hover { transform: translateX(6px); }
.rfc-slide__more svg { width: 140px; height: 14px; }

/* фото */
.rfc-slide__media { position: absolute; z-index: 1; left: var(--rfc-media-left); right: 0; top: 20px; bottom: 0; display: block; overflow: hidden; background: #dfe1ea; }
.rfc-slide__img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* керування */
.rfc-slider__controls { position: absolute; z-index: 3; left: var(--rfc-media-left); right: 0; top: 20px; bottom: 0; pointer-events: none; }
.rfc-slider__controls > * { pointer-events: auto; }
.rfc-slider__arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; display: flex; align-items: center; justify-content: center; padding: 0; margin: 0; border: 0; border-radius: 4px; background: transparent; color: #fff; cursor: pointer; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .55)); }
.rfc-slider__arrow--prev { left: 43px; }
.rfc-slider__arrow--next { right: 13px; }
.rfc-slider__arrow:hover { color: #fff; background: rgba(11, 28, 128, .25); }
.rfc-slider__dots { position: absolute; left: 30px; bottom: 16px; display: flex; gap: 0; }
.rfc-slider__dot { width: 24px; height: 24px; padding: 0; margin: 0; border: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.rfc-slider__dot::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .65); box-shadow: 0 0 2px rgba(0, 0, 0, .5); transition: width .25s, background .25s; }
.rfc-slider__dot[aria-current="true"] { width: 40px; }
.rfc-slider__dot[aria-current="true"]::before { width: 32px; background: #fff; }
.rfc-slider__pause { position: absolute; right: 16px; bottom: 14px; width: 32px; height: 32px; padding: 0; margin: 0; border: 0; border-radius: 50%; background: rgba(11, 28, 128, .55); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.rfc-slider__pause:hover { background: rgba(11, 28, 128, .85); }
.rfc-slider__pause-icon { width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.rfc-slider.is-paused .rfc-slider__pause-icon { width: 0; height: 0; border-style: solid; border-color: transparent; border-width: 6px 0 6px 10px; border-left-color: currentColor; margin-left: 3px; }
.rfc-slider :is(a, button):focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px var(--rfc-blue); }
.rfc-slide__card a:focus-visible { outline: 2px solid var(--rfc-blue); outline-offset: 3px; box-shadow: none; }

@media (max-width: 1199.98px) {
	.rfc-slider { --rfc-card-left: 40px; --rfc-card-w: 420px; --rfc-media-left: 500px; }
	.rfc-slide__card { padding: 40px 36px 0; }
	.rfc-slide__title { font-size: 26px; line-height: 32px; margin-bottom: 22px; }
	.rfc-slide__meta { left: 36px; right: 36px; }
}

/* мобільний: фото зверху, синій блок із білим заголовком, датою і стрілкою знизу */
@media (max-width: 767.98px) {
	.rfc-slider { background: var(--rfc-blue); }
	.rfc-slide { height: auto; display: flex; flex-direction: column; }
	.rfc-slide__media { position: relative; left: auto; right: auto; top: auto; bottom: auto; order: -1; width: 100%; aspect-ratio: 4 / 3; background: var(--rfc-blue); }
	/* фото повністю, без обрізання: вписується в однакову рамку 4:3, зайве місце — синім фоном */
	.rfc-slide__img { height: 100%; object-fit: contain; }
	.rfc-slide__card { position: relative; left: auto; top: auto; width: auto; height: auto; min-height: 150px; padding: 30px 20px 24px; box-shadow: none; background: var(--rfc-blue); }
	.rfc-slide__title a, .rfc-slide__date, .rfc-slide__more { color: #fff; }
	.rfc-slide__card a:focus-visible { outline-color: #fff; }
	.rfc-slide__cat, .rfc-slide__excerpt { display: none; }
	.rfc-slide__title { font-size: 22px; line-height: 27px; margin: 0 0 14px; max-width: 330px; }
	.rfc-slide__meta { position: static; }
	.rfc-slide__more { transform: translateY(10px); }
	.rfc-slide__more:hover { transform: translate(4px, 10px); }
	.rfc-slide__more svg { width: 80px; }
	.rfc-slider__controls { left: 0; top: 0; bottom: auto; aspect-ratio: 4 / 3; }
	.rfc-slider__arrow { opacity: 0; width: 36px; height: 56px; }
	.rfc-slider__arrow:focus-visible { opacity: 1; }
	.rfc-slider__arrow--prev { left: 4px; }
	.rfc-slider__arrow--next { right: 4px; }
	.rfc-slider__dots { left: 12px; bottom: 6px; }
	.rfc-slider__pause { right: 12px; bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
	.rfc-slide, .rfc-slide.is-active, .rfc-slide__more, .rfc-slider__dot::before { transition: none; }
}
