
/* ===========================
   Reset
=========================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:'Segoe UI','Roboto','Vazirmatn',Tahoma,sans-serif;
    background:#f8fafc;
    color:#334155;
    direction:rtl;
    line-height:1.8;
}

/* ===========================
   General
=========================== */

a{
    text-decoration:none;
    color:#2563eb;
    transition:.3s;
}

a:hover{
    color:#1d4ed8;
}

img{
    max-width:100%;
    height:auto;
    display:block;
}

.container{
    width:90%;
    max-width:1200px;
    margin:auto;
    padding:0 15px;
}

/* ===========================
   Header
=========================== */

.site-header{
    background:linear-gradient(135deg,#1e293b,#0f172a);
    color:#fff;
    padding:20px 0;
    box-shadow:0 4px 10px rgba(0,0,0,.08);
    position:sticky;
    top:0;
    z-index:1000;
}

.header-inner{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:15px;
}

.logo a{
    color:#fff;
    font-size:28px;
    font-weight:800;
}

.navbar{
    display:flex;
    align-items:center;
    gap:20px;
}

.navbar a{
    color:#e2e8f0;
    position:relative;
    font-weight:500;
}

.navbar a::after{
    content:"";
    position:absolute;
    bottom:-5px;
    right:0;
    width:0;
    height:2px;
    background:#3b82f6;
    transition:.3s;
}

.navbar a:hover::after{
    width:100%;
}

/* ===========================
   Main
=========================== */

.main-content{
    padding:40px 0;
}

/* ===========================
   Search
=========================== */

.search-form{
    width:100%;
    margin-bottom:30px;
    display:flex;
    gap:8px;
    background:#fff;
    padding:8px;
    border-radius:16px;
    box-shadow:0 5px 15px rgba(0,0,0,.05);
}

.search-form input{
    flex:1;
    border:none;
    outline:none;
    background:#f1f5f9;
    border-radius:12px;
    padding:12px;
    font-size:14px;
}

.search-form button{
    border:none;
    background:#2563eb;
    color:#fff;
    border-radius:12px;
    padding:12px 20px;
    cursor:pointer;
    font-weight:600;
}

.search-form button:hover{
    background:#1d4ed8;
}

/* ===========================
   Titles
=========================== */

h1{
    text-align:center;
    margin-bottom:30px;
    color:#0f172a;
    font-size:32px;
}

h2{
    color:#1e293b;
}

/* ===========================
   News Grid
=========================== */

.news-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
    gap:25px;
}

.news-card{
    background:#fff;
    border-radius:16px;
    overflow:hidden;
    box-shadow:0 10px 20px rgba(0,0,0,.05);
    transition:.3s;
}

.news-card:hover{
    transform:translateY(-5px);
    box-shadow:0 20px 30px rgba(0,0,0,.08);
}

.news-card img{
    width:100%;
    height:220px;
    object-fit:cover;
}

.news-card h2{
    padding:15px 15px 0;
    font-size:20px;
}

.news-card h2 a{
    color:#1e293b;
}

.news-card h2 a:hover{
    color:#2563eb;
}

.news-card p{
    padding:0 15px 15px;
}

.meta{
    color:#64748b;
    font-size:13px;
}

/* ===========================
   Load More Button
=========================== */

#load-more-wrapper{
    text-align:center;
    margin-top:30px;
}

#load-more{
    padding:12px 25px;
    border:none;
    border-radius:12px;
    background:#2563eb;
    color:#fff;
    cursor:pointer;
    font-size:15px;
    font-weight:600;
    transition:.3s;
}

#load-more:hover{
    background:#1d4ed8;
}

#load-more:disabled{
    background:#94a3b8;
    cursor:not-allowed;
}

/* ===========================
   Intro
=========================== */

.site-intro{
    background:#fff;
    padding:30px;
    margin-top:40px;
    border-radius:16px;
    box-shadow:0 10px 20px rgba(0,0,0,.05);
}

.site-intro h2{
    margin-bottom:15px;
}

.site-intro p{
    margin-bottom:15px;
}

/* ===========================
   Categories
=========================== */

.category-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
    gap:20px;
}

.category-card{
    display:block;
    background:#fff;
    padding:25px;
    border-radius:12px;
    border:1px solid #e2e8f0;
    color:#334155;
    text-align:center;
    font-weight:600;
    transition:.3s;
}

.category-card:hover{
    border-color:#2563eb;
    color:#2563eb;
    transform:translateY(-3px);
}

/* ===========================
   News Detail
=========================== */

.detail-image{
    width:100%;
    max-width:900px;
    margin:25px auto;
    border-radius:16px;
    box-shadow:0 10px 25px rgba(0,0,0,.08);
}

/* ===========================
   Loader
=========================== */

#loader-screen{
    position:fixed;
    inset:0;
    background:#fff;
    z-index:9999;
    display:flex;
    justify-content:center;
    align-items:center;
    flex-direction:column;
    gap:15px;
}

.spinner{
    width:40px;
    height:40px;
    border:4px solid rgba(0,0,0,.1);
    border-left-color:#2563eb;
    border-radius:50%;
    animation:spin 1s linear infinite;
}

@keyframes spin{
    from{
        transform:rotate(0);
    }
    to{
        transform:rotate(360deg);
    }
}

/* ===========================
   Footer
=========================== */

.site-footer{
    background:linear-gradient(135deg,#0f172a,#1e293b);
    color:#cbd5e1;
    padding:50px 20px;
    margin-top:60px;
    text-align:center;
    border-top:3px solid #2563eb;
}

.site-footer h3{
    color:#fff;
    margin-bottom:20px;
}

.footer-links{
    list-style:none;
    max-width:700px;
    margin:auto;
}

.footer-links li{
    margin:12px 0;
}

.site-footer a{
    color:#60a5fa;
}

.site-footer a:hover{
    color:#93c5fd;
}

.site-footer hr{
    border:none;
    border-top:1px solid rgba(255,255,255,.15);
    margin:25px auto;
    max-width:700px;
}

.site-footer p{
    margin:10px 0;
}

/* ===========================
   Mobile
=========================== */

@media(max-width:768px){

    .header-inner{
        flex-direction:column;
        text-align:center;
    }

    .navbar{
        flex-wrap:wrap;
        justify-content:center;
    }

    .logo a{
        font-size:24px;
    }

    h1{
        font-size:26px;
    }

    .news-card img{
        height:180px;
    }
}

@media(max-width:480px){

    .search-form{
        padding:5px;
    }

    .search-form input{
        font-size:12px;
    }

    .search-form button{
        padding:10px 15px;
        font-size:12px;
    }

    .news-grid{
        grid-template-columns:1fr;
    }
}
/* ===========================
   دکمه مشاهده اخبار بیشتر
=========================== */

#load-more-wrapper{
    text-align:center;
    margin:40px 0;
}

#load-more{
    background: linear-gradient(135deg,#2563eb,#1d4ed8);
    color:#fff;
    border:none;
    border-radius:14px;
    padding:14px 30px;
    font-size:16px;
    font-weight:700;
    cursor:pointer;
    min-width:220px;
    box-shadow:0 8px 20px rgba(37,99,235,.25);
    transition:all .3s ease;
}

#load-more:hover{
    transform:translateY(-3px);
    box-shadow:0 15px 30px rgba(37,99,235,.35);
}

#load-more:active{
    transform:translateY(0);
}

#load-more:disabled{
    background:#94a3b8;
    box-shadow:none;
    cursor:not-allowed;
}

@media (max-width:768px){

    #load-more{
        width:100%;
        max-width:320px;
        padding:14px;
        font-size:15px;
    }

}
