/**
 * Haber Sitesi - Özel Haber Bölümü CSS
 */

.news-main-section {
    padding: 20px 0;
}

.news-main-container {
    display: flex;
    gap: 15px;
    max-width: var(--desktop-max-width);
    margin: 0 auto;
    padding: 0;
    box-shadow: 0 10px 10px rgb(0 0 0 / 45%);
}

/* Sol Sütun: Başlık Listesi */
.news-titles-sidebar {
    flex: 0 0 280px;
    /* Sabit Genişlik */
    width: 280px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    background: var(--content-bg-color);
    border: 1px solid var(--border-color);
    height: 408px;
}

.news-items-nav {
    flex: 1;
    position: relative;
}

.news-items-nav::-webkit-scrollbar {
    width: 2px;
}

.news-items-nav::-webkit-scrollbar-track {
    background: var(--background-secondary-color);
}

.news-items-nav::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.news-item-link {
    display: block;
    padding: 12px 12px;
    /* Dikey boşluk biraz arttırıldı */
    border-bottom: 1px solid var(--border-color);
    border-left: 0 solid transparent;
    /* Sol kenarlık başlangıcı */
    text-decoration: none;
    color: var(--text-primary-color);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Geçiş efektleri */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.news-item-link:hover {
    background: var(--background-secondary-color);
    padding-left: 16px;
    /* Hover'da hafif kayma */
}

.news-item-link.active {
    background: var(--background-secondary-color);
    /* Koyu zemin yerine açık zemin */
    color: var(--primary-color);
    /* Yazı rengi ana renk */
    font-weight: 700;
    /* Kalın font */
    border-left: 4px solid var(--primary-color);
    /* Sol şerit */
    padding-left: 18px;
    /* Belirgin sağa kayma */
    border-bottom-color: var(--border-color);
}

/* Orta Sütun: Slider */
.news-slider-center {
    flex: 1;
    /* Esnek Genişlik */
    height: 408px;
    position: relative;
    overflow: hidden;
    min-width: 0;
    /* Flexbox taşma sorununu önlemek için */
}

.news-slider {
    height: 100%;
    position: relative;
}

.news-slider .carousel-inner {
    height: 100%;
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Bootstrap JS olmadığı için manuel kontrol */
.news-slider .carousel-item {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    /* display: none; YERİNE opacity kullanıyoruz */
    display: block;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    z-index: 0;
}

.news-slider .carousel-item.active {
    /* display: block; YERİNE */
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.news-slider .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: fill;
}

/* Carousel Caption */
.news-slider .carousel-caption {
    position: absolute;
    bottom: 0;
    /* Noktalardan uzaklaştırmak için yukarı alındı */
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 100%);
    padding: 15px 20px;
    display: none;
    z-index: 2;
    pointer-events: none;
    /* Caption linki engellemesin */
}

.news-slider .carousel-item.active .carousel-caption {
    display: block;
}

.news-slider .carousel-caption h5 {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

/* Indicators */
.news-slider .carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 10%;
    right: 10%;
    display: flex;
    justify-content: center;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 5;
    /* Tıklanabilirlik için en üstte */
}

.news-slider .carousel-indicators button {
    flex: 1;
    height: 3px;
    /* Tıklama alanı çok dar olabilir */
    padding: 5px 0;
    /* Tıklama alanını genişletmek için padding (görünmez) */
    background-clip: content-box;
    /* Sadece 3px'lik kısım boyansın */
    background-color: #fff;
    opacity: 0.5;
    border: none;
    cursor: pointer;
}

.news-slider .carousel-indicators button.active {
    opacity: 1;
    background-color: var(--primary-color);
}

/* Kontroller (Oklar) */
.news-slider .carousel-control-prev,
.news-slider .carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    /* Dikey ortalama */
    z-index: 10;
    /* En üstte */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    /* Sabit genişlik */
    height: 40px;
    /* Sabit yükseklik */
    color: #fff;
    text-align: center;
    opacity: 1;
    /* Tam görünür */
    transition: background-color 0.15s ease;
    border: 0;
    background-color: rgba(0, 0, 0, 0.3);
    /* Yarı saydam siyah arka plan */
    border-radius: 50%;
    /* Yuvarlak */
    cursor: pointer;
}

.news-slider .carousel-control-prev:hover,
.news-slider .carousel-control-next:hover {
    background-color: rgba(0, 0, 0, 0.6);
    /* Hover'da koyulaş */
}

.news-slider .carousel-control-prev {
    left: 10px;
    /* Kenardan boşluk */
}

.news-slider .carousel-control-next {
    right: 10px;
    /* Kenardan boşluk */
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    display: inline-block;
    width: 20px;
    /* İkon boyutu */
    height: 20px;
    background-repeat: no-repeat;
    background-position: 50%;
    background-size: 100% 100%;
}

.carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

.carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Sağ Sütun: Sidebar */
.news-sidebar-right {
    flex: 0 0 288px;
}

.sidebar-banners {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-banners img,
.sidebar-banners amp-img {
    width: 100%;
    height: auto;
    max-width: 288px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .news-titles-sidebar {
        display: none;
        /* Tablet ve Mobilde Gizle */
    }

    .news-main-container {
        flex-wrap: wrap;
    }

    .news-slider-center {
        flex: 0 0 100%;
        height: 300px;
        /* Tablet yüksekliği */
    }

    .news-sidebar-right {
        flex: 0 0 100%;
    }
}

@media (max-width: 768px) {
    .news-slider-center {
        height: 200px;
        /* Telefon yüksekliği */
    }

    .news-slider .carousel-caption h5 {
        font-size: 14px;
        /* Mobilde daha küçük başlık */
    }
}

/* News Grid Section */
.news-grid-section {
    padding: 30px 0;
}

.news-grid-container {
    max-width: var(--desktop-max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.news-card {
    background: var(--content-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.news-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #eee;
}

.news-card-image img,
.news-card-image amp-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-card-content {
    padding: 15px;
    flex-grow: 1;
}

/* Feed Interstitial Ads */
.ad-item.ad-feed-interstitial {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--content-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    height: 100%;
}

.ad-item.ad-feed-interstitial img {
    width: 300px;
    height: 250px;
    object-fit: contain;
}

.news-card-content h3 {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 600;
    color: var(--text-primary-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
    /* İki satırlık sabit yükseklik */
}

@media (max-width: 1200px) {
    .news-grid-container {
        padding: 0 15px;
        gap: 15px;
    }
}

@media (max-width: 1024px) {
    .news-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .news-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-card-content h3 {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .news-grid-container {
        grid-template-columns: 1fr;
    }
}