/* Haberler Detay Sayfası Stilleri */
.haber-detay-page {
    background: #f8f9fa;
    min-height: 100vh;
    font-family: 'Open Sans', sans-serif;
    padding: 0;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.haber-detay-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    box-sizing: border-box;
}

.haber-detay-title {
    color: #222;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    margin-top: 0;
    line-height: 1.2;
}

.haber-detay-date {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.haber-detay-date i {
    font-size: 16px;
    color: #666;
}

.haber-detay-mainimg {
    width: 100%;
    max-width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio (9/16 = 0.5625) */
    position: relative;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    margin-bottom: 1.5rem;
    display: block;
    background: #eaeaea;
    border: 1px solid #e3e9ef;
    overflow: hidden;
}

.haber-detay-mainimg img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.haber-detay-icerik-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 1.5rem 1.2rem;
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.haber-detay-icerik {
    color: #222;
    font-size: 1.05rem;
    line-height: 1.6;
    font-family: 'Open Sans', sans-serif;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    box-sizing: border-box;
}

.haber-detay-icerik p {
    margin-bottom: 0.8rem;
    max-width: 100%;
    overflow: hidden;
    text-align: justify;
}

.haber-detay-icerik img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0.8rem 0;
}

.haber-detay-icerik table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
    margin: 0.8rem 0;
}

.haber-detay-icerik pre {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    background: #f8f9fa;
    padding: 0.8rem;
    border-radius: 4px;
    margin: 0.8rem 0;
}

.haber-detay-gallery-title {
    font-size: 1.50rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 0.7rem;
    margin-top: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
    display: block;
    width: 100%;
}

.haber-detay-gallery-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
}

.haber-detay-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
    width: 100%;
    justify-items: center;
}
.haber-detay-gallery {
    margin: 2rem 0;
}

.haber-detay-gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    aspect-ratio: 16/9;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 300px;
}

.haber-detay-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.haber-detay-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
/* Lightbox Stilleri */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    cursor: pointer;
    overflow: hidden;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.lightbox img {
    width: auto;
    height: auto;
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    margin: 0;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 10000;
}

.lightbox-nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: background-color 0.3s ease;
}

.lightbox-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-nav-btn i {
    font-size: 20px;
}


@media (max-width: 1200px) {
    .haber-detay-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .haber-detay-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .haber-detay-icerik-box {
        padding: 1.5rem 2rem;
    }
    .haber-detay-content {
        padding: 2rem 1.5rem;
    }

    .haber-detay-gallery {
        padding: 0 1.5rem;
        gap: 1.2rem;
    }
    .lightbox-nav {
        padding: 0 10px;
    }

    .lightbox-nav-btn {
        width: 35px;
        height: 35px;
    }

    .lightbox-nav-btn i {
        font-size: 16px;
    }
    
}

@media (max-width: 576px) {
    .haber-detay-content {
        padding: 1.5rem 1.5rem;
        width: 100%;
        box-sizing: border-box;
    }

    .haber-detay-title {
        font-size: 1.5rem;
        padding: 0;
    }

    .haber-detay-mainimg {
        height: 150px;
        margin: 0;
        width: 100%;
    }

    .haber-detay-gallery {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        padding: 0 1.5rem;
        margin: 2rem 0;
        width: 100%;
        box-sizing: border-box;
    }
    .haber-detay-gallery-item {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .haber-detay-gallery-item img {
        width: 100%;
        height: auto;
        object-fit: cover;
        display: block;
    }


    .haber-detay-icerik-box {
        padding: 1.5rem;
        margin: 0;
        width: 100%;
    }

    /* Lightbox mobile styles */
    .lightbox {
        padding: 1.5rem;
    }

    .lightbox img {
        max-width: 100%;
        max-height: 80vh;
        margin: 0 auto;
        border-radius: 8px;
    }

    .lightbox-nav {
        padding: 0 1.5rem;
    }

    .lightbox-nav-btn {
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.3);
    }

    .lightbox-nav-btn i {
        font-size: 18px;
    }
    .haber-detay-gallery-empty {
        width: 100%;
        padding: 2rem;
        text-align: center;
        background: #f8f9fa;
        border-radius: 8px;
        border: 1px dashed #dee2e6;
    }
    
    .haber-detay-gallery-empty p {
        color: #6c757d;
        font-size: 1rem;
        margin: 0;
    }
    
    .lb-nav a.lb-prev,
    .lb-nav a.lb-next {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .lb-nav a.lb-prev {
        left: 0;
    }
    
    .lb-nav a.lb-next {
        right: 0;
    }
    
    .lb-nav a.lb-prev:hover,
    .lb-nav a.lb-next:hover {
        opacity: 0.8 !important;
    } 
}

/* Animasyonlar */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}