﻿/* --- 2. KATEGORİ MENÜSÜ (Yatay Kaydırmalı) --- */
.category-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 10px 0 20px 0;
    margin: 10px 0;
    overflow-x: auto !important;
    border-bottom: 1px solid #e1e1e1;
    position: sticky;
    top: 0;
    background-color: #f4f6f9;
    z-index: 100;
}

    /* Scrollbar'ı gizle (Estetik için) */
    .category-nav::-webkit-scrollbar {
        display: none;
    }

.cat-btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.95em;
    font-weight: 600;
    color: #555;
    background-color: #fff;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

    .cat-btn:hover {
        background-color: #ecf0f1;
        transform: translateY(-2px);
        color: #2c3e50;
    }

    .cat-btn.active {
        background-color: #2c3e50;
        color: #fff;
        border-color: #2c3e50;
        box-shadow: 0 4px 10px rgba(44, 62, 80, 0.3);
    }

/* --- 3. KAYNAK FİLTRESİ (Dropdown) --- */
#source-filter-wrapper {
    text-align: center;
    margin-bottom: 25px;
    animation: fadeIn 0.5s ease;
}

.source-dropdown {
    padding: 10px 20px;
    border-radius: 25px;
    border: 1px solid #ccc;
    background-color: #fff;
    font-size: 0.95em;
    color: #555;
    outline: none;
    cursor: pointer;
    min-width: 250px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    appearance: none; /* Varsayılan ok işaretini kaldırır (isteğe bağlı) */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right .7em top 50%;
    background-size: .65em auto;
}

/* --- 4. HABER IZGARASI (Grid) --- */
#feed-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    min-height: 200px; /* Boşken çökmesin */
}

/* --- 5. KART TASARIMI --- */
.news-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    position: relative; /* Menü konumlandırması için şart */
}

    .news-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    }

.card-image {
    width: 100%;
    height: 200px;
    background-color: #eee;
    background-size: cover;
    background-position: center;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
    margin-bottom: 10px;
    line-height: 1.4;
    display: block;
}

    .news-title:hover {
        color: #3498db;
    }

.news-desc {
    font-size: 0.9em;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 3 satırdan sonrasını kes */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer Satırı (Tarih, Kaynak, Menü) */
.card-footer-row {
    margin-top: auto;
    border-top: 1px solid #f1f1f1;
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.meta-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rss-date-text {
    font-size: 0.8em;
    color: #999;
    font-weight: 500;
}

.source-name-link {
    font-size: 0.85em;
    color: #555;
    text-decoration: none;
    font-weight: 600;
}

    .source-name-link:hover {
        color: #000;
        text-decoration: underline;
    }

/* --- 6. AÇILIR MENÜ (Dropdown) --- */
.menu-wrapper {
    position: relative;
    display: inline-block;
}

.menu-icon-btn {
    font-size: 24px;
    line-height: 20px;
    color: #888;
    cursor: pointer;
    padding: 0 5px;
    user-select: none;
    transition: color 0.2s;
}

    .menu-icon-btn:hover {
        color: #333;
    }

.menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    bottom: 30px;
    width: 160px;
    background: white;
    border: 1px solid #eee;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    z-index: 999;
    padding: 5px 0;
    animation: fadeInMenu 0.2s ease;
}

    .menu-dropdown.show {
        display: block;
    }

.menu-item {
    padding: 10px 15px;
    font-size: 0.9em;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.1s;
}

    .menu-item:hover {
        background-color: #f8f9fa;
        color: #000;
    }

    .menu-item span {
        width: 20px;
        text-align: center;
    }
/* İkon hizalama */

/* --- 7. EFEKTLER VE YARDIMCILAR --- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInMenu {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Yeni haber flaş efekti */
@keyframes yeniHaberFlash {
    0% {
        background-color: #fffacd;
    }

    100% {
        background-color: white;
    }
}

.yeni-gelen-haber {
    animation: yeniHaberFlash 4s ease-out;
    border-left: 4px solid #f1c40f;
}

.loading {
    color: #7f8c8d;
    font-style: italic;
    font-size: 1.1em;
}

@media handheld, only screen and (max-width: 1000px) {
    .category-nav {
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start !important;
    }
}
