/* ==================== HABER CAROUSEL ==================== */

/* Carousel FIX - 3 SATIR */
.carousel-track { width: auto !important; }
.carousel-slide { flex: 0 0 100% !important; }
.carousel-container { overflow: hidden !important; }

.news-gallery {
    margin: 30px 0;
    position: relative;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    background: #f8f9fa;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 400px;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 20px;
    text-align: center;
}

.carousel-caption h4 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
}

.carousel-caption p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Carousel Kontroller */
.carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10;
}

.carousel-btn {
    background: rgba(255,255,255,0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #333;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

.carousel-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.carousel-btn:active {
    transform: scale(0.95);
}

/* Carousel Dots */
.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.carousel-dot.active {
    background: white;
    transform: scale(1.2);
}

.carousel-dot:hover {
    background: rgba(255,255,255,0.8);
}

/* Carousel Counter */
.carousel-counter {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 10;
}

/* Thumbnail Gallery */
.carousel-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding: 0 10px;
    overflow-x: auto;
    scrollbar-width: thin;
}



/* Fullscreen Modal */
.carousel-fullscreen-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 10;
    transition: all 0.3s;
}

.carousel-fullscreen-btn:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.fullscreen-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

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

.fullscreen-carousel {
    width: 90%;
    height: 80%;
    position: relative;
}

.fullscreen-carousel .carousel-track {
    height: 100%;
}

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-close:hover {
    color: #ff6b6b;
}

