@font-face{
font-family:Tajawal;
src:url("fonts/Tajawal-Medium.ttf");
font-family:Cairo-ExtraBold;
src:url("fonts/Cairo-ExtraBold.ttf");

font-family:IBMPlexSansArabic-Medium;
src:url("fonts/IBMPlexSansArabic-Medium.ttf");
}

body{
font-family:Tajawal;
}

/*************************** latest news *************************/

.latest-news{
padding:50px 0;
background:#f7f7f7;
direction:rtl;
}

.section-title{
text-align:center;
font-size:40px;
margin-bottom:50px;
font-weight:700;
color:#111;
position:relative;
font-family:Cairo-ExtraBold;
}

.section-title:after{
content:"";
width:80px;
height:4px;
background:#c8a46b;
display:block;
margin:15px auto 0;
border-radius:10px;
}

.news-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
gap:15px;
margin : 0px 90px;
}

.news-card{
background:white;
border-radius:18px;
overflow:hidden;
box-shadow:0 10px 30px rgba(0,0,0,.07);
transition:.35s;
display:flex;
flex-direction:column;
}

.news-card:hover{
transform:translateY(-8px);
box-shadow:0 25px 40px rgba(0,0,0,.12);
}

.news-image img{
width:100%;
height:280px;
object-fit:cover;
}

.news-content{
padding:22px;
}

.news-date{
font-size:13px;
color:#999;
display:block;
margin-bottom:10px;
}

.news-content h3{
font-size:20px;
margin-bottom:12px;
color:#222;
font-family:IBMPlexSansArabic-Medium;
}

.news-content p{
font-size:18px;
color:#666;
line-height:1.7;
font-family:Tajawal;
}

.news-btn{
display:inline-block;
margin-top:15px;
background:#c8a46b;
color:white;
padding:10px 22px;
border-radius:30px;
text-decoration:none;
font-size:2rem;
transition:.3s;
font-family:IBMPlexSansArabic-Medium;
}

.news-btn:hover{
background:#a8864f;
}

.show-more{
border:2px solid #c8a46b;
padding:12px 30px;
border-radius:40px;
color:#c8a46b;
text-decoration:none;
transition:.3s;
font-family:IBMPlexSansArabic-Medium;
}

.show-more:hover{
background:#c8a46b;
color:white;
}
/******************************sidebar*******************************/
/* Sidebar (يمين) */
.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 220px;
    height: 100%;
    background: #0f172a;
    padding: 20px;
    color: white;
}

.sidebar h3 {
    margin-bottom: 20px;
}

.sidebar a {
    display: block;
    padding: 10px;
    margin-bottom: 10px;
    color: #cbd5f5;
    text-decoration: none;
    border-radius: 8px;
}

.sidebar a:hover,
.sidebar .active {
    background: #1e293b;
    color: white;
}
/****************************** news page ***************************/
.center{
text-align:center;
margin-top:50px;
}


