/* ==================== بالای صفحه ==================== */
#top-banner {
    display: grid;
    grid-template-columns: 1fr;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #010911;
    border-bottom: 1px solid #ccc;
    padding: 0px 0px;
    padding-bottom: 0%;
    text-align: center;
    z-index: 999;
    box-shadow: 0 1px 1px rgba(234, 61, 61, 0.1);
    font-size: 13px;
    color: #fff;
}

#top-banner h6 {
    margin: 0;
    font-weight: normal;
    padding-bottom: 0%;
}

/* ==================== عمومی ==================== */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: 40px; /* فاصله برای بنر ثابت */
    background: #000;
    color: #fff;
}

header {
    background-color: #1a1a1a;
    color: #fff;
    text-align: center;
    padding: 10px;
}

/* ==================== فرم جستجو ==================== */
#search-form {
    text-align: center;
    margin: 15px 0;
}

#search-input {
    padding: 6px 10px;
    width: 200px;
    border-radius: 5px;
    border: 1px solid #555;
    font-size: 14px;
}

#search-button {
    padding: 6px 12px;
    margin-left: 5px;
    background: #222;
    color: #fff;
    border: 1px solid #555;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

#search-button:hover {
    background: #333;
}

/* ==================== گرید کارت‌ها ==================== */
#news-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
}

@media (min-width: 600px) {
    #news-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 900px) {
    #news-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1200px) {
    #news-container {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* ==================== کارت خبر ==================== */
.news-card {
    display: flex;
    flex-direction: column;
    background: #020000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    color: #fff;
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.news-card img {
    width: 100%;
    object-fit: cover;
    aspect-ratio: 16 / 10;
    display: block;
}

.news-card-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.news-card-content h3 {
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-content h3 a {
    text-decoration: none;
    color: inherit;
}

.news-card-content p {
    margin: 0;
    font-size: 13px;
    color: #ccc;
}

.news-source {
    margin-top: auto;
    font-size: 13px;
    color: #aaa;
}

/* ==================== اکشن‌ها ==================== */
.news-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.action-btn {
    background: #fff;
    border: 1px solid #444;
    padding: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #000;
}

.action-btn:hover {
    background: #e5e5e5;
}

/* ==================== کارت تبلیغات ==================== */
.ad-banner-card {
    background: #020000;
    border-radius: 12px;
    overflow: hidden;
    height: auto;
    aspect-ratio: 16/10;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.ad-banner-card img.ad-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==================== تبلیغ خالی ==================== */
.ad-empty {
    width: 100%;
    height: 100%;
    background: #111;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 17px;
    font-weight: bold;
    text-align: center;
    padding: 10px;
}

/* ==================== لودینگ ==================== */
#loading {
    text-align: center;
    padding: 20px;
    color: #ccc;
    display: none;
}

/* ==================== lazy load ==================== */
img.lazy {
    filter: blur(3px);
    transition: filter 0.3s;
}

img.lazy.loaded {
    filter: blur(0);
}
