/* ============================================================
   Photos Modal — Kurumsal Galeri Tasarımı
   ============================================================ */

.photos-modal {
	--pm-navy: var(--td-navy, #0f2a4d);
	--pm-blue: var(--td-blue, #0f79b1);
	--pm-blue-light: var(--td-blue-light, #1c87b6);
	--pm-red: var(--td-red, #e81932);
	--pm-radius: var(--td-card-radius, 16px);
	--pm-glass: rgba(15, 42, 77, 0.55);
	--pm-glass-border: rgba(255, 255, 255, 0.12);

	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100vh;
	z-index: 1001;
	background: rgba(8, 18, 36, 0.88);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	padding: 20px;
	box-sizing: border-box;
}

.photos-modal__inner {
	width: 100%;
	max-width: 1200px;
	max-height: calc(100vh - 40px);
	display: flex;
	flex-direction: column;
	animation: pmFadeIn 0.35s ease;
}

@keyframes pmFadeIn {
	from { opacity: 0; transform: translateY(12px) scale(0.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Header ---- */
.photos-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 0 4px 16px;
	flex-shrink: 0;
}

.photos-modal__header-left {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.photos-modal__header-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--pm-blue) 0%, var(--pm-navy) 100%);
	color: #fff;
	font-size: 15px;
	flex-shrink: 0;
	box-shadow: 0 4px 14px rgba(15, 121, 177, 0.35);
}

.photos-modal__title {
	color: #fff;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: 0.01em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.photos-modal__header-count {
	color: rgba(255, 255, 255, 0.55);
	font-size: 14px;
	font-weight: 400;
}

.photos-modal__header-right {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-shrink: 0;
}

.photos-modal_close {
	position: static;
	transform: none;
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid var(--pm-glass-border);
	color: #fff;
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
	text-decoration: none;
}

.photos-modal_close i {
	font-size: 20px;
	line-height: 1;
}

.photos-modal_close:hover {
	background: rgba(232, 25, 50, 0.85);
	border-color: transparent;
	color: #fff;
	transform: rotate(90deg);
}

.photos-modal_keyboard-info {
	color: rgba(255, 255, 255, 0.5);
	font-size: 12px;
	display: flex;
	align-items: center;
	margin: 0;
	width: auto;
}

.photos-modal_keyboard-info i {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.4);
	margin-right: 6px;
}

.photos-modal_keyboard-info .text {
	margin: 0;
	white-space: nowrap;
}

/* ---- Body Layout ---- */
.photos-modal .wrapper {
	max-width: 100%;
	width: 100%;
	margin: 0;
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.photos-modal .relative {
	position: relative;
}

.photos-modal__body {
	flex: 1;
	min-height: 0;
}

.photos-modal__content-row {
	flex: 1;
	min-height: 0;
	margin: 0 -10px;
}

.photos-modal__main-col {
	padding: 0 10px;
}

/* ---- Carousel ---- */
.photos-modal_carousel {
	position: relative;
	height: calc(100vh - 260px);
	max-height: 580px;
	min-height: 280px;
	border-radius: var(--pm-radius);
	overflow: hidden;
	background: #0a1628;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.photos-modal_carousel::after {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	border-radius: inherit;
	box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.15);
	z-index: 1;
}

.photos-modal_carousel .image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
	border-radius: var(--pm-radius);
}

.photos-modal_carousel .image.active {
	display: block;
}

.photos-modal_carousel .image-count {
	position: absolute;
	right: 16px;
	bottom: 16px;
	height: 32px;
	padding: 0 14px;
	border-radius: 20px;
	background: var(--pm-glass);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid var(--pm-glass-border);
	color: #fff;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.04em;
	display: flex;
	align-items: center;
	box-sizing: border-box;
	z-index: 3;
}

/* Carousel overlay nav */
.photos-modal__carousel-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: rgba(15, 42, 77, 0.65);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 3;
	opacity: 0;
	transition: opacity 0.25s ease, background 0.2s ease, transform 0.2s ease;
	padding: 0;
}

.photos-modal__carousel-nav i {
	font-size: 16px;
}

.photos-modal__carousel-nav--prev { left: 14px; }
.photos-modal__carousel-nav--next { right: 14px; }

.photos-modal_carousel:hover .photos-modal__carousel-nav {
	opacity: 1;
}

.photos-modal__carousel-nav:hover {
	background: var(--pm-blue);
	border-color: transparent;
	transform: translateY(-50%) scale(1.08);
}

/* ---- Categories Sidebar ---- */
.photos-modal_categories {
	padding: 0 10px;
}

.photos-modal_categories .categories {
	max-height: calc(100vh - 260px);
	height: 100%;
	min-height: 280px;
	overflow-y: auto;
	padding: 18px 16px;
	border-radius: var(--pm-radius);
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--pm-glass-border);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	box-sizing: border-box;
}

.photos-modal_categories .categories::-webkit-scrollbar {
	width: 4px;
}

.photos-modal_categories .categories::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.2);
	border-radius: 4px;
}

.categories__heading {
	color: rgba(255, 255, 255, 0.4);
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 14px;
	padding-bottom: 10px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.photos-modal_categories .categories_link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 6px;
	padding: 10px 12px;
	color: rgba(255, 255, 255, 0.75) !important;
	font-weight: 400;
	font-size: 13px;
	width: 100%;
	cursor: pointer;
	border-radius: 10px;
	border: 1px solid transparent;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	text-decoration: none;
	box-sizing: border-box;
}

.photos-modal_categories .categories_link:hover {
	background: rgba(255, 255, 255, 0.06);
	color: #fff !important;
}

