/*==============================================
  Актуальні події — секція головної, архів, одинична сторінка
  Стиль базується на темі Odessa NRC Open World
===============================================*/

/* ─── Загальна секція ─── */
.fp-events {
	position: relative;
	display: block;
	padding: 56px 0 64px;
	background-color: #f7f9fc;
}

.fp-events__header {
	text-align: center;
	max-width: 760px;
	margin: 0 auto 40px;
}

.fp-events__title {
	margin: 0 0 10px;
	font-family: var(--nexin-font);
	font-size: 32px;
	line-height: 1.26;
	font-weight: 700;
	color: var(--nexin-black);
}

.fp-events__subtitle {
	margin: 0;
	font-family: var(--nexin-font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--nexin-gray);
}

/* ─── Двоколонний лейаут ─── */
.fp-events__body {
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: 32px;
	align-items: start;
}

.fp-events__body--no-sidebar {
	grid-template-columns: 1fr;
}

.fp-events__col-title {
	font-family: var(--nexin-font);
	font-size: 20px;
	font-weight: 700;
	color: var(--nexin-black);
	margin: 0 0 20px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--nexin-base);
	display: flex;
	align-items: center;
	gap: 8px;
}

.fp-events__col-title::before {
	content: '';
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--nexin-base);
	flex-shrink: 0;
}

/* ─── Стрічка подій ─── */
.fp-events__feed-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	align-items: start;
}

.fp-events__feed-footer {
	margin-top: 28px;
	text-align: center;
}

/* ─── Кнопка «Всі події» (стиль fp-gallery__btn) ─── */
.fp-events__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 11px 34px;
	border-radius: 999px;
	background-color: #0b73ff;
	color: var(--nexin-white);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	box-shadow: 0 10px 24px rgba(11, 115, 255, 0.35);
	transition: background-color 180ms ease, box-shadow 180ms ease, transform 120ms ease;
	text-decoration: none;
}

.fp-events__btn:hover,
.fp-events__btn:focus {
	background-color: #075cd1;
	box-shadow: 0 14px 30px rgba(11, 115, 255, 0.42);
	color: var(--nexin-white);
	transform: translateY(-2px);
	text-decoration: none;
}

/* ─── Картки подій ─── */
.event-card {
	position: relative;
	background: #ffffff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
	transition: box-shadow 0.25s ease, transform 0.2s ease;
	display: flex;
	flex-direction: column;
}

.event-card:hover {
	box-shadow: 0 10px 32px rgba(0, 0, 0, 0.12);
	transform: translateY(-3px);
}

/* Wide модифікатор — картка на всю ширину */
.event-card--wide {
	grid-column: span 2;
}

/* Narrow — займає одну колонку (за замовчуванням) */
.event-card--narrow {}

/* ─── Бейдж типу ─── */
.event-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	display: inline-block;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1.4;
}

