/* ===== Tab panels ===== */
.map_panel {
	display: none;
}

.map_panel.active {
	display: block;
}

/* ===== Marker legend ===== */
.map_panel .red_marker,
.map_panel .green_marker {
	position: relative;
	padding: 6px 12px 6px 46px;
	margin: 8px 0;
	line-height: 1.5;
}

.map_panel .red_marker::before,
.map_panel .green_marker::before {
	content: "";
	position: absolute;
	left: 8px;
	top: 50%;
	transform: translateY(-50%) rotate(-45deg);
	width: 24px;
	height: 24px;
	border-radius: 50% 50% 50% 0;
	border: 2px solid #fff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.map_panel .red_marker::before {
	background: #e02b2b;
}

.map_panel .green_marker::before {
	background: #2e9e3f;
}

/* ===== Опис: як користуватись картою ===== */
.map_description {
	margin: 24px 0 0;
}

.map_description__title {
	margin: 0 0 10px;
	font-size: 22px;
	font-weight: 700;
	color: #1d2b36;
}

.map_description__text {
	margin: 0 0 14px;
	font-size: 15px;
	line-height: 1.55;
	color: #51606b;
}

.map_description__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 8px 24px;
}

.map_description__list li {
	position: relative;
	padding-left: 26px;
	font-size: 14px;
	line-height: 1.5;
	color: #51606b;
}

.map_description__list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 3px;
	width: 16px;
	height: 16px;
	background: #027C49;
	border-radius: 50%;
}

.map_description__list li::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 7px;
	width: 4px;
	height: 8px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.map_description__list b {
	color: #1d2b36;
}

@media (max-width: 600px) {
	.map_description__title { font-size: 19px; }
	.map_description__list { grid-template-columns: 1fr; }
}

/* ===== Контейнер карти ===== */
.club_map {
	width: 100%;
	height: 620px;
	margin: 30px 0;
	border-radius: 10px;
	overflow: hidden;
	background: #e9eef2;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

@media (max-width: 768px) {
	.club_map {
		height: 400px;
		margin: 20px 0;
	}
}

/* Повідомлення про відсутній / невірний API ключ */
.club_map__notice {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 20px;
	text-align: center;
	font: 15px/1.5 Arial, sans-serif;
	color: #5a6b78;
}

/* ===== Власний маркер ===== */
.map_pin {
	position: absolute;
	width: 34px;
	height: 34px;
	/* вістря маркера вказує на координату */
	transform: translate(-50%, -100%);
	cursor: pointer;
}

.map_pin__shape {
	position: absolute;
	inset: 0;
	background: var(--pin-color);
	border: 2px solid #fff;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
	transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.map_pin__num {
	position: absolute;
	left: 0;
	right: 0;
	top: 1px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font: bold 13px/1 Arial, sans-serif;
	pointer-events: none;
}

/* hover: плавна тінь + рамка кольору маркера */
.map_pin:hover .map_pin__shape {
	border-color: var(--pin-color);
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}

/* ===== Повноекранний попап (модальне вікно) ===== */
body.map_modal_open {
	overflow: hidden; /* блокуємо прокрутку сторінки під модалкою */
}

.map_modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(0, 0, 0, 0.88);
	font-family: Arial, sans-serif;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.map_modal.is-visible {
	opacity: 1;
}

.map_modal__dialog {
	position: relative;
	width: 100%;
	max-width: 1100px;
	max-height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	cursor: default;
	transform: scale(0.96);
	transition: transform 0.2s ease;
}

.map_modal.is-visible .map_modal__dialog {
	transform: scale(1);
}

/* ===== Слайдер зображень (велике зображення) ===== */
.map_modal__slider {
	position: relative;
	width: 100%;
	height: 75vh;
	flex: 0 0 auto;
}

.map_modal__slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.map_modal__slide.is-active {
	opacity: 1;
	pointer-events: auto;
}

.map_modal__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 52px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 2;
	transition: background 0.15s ease;
}

.map_modal__arrow svg {
	width: 26px;
	height: 26px;
	flex-shrink: 0;
	pointer-events: none;
}

.map_modal__arrow:hover {
	background: rgba(255, 255, 255, 0.35);
}

.map_modal__arrow--prev { left: 14px; }
.map_modal__arrow--next { right: 14px; }

.map_modal__counter {
	position: absolute;
	top: 14px;
	left: 50%;
	transform: translateX(-50%);
	padding: 4px 12px;
	border-radius: 14px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 13px;
	z-index: 2;
}

.map_modal__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 12px;
	display: flex;
	justify-content: center;
	gap: 8px;
	z-index: 2;
}

.map_modal__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.5);
	cursor: pointer;
	transition: background 0.15s ease;
}

.map_modal__dot.is-active {
	background: #fff;
}

/* приховати стрілки/крапки/лічильник, якщо одне зображення */
.map_modal--single .map_modal__arrow,
.map_modal--single .map_modal__dots,
.map_modal--single .map_modal__counter {
	display: none;
}

/* ===== Текстова частина ===== */
.map_modal__body {
	flex: 0 0 auto;
	width: 100%;
	box-sizing: border-box;
	margin-top: 14px;
	padding: 16px 24px;
	background: rgba(255, 255, 255, 0.07);
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	text-align: center;
	color: #fff;
}

.map_modal__title {
	margin: 0 0 8px;
	font-size: 24px;
	font-weight: 700;
	color: #fff;
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.map_modal__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	flex-shrink: 0;
	border-radius: 50%;
	background: #027C49;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
}

.map_modal__desc {
	margin: 0 auto;
	max-width: 760px;
	font-size: 15px;
	line-height: 1.55;
	color: #d7dde1;
}

.map_modal__close {
	position: fixed;
	top: 18px;
	right: 22px;
	width: 46px;
	height: 46px;
	border: 1.5px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.45);
	color: #fff;
	font-size: 28px;
	line-height: 46px;
	text-align: center;
	cursor: pointer;
	z-index: 6;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.map_modal__close:hover {
	background: rgba(0, 0, 0, 0.7);
	border-color: rgba(255, 255, 255, 0.6);
}

/* ===== Custom fullscreen control ===== */
.map_fs_btn {
	width: 40px;
	height: 40px;
	margin: 10px 10px 0 0;
	background: #fff;
	border-radius: 2px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	user-select: none;
}

.map_fs_btn:hover { background: #f0f0f0; }

.map_fs_btn__icon {
	width: 18px;
	height: 18px;
	fill: #666;
	display: block;
}

.map_fs_btn__icon--collapse { display: none; }
.map_fs_btn.is-active .map_fs_btn__icon--expand { display: none; }
.map_fs_btn.is-active .map_fs_btn__icon--collapse { display: block; }

/* Map in CSS fullscreen */
.club_map.is-fullscreen {
	position: fixed !important;
	inset: 0 !important;
	z-index: 9000 !important;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	border-radius: 0 !important;
}

body.map_fs_open { overflow: hidden; }

@media (max-width: 768px) {
	.map_modal { padding: 14px; }
	.map_modal__slider { height: 60vh; }
	.map_modal__arrow { width: 42px; height: 42px; }
	.map_modal__arrow svg { width: 22px; height: 22px; }
	.map_modal__body { padding: 12px 16px; }
	.map_modal__title {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		align-items: center;
		gap: 8px;
		font-size: 18px;
		word-break: break-word;
		overflow-wrap: anywhere;
	}
	.map_modal__num {
		width: 30px;
		height: 30px;
		font-size: 12px;
	}
	.map_modal__desc { font-size: 14px; }
	.map_modal__close { top: 10px; right: 10px; }
}