/* Responsive Carousel */
@media (max-width: 768px) {
    .carousel-track {
        height: 300px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .carousel-caption {
        padding: 15px;
    }
    
    .carousel-caption h4 {
        font-size: 1rem;
    }
    
    .carousel-caption p {
        font-size: 0.8rem;
    }
    
    .carousel-thumbnails {
        padding: 0 5px;
    }
    
    .thumbnail {
        width: 60px;
        height: 45px;
    }
    
    .carousel-dots {
        bottom: 10px;
    }
    
    .carousel-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .carousel-track {
        height: 250px;
    }
    
    .carousel-controls {
        padding: 0 10px;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .carousel-counter {
        top: 10px;
        right: 10px;
        font-size: 0.8rem;
        padding: 3px 10px;
    }
    
    .carousel-fullscreen-btn {
        top: 10px;
        left: 10px;
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* Touch optimizasyonu */
.carousel-track {
    -webkit-overflow-scrolling: touch;
}

.carousel-btn,
.carousel-dot,
.thumbnail {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: manipulation;
}

/* Otomatik oynatma kontrolü */
.carousel-autoplay-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    align-items: center;
}

.autoplay-btn {
    background: #1a6ca1;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.autoplay-btn:hover {
    background: #155d92;
    transform: translateY(-2px);
}

.autoplay-speed {
    color: #666;
    font-size: 0.9rem;
}
/* ==================== THUMBNAIL GALERİ İYİLEŞTİRMESİ ==================== */

.carousel-thumbnails {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding: 15px 10px;
    overflow-x: auto;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #1a6ca1 #f1f1f1;
    background: linear-gradient(to right, #f8f9fa, #ffffff, #f8f9fa);
    border-radius: 10px;
    border: 1px solid #eaeaea;
    min-height: 100px;
    align-items: center;
}

/* Webkit scrollbar (Chrome, Safari, Edge) */
.carousel-thumbnails::-webkit-scrollbar {
    height: 8px;
    border-radius: 4px;
}

.carousel-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
    margin: 0 10px;
}

.carousel-thumbnails::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #1a6ca1, #2c8bd1);
    border-radius: 4px;
    border: 2px solid #f1f1f1;
}

.carousel-thumbnails::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #155d92, #1a6ca1);
}

/* Thumbnail item */
.thumbnail {
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    border: 3px solid transparent;
    position: relative;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.thumbnail:hover {
    opacity: 0.9;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.thumbnail.active {
    opacity: 1;
   /* border-color: #1a6ca1;*/
    box-shadow: 0 5px 15px rgba(26, 108, 161, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 3px 8px rgba(26, 108, 161, 0.3);
}

.thumbnail.active::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
    background: #28a745;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.thumbnail:hover img {
    transform: scale(1.1);
}

/* Thumbnail sayıları (opsiyonel) */
.thumbnail::before {
    content: attr(data-index);
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.thumbnail:hover::before {
    opacity: 1;
}

/* Scroll butonları (opsiyonel) */
.thumbnails-container {
    position: relative;
    margin-top: 20px;
}

.thumb-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a6ca1;
    font-size: 1.2rem;
    transition: all 0.3s;
    opacity: 0.8;
}

.thumb-scroll-btn:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.thumb-scroll-btn.prev {
    left: -18px;
}

.thumb-scroll-btn.next {
    right: -18px;
}

/* Mobil için thumbnail */
@media (max-width: 768px) {
    .carousel-thumbnails {
        gap: 8px;
        padding: 12px 8px;
        min-height: 85px;
    }
    
    .thumbnail {
        width: 100px;
        height: 70px;
    }
    
    .thumb-scroll-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .thumb-scroll-btn.prev {
        left: -16px;
    }
    
    .thumb-scroll-btn.next {
        right: -16px;
    }
}

@media (max-width: 480px) {
    .thumbnail {
        width: 80px;
        height: 60px;
    }
    
    .carousel-thumbnails {
        min-height: 75px;
    }
}

/* Karanlık tema için */
@media (prefers-color-scheme: dark) {
    .carousel-thumbnails {
        background: linear-gradient(to right, #2d2d2d, #1e1e1e, #2d2d2d);
        border-color: #444;
    }
    
    .thumbnail {
        box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    }
    
    .thumb-scroll-btn {
        background: #2d2d2d;
        color: #e0e0e0;
        box-shadow: 0 3px 10px rgba(0,0,0,0.4);
    }
}
/* Mobilde thumbnail scroll daha iyi */
@media (max-width: 768px) {
    .carousel-thumbnails {
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding: 10px 5px;
    }
    
    .thumbnail {
        scroll-snap-align: center;
    }
    
    /* Mobilde tıklama alanını büyüt */
    .thumbnail {
        min-width: 90px;
    }
}

/* Tablet için */
@media (min-width: 769px) and (max-width: 1024px) {
    .thumbnail {
        width: 110px;
        height: 75px;
    }
}
.carousel-slide {
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: 100% !important;
}
/* Fullscreen modal için ek CSS */
.fullscreen-modal.active .fullscreen-carousel {
    width: 95%;
    height: 90%;
    position: relative;
}

.fullscreen-modal.active .carousel-track {
    height: 100%;
}

.fullscreen-modal.active .carousel-slide {
    height: 100%;
}

.fullscreen-modal.active .carousel-image {
    max-height: 100%;
    object-fit: contain;
    background: #000;
}

/* Thumbnail scrollbar */
.carousel-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.carousel-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.carousel-thumbnails::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.carousel-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Autoplay butonu */
.autoplay-btn.playing {
    background: #dc3545;
}

.autoplay-btn.playing:hover {
    background: #c82333;
}

/* RESİM BOYUTLANDIRMA FIX */
.carousel-image {
    width: 100% !important;
    height: 400px !important;
    object-fit: contain !important; /* veya 'cover' */
    max-width: 100% !important;
    max-height: 100% !important;
    display: block !important;
}

/* Slide container */
.carousel-slide {
    width: 100% !important;
    height: 400px !important; /* Sabit yükseklik ver */
    overflow: hidden !important;
    position: relative !important;
}

/* Carousel track */
.carousel-track {
    height: 400px !important; /* Track'e de aynı yüksekliği ver */
}
.carousel-dots {
    display: none !important;
}

/* Fullscreen modal'daki dot'ları da kaldır */
.fullscreen-modal .carousel-dots {
    display: none !important;
}