/* Günlük haberler: kategori sekmeleri + haber kartları (/haberler) + anasayfa kaydırıcısı */

/* Her zaman tek satır; sığmazsa yatay kayar (çubuk gizli, taşan kenar solar) */
.news-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.news-tabs::-webkit-scrollbar {
    display: none;
}

.news-tabs.is-fade-right {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
}

.news-tabs.is-fade-left {
    -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent);
    mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent);
}

.news-tabs.is-fade-left.is-fade-right {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
    mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
}

.news-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid var(--border-card);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.news-tab:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.news-tab.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #1a1614;
}

.news-tab-count {
    font-size: 0.74rem;
    font-weight: 700;
    opacity: 0.65;
}

.news-tabs--home {
    margin: 4px 0 18px;
}

/* Liste */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.news-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.15s, transform 0.15s;
}

.news-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.news-card-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-secondary));
    overflow: hidden;
}

.news-card-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Görsel yüklenemezse görünen yer tutucu */
.news-card-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 2.4rem;
    opacity: 0.55;
}

.news-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    padding: 14px 16px 14px;
}

.news-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.news-card-cat {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.news-card-title {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.35;
}

.news-card-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.news-card-title a:hover {
    color: var(--accent);
}

.news-card-text {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-foot {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
}

.news-card-source {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-muted);
}

.news-card-source strong {
    color: var(--text-secondary);
}

.news-card-more {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--accent);
    background: var(--accent-soft);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.news-card-more:hover {
    background: var(--accent);
    color: #1a1614;
}

/* Manşet: 2 sütun × 2 satır; sağında iki haber durur, görsel kalan yüksekliği doldurur */
.news-card--lead {
    grid-column: span 2;
    grid-row: span 2;
}

.news-card--lead .news-card-media {
    aspect-ratio: auto;
    flex: 1 1 auto;
    min-height: 280px;
}

.news-card--lead .news-card-body {
    flex: 0 0 auto;
}

.news-card--lead .news-card-title {
    font-size: 1.45rem;
}

.news-empty {
    text-align: center;
    padding: 48px 16px;
    color: var(--text-muted);
}

.news-empty i {
    font-size: 2.4rem;
    margin-bottom: 10px;
}

/* Anasayfa: tek sıra, oklarla kaydırılır */
.news-slider {
    position: relative;
}

.news-slider-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 3 * 18px) / 4);
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 4px 0 6px;
}

.news-slider-track::-webkit-scrollbar {
    display: none;
}

.news-slider-track .news-card {
    scroll-snap-align: start;
}

.news-slider-track .news-card:hover {
    transform: none;
}

.news-slider-track .news-card-text {
    -webkit-line-clamp: 2;
}

.news-slider-btn {
    position: absolute;
    top: 30%;
    z-index: 3;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-card);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, opacity 0.15s;
}

.news-slider-btn:hover:not(:disabled) {
    background: var(--accent);
    border-color: var(--accent);
    color: #1a1614;
}

/* Uçta kalan ok tamamen kalkar (görünür kalıp tıklamayı alttaki habere geçirmesin) */
.news-slider-btn:disabled {
    visibility: hidden;
}

.news-slider-btn--prev {
    left: -20px;
}

.news-slider-btn--next {
    right: -20px;
}

.news-slider.is-static .news-slider-btn {
    display: none;
}

@media (max-width: 1100px) {
    .news-slider-track {
        grid-auto-columns: calc((100% - 2 * 18px) / 3);
    }
}

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

    .news-slider-track {
        grid-auto-columns: calc((100% - 18px) / 2);
    }

    .news-slider-btn--prev {
        left: -8px;
    }

    .news-slider-btn--next {
        right: -8px;
    }
}

@media (max-width: 600px) {
    .news-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .news-card--lead {
        grid-column: auto;
        grid-row: auto;
    }

    .news-card--lead .news-card-media {
        aspect-ratio: 16 / 9;
        min-height: 0;
    }

    .news-card--lead .news-card-title {
        font-size: 1.1rem;
    }

    .news-slider-track {
        grid-auto-columns: 82%;
        gap: 12px;
    }

    .news-slider-btn {
        display: none;
    }
}
