/* ============================================
   EfeGaleri - Frontend CSS
   ============================================ */

/* CSS Variables - Sadece EfeGalari elementleri için scope'lanmış */
.efegalari-masonry-gallery,
.efegalari-grid-gallery,
.efegalari-carousel-wrapper,
.efegalari-3d-cube-gallery,
.efegalari-scroll-container,
.efe-basin-wrapper {
    --efegalari-primary-color: #667eea;
    --efegalari-secondary-color: #764ba2;
    --efegalari-text-dark: #1a1a1a;
    --efegalari-text-light: #666666;
    --efegalari-bg-light: #f8f8f8;
    --efegalari-border-color: #e0e0e0;
    --efegalari-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
    --efegalari-shadow-hover: 0 15px 50px rgba(0, 0, 0, 0.15);
}

/* Gallery Container */
.efegalari-masonry-gallery,
.efegalari-grid-gallery {
    margin: 30px 0;
    width: 100%;
}

/* Image Wrapper */
.efegalari-image-wrapper {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--efegalari-shadow, 0 5px 30px rgba(0, 0, 0, 0.1));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.efegalari-image-wrapper:hover {
    transform: translateY(-10px);
    box-shadow: var(--efegalari-shadow-hover, 0 15px 50px rgba(0, 0, 0, 0.15));
}

/* Image Link */
.efegalari-image-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.efegalari-image-link img {
    transition: transform 0.3s ease;
}

.efegalari-image-wrapper:hover .efegalari-image-link img {
    transform: scale(1.05);
}

/* Grid Item */
.efegalari-grid-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.efegalari-grid-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.efegalari-grid-item:hover img {
    transform: scale(1.1);
}

