﻿/* ============================================================
   wwwroot/css/news.css
   بخش اخبار — سایت
   ============================================================ */

/* ═══════════════════════════════════════════════════════════
   ۱. HERO
   ═══════════════════════════════════════════════════════════ */
.news-hero {
    background: linear-gradient(135deg, #0f1824 0%, #1e293b 100%);
    color: #fff;
    padding: 48px 24px;
}

.news-hero-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.news-hero-text h1 {
    font-family: var(--font-heading, 'BTitrBd', serif);
    font-size: 32px;
    color: #fff;
    margin: 0 0 12px;
}

.news-hero-text p {
    font-family: var(--font-primary, Tahoma);
    color: #cbd5e1;
    font-size: 15px;
    margin: 0;
    max-width: 600px;
    line-height: 1.9;
}

.news-hero-icon {
    color: rgba(212, 160, 23, 0.35);
    font-size: 80px;
}

/* ═══════════════════════════════════════════════════════════
   ۲. FILTER
   ═══════════════════════════════════════════════════════════ */
.news-filter-section {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 24px;
}

.news-filter-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.news-filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    font-family: var(--font-primary, Tahoma);
}

.filter-input,
.filter-select {
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-family: var(--font-primary, Tahoma);
    font-size: 13px;
    background: #fff;
    transition: border-color 0.2s;
}

    .filter-input:focus,
    .filter-select:focus {
        outline: none;
        border-color: #d4a017;
    }

.filter-btn {
    height: 40px;
    padding: 0 20px;
    background: #d4a017;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: var(--font-primary, Tahoma);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
    white-space: nowrap;
}

    .filter-btn:hover {
        background: #b8890f;
    }

.active-filters {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-family: var(--font-primary, Tahoma);
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 16px;
    font-size: 12px;
}

.filter-remove {
    color: #92400e;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    line-height: 1;
}

.clear-all-filters {
    font-size: 12px;
    color: #dc2626;
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════
   ۳. LIST
   ═══════════════════════════════════════════════════════════ */
.news-list-section {
    background: #f8f9fb;
    padding: 32px 24px 60px;
    min-height: 500px;
}

.news-list-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.news-count-bar {
    margin-bottom: 20px;
    font-family: var(--font-primary, Tahoma);
    color: #64748b;
    font-size: 13px;
}

    .news-count-bar i {
        color: #d4a017;
    }

/* ═══════════════════════════════════════════════════════════
   ۴. GRID
   ═══════════════════════════════════════════════════════════ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ═══════════════════════════════════════════════════════════
   ۵. CARD
   ═══════════════════════════════════════════════════════════ */
.news-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

    .news-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    }

.news-card-image {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f1f5f9;
}

    .news-card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.4s;
    }

.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-card-badge {
    position: absolute;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-primary, Tahoma);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.badge-featured {
    top: 10px;
    right: 10px;
    background: #fbbf24;
    color: #78350f;
}

.badge-pinned {
    top: 10px;
    left: 10px;
    background: #dc2626;
    color: #fff;
}

.news-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-card-kind {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-primary, Tahoma);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 8px;
    align-self: flex-start;
}

    .news-card-kind:hover {
        text-decoration: underline;
    }

.news-card-title {
    font-family: var(--font-heading, 'BTitrBd');
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 8px;
    line-height: 1.6;
    color: #1a2233;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;
}

    .news-card-title a {
        color: inherit;
        text-decoration: none;
    }

        .news-card-title a:hover {
            color: #d4a017;
        }

.news-card-excerpt {
    font-family: var(--font-primary, Tahoma);
    font-size: 13px;
    color: #64748b;
    line-height: 1.8;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.news-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 12px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    font-family: var(--font-primary, Tahoma);
}

    .news-card-meta i {
        margin-left: 3px;
    }

.news-card-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-primary, Tahoma);
    font-size: 13px;
    color: #d4a017;
    text-decoration: none;
    font-weight: 600;
    transition: gap 0.2s;
}

    .news-card-more:hover {
        gap: 8px;
        color: #b8890f;
    }

/* ═══════════════════════════════════════════════════════════
   ۶. PAGINATION
   ═══════════════════════════════════════════════════════════ */
.news-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-primary, Tahoma);
    font-size: 13px;
    color: #1a2233;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

    .page-btn:hover {
        border-color: #d4a017;
        color: #d4a017;
        background: #fffbeb;
    }

    .page-btn.active {
        background: #0f1824;
        color: #fff;
        border-color: #0f1824;
        font-weight: bold;
    }

    .page-btn.disabled {
        opacity: 0.4;
        cursor: not-allowed;
        pointer-events: none;
    }

.page-dots {
    color: #94a3b8;
    padding: 0 4px;
}

/* ═══════════════════════════════════════════════════════════
   ۷. EMPTY
   ═══════════════════════════════════════════════════════════ */
.news-empty {
    text-align: center;
    padding: 80px 20px;
    color: #64748b;
    font-family: var(--font-primary, Tahoma);
}

    .news-empty i {
        font-size: 72px;
        color: #cbd5e1;
        margin-bottom: 20px;
        display: block;
    }

    .news-empty h3 {
        font-family: var(--font-heading, 'BTitrBd');
        font-size: 20px;
        color: #1a2233;
        margin: 0 0 12px;
    }

    .news-empty p {
        margin: 0 0 20px;
        line-height: 1.8;
    }

    .news-empty .btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 10px 24px;
        background: #d4a017;
        color: #fff;
        border-radius: 8px;
        text-decoration: none;
        font-weight: 600;
    }

