/**
 * Barış Adalı Çanakkale Haritası – Frontend
 */

.bach-map-section {
	--bach-navy: #073B7A;
	--bach-navy-dark: #052D5E;
	--bach-navy-mid: #164F94;
	--bach-navy-deep: #062A57;
	--bach-white: #FFFFFF;
	--bach-bg: #F7F8FA;
	--bach-text: #6E7278;
	--bach-border: #E7EAF0;
	--bach-gold: #C89B3C;
	--bach-shadow: 0 8px 28px rgba(7, 59, 122, 0.08);
	--bach-radius: 8px;
	--bach-radius-sm: 5px;

	position: relative;
	isolation: isolate;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding: 80px 0 88px;
	background:
		radial-gradient(ellipse 70% 55% at 12% 0%, rgba(7, 59, 122, 0.06), transparent 55%),
		radial-gradient(ellipse 65% 50% at 100% 100%, rgba(22, 79, 148, 0.05), transparent 50%),
		linear-gradient(180deg, #F7F8FA 0%, #EEF1F6 100%);
	font-family: inherit;
	color: var(--bach-navy-dark);
	box-sizing: border-box;
	overflow: hidden;
}

.bach-map-section *,
.bach-map-section *::before,
.bach-map-section *::after {
	box-sizing: border-box;
}

.bach-map-section__inner {
	width: min(1360px, calc(100% - 48px));
	margin: 0 auto;
	position: relative;
	z-index: 1;
}

/* Decorative silhouette (subtle) */
.bach-map-section::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.035;
	background-repeat: no-repeat;
	background-position: right 8% bottom 6%;
	background-size: min(480px, 42vw) auto;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 420 220' fill='none'%3E%3Cpath d='M40 180 L70 90 L100 180 Z' fill='%23073B7A'/%3E%3Crect x='95' y='70' width='18' height='110' fill='%23073B7A'/%3E%3Ccircle cx='104' cy='58' r='14' fill='%23073B7A'/%3E%3Cpath d='M160 180 V100 H190 V180 Z M175 100 V70' stroke='%23073B7A' stroke-width='10'/%3E%3Cpath d='M230 180 L280 95 L330 180 Z' fill='%23073B7A'/%3E%3Cpath d='M300 180 Q340 120 380 180' stroke='%23073B7A' stroke-width='8' fill='none'/%3E%3C/svg%3E");
	z-index: 0;
}

.bach-map-section::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image: radial-gradient(rgba(7, 59, 122, 0.035) 1px, transparent 1px);
	background-size: 22px 22px;
	opacity: 0.45;
	z-index: 0;
}

/* Layout */
.bach-map-layout {
	display: grid;
	grid-template-columns: minmax(280px, 32%) minmax(0, 68%);
	gap: 36px;
	align-items: stretch;
}

/* Header */
.bach-map-header {
	margin-bottom: 28px;
}

.bach-map-header__eyebrow {
	margin: 0 0 14px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--bach-navy-mid);
	font-family: inherit;
}

.bach-map-header__line {
	display: block;
	width: 52px;
	height: 2px;
	background: var(--bach-navy);
	margin-bottom: 16px;
}

.bach-map-header__title {
	margin: 0 0 16px;
	font-family: inherit;
	font-size: clamp(28px, 2.6vw, 40px);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: var(--bach-navy);
}

.bach-map-header__desc {
	margin: 0;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.65;
	color: var(--bach-text);
	max-width: 36em;
}

/* Filters */
.bach-map-filters {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 20px;
	background: var(--bach-white);
	border: 1px solid var(--bach-border);
	border-radius: var(--bach-radius);
	box-shadow: var(--bach-shadow);
	margin-bottom: 20px;
}

.bach-map-filters__field {
	position: relative;
}

.bach-map-filters__icon {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--bach-navy);
	display: flex;
	pointer-events: none;
	z-index: 1;
}

.bach-map-filters__input,
.bach-map-filters__select {
	width: 100%;
	height: 56px;
	padding: 0 16px 0 46px;
	border: 1px solid var(--bach-border);
	border-radius: var(--bach-radius-sm);
	background: var(--bach-white);
	color: var(--bach-navy-dark);
	font-family: inherit;
	font-size: 15px;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bach-map-filters__select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23073B7A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	padding-right: 40px;
	cursor: pointer;
}

