/* Ana sayfa Instagram tarzı galeri — kapsayıcıya özel Swiper navigasyon değişkeni */
.ig-gallery-container {
	--swiper-navigation-size: 20px;
	overflow: visible;
	min-height: 400px;
	background: transparent;
	width: 100%;
}

/* Tam genişlik için 100vw + negatif margin, tema overflow-x:hidden ile sol/sağ kesilir; %100 genişlik kullan */
.ig-swiper-wrap {
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
	position: relative;
	box-sizing: border-box;
	padding-left: max(12px, env(safe-area-inset-left, 0px));
	padding-right: max(12px, env(safe-area-inset-right, 0px));
}

.ig-swiper.swiper {
	height: 400px;
	min-height: 400px;
	overflow: hidden;
	width: 100%;
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
}

.ig-swiper .swiper-slide {
	height: 400px;
}

/* Mobil: galeri altında sayfa noktaları — dinamik modda Swiper kendi transform'unu kullanır */
.ig-swiper-wrap .ig-swiper-pagination {
	position: relative;
	margin-top: 10px;
	margin-bottom: 2px;
	bottom: auto !important;
	top: auto !important;
	width: 100%;
	text-align: center;
	box-sizing: border-box;
}

.ig-swiper-wrap .ig-swiper-pagination .swiper-pagination-bullet {
	margin: 0 4px !important;
	width: 7px;
	height: 7px;
	background: var(--bs-primary, #6f42c1);
	opacity: 0.35;
}

.ig-swiper-wrap .ig-swiper-pagination .swiper-pagination-bullet-active {
	opacity: 1;
	background: var(--bs-primary, #6f42c1);
}

.ig-image-wrapper {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.ig-image {
	width: 100%;
	height: 100%;
	min-width: 0;
	min-height: 0;
	object-fit: cover;
	display: block;
	background-color: #eee;
}

@media (max-width: 1024px) {
	.ig-swiper.swiper,
	.ig-swiper .swiper-slide {
		height: 360px;
		min-height: 360px;
	}

	.ig-gallery-container {
		min-height: 360px;
	}

	.ig-image {
		width: 100%;
		height: 100%;
		min-width: 0;
		min-height: 0;
	}
}

@media (max-width: 600px) {
	.ig-swiper.swiper,
	.ig-swiper .swiper-slide {
		height: 280px;
		min-height: 280px;
	}

	.ig-gallery-container {
		min-height: 280px;
	}
}

.ig-image:hover {
	transform: scale(1.05);
}

.ig-slide-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px 14px;
	box-sizing: border-box;
	font-size: 0.9rem;
	font-weight: 500;
	line-height: 1.35;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s;
}

.ig-slide-overlay-text {
	display: -webkit-box;
	-webkit-line-clamp: 5;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-align: center;
	max-width: 100%;
	word-break: break-word;
}

.ig-image-wrapper:hover .ig-slide-overlay,
.ig-swiper .swiper-slide:hover .ig-slide-overlay {
	opacity: 1;
	pointer-events: auto;
}

.ig-gallery-container .swiper-button-next,
.ig-gallery-container .swiper-button-prev {
	display: none !important;
	width: 48px;
	height: 48px;
	color: #222;
	top: 50%;
	transform: translateY(-50%);
	z-index: 1000;
	margin-top: 0;
}

.ig-gallery-container .swiper-button-next::after,
.ig-gallery-container .swiper-button-prev::after {
	font-size: 20px;
	font-weight: bold;
}

@media (min-width: 1200px) {
	.ig-gallery-container .swiper-button-next,
	.ig-gallery-container .swiper-button-prev {
		display: flex !important;
		align-items: center;
		justify-content: center;
	}

	.ig-gallery-container .swiper-button-next {
		right: 8px !important;
	}

	.ig-gallery-container .swiper-button-prev {
		left: 8px !important;
	}
}

.ig-gallery-container .swiper-button-next:hover,
.ig-gallery-container .swiper-button-prev:hover {
	color: #fff;
	background: #000;
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Modal */
.ig-feed-modal-backdrop {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: rgba(0, 0, 0, 0.7);
	display: none;
	justify-content: center;
	align-items: flex-start;
	overflow-y: auto;
	overflow-x: hidden;
}

.ig-feed-modal-backdrop.is-open {
	display: flex;
}

.ig-feed-modal-fixed-close {
	position: fixed;
	top: 20px;
	right: 20px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.95);
	border: 2px solid rgba(0, 0, 0, 0.1);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 1001;
	padding: 0;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.ig-feed-modal-fixed-close.is-visible {
	display: flex;
}

.ig-feed-modal-fixed-close:hover,
.ig-feed-modal-fixed-close:focus-visible {
	background: #fff;
	transform: scale(1.1);
}

.ig-feed-modal-fixed-close svg {
	width: 20px;
	height: 20px;
	color: #000;
}

.ig-feed-modal-content {
	position: relative;
	background: #fff;
	box-sizing: border-box;
	margin-top: 72px;
	margin-bottom: 32px;
	margin-left: auto;
	margin-right: auto;
	width: min(450px, calc(100vw - 24px));
	max-width: 450px;
	min-height: auto;
	max-height: calc(100vh - 96px);
	overflow-y: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
	padding: 0;
	border-radius: 12px;
}

.ig-feed-modal-content::-webkit-scrollbar {
	display: none;
}

.ig-feed-post {
	border-bottom: 1px solid #eee;
	padding: 0;
}

.ig-feed-post:first-of-type {
	margin-top: 12px;
}

.ig-feed-post-header {
	display: flex;
	align-items: center;
	padding: 16px 16px 8px 16px;
}

.ig-profile-gradient {
	background: linear-gradient(135deg, #f9ce34 0%, #ee2a7b 50%, #6228d7 100%);
	border-radius: 50%;
	padding: 2.5px;
	margin-right: 12px;
	flex-shrink: 0;
}

.ig-profile-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	background: #fff;
	display: block;
}

.ig-profile-name {
	font-weight: 400;
	color: #000;
	font-size: 16px;
	text-decoration: none;
	transition: text-decoration 0.2s;
}

.ig-profile-name:hover {
	text-decoration: underline;
}

.ig-feed-follow-btn {
	margin-left: auto;
	flex-shrink: 0;
	padding: 0.4rem 1.15rem;
	font-weight: 600;
	font-size: 0.8125rem;
	line-height: 1.2;
	border-radius: 999px;
	border: none;
	color: #fff;
	text-decoration: none;
	cursor: pointer;
	background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
	transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.ig-feed-follow-btn:hover {
	color: #fff;
	filter: brightness(1.07);
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(220, 39, 67, 0.35);
}

.ig-feed-image-wrapper {
	width: 100%;
	background: #fafafa;
}

.ig-feed-image {
	aspect-ratio: 1 / 1;
	width: 100%;
	object-fit: cover;
	display: block;
	vertical-align: top;
}

.ig-feed-post-footer {
	display: flex;
	align-items: flex-start;
	padding: 12px 16px 16px 16px;
	gap: 0;
}

.ig-feed-post-footer-left {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex: 1;
	min-width: 0;
	gap: 0;
}

.ig-feed-modal-kicker {
	margin: 0 0 6px;
	width: 100%;
	font-size: 0.9375rem;
	font-weight: 600;
	color: #6c757d;
	line-height: 1.35;
}

.ig-feed-post-text {
	font-size: 15px;
	color: #000;
	margin: 0;
	word-break: break-word;
}

.ig-feed-read-more-btn,
.ig-feed-read-less-btn {
	display: inline;
	padding: 0;
	margin: 0;
	border: none;
	background: transparent;
	color: var(--bs-primary, #6f42c1);
	font-weight: 600;
	font-size: inherit;
	font-family: inherit;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ig-feed-read-more-btn:hover,
.ig-feed-read-less-btn:hover {
	color: var(--bs-primary, #6f42c1);
	filter: brightness(0.92);
}

.ig-feed-caption-expanded .ig-feed-read-less-btn {
	display: inline-block;
	margin-top: 6px;
}

.ig-feed-caption-collapsed {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	max-width: 100%;
}

.ig-feed-caption-expanded {
	width: 100%;
}

.ig-hidden {
	display: none !important;
}

.ig-feed-share-btn {
	margin-left: auto;
	font-weight: 300;
	font-size: 13px;
	padding: 6px 16px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: transparent;
	border: none;
	color: #000;
	cursor: pointer;
}

.ig-feed-share-btn svg {
	width: 18px;
	height: 18px;
	margin-left: 4px;
	flex-shrink: 0;
}

body.ig-feed-modal-open {
	overflow: hidden;
}