/* Carousel */
.efegalari-carousel-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.efegalari-carousel-slides {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.efegalari-slide {
    animation: fadeInSlide 0.5s ease;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.efegalari-carousel-prev,
.efegalari-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    z-index: 10;
    transition: all 0.3s ease;
    color: var(--efegalari-text-dark, #1a1a1a);
    font-weight: bold;
}

.efegalari-carousel-prev {
    left: 20px;
}

.efegalari-carousel-next {
    right: 20px;
}

.efegalari-carousel-prev:hover,
.efegalari-carousel-next:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.efegalari-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.efegalari-indicator:hover {
    transform: scale(1.3);
}

/* Horizontal Scroll */
.efegalari-scroll-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 20px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.efegalari-scroll-item {
    flex: 0 0 300px;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.efegalari-scroll-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* 3D Cube */
.efegalari-3d-cube-gallery {
    perspective: 1200px;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.efegalari-cube {
    position: relative;
    width: 300px;
    height: 300px;
    transform-style: preserve-3d;
    animation: rotateCube 20s infinite linear;
}

.efegalari-cube-face {
    position: absolute;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #eee;
    overflow: hidden;
    backface-visibility: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.efegalari-cube-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes rotateCube {
    from {
        transform: rotateX(0deg) rotateY(0deg);
    }
    to {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

/* Lightbox */
.efegalari-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.efegalari-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 80vh;
}

.efegalari-lightbox-content img {
    border-radius: 8px;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

/* Responsive */
@media (max-width: 1200px) {
    .efegalari-masonry-gallery {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .efegalari-masonry-gallery,
    .efegalari-grid-gallery {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px;
    }

    .efegalari-scroll-item {
        flex: 0 0 250px;
        height: 250px;
    }

    .efegalari-cube,
    .efegalari-cube-face {
        width: 250px !important;
        height: 250px !important;
    }

    .efegalari-carousel-prev,
    .efegalari-carousel-next {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .efegalari-masonry-gallery,
    .efegalari-grid-gallery {
        grid-template-columns: 1fr !important;
    }

    .efegalari-scroll-container {
        padding: 15px;
        gap: 15px;
    }

    .efegalari-scroll-item {
        flex: 0 0 200px;
        height: 200px;
    }

    .efegalari-carousel-prev,
    .efegalari-carousel-next {
        width: 35px;
        height: 35px;
        font-size: 16px;
        left: 10px;
        right: 10px;
    }
}

/* Accessibility */
.efegalari-image-link:focus {
    outline: 2px solid var(--efegalari-primary-color, #667eea);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .efegalari-carousel-prev,
    .efegalari-carousel-next {
        display: none;
    }
}

/* ============================================
   EfeGaleri - Mobil "Daha Fazla Göster" Stilleri
   ============================================ */
@media (max-width: 768px) {
    /* Başlangıçta 3'ten sonraki görselleri gizle */
    .efegalari-gallery-container.efegalari-mobile-paginated > .efegalari-grid-item:nth-child(n+4),
    .efegalari-gallery-container.efegalari-mobile-paginated > .efegalari-image-wrapper:nth-child(n+4) {
        display: none;
    }

    /* JavaScript ile görünür hale getirilecek görseller için */
    .efegalari-gallery-container.efegalari-mobile-paginated > .efegalari-mobile-visible {
        display: block !important; /* Grid için block veya grid olabilir, block daha genel */
    }
}

/* ============================================
   EfeGaleri - Liste Sayfası Stilleri (EfeBasın Tasarımı)
   TÜM STİLLER .efe-basin-wrapper içinde scope'lanmıştır
   ============================================ */
.efe-basin-wrapper {
	margin: 40px auto;
	max-width: 1200px;
	padding: 0 20px;
	/* Scope: Bu wrapper içindeki tüm stiller sadece galeri sayfalarında geçerlidir */
}

/* Galeri arşiv sayfası ( /galeri-efe/ ) tam genişlik, menüsüz */
.efe-basin-wrapper.efe-basin-wrapper--archive {
	max-width: 100% !important;
	width: 100% !important;
	padding: 20px !important;
}

.efe-basin-wrapper.efe-basin-wrapper--archive .efe-basin-layout {
	display: block !important;
	width: 100% !important;
	grid-template-columns: none !important;
}

.efe-basin-wrapper.efe-basin-wrapper--archive .efe-basin-main {
	width: 100% !important;
	max-width: 100% !important;
}

.efe-basin-single-wrapper {
	margin: 40px auto;
	max-width: 1200px;
	padding: 0 20px;
}

.efe-basin-single-wrapper .efe-basin-main {
	width: 100%;
}

.efe-basin-single-wrapper .efe-basin-sidebar {
	width: 100%;
}

/* TÜM EfeBasın stilleri .efe-basin-wrapper içinde scope'lanmış */
.efe-basin-wrapper .efe-basin-layout {
	display: block;
	width: 100%;
}

.efe-basin-wrapper.efe-basin-wrapper--archive .efe-basin-layout {
	display: block;
	width: 100%;
}

.efe-basin-wrapper .efe-basin-main {
	min-width: 0;
}

.efe-basin-wrapper .efe-basin-sidebar {
	min-width: 0;
}

.efe-basin-wrapper .efe-basin-title {
	font-size: 28px;
	font-weight: 700;
	margin: 0 0 24px 0;
	text-align: left;
}

.efe-basin-wrapper .efe-basin-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 30px;
	margin-top: 0;
	transition: opacity 0.3s ease;
}

.efe-basin-wrapper .efe-basin-item {
	position: relative;
	overflow: hidden;
	background-color: #ffffff;
	border: 1px solid #e5e7eb;
	transition: all 0.3s ease;
	cursor: pointer;
	border-radius: 0;
}

.efe-basin-wrapper .efe-basin-item:hover {
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	transform: translateY(-5px);
	border-color: #d1d5db;
}

.efe-basin-wrapper .efe-basin-thumb-link {
	display: block;
	position: relative;
	overflow: hidden;
	background-color: #f9fafb;
}

.efe-basin-wrapper .efe-basin-thumb {
	width: 100%;
	padding-top: 75%;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	transition: transform 0.4s ease;
	position: relative;
	display: block;
	min-height: 200px;
	background-color: #f9fafb;
}

.efe-basin-wrapper .efe-basin-item:hover .efe-basin-thumb {
	transform: scale(1.08);
}

/* Fotoğraftaki tasarım: Siyah kutu sol altta, Görsel sayısı butonu sağ altta */
.efe-basin-wrapper .efe-basin-info-box {
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	gap: 0;
	pointer-events: none;
}

.efe-basin-wrapper .efe-basin-source-box {
	position: absolute;
	left: 0;
	bottom: 0;
	background-color: rgba(31, 30, 28, 0.95);
	color: #ffffff;
	font-size: 10px;
	font-weight: 600;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 10px 18px;
	margin: 0;
	white-space: nowrap;
	z-index: 10;
	pointer-events: auto;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: calc(100% - 60px);
}

.efe-basin-wrapper .efe-basin-year-button {
	position: absolute;
	right: 0;
	bottom: 0;
	background-color: #f97316;
	color: #ffffff;
	border-radius: 0;
	font-size: 10px;
	font-weight: 600;
	text-align: center;
	display: inline-block;
	transition: all 0.2s ease;
	cursor: pointer;
	border: none;
	margin: 0;
	width: auto;
	min-width: 60px;
	z-index: 3;
	padding: 10px 14px;
}

.efe-basin-wrapper .efe-basin-year-button:hover {
	background-color: #ea580c;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.efegalari-single-wrapper {
    margin: 40px auto;
    max-width: 1200px;
    padding: 0 20px;
}

/* Responsive */
@media (max-width: 1200px) {
	.efe-basin-wrapper .efe-basin-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 1024px) {
	.efe-basin-wrapper .efe-basin-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.efe-basin-wrapper .efe-basin-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.efe-basin-wrapper .efe-basin-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.efe-basin-wrapper .efe-basin-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.efe-basin-wrapper {
		padding: 0 12px;
	}

	.efe-basin-wrapper .efe-basin-item {
		border: 10px solid #e5e7eb;
	}

	/* Mobilde görsellerin görünmesi için */
	.efe-basin-wrapper .efe-basin-thumb-link {
		display: block !important;
		position: relative !important;
		width: 100% !important;
		overflow: hidden !important;
		background-color: #f9fafb !important;
	}

	.efe-basin-wrapper .efe-basin-thumb {
		position: absolute !important;
		top: 0 !important;
		left: 0 !important;
		width: 100% !important;
		height: 100% !important;
		padding-top: 0 !important;
		background-size: cover !important;
		background-position: center !important;
		background-repeat: no-repeat !important;
		display: block !important;
		visibility: visible !important;
		opacity: 1 !important;
		min-height: 200px !important;
	}

	.efe-basin-wrapper .efe-basin-thumb-link::before {
		content: '';
		display: block;
		padding-top: 75%;
	}
}
