/*
Theme Name: Al-Jazirah Modern RTL
Theme URI: https://www.al-jazirah.com/
Author: Custom WordPress Theme
Description: RTL Arabic newspaper theme based on the supplied Al-Jazirah HTML homepage, with dynamic Level-2 category and Level-3 article templates.
Version: 1.0.0
Requires at least: 6.8
Tested up to: 6.8.1
Requires PHP: 8.1
Text Domain: aljazirah
*/

:root{
  --az-teal:#214b5c;
  --az-teal-2:#526b80;
  --az-gold:#b18b32;
  --az-red:#f44343;
  --az-bg:#fff;
  --az-text:#222;
  --az-muted:#555;
  --az-border:#dbe3eb;
}
*{box-sizing:border-box}
html{direction:rtl}
body{margin:0;background:#fff;color:var(--az-text);font-family:Tahoma,Arial,sans-serif}
img{max-width:100%;height:auto}
a{color:navy;text-decoration:none;font-weight:500;transition:color .2s}
a:hover{color:#b18b32}
.site-shell{width:min(1200px,100%);margin:auto}
.site-header{min-height:82px;background:var(--az-teal);color:#fff;display:flex;align-items:center;padding:10px 22px;gap:25px}
.site-logo{margin-right:auto;width:125px;height:65px;background:#fff;display:flex;align-items:center;justify-content:center;color:#222;font-size:22px;font-weight:bold;overflow:hidden}
.site-logo img{width:100%;height:100%;object-fit:contain}
.site-nav{display:flex;gap:25px;align-items:center;font-weight:bold;font-size:15px}
.site-nav ul{display:flex;gap:25px;list-style:none;margin:0;padding:0}
.site-nav a{color:#fff}
.site-nav a:hover{color:#ffd323}
.paper-link{background:var(--az-red);padding:9px 17px;border-radius:7px;font-weight:bold;color:#fff}
.paper-link:hover{color:#fff}
.site-date{color:#ffd323;font-size:13px;white-space:nowrap;text-align:center}
.mobile-menu-toggle{display:none}
.hero{margin:12px 0 28px;display:grid;grid-template-columns:repeat(3,1fr);height:275px;overflow:hidden;border-radius:15px}
.hero-card{position:relative;overflow:hidden;background:#ddd}
.hero-card img{width:100%;height:100%;object-fit:cover;display:block}
.hero-card::after{content:"";position:absolute;inset:35% 0 0;background:linear-gradient(transparent,rgba(0,0,0,.82))}
.hero-title{position:absolute;z-index:2;bottom:18px;left:18px;right:18px;color:#fff;font-size:23px;line-height:1.35;font-weight:bold;text-align:right}
.hero-title a{color:#fff}
.content{display:grid;grid-template-columns:290px 1fr;gap:28px;direction:ltr}
.sidebar,.main{direction:rtl}
.ad{border:1px solid #e34b4b;padding:10px;margin-bottom:38px;text-align:center}
.ad-image{height:125px;background:#eee center/cover no-repeat;border-radius:3px;margin-bottom:8px}
.ad-title{font-size:16px;font-weight:bold;line-height:1.5}
.paper-title{display:inline-block;background:var(--az-gold);color:#fff;padding:8px 30px;font-weight:bold;margin-bottom:10px;border-radius:2px}
.newspaper{border:5px solid var(--az-gold);border-radius:15px;padding:10px;overflow:hidden}
.newspaper img{width:100%;display:block}
.section-title{position:relative;margin:0 0 18px;height:40px;display:flex;align-items:center;justify-content:flex-start}
.section-title::before{content:"";position:absolute;left:0;right:0;height:34px;background:linear-gradient(to left,#fff,#dbe3eb,#9daebe);border-radius:20px 0 0 20px;z-index:0}
.section-title span{position:relative;z-index:1;background:#fff;padding:0 25px;color:var(--az-teal-2);font-size:21px;font-weight:bold}
.section-title span a{color:var(--az-teal-2)}
.news-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-bottom:42px}
.news-card{border-radius:10px;overflow:hidden;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.12)}
.news-image{width:100%;height:175px;object-fit:cover;display:block;background:#e7ecef}
.news-body{padding:12px 15px 17px}
.news-title{font-size:18px;font-weight:bold;line-height:1.45;margin-bottom:8px}
.news-title a{color:#173f54}
.news-title a:hover{color:#b18b32}
.news-summary{font-size:14px;line-height:1.65;color:var(--az-muted)}
.site-footer{margin-top:40px;padding:25px;background:var(--az-teal);color:#fff;text-align:center}
.site-footer a{color:#fff}
.archive-header{margin:12px 0 25px;padding:22px;background:linear-gradient(to left,#fff,#dbe3eb);border-radius:12px}
.archive-header h1{margin:0;color:var(--az-teal-2);font-size:30px}
.archive-description{margin-top:10px;line-height:1.8;color:#555}
.archive-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.pagination{display:flex;gap:8px;justify-content:center;margin:30px 0}
.pagination .page-numbers{padding:8px 13px;border:1px solid #d5dde4;border-radius:6px;background:#fff}
.pagination .current{background:var(--az-teal);color:#fff;border-color:var(--az-teal)}
.single-layout{display:grid;grid-template-columns:290px 1fr;gap:28px;direction:ltr;margin-top:15px}
.single-main,.single-sidebar{direction:rtl}
.breadcrumb{font-size:14px;margin-bottom:15px;color:#777}
.breadcrumb a{color:var(--az-teal-2)}
.article{background:#fff}
.article-title{font-size:34px;line-height:1.45;color:#173f54;margin:0 0 12px}
.article-meta{font-size:14px;color:#777;margin-bottom:18px}
.article-featured{width:100%;max-height:560px;object-fit:cover;border-radius:10px;margin-bottom:20px}
.article-content{font-size:18px;line-height:2;color:#222}
.article-content p{margin:0 0 18px}
.article-content img{display:block;margin:20px auto}
.back-link{display:inline-block;margin-top:25px;padding:9px 18px;background:var(--az-teal);color:#fff;border-radius:6px}
.back-link:hover{color:#fff;background:#173f54}
.widget-title{font-size:18px;color:var(--az-teal-2);margin:0 0 10px}
.empty-state{padding:30px;text-align:center;background:#f5f7f9;border-radius:10px}
@media(max-width:900px){
 .site-nav{display:none}
 .mobile-menu-toggle{display:block;color:#fff;font-size:24px}
 .hero{height:230px}
 .hero-title{font-size:17px}
 .content,.single-layout{grid-template-columns:1fr;padding:15px}
 .sidebar,.single-sidebar{order:2}
 .main,.single-main{order:1}
 .news-grid,.archive-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:600px){
 .site-header{min-height:65px;padding:8px 12px}
 .site-date{display:none}
 .site-logo{width:100px;height:50px}
 .hero{grid-template-columns:1fr;height:auto}
 .hero-card{height:210px}
 .hero-card:not(:first-child){display:none}
 .news-grid,.archive-grid{grid-template-columns:1fr}
 .article-title{font-size:26px}
 .article-content{font-size:17px}
}