.bach-map-filters__input::placeholder {
	color: #9AA0A8;
}

.bach-map-filters__input:focus,
.bach-map-filters__select:focus {
	outline: none;
	border-color: var(--bach-navy);
	box-shadow: 0 0 0 3px rgba(7, 59, 122, 0.1);
}

.bach-map-filters__clear {
	height: 52px;
	padding: 0 20px;
	border: 1px solid var(--bach-navy);
	border-radius: var(--bach-radius-sm);
	background: var(--bach-white);
	color: var(--bach-navy);
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.bach-map-filters__clear:hover {
	background: var(--bach-navy);
	color: var(--bach-white);
}

/* Results list */
.bach-map-results {
	background: var(--bach-white);
	border: 1px solid var(--bach-border);
	border-radius: var(--bach-radius);
	box-shadow: var(--bach-shadow);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	max-height: 420px;
}

.bach-map-results__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	border-bottom: 1px solid var(--bach-border);
	flex-shrink: 0;
}

.bach-map-results__label {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--bach-navy);
}

.bach-map-results__count {
	font-size: 13px;
	color: var(--bach-text);
}

.bach-map-results__empty {
	padding: 28px 18px;
	text-align: center;
	font-size: 15px;
	color: var(--bach-text);
	line-height: 1.5;
}