.photos-modal_categories .categories_link.active {
	background: linear-gradient(135deg, rgba(15, 121, 177, 0.35) 0%, rgba(15, 42, 77, 0.5) 100%);
	border-color: rgba(15, 121, 177, 0.45);
	color: #fff;
	font-weight: 500;
}

.photos-modal_categories .categories_link-category-name {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	flex: 1;
	min-width: 0;
}

.categories__badge {
	flex-shrink: 0;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.45);
}

.photos-modal_categories .categories_link.active .categories__badge {
	color: var(--pm-blue-light);
}

/* ---- Thumbnails ---- */
.photos-modal__footer-row {
	flex-shrink: 0;
	margin: 0;
}

.photos-modal_thumbnails {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden;
	margin-top: 18px;
	padding: 0 4px;
}

.photos-modal_thumbnails .thumbnails {
	margin-top: 0;
	width: calc(100% - 110px);
	overflow-x: hidden;
	padding: 8px 12px;
	display: flex;
	flex-wrap: nowrap;
	justify-content: flex-start;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid var(--pm-glass-border);
	border-radius: 12px;
}

.photos-modal_thumbnails .thumbnails_carousel {
	display: flex;
	flex-wrap: nowrap;
	margin: 0 auto;
	transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.photos-modal_thumbnails .thumbnails_item {
	cursor: pointer;
	width: 87px;
	height: 56px;
	position: relative;
	overflow: hidden;
	margin: 0 5px;
	border-radius: 8px;
	flex: 0 0 auto;
	border: 2px solid transparent;
	transition: border-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.photos-modal_thumbnails .thumbnails_item .image {
	width: 100%;
	height: 100%;
	opacity: 0.45;
	display: block;
	background-size: cover;
	background-position: center;
	transition: opacity 0.25s ease, transform 0.3s ease;
}

.photos-modal_thumbnails .thumbnails_item:hover .image {
	opacity: 0.75;
	transform: scale(1.05);
}

.photos-modal_thumbnails .thumbnails_item.active {
	border-color: var(--pm-blue);
	box-shadow: 0 0 0 2px rgba(15, 121, 177, 0.3);
}

.photos-modal_thumbnails .thumbnails_item.active .image {
	opacity: 1;
}

.photos-modal_thumbnails .thumbnails_next,
.photos-modal_thumbnails .thumbnails_prev {
	width: 44px;
	height: 44px;
	position: static;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid var(--pm-glass-border);
	border-radius: 50%;
	color: #fff;
	flex-shrink: 0;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
	padding: 0;
	line-height: 1;
}

.photos-modal_thumbnails .thumbnails_prev {
	margin-right: 10px;
}

.photos-modal_thumbnails .thumbnails_next {
	margin-left: 10px;
}

.photos-modal_thumbnails .thumbnails_next i,
.photos-modal_thumbnails .thumbnails_prev i {
	color: rgba(255, 255, 255, 0.8);
	font-size: 14px;
}

.photos-modal_thumbnails .thumbnails_next:hover,
.photos-modal_thumbnails .thumbnails_prev:hover {
	background: var(--pm-blue);
	border-color: transparent;
	transform: scale(1.06);
}

.photos-modal_thumbnails .thumbnails_next:hover i,
.photos-modal_thumbnails .thumbnails_prev:hover i {
	color: #fff;
}

/* ---- Trigger Button ---- */
.open-photo-modal-carousel {
	background: linear-gradient(135deg, var(--pm-blue, #0f79b1) 0%, var(--pm-navy, #0f2a4d) 100%);
	padding: 8px 14px;
	color: #fff;
	font-size: 0.82rem;
	font-weight: 500;
	cursor: pointer;
	border-radius: 8px;
	border: none;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	letter-spacing: 0.01em;
}

.open-photo-modal-carousel:hover {
	color: #fff;
	box-shadow: 0 6px 20px rgba(15, 121, 177, 0.4);
	transform: translateY(-1px);
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
	.photos-modal_carousel {
		height: calc(100vh - 340px);
		max-height: 420px;
	}

	.photos-modal_categories .categories {
		max-height: none;
		height: auto;
		min-height: 0;
		margin-top: 14px;
	}
}

@media (max-width: 768px) {
	.photos-modal {
		padding: 12px;
		align-items: flex-start;
		padding-top: 16px;
	}

	.photos-modal__inner {
		max-height: calc(100vh - 24px);
	}

	.photos-modal__header {
		padding-bottom: 12px;
	}

	.photos-modal__title {
		font-size: 15px;
	}

	.photos-modal_keyboard-info {
		display: none !important;
	}

	.photos-modal_carousel {
		height: 52vw;
		min-height: 200px;
		max-height: 340px;
	}

	.photos-modal__carousel-nav {
		opacity: 1;
		width: 36px;
		height: 36px;
	}

	.photos-modal__carousel-nav--prev { left: 8px; }
	.photos-modal__carousel-nav--next { right: 8px; }

	.photos-modal_categories {
		margin: 0;
		padding: 0 10px;
	}

	.photos-modal_categories .categories {
		padding: 12px;
	}

	.photos-modal_categories .categories_link {
		width: calc(50% - 4px);
		float: left;
		margin-bottom: 6px;
		margin-right: 4px;
		font-size: 12px;
		padding: 8px 10px;
	}

	.photos-modal_thumbnails .thumbnails {
		width: calc(100% - 96px);
		padding: 6px 8px;
	}

	.photos-modal_thumbnails .thumbnails_item {
		width: 64px;
		height: 46px;
	}

	.photos-modal_thumbnails .thumbnails_next,
	.photos-modal_thumbnails .thumbnails_prev {
		width: 38px;
		height: 38px;
	}

	.photos-modal_close {
		width: 36px;
		height: 36px;
	}

	.photos-modal_close i {
		font-size: 18px;
	}
}
