/* ==========================================
   Global
========================================== */

:root{

    --primary:#2563eb;
    --primary-dark:#1d4ed8;
    --secondary:#64748b;
    --success:#10b981;
    --warning:#f59e0b;
    --danger:#ef4444;

    --bg:#eef3f9;
    --card:#ffffff;
    --border:#dbe4ef;

    --text:#1e293b;
    --muted:#64748b;

    --shadow:0 8px 30px rgba(0,0,0,.08);

}

*{

    margin:0;
    padding:0;
    box-sizing:border-box;

}

body{

    font-family:"Vazirmatn", Tahoma,sans-serif;
    background:linear-gradient(180deg,#f8fbff,#eef3f9);
    color:var(--text);
    padding:30px;

}

/* ==========================================
   Dashboard Title
========================================== */

h2{

    font-size:34px;
    font-weight:bold;
    margin-bottom:25px;

    display:flex;
    align-items:center;
    gap:12px;

    color:#17324f;

}

h2::before{

    content:"📰";
    font-size:36px;

}

/* ==========================================
   Statistics
========================================== */

.stats-grid{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));

    gap:20px;

    margin-bottom:35px;

}

.stat-card{

    background:var(--card);

    border-radius:18px;

    padding:28px;

    position:relative;

    overflow:hidden;

    box-shadow:var(--shadow);

    transition:.3s;

    border:1px solid var(--border);

}

.stat-card::before{

    content:"";

    position:absolute;

    top:0;
    left:0;

    width:6px;
    height:100%;

    background:var(--primary);

}

.stat-card:nth-child(2)::before{

    background:var(--success);

}

.stat-card:nth-child(3)::before{

    background:var(--warning);

}

.stat-card:nth-child(4)::before{

    background:var(--danger);

}

.stat-card:hover{

    transform:translateY(-8px);

    box-shadow:0 18px 40px rgba(37,99,235,.18);

}

.stat-number{

    font-size:40px;

    font-weight:bold;

    color:var(--primary);

    margin-bottom:12px;

}

.stat-title{

    color:var(--muted);

    font-size:16px;

}

/* ==========================================
   Filter Box
========================================== */

.filter-box{

    background:rgba(255,255,255,.95);

    backdrop-filter:blur(12px);

    border-radius:20px;

    border:1px solid var(--border);

    box-shadow:var(--shadow);

    overflow:hidden;

    margin-bottom:35px;

}

/* ==========================================
   Filter Header
========================================== */

.filter-header{

    background:linear-gradient(135deg,#2563eb,#3b82f6);

    color:#fff;

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:18px 24px;

    font-size:18px;

    font-weight:bold;

    cursor:pointer;

    transition:.3s;

}

.filter-header:hover{

    background:linear-gradient(135deg,#1d4ed8,#2563eb);

}

/* ==========================================
   Filter Body
========================================== */

#filterBody{

    padding:25px;

}

/* ==========================================
   Filter Grid
========================================== */

.filter-grid{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));

    gap:22px;

}

.filter-item{

    display:flex;

    flex-direction:column;

}

.filter-item label{

    font-size:14px;

    font-weight:bold;

    color:#334155;

    margin-bottom:8px;

}

/* ==========================================
   Inputs
========================================== */

.filter-item input,

.filter-item select{

    height:48px;

    border-radius:12px;

    border:1px solid #cbd5e1;

    background:#fff;

    padding:0 15px;

    font-size:15px;

    transition:.25s;

}

.filter-item input:hover,

.filter-item select:hover{

    border-color:#93c5fd;

}

.filter-item input:focus,

.filter-item select:focus{

    border-color:#2563eb;

    box-shadow:0 0 0 4px rgba(37,99,235,.15);

    outline:none;

}

/* ==========================================
   Button
========================================== */

.filter-button{

    display:flex;

    align-items:flex-end;

}