.news-page{
padding:100px 40px;
background:linear-gradient(180deg,#f5f7fa,#eef2f6);
direction:rtl;
font-family:Cairo-ExtraBold;
}

.news-title{
text-align:center;
font-size:48px;
margin-bottom:70px;
color:#1d2b3a;
position:relative;
font-family:Cairo-ExtraBold;
}

.news-title:after{
content:"";
width:120px;
height:4px;
background:#c59d5f;
display:block;
margin:18px auto;
border-radius:5px;
}

.news-wrapper{
max-width:1200px;
margin:auto;
display:grid;
grid-template-columns:repeat(auto-fill,minmax(360px,1fr));
gap:35px;
}

.news-card{
background:#fff;
border-radius:22px;
overflow:hidden;
box-shadow:0 25px 60px rgba(0,0,0,.08);
transition:.4s;
display:flex;
flex-direction:column;
font-family:Tajawal;
}

.news-card:hover{
transform:translateY(-12px);
box-shadow:0 40px 80px rgba(0,0,0,.12);
}

.news-card img{
width:100%;
height:240px;
object-fit:cover;
}

.news-card h3{
font-size:24px;
padding:20px;
margin:0;
color:#162938;
font-family:Cairo-ExtraBold;
}

.news-card p{
padding:0 20px;
color:#6b7b8a;
line-height:1.8;
flex:1;
font-family:Tajawal;
}

.news-card a{
margin:20px;
padding:14px;
background:#c59d5f;
color:white;
text-align:center;
border-radius:12px;
text-decoration:none;
transition:.3s;
font-size:15px;
font-family:IBMPlexSansArabic-Medium;
}

.news-card a:hover{
background:#b1894f;
}
/* إصلاح navbar */
.u-header .u-sheet {
  padding-left: 20px !important;
  padding-right: 20px !important;
}
/*************************** admin news ****************************/

.admin-news{
background:linear-gradient(180deg,#eef2f6,#f9fbfd);
min-height:100vh;
padding:100px 20px;
display:flex;
justify-content:center;
align-items:flex-start;
direction:rtl;
}

.admin-card{
background:white;
padding:50px;
border-radius:22px;
width:100%;
max-width:600px;
box-shadow:0 30px 70px rgba(0,0,0,.08);
font-family:IBMPlexSansArabic-Medium;
}

.admin-card h2{
text-align:center;
margin-bottom:40px;
font-size:32px;
color:#162938;
font-family:Tajawal;
}

.form-group{
margin-bottom:25px;
}

.form-group label{
display:block;
margin-bottom:8px;
font-size:15px;
color:#555;
}

.form-group input,
.form-group textarea{
width:100%;
padding:14px;
border-radius:12px;
border:1px solid #e3e7ec;
font-size:15px;
transition:.3s;
}

.form-group textarea{
height:140px;
resize:none;
}

.form-group input:focus,
.form-group textarea:focus{
border-color:#c59d5f;
outline:none;
box-shadow:0 0 0 3px rgba(197,157,95,.15);
}

.publish-btn{
width:100%;
padding:16px;
background:#c59d5f;
color:white;
border:none;
border-radius:14px;
font-size:16px;
cursor:pointer;
transition:.3s;
}

.publish-btn:hover{
background:#b0894f;
}

.success-msg{
background:#e9f8ef;
padding:14px;
margin-top:20px;
border-radius:10px;
color:#1e7e34;
text-align:center;
font-weight:600;
}

.error-msg{
background:#fdecea;
padding:14px;
margin-top:20px;
border-radius:10px;
color:#c0392b;
text-align:center;
font-weight:600;
}
.table-card{
max-width:900px;
}

.news-table{
width:100%;
border-collapse:collapse;
margin-top:30px;
}

.news-table th{
background:#f4f7fb;
padding:14px;
font-size:15px;
}

.news-table td{
padding:14px;
border-bottom:1px solid #eee;
text-align:center;
}

.preview-img{
width:80px;
height:60px;
object-fit:cover;
border-radius:8px;
}

.edit-btn{
background:#162938;
color:white;
padding:6px 14px;
border-radius:6px;
text-decoration:none;
margin-left:5px;
}

.delete-btn{
background:#c0392b;
color:white;
padding:6px 14px;
border-radius:6px;
text-decoration:none;
}

/*********************** pagination *******************************/

.pagination{
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination a{
    padding: 8px 14px;
    background: #eee;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: 0.3s;
}

.pagination a:hover{
    background: #c59d5f;
    color: #fff;
}

.pagination a.active{
    background: #c59d5f;
    color: #fff;
}

.modal{
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content{
    background: #fff;
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    width: 80%;
    max-width: 300px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: fadeIn 0.3s ease;
}

.modal-content .icon{
    font-size: 30px;
    margin-bottom: 10px;
}

@keyframes fadeIn{
    from{
        opacity: 0;
        transform: scale(0.9);
    }
    to{
        opacity: 1;
        transform: scale(1);
    }
}
/******* reponsive with mobile ********/
@media (max-width: 768px){

/* العنوان */
.news-title{
    font-size:32px;
    margin-bottom:40px;
}

/* padding الصفحة */
.news-page{
    padding:60px 15px;
}

/* grid الأخبار */
.news-wrapper{
    grid-template-columns:1fr;
    gap:20px;
}

/* الكارد */
.news-card img{
    height:200px;
}

.news-card h3{
    font-size:20px;
    padding:15px;
}

.news-card p{
    font-size:15px;
    padding:0 15px;
}

.news-card a{
    margin:15px;
    padding:12px;
    font-size:14px;
}

/* pagination */
.pagination{
    flex-wrap:wrap;
}
}

@media (max-width: 768px){

/* الخلفية */
body{
    padding: 10px;
}

/* الكارت */
.admin-card{
    width: 100%;
    max-width: 100%;
    margin: 20px auto;
    padding: 20px 15px;
    border-radius: 16px;
}

/* العنوان */
.admin-card h2{
    font-size: 18px;
    text-align: center;
    margin-bottom: 15px;
}

/* labels */
label{
    font-size: 13px;
    margin-bottom: 5px;
    display: block;
}

/* inputs */
input,
textarea{
    width: 100%;
    padding: 12px;
    font-size: 14px;
    border-radius: 10px;
    box-sizing: border-box;
}

/* textarea */
textarea{
    min-height: 120px;
}

/* upload */
input[type="file"]{
    font-size: 13px;
}

/* الزر */
.publish-btn{
    width: 100%;
    padding: 14px;
    font-size: 15px;
    border-radius: 12px;
    margin-top: 15px;
}

/* إزالة الفراغ الكبير */
.admin-news{
    padding: 10px;
    margin: 0;
}

}

@media (max-width: 768px) {

  .news-grid {
    grid-template-columns: 1fr;
    margin: 0 10px; /* بدل 90px */
  }

  .section-title {
    font-size: 26px;
    margin-bottom: 25px;
  }

  .news-image img {
    height: 200px;
  }

  .news-content {
    padding: 15px;
    text-align: center;
  }

  .news-content h3 {
    font-size: 17px;
  }

  .news-content p {
    font-size: 14px;
  }

  .news-date {
    font-size: 12px;
  }

  .news-btn {
    display: block;
    width: fit-content;
    margin: 15px auto 0;
    font-size: 16px; /* بدل 2rem (كبيرة بزاف) */
    padding: 8px 18px;
  }

  .show-more {
    display: inline-block;
    margin-top: 20px;
    font-size: 14px;
  }

}

