/* =========================================================
   NEWS.CSS — صفحة أخبارنا
   ========================================================= */

/* ================= BASE / RESET / VARIABLES ================= */
:root{
  --navy:#0B3665;
  --navy-deep:#082747;
  --navy-ink:#06203C;
  --teal:#17B2A2;
  --teal-soft:#5fd3c4;
  --gray:#6A7177;
  --white:#FFFFFF;
  --paper:#FAFAF7;
  --line:#DCE2E4;
  --line-dark:rgba(255,255,255,.14);
  --ease:cubic-bezier(.22,.61,.36,1);
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family:'Tajawal',sans-serif !important;
  color:var(--navy);
  background:var(--white);
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;display:block;}
a{text-decoration:none;color:inherit;}
ul{list-style:none;margin:0;padding:0;}
button{font-family:inherit;cursor:pointer;border:none;background:none;}
.en{font-family:'Poppins',sans-serif;direction:ltr;unicode-bidi:isolate;}
.wrap{max-width:1240px;margin:0 auto; padding:0 28px;}
section{position:relative;}

@media (prefers-reduced-motion: reduce){
  *{animation-duration:.001ms !important; transition-duration:.001ms !important;}
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible{
  outline:2px solid var(--teal); outline-offset:3px;
}
h1,h2,h3,h4{margin:0;color:var(--navy);}

/* ================= SHARED SECTION HEAD ================= */
.sec-title{font-size:clamp(26px,3vw,36px); font-weight:800; line-height:1.3; max-width:640px;}
.sec-text{color:var(--gray); font-size:17px; line-height:1.95; max-width:600px; margin-top:14px;}
.sec-head{margin-bottom:44px; padding-bottom:30px; border-bottom:1px solid var(--line);}
.sec-head-split{display:flex; align-items:flex-end; justify-content:space-between; gap:24px; flex-wrap:wrap;}
.sec-head-split .sec-title{margin-bottom:0;}

/* ================= BUTTONS ================= */
.btn{
  display:inline-flex; align-items:center; gap:8px; padding:13px 28px;
  border-radius:2px; font-weight:700; font-size:16.5px;
  transition:transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.btn-teal{background:var(--teal); color:var(--white);}
.btn-teal:hover{background:var(--teal-soft);}
.btn-primary{background:var(--navy); color:var(--white);}
.btn-primary:hover{background:var(--teal);}

/* ================= TOAST / BACK-TO-TOP ================= */
.toast{
  position:fixed; bottom:28px; left:50%; transform:translateX(-50%) translateY(20px);
  background:var(--navy-ink); color:var(--white); padding:14px 26px; font-size:16px; font-weight:600;
  opacity:0; pointer-events:none; transition:all .35s var(--ease); z-index:200; white-space:nowrap;
}
.toast.show{opacity:1; transform:translateX(-50%) translateY(0);}
.back-top{
  position:fixed; bottom:28px; inset-inline-end:28px; width:48px; height:48px; background:var(--navy);
  display:flex; align-items:center; justify-content:center; opacity:0; visibility:hidden; transform:translateY(10px);
  transition:all .3s var(--ease); z-index:150;
}
.back-top.show{opacity:1; visibility:visible; transform:translateY(0);}
.back-top svg{width:18px; height:18px; stroke:var(--white);}
.back-top:hover{background:var(--teal);}

/* ================= PAGE HERO / BREADCRUMB ================= */
.page-hero{
  padding:180px 0 70px; background:var(--navy-ink);
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size:26px 26px;
}
.breadcrumb{display:flex; align-items:center; gap:8px; font-size:15px; color:rgba(255,255,255,.55); margin-bottom:22px;}
.breadcrumb a{color:rgba(255,255,255,.75); transition:color .25s var(--ease);}
.breadcrumb a:hover{color:var(--teal-soft);}
.breadcrumb span:last-child{color:var(--teal-soft);}
.page-hero h1{color:var(--white); font-size:clamp(28px,4vw,42px); font-weight:800; margin:0 0 16px;}
.page-hero p{color:rgba(255,255,255,.62); font-size:17px; line-height:1.95; max-width:620px; margin:0;}

/* ================= FEATURED NEWS ================= */
.featured-news{padding:100px 0 40px; background:var(--white);}
.featured-grid{
  display:grid; grid-template-columns:1.4fr 1fr; grid-template-rows:1fr 1fr; gap:24px;
}
.featured-card{
  position:relative; overflow:hidden; background:var(--navy-ink); min-height:220px;
  display:flex; align-items:flex-end;
}
.featured-card.main{grid-row:1 / span 2;}
.featured-card img{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  transition:transform .5s var(--ease);
}
.featured-card:hover img{transform:scale(1.06);}
.featured-card::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(0deg, rgba(6,32,60,.92) 0%, rgba(6,32,60,.45) 55%, rgba(6,32,60,.05) 100%);
}
.featured-body{position:relative; z-index:2; padding:26px 26px 24px; width:100%;}
.featured-cat{
  display:inline-block; background:var(--teal); color:var(--white); font-size:13px; font-weight:700;
  padding:5px 12px; margin-bottom:14px;
}
.featured-card.main .featured-body{padding:34px 34px 30px;}
.featured-card h3{color:var(--white); font-weight:700; line-height:1.55;}
.featured-card.main h3{font-size:24.5px; margin-bottom:12px;}
.featured-card:not(.main) h3{font-size:18px;}
.featured-date{color:rgba(255,255,255,.65); font-size:13.5px; margin:0 0 10px; display:block;}
.featured-card.main .featured-date{font-size:15px; margin-bottom:12px;}

@media (max-width:900px){
  .featured-grid{grid-template-columns:1fr; grid-template-rows:none;}
  .featured-card.main{grid-row:auto;}
  .featured-card{min-height:260px;}
}

/* ================= ALL NEWS — search + filter + grid ================= */
.all-news{padding:60px 0 120px; background:var(--paper); border-top:1px solid var(--line);}

.news-filter-bar{
  display:flex; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:40px;
}
.search-field{
  flex:1 1 320px; min-width:0;
  display:flex; align-items:center; gap:10px;
  border:1px solid var(--line); background:var(--white);
  padding:0 16px;
  transition:border-color .25s var(--ease);
}
.search-field:focus-within{border-color:var(--teal);}
.search-field svg{
  flex:0 0 auto;
  width:18px; height:18px; stroke:var(--gray); pointer-events:none;
}
.search-field input{
  flex:1 1 auto; min-width:0; width:100%; border:none; background:transparent;
  padding:14px 0; font-family:inherit; font-size:16px; color:var(--navy);
}
.search-field input:focus{outline:none;}
#newsCatFilter{
  flex:0 0 auto; border:1px solid var(--line); background:var(--white);
  padding:14px 18px; font-family:inherit; font-size:16px; color:var(--navy); min-width:180px;
  transition:border-color .25s var(--ease);
}
#newsCatFilter:focus{outline:none; border-color:var(--teal);}