.bach-map-results__list {
	list-style: none;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.bach-result-card-wrap {
	border-bottom: 1px solid var(--bach-border);
	background: var(--bach-white);
	transition: background 0.15s ease;
}

.bach-result-card-wrap:last-child {
	border-bottom: 0;
}

.bach-result-card-wrap:hover,
.bach-result-card-wrap.is-active {
	background: #F3F5F8;
}

.bach-result-card {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	width: 100%;
	padding: 12px 16px 8px;
	border: 0;
	background: transparent;
	text-align: left;
	cursor: pointer;
	font-family: inherit;
}

.bach-result-card__thumb {
	width: 48px;
	height: 48px;
	border-radius: 6px;
	object-fit: cover;
	flex-shrink: 0;
	background: #E8ECF2;
}

.bach-result-card__icon {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #052D5E;
	color: #fff;
	box-shadow: 0 2px 8px rgba(5, 45, 94, 0.18);
}

.bach-result-card__icon svg {
	display: block;
}

.bach-result-card__body {
	flex: 1;
	min-width: 0;
}

.bach-result-card__title {
	display: block;
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 700;
	color: var(--bach-navy);
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bach-result-card__meta {
	display: block;
	margin: 0 0 4px;
	font-size: 12px;
	color: var(--bach-text);
	line-height: 1.35;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bach-result-card__desc {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0;
	font-size: 12px;
	line-height: 1.45;
	color: var(--bach-text);
}

.bach-result-card__arrow {
	flex-shrink: 0;
	color: var(--bach-navy);
	opacity: 0.55;
	margin-top: 4px;
}

.bach-result-card__directions {
	display: inline-flex;
	margin: 0 16px 12px 82px;
	font-size: 12px;
	font-weight: 700;
	color: var(--bach-navy);
	text-decoration: none;
}

.bach-result-card__directions:hover {
	color: var(--bach-navy-dark);
	text-decoration: underline;
}

/* Map stage */
.bach-map-stage {
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.bach-map-stage__frame {
	position: relative;
	flex: 1;
	background: var(--bach-white);
	border: 1px solid var(--bach-border);
	border-radius: 8px;
	box-shadow: var(--bach-shadow);
	overflow: hidden;
	padding: 8px;
	min-height: 650px;
}

.bach-map-canvas {
	width: 100%;
	height: 100%;
	min-height: 634px;
	border-radius: 4px;
	overflow: hidden;
	background: #E8EEF5;
}

.bach-map-fallback {
	position: absolute;
	inset: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px;
	background: #F3F6FA;
	border-radius: 4px;
	z-index: 2;
}

.bach-map-fallback__text {
	margin: 0;
	max-width: 28em;
	text-align: center;
	font-size: 16px;
	line-height: 1.6;
	color: var(--bach-text);
}

/* Custom markers (AdvancedMarkerElement content) */
.bach-marker {
	background: transparent;
	border: 0;
	cursor: pointer;
}

.bach-marker__pin {
	width: 36px;
	height: 44px;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	filter: drop-shadow(0 3px 6px rgba(5, 45, 94, 0.28));
	transition: transform 0.18s ease;
}

.bach-marker__pin:hover,
.bach-marker.is-active .bach-marker__pin {
	transform: translateY(-3px) scale(1.06);
}

.bach-marker__svg {
	width: 36px;
	height: 44px;
	display: block;
}

.bach-marker.is-active .bach-marker__fill {
	fill: var(--bach-gold);
}

.bach-marker.is-active .bach-marker__ring {
	stroke: #A67F2A;
}

/* Google Maps InfoWindow – compact card (title always visible) */
.bach-map-section .gm-style .gm-style-iw-c {
	padding: 0 !important;
	border-radius: 8px !important;
	box-shadow: 0 12px 36px rgba(5, 45, 94, 0.16) !important;
	border: 1px solid var(--bach-border);
	max-width: min(320px, calc(100vw - 40px)) !important;
	overflow: visible !important;
}

.bach-map-section .gm-style .gm-style-iw-d {
	overflow: visible !important;
	max-height: none !important;
}

.bach-map-section .gm-style .gm-style-iw-tc,
.bach-map-section .gm-style .gm-style-iw-t::after {
	display: none;
}

.bach-map-section .gm-style-iw-chr {
	position: absolute !important;
	top: 6px;
	right: 6px;
	z-index: 2;
}

.bach-map-section button.gm-ui-hover-effect {
	width: 28px !important;
	height: 28px !important;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.95) !important;
	opacity: 1 !important;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.bach-map-section button.gm-ui-hover-effect > span {
	margin: 0 !important;
}

.bach-popup {
	width: 100%;
	box-sizing: border-box;
	background: var(--bach-white);
	padding: 14px 16px 16px;
}

.bach-popup__top {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding-right: 28px;
	margin-bottom: 10px;
}

.bach-popup__thumb {
	width: 64px;
	height: 64px;
	border-radius: 6px;
	object-fit: cover;
	flex-shrink: 0;
	display: block;
	background: #E8ECF2;
}

.bach-popup__icon {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #052D5E;
	box-shadow: 0 2px 8px rgba(5, 45, 94, 0.18);
}

.bach-popup__icon svg {
	display: block;
}

.bach-popup__top-text {
	min-width: 0;
	flex: 1;
}

.bach-popup__body {
	padding: 0;
}

.bach-popup__title {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.25;
	color: var(--bach-navy);
	font-family: inherit;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.bach-popup__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 0;
}

.bach-popup__tag {
	display: inline-block;
	padding: 3px 8px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--bach-text);
	background: #F3F5F8;
	border: 1px solid var(--bach-border);
	border-radius: 3px;
}

.bach-popup__desc {
	margin: 0 0 12px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--bach-text);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.bach-popup__actions {
	display: flex;
	gap: 8px;
}

.bach-popup__btn {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 40px;
	padding: 10px 12px;
	border-radius: 5px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none !important;
	text-align: center;
	line-height: 1.2;
	transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
	white-space: nowrap;
}

.bach-popup__btn--secondary {
	background: var(--bach-white);
	border: 1px solid var(--bach-navy);
	color: var(--bach-navy) !important;
}

.bach-popup__btn--secondary:hover {
	background: #F3F6FA;
}

.bach-popup__btn--primary {
	background: var(--bach-navy-dark);
	border: 1px solid var(--bach-navy-dark);
	color: var(--bach-white) !important;
}

.bach-popup__btn--primary:hover {
	background: var(--bach-navy);
	border-color: var(--bach-navy);
}

.bach-popup__btn svg {
	flex-shrink: 0;
}

/* Screen reader */
.bach-map-section .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* Tablet */
@media (max-width: 1024px) {
	.bach-map-section {
		padding: 56px 0 64px;
	}

	.bach-map-layout {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.bach-map-sidebar {
		display: contents;
	}

	.bach-map-header {
		grid-column: 1;
		margin-bottom: 8px;
	}

	.bach-map-filters {
		grid-column: 1;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 12px;
	}

	.bach-map-filters__field:first-child {
		grid-column: 1 / -1;
	}

	.bach-map-filters__clear {
		grid-column: 1 / -1;
	}

	.bach-map-stage {
		grid-column: 1;
		order: 2;
	}

	.bach-map-stage__frame {
		min-height: 550px;
	}

	.bach-map-canvas {
		min-height: 534px;
	}

	.bach-map-results {
		grid-column: 1;
		order: 3;
		max-height: none;
	}

	.bach-map-results__list {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}

	.bach-map-results__list > li:nth-child(odd) .bach-result-card-wrap {
		border-right: 1px solid var(--bach-border);
	}
}

/* Mobile */
@media (max-width: 640px) {
	.bach-map-section {
		padding: 28px 0 36px;
		width: 100vw;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
	}

	.bach-map-section__inner {
		width: calc(100% - 24px);
	}

	.bach-map-header {
		margin-bottom: 16px;
	}

	.bach-map-header__title {
		font-size: 24px;
	}

	.bach-map-header__desc {
		font-size: 14px;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	.bach-map-filters {
		grid-template-columns: 1fr;
		padding: 12px;
		gap: 10px;
		margin-bottom: 14px;
	}

	.bach-map-filters__field:first-child,
	.bach-map-filters__clear {
		grid-column: auto;
	}

	.bach-map-filters__input,
	.bach-map-filters__select {
		height: 48px;
	}

	.bach-map-filters__clear {
		height: 46px;
	}

	.bach-map-stage {
		order: 2;
	}

	.bach-map-stage__frame {
		min-height: 360px;
		padding: 4px;
	}

	.bach-map-canvas {
		min-height: 352px;
	}

	/* Yatay kaydırılabilir kompakt sonuçlar */
	.bach-map-results {
		order: 3;
		max-height: none;
		margin-top: 12px;
	}

	.bach-map-results__head {
		padding: 10px 14px;
	}

	.bach-map-results__list {
		display: flex;
		flex-direction: row;
		gap: 10px;
		padding: 12px;
		overflow-x: auto;
		overflow-y: hidden;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
	}

	.bach-map-results__list > li {
		flex: 0 0 min(78vw, 260px);
		scroll-snap-align: start;
	}

	.bach-map-results__list > li:nth-child(odd) .bach-result-card-wrap {
		border-right: 0;
	}

	.bach-result-card-wrap {
		border: 1px solid var(--bach-border);
		border-radius: 8px;
		height: 100%;
		display: flex;
		flex-direction: column;
	}

	.bach-result-card {
		align-items: center;
		padding: 12px;
		gap: 10px;
		flex: 1;
	}

	.bach-result-card__icon {
		width: 36px;
		height: 36px;
	}

	.bach-result-card__icon svg {
		width: 16px;
		height: 16px;
	}

	.bach-result-card__thumb {
		width: 36px;
		height: 36px;
		border-radius: 50%;
	}

	.bach-result-card__title {
		margin: 0 0 2px;
		font-size: 14px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		display: block;
		-webkit-line-clamp: unset;
	}

	.bach-result-card__meta {
		font-size: 11px;
	}

	.bach-result-card__desc {
		display: none;
	}

	.bach-result-card__arrow {
		display: none;
	}

	.bach-result-card__directions {
		margin: 0;
		padding: 8px 12px 12px;
		border-top: 1px solid var(--bach-border);
		font-size: 12px;
	}

	.bach-map-section .gm-style .gm-style-iw-c {
		max-width: min(300px, calc(100vw - 28px)) !important;
	}

	.bach-popup {
		padding: 12px 12px 14px;
	}

	.bach-popup__thumb {
		width: 56px;
		height: 56px;
	}

	.bach-popup__title {
		font-size: 15px;
	}

	.bach-popup__actions {
		flex-direction: column;
	}

	.bach-popup__btn {
		width: 100%;
		min-height: 44px;
	}

	.bach-marker__pin,
	.bach-marker__svg {
		width: 32px;
		height: 40px;
	}
}

@media (max-width: 480px) {
	.bach-map-stage__frame {
		min-height: 320px;
	}

	.bach-map-canvas {
		min-height: 312px;
	}

	.bach-map-results__list > li {
		flex-basis: min(82vw, 240px);
	}
}