.event-card__badge--article    { background: #0b73ff; color: #fff; }
.event-card__badge--photo_card { background: var(--nexin-base); color: #121212; }
.event-card__badge--video      { background: #e53935; color: #fff; }
.event-card__badge--gallery    { background: #6c3fcb; color: #fff; }
.event-card__badge--news       { background: #ff8c00; color: #fff; }

/* ─── Дата ─── */
.event-card__date {
	display: block;
	font-size: 12px;
	color: var(--nexin-gray);
	margin-bottom: 6px;
	font-weight: 500;
}

/* ─── Заголовок ─── */
.event-card__title {
	font-family: var(--nexin-font);
	font-size: 16px;
	font-weight: 700;
	color: var(--nexin-black);
	line-height: 1.4;
	margin: 0 0 8px;
	transition: color 0.2s;
}

.event-card:hover .event-card__title,
a.event-card__news-link:hover .event-card__title,
a.event-card__article-link:hover .event-card__title,
a.event-card__photo-link:hover .event-card__title,
a.event-card__video-link:hover .event-card__title,
a.event-card__gallery-link:hover .event-card__title {
	color: #0b73ff;
}

/* ─── Excerpt / Subtitle ─── */
.event-card__excerpt,
.event-card__subtitle {
	font-size: 14px;
	color: var(--nexin-gray);
	line-height: 1.55;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ─────────────────────────────────
   ARTICLE card
───────────────────────────────── */
.event-card--article .event-card__article-link {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
}

.event-card__article-img-wrap {
	position: relative;
	overflow: hidden;
	flex-shrink: 0;
	background: #e7ecf4;
}

.event-card__article-img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.event-card--wide .event-card__article-img {
	height: 250px;
}

.event-card:hover .event-card__article-img {
	transform: scale(1.04);
}

.event-card__article-body {
	padding: 16px 18px 20px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

/* ─────────────────────────────────
   PHOTO CARD
───────────────────────────────── */
.event-card--photo_card .event-card__photo-link {
	display: block;
	text-decoration: none;
	color: inherit;
	height: 100%;
}

.event-card__photo-wrap {
	position: relative;
	overflow: hidden;
	background: #e7ecf4;
}

.event-card__photo-img {
	width: 100%;
	height: 220px;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.event-card:hover .event-card__photo-img {
	transform: scale(1.04);
}

.event-card__photo-placeholder {
	width: 100%;
	height: 220px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 48px;
	color: #bbb;
}

.event-card__photo-footer {
	padding: 14px 16px 18px;
}

/* ─────────────────────────────────
   VIDEO card
───────────────────────────────── */
.event-card--video .event-card__video-link {
	display: block;
	text-decoration: none;
	color: inherit;
	height: 100%;
}

.event-card__video-wrap {
	position: relative;
	overflow: hidden;
	background: #1a1a2e;
}

.event-card__video-thumb {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
	opacity: 0.85;
	transition: opacity 0.25s, transform 0.35s ease;
}

.event-card:hover .event-card__video-thumb {
	opacity: 0.7;
	transform: scale(1.04);
}

.event-card__video-placeholder {
	width: 100%;
	height: 200px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 48px;
	color: #555;
}

.event-card__play-btn {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
}

.event-card__play-btn i {
	width: 56px;
	height: 56px;
	background: rgba(255, 255, 255, 0.92);
	color: #e53935;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	padding-left: 4px;
	box-shadow: 0 6px 20px rgba(0,0,0,0.25);
	transition: background 0.2s, transform 0.2s;
}

.event-card:hover .event-card__play-btn i {
	background: #fff;
	transform: scale(1.1);
}

.event-card__video-footer {
	padding: 14px 16px 18px;
}

/* ─────────────────────────────────
   GALLERY card
───────────────────────────────── */
.event-card--gallery .event-card__gallery-link {
	display: block;
	text-decoration: none;
	color: inherit;
	height: 100%;
}

.event-card__gallery-collage {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: 2px;
	overflow: hidden;
	background: #e7ecf4;
	aspect-ratio: 16 / 9;
}

.event-card__collage-cell {
	display: block;
	background-size: cover;
	background-position: center;
	background-color: #dde3eb;
	transition: opacity 0.25s;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #bbb;
	font-size: 24px;
}

.event-card:hover .event-card__collage-cell {
	opacity: 0.88;
}

.event-card__gallery-count {
	position: absolute;
	bottom: 8px;
	right: 8px;
	background: rgba(0,0,0,0.62);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 12px;
	z-index: 3;
}

.event-card__gallery-footer {
	padding: 14px 16px 18px;
}

/* ─────────────────────────────────
   NEWS card
───────────────────────────────── */
.event-card--news {
	border-radius: 12px;
}

.event-card--news .event-card__news-link {
	display: block;
	text-decoration: none;
	color: inherit;
	height: 100%;
}

.event-card__news-body {
	display: flex;
	gap: 16px;
	padding: 16px 18px;
	align-items: flex-start;
}

.event-card__news-left {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	min-width: 64px;
}

.event-card__news-left .event-card__badge {
	position: static;
	white-space: nowrap;
}

.event-card__news-content {
	flex: 1;
	min-width: 0;
}

.event-card--news .event-card__title {
	font-size: 15px;
}

/* ═══════════════════════════════════════════════
   CALENDAR SIDEBAR
═══════════════════════════════════════════════ */
.fp-events__sidebar {
	position: sticky;
	top: 100px;
}

.events-calendar__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.events-calendar__item {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	background: #ffffff;
	border-radius: 12px;
	padding: 14px 16px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.05);
	transition: box-shadow 0.2s, transform 0.2s;
}

.events-calendar__item:hover {
	box-shadow: 0 6px 20px rgba(0,0,0,0.1);
	transform: translateX(3px);
}

.events-calendar__date-box {
	flex-shrink: 0;
	width: 50px;
	height: 54px;
	background: #0b73ff;
	border-radius: 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: #fff;
	line-height: 1;
}

.events-calendar__month {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.85;
}

.events-calendar__day {
	font-size: 22px;
	font-weight: 700;
	line-height: 1.1;
}

.events-calendar__info {
	flex: 1;
	min-width: 0;
}

.events-calendar__title {
	display: block;
	font-family: var(--nexin-font);
	font-size: 14px;
	font-weight: 700;
	color: var(--nexin-black);
	line-height: 1.4;
	text-decoration: none;
	transition: color 0.2s;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.events-calendar__title:hover {
	color: #0b73ff;
}

.events-calendar__desc {
	margin: 4px 0 0;
	font-size: 12px;
	color: var(--nexin-gray);
	line-height: 1.45;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.events-calendar__all-link {
	display: inline-block;
	margin-top: 16px;
	font-size: 14px;
	font-weight: 600;
	color: #0b73ff;
	text-decoration: none;
}

.events-calendar__all-link:hover {
	text-decoration: underline;
}

.events-calendar__empty {
	font-size: 14px;
	color: var(--nexin-gray);
	margin: 0;
	padding: 12px 0;
}

/* ═══════════════════════════════════════════════
   GLIGHTBOX (events) — читабельний заголовок/опис
═══════════════════════════════════════════════ */
.glightbox-container .gslide-description {
	padding: 14px 16px;
	background: linear-gradient(180deg, rgba(13, 20, 36, 0.62) 0%, rgba(13, 20, 36, 0.78) 100%);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-top: 1px solid rgba(255,255,255,0.10);
}

.glightbox-container .gslide-description .gdesc-inner {
	padding: 0;
	max-width: 980px;
	margin: 0 auto;
}

.glightbox-container .gslide-description .gslide-title,
.glightbox-container .gslide-description h4,
.glightbox-container .gslide-description h3 {
	margin: 0 0 6px;
	font-family: var(--nexin-font);
	font-weight: 700;
	font-size: 18px;
	line-height: 1.25;
	letter-spacing: 0.01em;
	color: #fff;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.glightbox-container .gslide-description p {
	margin: 0;
	font-family: var(--nexin-font);
	font-size: 14px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.86);
	overflow-wrap: anywhere;
	word-break: break-word;
	hyphens: auto;
}

/* Якщо опис дуже довгий — не ламаємо вікно */
.glightbox-container .gslide-description .gdesc-inner {
	max-height: 22vh;
	overflow: auto;
}

@media (max-width: 768px) {
	.glightbox-container .gslide-description {
		padding: 12px 14px;
	}
	.glightbox-container .gslide-description .gslide-title,
	.glightbox-container .gslide-description h4,
	.glightbox-container .gslide-description h3 {
		font-size: 16px;
	}
	.glightbox-container .gslide-description p {
		font-size: 13px;
	}
	.glightbox-container .gslide-description .gdesc-inner {
		max-height: 28vh;
	}
}

@media (max-width: 480px) {
	.glightbox-container .gslide-description {
		padding: 10px 12px;
	}
	.glightbox-container .gslide-description .gslide-title,
	.glightbox-container .gslide-description h4,
	.glightbox-container .gslide-description h3 {
		font-size: 15px;
	}
	.glightbox-container .gslide-description .gdesc-inner {
		max-height: 32vh;
	}
}

/* ═══════════════════════════════════════════════
   ARCHIVE PAGE — events-archive
═══════════════════════════════════════════════ */
.events-archive {
	padding: 48px 0 72px;
	background: #fff;
}

.events-archive__header {
	margin-bottom: 40px;
}

.events-archive__body {
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 40px;
	align-items: start;
}

.events-archive__body.fp-events__body--no-sidebar {
	grid-template-columns: 1fr;
	gap: 32px;
}

.events-archive__body.fp-events__body--no-sidebar .events-archive__grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.events-archive__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	align-items: start;
}

/* Важливо: не розтягувати "компактну новину" по висоті рядка */
.fp-events__feed-grid > .event-card,
.events-archive__grid > .event-card {
	align-self: start;
}

.events-archive__pagination {
	margin-top: 36px;
	display: flex;
	justify-content: center;
}

.events-archive__pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 8px;
	margin: 0 3px;
	font-size: 14px;
	font-weight: 600;
	color: var(--nexin-black);
	background: #f0f3f8;
	text-decoration: none;
	transition: background 0.2s, color 0.2s;
}

.events-archive__pagination .page-numbers:hover,
.events-archive__pagination .page-numbers.current {
	background: #0b73ff;
	color: #fff;
}

.events-archive__empty {
	grid-column: span 2;
	text-align: center;
	padding: 40px 0;
	color: var(--nexin-gray);
	font-size: 16px;
}

/* ═══════════════════════════════════════════════
   SINGLE EVENT PAGE
═══════════════════════════════════════════════ */
.single-event {
	padding: 0 0 72px;
}

.single-event__back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 600;
	color: var(--nexin-gray);
	text-decoration: none;
	margin-top: 32px;
	margin-bottom: 28px;
	transition: color 0.2s;
}

.single-event__back:hover {
	color: #0b73ff;
}

.single-event__header {
	margin-bottom: 28px;
}

.single-event__meta {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}

.single-event__badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.single-event__badge--article    { background: #0b73ff; color: #fff; }
.single-event__badge--photo_card { background: var(--nexin-base); color: #121212; }
.single-event__badge--video      { background: #e53935; color: #fff; }
.single-event__badge--gallery    { background: #6c3fcb; color: #fff; }
.single-event__badge--news       { background: #ff8c00; color: #fff; }

.single-event__date {
	font-size: 14px;
	color: var(--nexin-gray);
}

.single-event__title {
	font-family: var(--nexin-font);
	font-size: 30px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--nexin-black);
	margin: 0 0 16px;
}

.single-event__subtitle {
	font-family: var(--nexin-font);
	font-size: 17px;
	color: var(--nexin-gray);
	line-height: 1.6;
	margin: 0 0 24px;
}

.single-event__hero-img {
	width: 100%;
	max-height: 480px;
	object-fit: cover;
	border-radius: 20px;
	display: block;
	margin-bottom: 36px;
}

.single-event__content {
	font-size: 16px;
	line-height: 1.75;
	color: #333;
	margin-bottom: 40px;
}

.single-event__content p {
	margin-bottom: 1em;
}

/* ─── Блок відео ─── */
.single-event__section-title {
	font-family: var(--nexin-font);
	font-size: 22px;
	font-weight: 700;
	color: var(--nexin-black);
	margin: 0 0 20px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--nexin-base);
}

.single-event__video-block {
	margin-bottom: 44px;
}

.single-event__video-embed {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	border-radius: 16px;
	background: #000;
	box-shadow: 0 8px 28px rgba(0,0,0,0.15);
}

.single-event__video-embed iframe,
.single-event__video-embed video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: none;
	border-radius: 16px;
}

/* ─── Блок галереї ─── */
.single-event__gallery-block {
	margin-bottom: 44px;
}

.single-event__gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 10px;
}

.single-event__gallery-item {
	position: relative;
	border-radius: 10px;
	overflow: hidden;
	background: #e7ecf4;
	aspect-ratio: 4 / 3;
	display: block;
	transition: transform 0.2s, box-shadow 0.2s;
}

.single-event__gallery-item:hover {
	transform: scale(1.02);
	box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

.single-event__gallery-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.single-event__gallery-video-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.single-event__gallery-play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0,0,0,0.3);
}

.single-event__gallery-play i {
	width: 44px;
	height: 44px;
	background: rgba(255,255,255,0.9);
	color: #e53935;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	padding-left: 3px;
}

.single-event__gallery-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 36px;
	color: #bbb;
}

/* ═══════════════════════════════════════════════
   PAGE HEADER for archive
═══════════════════════════════════════════════ */
.events-page-header {
	padding: 44px 0 36px;
	background: linear-gradient(135deg, #0b2045 0%, #0b73ff 100%);
	color: #fff;
	margin-bottom: 0;
}

/* Знімаємо білий фон/бордер breadcrumbs всередині синього хедера */
.events-page-header .page-breadcrumbs-bar {
	background: transparent;
	border-bottom: none;
	padding: 0;
	margin-bottom: 14px;
}

.events-page-header .page-breadcrumbs-bar__nav {
	color: rgba(255, 255, 255, 0.75);
	font-size: 13px;
}

.events-page-header__title {
	font-size: 34px;
	font-weight: 700;
	color: #fff;
	margin: 0 0 10px;
	font-family: var(--nexin-font);
}

.events-page-header__subtitle {
	font-family: var(--nexin-font);
	font-size: 16px;
	color: rgba(255,255,255,0.8);
	margin: 0;
	line-height: 1.6;
}

/* ═══════════════════════════════════════════════
   АДАПТИВНІСТЬ
═══════════════════════════════════════════════ */

/* ≤1199px — скорочуємо правий сайдбар */
@media (max-width: 1199px) {
	.fp-events__body {
		grid-template-columns: 1fr 300px;
		gap: 24px;
	}

	.events-archive__body.fp-events__body--no-sidebar .events-archive__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ≤991px — вертикальний лейаут основного body */
@media (max-width: 991px) {
	.fp-events__body {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.fp-events__sidebar {
		position: static;
	}

	.events-archive__body {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.events-archive__body.fp-events__body--no-sidebar .events-archive__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ≤767px — картки в одну колонку */
@media (max-width: 767px) {
	.fp-events {
		padding: 40px 0 48px;
	}

	.fp-events__title {
		font-size: 26px;
	}

	.fp-events__feed-grid {
		grid-template-columns: 1fr;
	}

	.event-card--wide {
		grid-column: span 1;
	}

	.events-archive__grid {
		grid-template-columns: 1fr;
	}

	.events-archive__empty {
		grid-column: span 1;
	}

	.single-event__title {
		font-size: 24px;
	}

	.events-page-header__title {
		font-size: 26px;
	}
}

/* ≤479px */
@media (max-width: 479px) {
	.single-event__gallery-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.event-card__gallery-collage {
		aspect-ratio: 4 / 3;
	}
}