.filter-button button{

    width:100%;

    height:48px;

    border:none;

    border-radius:12px;

    background:linear-gradient(135deg,#2563eb,#3b82f6);

    color:#fff;

    font-size:15px;

    font-weight:bold;

    cursor:pointer;

    transition:.3s;

}

.filter-button button:hover{

    transform:translateY(-2px);

    box-shadow:0 10px 22px rgba(37,99,235,.25);

}

/* ==========================================
   Remove HR
========================================== */

hr{

    display:none;

}

/* ==========================================
   News Grid
========================================== */

.news-grid{

    display:grid;

    grid-template-columns:repeat(auto-fill,minmax(390px,1fr));

    gap:28px;

    align-items:start;

}

/* ==========================================
   News Card
========================================== */

.news-card{

    background:#fff;

    border-radius:22px;

    overflow:hidden;

    border:1px solid #dbe4ef;

    box-shadow:0 10px 30px rgba(15,23,42,.08);

    transition:.35s;

    position:relative;

}

.news-card:hover{

    transform:translateY(-8px);

    box-shadow:0 18px 45px rgba(37,99,235,.18);

}

/* نوار رنگی بالای کارت */

.news-card::before{

    content:"";

    position:absolute;

    top:0;

    left:0;

    width:100%;

    height:5px;

    background:linear-gradient(90deg,#2563eb,#60a5fa,#38bdf8);

}

/* ==========================================
   Image
========================================== */

.news-image{

    width:100%;

    height:240px;

    object-fit:cover;

    display:block;

    transition:.5s;

}

.news-card:hover .news-image{

    transform:scale(1.05);

}

/* ==========================================
   Content
========================================== */

.news-content{

    padding:22px;

}

/* ==========================================
   Source + ID
========================================== */

.news-source{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:14px;

}

.news-source span:first-child{

    background:#eff6ff;

    color:#2563eb;

    padding:6px 12px;

    border-radius:20px;

    font-size:12px;

    font-weight:bold;

}

.news-source span:last-child{

    background:#f8fafc;

    color:#475569;

    padding:6px 12px;

    border-radius:20px;

    font-size:12px;

}

/* ==========================================
   Date
========================================== */

.news-date{

    color:#64748b;

    font-size:13px;

    margin-bottom:18px;

}

/* ==========================================
   Title
========================================== */

.news-card-title{

    font-size:22px;

    font-weight:bold;

    line-height:1.8;

    margin-bottom:18px;

    color:#0f172a;

    transition:.25s;

}

.news-card:hover .news-card-title{

    color:#2563eb;

}

/* ==========================================
   Description
========================================== */

.news-desc{

    color:#475569;

    font-size:15px;

    line-height:2.1;

    min-height:140px;

    text-align:justify;

}

/* ==========================================
   Buttons
========================================== */

.news-buttons{

    display:flex;

    gap:12px;

    margin-top:24px;

}

.btn{

    flex:1;

    text-align:center;

    padding:12px;

    border-radius:12px;

    text-decoration:none;

    font-weight:bold;

    transition:.25s;

    border:1px solid #dbe4ef;

    color:#334155;

    background:#f8fafc;

}

.btn:hover{

    background:#e2e8f0;

}

.btn.primary{

    background:linear-gradient(135deg,#2563eb,#3b82f6);

    color:#fff;

    border:none;

}

.btn.primary:hover{

    transform:translateY(-2px);

    box-shadow:0 10px 22px rgba(37,99,235,.30);

}

/* ==========================================
   New News Highlight
========================================== */

.news-card.new-news{

    animation:newNewsFlash 8s ease;

}

@keyframes newNewsFlash{

    0%{

        background:#dbeafe;

        transform:scale(1.02);

    }

    15%{

        background:#bfdbfe;

    }

    100%{

        background:#ffffff;

        transform:scale(1);

    }

}

/* ==========================================
   Scrollbar
========================================== */

::-webkit-scrollbar{

    width:10px;

}

::-webkit-scrollbar-track{

    background:#edf2f7;

}

::-webkit-scrollbar-thumb{

    background:#94a3b8;

    border-radius:10px;

}

::-webkit-scrollbar-thumb:hover{

    background:#64748b;

}

/* ==========================================
   Smooth Animation
========================================== */

*{

    scroll-behavior:smooth;

}

.news-card,
.stat-card,
.filter-box,
button,
.btn,
input,
select{

    transition:all .28s ease;

}

/* ==========================================
   Selection
========================================== */

::selection{

    background:#2563eb;
    color:#fff;

}

/* ==========================================
   Focus
========================================== */

button:focus,
input:focus,
select:focus,
a:focus{

    outline:none;

}

/* ==========================================
   Card Entrance
========================================== */

.news-card{

    animation:cardAppear .45s ease;

}

@keyframes cardAppear{

    from{

        opacity:0;

        transform:translateY(18px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

/* ==========================================
   Image Overlay
========================================== */

.news-card{

    position:relative;

}

.news-card::after{

    content:"";

    position:absolute;

    top:0;
    left:0;

    width:100%;
    height:240px;

    background:linear-gradient(to top,
        rgba(0,0,0,.28),
        rgba(0,0,0,0));

    pointer-events:none;

}

/* ==========================================
   Better Description
========================================== */

.news-desc{

    display:-webkit-box;

    -webkit-line-clamp:5;

    -webkit-box-orient:vertical;

    overflow:hidden;

}

/* ==========================================
   Hover Effect
========================================== */

.news-card:hover{

    border-color:#60a5fa;

}

/* ==========================================
   Floating Statistics
========================================== */

.stat-card{

    position:relative;

}

.stat-card::after{

    content:"";

    position:absolute;

    left:-40px;
    bottom:-40px;

    width:100px;
    height:100px;

    border-radius:50%;

    background:rgba(37,99,235,.05);

}

/* ==========================================
   Button Ripple Feeling
========================================== */

.btn,
.filter-button button{

    overflow:hidden;

}

.btn:active,
.filter-button button:active{

    transform:scale(.97);

}

/* ==========================================
   Empty Image
========================================== */

.news-image{

    background:#edf2f7;

}

/* ==========================================
   Pagination
========================================== */

body>div:last-of-type{

    display:flex;

    justify-content:center;

    align-items:center;

    gap:18px;

    margin:40px 0;

    font-size:16px;

}

body>div:last-of-type a{

    text-decoration:none;

    background:#2563eb;

    color:#fff;

    padding:10px 20px;

    border-radius:10px;

    transition:.25s;

}

body>div:last-of-type a:hover{

    background:#1d4ed8;

    transform:translateY(-2px);

}

/* ==========================================
   Mobile
========================================== */

@media(max-width:1200px){

    .news-grid{

        grid-template-columns:repeat(2,1fr);

    }

}

@media(max-width:900px){

    .news-grid{

        grid-template-columns:1fr;

    }

    .stats-grid{

        grid-template-columns:repeat(2,1fr);

    }

}

@media(max-width:600px){

    body{

        padding:12px;

    }

    h2{

        font-size:24px;

    }

    .stats-grid{

        grid-template-columns:1fr;

    }

    .filter-grid{

        grid-template-columns:1fr;

    }

    .news-buttons{

        flex-direction:column;

    }

    .news-card-title{

        font-size:18px;

    }

    .news-image{

        height:200px;

    }

}

/* ==========================================
   Desktop Wide
========================================== */

@media(min-width:1600px){

    .news-grid{

        grid-template-columns:repeat(4,1fr);

    }

}

/* ==========================================
   Loading Feeling
========================================== */

.news-card:hover .news-date{

    color:#2563eb;

}

.news-card:hover .news-source span{

    background:#2563eb;

    color:#fff;

}

/* ==========================================
   Footer Space
========================================== */

body{

    padding-bottom:80px;

}

/* ==========================================
   Header Glass
========================================== */

.dashboard-header{

    position:sticky;

    top:15px;

    z-index:999;

    background:rgba(255,255,255,.75);

    backdrop-filter:blur(18px);

    border:1px solid rgba(255,255,255,.5);

    border-radius:20px;

    padding:20px 30px;

    margin-bottom:25px;

    box-shadow:0 15px 40px rgba(0,0,0,.08);

}

/* ==========================================
   Soft Background
========================================== */

body::before{

    content:"";

    position:fixed;

    top:-300px;

    right:-300px;

    width:700px;

    height:700px;

    border-radius:50%;

    background:radial-gradient(circle,#3b82f620,transparent);

    z-index:-1;

}

body::after{

    content:"";

    position:fixed;

    bottom:-250px;

    left:-250px;

    width:600px;

    height:600px;

    border-radius:50%;

    background:radial-gradient(circle,#2563eb15,transparent);

    z-index:-1;

}

/* ==========================================
   Floating Cards
========================================== */

.news-card:nth-child(odd){

    animation:floatA 7s ease-in-out infinite;

}

.news-card:nth-child(even){

    animation:floatB 8s ease-in-out infinite;

}

@keyframes floatA{

    50%{

        transform:translateY(-4px);

    }

}

@keyframes floatB{

    50%{

        transform:translateY(4px);

    }

}

/* ==========================================
   Glass Buttons
========================================== */

.btn{

    backdrop-filter:blur(8px);

}

/* ==========================================
   Fancy Inputs
========================================== */

.filter-item input,

.filter-item select{

    background:linear-gradient(#fff,#fbfdff);

}

/* ==========================================
   News Badge
========================================== */

.news-source span{

    letter-spacing:.3px;

}

/* ==========================================
   Image Loading
========================================== */

.news-image{

    background:#edf2f7;

    transition:.5s;

}

.news-card:hover .news-image{

    filter:brightness(1.05);

}

/* ==========================================
   Nice Shadow
========================================== */

.news-card{

    box-shadow:
    0 10px 25px rgba(15,23,42,.07),
    0 3px 8px rgba(15,23,42,.05);

}
 
/* ========================================== 
   Page Fade
========================================== */

body{

    animation:pageFade .45s;

}

@keyframes pageFade{

    from{

        opacity:0;

    }

    to{

        opacity:1;

    }

}

.Vazirmatn{
    font-family:"Vazirmatn", Tahoma,sans-serif;
}