﻿/*
 * DOSYA: project-detail.css
 * KULLANIM: Views/Projects/Detail.cshtml
 * 
 * AÇIKLAMA: Proje detay sayfasının (Öncesi/Sonrası Slider, Galeri) stili.
 * Özellikle interaktif resim kaydırıcısı (Before/After) burada yönetilir.
 */

/* [SAYFA BAŞLIĞI] */
/* [SAYFA BAŞLIĞI] - Global layout.css kullanılıyor */

/* Breadcrumb - Link Rengi Ayarları */
.page-header .breadcrumb {
    margin-bottom: 0;
}

.page-header .breadcrumb-item,
.page-header .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.78);
}

.page-header .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
}



.page-header .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.9);
}

.project-detail-section {
    padding: 0 0 5rem;
    /* overflow-x: hidden; Sticky'yi bozduğu için kaldırıldı */
}

.detail-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

/* =====================================================
   [ÖNCESİ / SONRASI SLIDER] - Before/After Comparison
   İki resmi üst üste bindirip, ortadaki çubukla karşılaştırma yapmayı sağlar.
   ===================================================== */
.before-after-container {
    position: relative;
    /* İçindeki resimler buna göre konumlanır (absolute) */
    width: 100%;
    overflow: hidden;
    /* Taşmaları gizle */
    border-radius: var(--radius-lg);
    cursor: col-resize;
    /* İmleci sağ-sol ok yap */
    margin-bottom: 2rem;
    background: #f0f0f0;
    /* Resim yüklenirken gri zemin göster */
    min-height: 300px;
}

/* Ana Resim (Sonrası / Alttaki Resim) */
.before-after-container img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    pointer-events: none;
    /* Resmin sürüklenmesini engelle (kullanıcı deneyimi) */
    user-select: none;
    /* Seçilemez yap */
}

/* Üstteki Resim (Öncesi / Maskelenen Resim) */
.before-image-wrapper {
    position: absolute;
    /* Konteynerın üzerine bin */
    top: 0;
    left: 0;
    width: 50%;
    /* Başlangıçta yarısı görünsün (JS ile değişir) */
    height: 100%;
    overflow: hidden;
    /* Kalan kısmı gizle (Maskeleme mantığı) */
    border-right: 3px solid white;
    /* Ayırıcı beyaz çizgi */
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
    /* Çizgiye gölge ver */
}

.before-image-wrapper img {
    position: absolute;
    /* Maske içinde sabit dur */
    top: 0;
    left: 0;
    height: 100%;
    width: auto;
    /* Oranını koru */
    max-width: none;
    /* Sınırlamayı kaldır */
}

/* Ortadaki Tutamaç (Yuvarlak Buton) */
.slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    /* Tam ortada dur (JS ile Left değeri değişir) */
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    /* Yuvarlak */
    transform: translate(-50%, -50%);
    /* Merkezden hizala */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* Tutamaç üzerindeki sağ-sol oklar (CSS ile çizim) */
.slider-handle::before,
.slider-handle::after {
    content: '';
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.slider-handle::before {
    border-right: 8px solid var(--primary-color);
    margin-right: 2px;
}

/* Sol Ok */
.slider-handle::after {
    border-left: 8px solid var(--primary-color);
    margin-left: 2px;
}

/* Sağ Ok */

/* Etiketler (Öncesi / Sonrası yazıları) */
.before-label,
.after-label {
    position: absolute;
    top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.6);
    /* Yarı saydam siyah zemin */
    color: white;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    pointer-events: none;
    /* Tıklanamaz, sadece görsel */
    z-index: 5;
}

.before-label {
    left: 1rem;
}

.after-label {
    right: 1rem;
}

/* [META BİLGİLERİ] - Tarih, Konum vb. Grid */
.meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 Sütun */
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--light);
    border-radius: var(--radius-lg);
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 0.25rem;
}

.meta-value {
    font-weight: 600;
    color: var(--dark);
    font-size: 1.1rem;
}

/* [GALERİ] - Küçük resimler */
.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    transition: transform 0.3s ease;
    cursor: pointer;
    aspect-ratio: 1;
    /* Kare resimler */
}

.gallery-grid div:hover img {
    transform: scale(1.05);
    /* Hover'da zoom yap */
}

/* Sağ Menü Kartı (Sidebar) */
.side-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    /* Yuvarlak Köşeler */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    /* Yumuşak Gölge */
    position: sticky;
    top: 120px;
    /* Navbar altına yapış */
    border: 1px solid #eee;
}

.side-card h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.side-card .btn-primary {
    background-color: #8E735B;
    /* Kahverengi */
    border: 2px solid #8E735B;
    color: white;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.75rem;
}

.side-card .btn-primary:hover {
    background-color: white;
    color: #8E735B;
}

.side-card .btn-outline-primary {
    color: #8E735B;
    border: 2px solid #8E735B;
    background: white;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.75rem;
}

.side-card .btn-outline-primary:hover {
    background-color: #8E735B;
    color: white;
}

/* MOBİL UYUMLULUK */
@media (max-width: 991.98px) {
    .side-card {
        position: static;
        margin-top: 2rem;
    }

    .meta-grid {
        grid-template-columns: 1fr;
    }

    /* Mobilde tek sütun yap */
}

@media (max-width: 767.98px) {
    .project-detail-section .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
        max-width: 100% !important;
    }

    .detail-card {
        padding: 1.25rem !important;
    }

    .meta-grid {
        padding: 1.25rem !important;
    }

    .page-header h1 {
        font-size: 2rem !important;
    }
}

/* Sayfa Altı Butonları */
.project-detail-section .btn-secondary {
    background-color: white;
    /* Görseldeki gibi Beyaz Zemin */
    border: 2px solid #8E735B;
    color: #8E735B;
    /* Kahverengi Yazı */
    border-radius: 10px;
    font-weight: 500;
    /* Font Görseldeki Gibi */
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.project-detail-section .btn-secondary i {
    color: #8E735B;
}

.project-detail-section .btn-secondary:hover {
    background-color: #8E735B;
    color: white;
}

.project-detail-section .btn-secondary:hover i {
    color: white;
}

.project-detail-section .btn-outline-primary {
    color: #8E735B;
    border: 2px solid #8E735B;
    background: white;
    border-radius: 10px;
    font-weight: 500;
    /* Font Eşitlendi */
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.project-detail-section .btn-outline-primary:hover {
    background-color: #8E735B;
    color: white;
}

/* =====================================================
   [LIGHTBOX GALERİ] - Tam Ekran Resim Görüntüleme
   ===================================================== */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    /* Varsayılan gizli */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.lightbox-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    font-size: 1rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Kapatma ve Navigasyon Butonları */
.lightbox-close,
.lightbox-nav {
    position: absolute;
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    z-index: 10000;
}

.lightbox-close:hover,
.lightbox-nav:hover {
    transform: scale(1.1);
    color: var(--primary-color);
}

.lightbox-close {
    top: 20px;
    right: 20px;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* [RESİM YOKSA] - Placeholder Alanı */
.detail-card .placeholder {
    width: 100%;
    min-height: 400px;
    background-color: #f8f9fa;
    /* Açık gri zemin */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    color: #adb5bd;
    text-align: center;
    border: 2px dashed #dee2e6;
    margin-bottom: 2rem;
}

.detail-card .placeholder i {
    font-size: 4rem !important;
    /* İkonu büyüt */
    margin-bottom: 1rem;
    color: var(--secondary-color);
    opacity: 0.8;
}

.detail-card .placeholder p {
    font-size: 1.1rem;
    font-weight: 500;
}