.news-list-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:30px;}
.news-list-card{display:block; color:inherit; cursor:pointer; background:var(--white); border:1px solid var(--line); transition:box-shadow .3s var(--ease), transform .3s var(--ease);}
.news-list-card:hover{transform:translateY(-4px); box-shadow:0 24px 40px -28px rgba(6,32,60,.3);}
.news-list-img{height:180px; width:100%; overflow:hidden; position:relative; border-bottom:1px solid var(--line); background:var(--line);}
.news-list-img img{width:100%; height:100%; object-fit:cover;}
.news-list-cat{
  position:absolute; bottom:10px; inset-inline-end:10px;
  background:var(--white); border:1px solid var(--line); font-size:12.5px; font-weight:600; color:var(--navy);
  padding:5px 10px;
}
.news-list-body{padding:22px 24px 26px;}
.news-list-date{font-size:13px; color:var(--gray); display:block; margin-bottom:10px;}
.news-list-body h4{font-size:17.5px; font-weight:700; line-height:1.65; margin-bottom:16px; min-height:52px;}
.news-list-body .read-more{display:inline-block; color:var(--teal); font-weight:700; font-size:15.5px;}
.news-list-card:focus-visible{outline:2px solid var(--teal); outline-offset:3px;}

.no-results{text-align:center; color:var(--gray); font-size:16.5px; padding:60px 0; display:none;}

@media (max-width:900px){
  .news-list-grid{grid-template-columns:repeat(2,1fr);}
}
@media (max-width:640px){
  .featured-news{padding:70px 0 20px;}
  .all-news{padding:40px 0 80px;}
  .news-list-grid{grid-template-columns:1fr;}
  .page-hero{padding:130px 0 44px;}
  .breadcrumb{font-size:13px; margin-bottom:16px;}
  .page-hero h1{font-size:24px; margin:0 0 12px;}
  .page-hero p{font-size:15px; line-height:1.8;}
  .news-filter-bar{flex-direction:column; align-items:stretch;}
  #newsCatFilter{width:100%;}
  .search-field{flex:0}
}