/* ═══════════════════════════════════════════════════════════
   ۸. DETAIL — Breadcrumb
   ═══════════════════════════════════════════════════════════ */
.news-detail {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px 80px;
    font-family: var(--font-primary, Tahoma);
}

.news-breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
    margin: 0 0 24px;
    font-size: 13px;
    color: #64748b;
}

.news-breadcrumb li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .news-breadcrumb li:not(:last-child)::after {
        content: '›';
        color: #94a3b8;
    }

.news-breadcrumb a {
    color: #64748b;
    text-decoration: none;
}

    .news-breadcrumb a:hover {
        color: #d4a017;
    }

.news-breadcrumb .active {
    color: #1a2233;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   ۹. DETAIL — Header
   ═══════════════════════════════════════════════════════════ */
.news-header {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid #e5e7eb;
}

.news-header-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 500px;
    overflow: hidden;
    background: #1a2233;
}

    .news-header-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.news-header-body {
    padding: 24px;
}

.news-kind-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 16px;
    color: #fff;
    font-family: var(--font-primary, Tahoma);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 12px;
}

.news-title {
    font-family: var(--font-heading, 'BTitrBd');
    font-size: 28px;
    color: #1a2233;
    margin: 0 0 12px;
    line-height: 1.4;
}

.news-subtitle {
    font-size: 15px;
    color: #64748b;
    line-height: 1.9;
    margin: 0 0 16px;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: #64748b;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

    .news-meta i {
        color: #d4a017;
        margin-left: 4px;
    }

/* ═══════════════════════════════════════════════════════════
   ۱۰. DETAIL — Content
   ═══════════════════════════════════════════════════════════ */
.news-content {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 32px;
    margin-bottom: 24px;
    font-family: var(--font-primary, Tahoma);
    font-size: 16px;
    line-height: 2.2;
    color: #1a2233;
}

    .news-content h1, .news-content h2, .news-content h3,
    .news-content h4, .news-content h5, .news-content h6 {
        font-family: var(--font-heading, 'BTitrBd');
        margin-top: 1.2em;
        margin-bottom: 0.6em;
        color: #1a2233;
    }

    .news-content p {
        margin-bottom: 1em;
    }

    .news-content img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
        margin: 12px 0;
    }

    .news-content a {
        color: #d4a017;
        text-decoration: underline;
    }

    .news-content ul, .news-content ol {
        padding-right: 1.5em;
        margin-bottom: 1em;
    }

    .news-content blockquote {
        border-right: 4px solid #d4a017;
        padding: 8px 16px;
        background: #fef9e7;
        margin: 16px 0;
        color: #475569;
        border-radius: 0 8px 8px 0;
    }

/* ═══════════════════════════════════════════════════════════
   ۱۱. DETAIL — Source
   ═══════════════════════════════════════════════════════════ */
.news-source {
    background: #f8f9fb;
    border-right: 4px solid #d4a017;
    border-radius: 0 12px 12px 0;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-family: var(--font-primary, Tahoma);
    font-size: 14px;
    color: #475569;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .news-source i {
        color: #d4a017;
        margin-left: 6px;
    }

    .news-source a {
        color: #d4a017;
        text-decoration: underline;
    }

/* ═══════════════════════════════════════════════════════════
   ۱۲. DETAIL — Section Title
   ═══════════════════════════════════════════════════════════ */
.news-section-title {
    font-family: var(--font-heading, 'BTitrBd');
    font-size: 18px;
    color: #1a2233;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d4a017;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .news-section-title i {
        color: #d4a017;
    }

/* ═══════════════════════════════════════════════════════════
   ۱۳. DETAIL — Gallery
   ═══════════════════════════════════════════════════════════ */
.news-gallery {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 24px;
    margin-bottom: 24px;
}

.news-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.news-gallery-item {
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    transition: transform 0.2s;
}

    .news-gallery-item:hover {
        transform: scale(1.03);
    }

    .news-gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

/* ═══════════════════════════════════════════════════════════
   ۱۴. DETAIL — Related
   ═══════════════════════════════════════════════════════════ */
.news-related {
    margin-top: 40px;
}

/* ═══════════════════════════════════════════════════════════
   ۱۵. RESPONSIVE — تبلت
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
    .news-filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .filter-submit {
        grid-column: span 2;
    }

    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }

    .news-title {
        font-size: 22px;
    }

    .news-header-image {
        max-height: 350px;
    }
}

/* ═══════════════════════════════════════════════════════════
   ۱۶. RESPONSIVE — موبایل
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .news-hero {
        padding: 32px 16px;
    }

    .news-hero-text h1 {
        font-size: 24px;
    }

    .news-hero-icon {
        display: none;
    }

    .news-filter-section {
        padding: 16px;
    }

    .news-filter-grid {
        grid-template-columns: 1fr;
    }

    .filter-submit {
        grid-column: auto;
    }

    .news-list-section {
        padding: 20px 12px 40px;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .news-detail {
        padding: 16px 12px 60px;
    }

    .news-header-body {
        padding: 16px;
    }

    .news-title {
        font-size: 20px;
    }

    .news-subtitle {
        font-size: 14px;
    }

    .news-content {
        padding: 20px 16px;
        font-size: 15px;
    }

    .news-gallery {
        padding: 16px;
    }

    .news-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .news-source {
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .news-gallery-grid {
        grid-template-columns: 1fr;
    }
}
