/*
Theme Name: News9
Theme URI: https://example.com/
Author: ChatGPT
Author URI: https://example.com/
Description: ثيم إخباري عربي (RTL) خفيف وسريع لموقع "التاسعة" مستلهم من تصميم الصحف الحديثة (Minimal / Newspaper Grid).
Version: 1.0.7
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: altaseah
Tags: news, blog, rtl-language-support, custom-logo, custom-menu, featured-images
*/

:root{
  /* أسلوب أبيض/أسود مع خطوط واضحة مثل الصورة */
  --bg:#ffffff;
  --paper:#ffffff;
  --ink:#111111;
  --muted:#444444;
  --line:#111111;
  /* حدة زوايا الكروت */
  --radius:0px;
  --accent:#0f172a;
  --max:1240px;
}

html{box-sizing:border-box}
*,*:before,*:after{box-sizing:inherit}
body{
  margin:0;
  font-family:"Readex Pro",system-ui,-apple-system,"Segoe UI",Tahoma,Arial,"Noto Kufi Arabic","Noto Sans Arabic",sans-serif;
  background:var(--bg);
  color:var(--ink);
  line-height:1.7;
}

/* توحيد الخط في كل الموقع (العناوين/الشعار/الفوتر/الكروت) */
h1,h2,h3,h4,h5,h6,
.site-title,
.hero-msa__title,
.hero-title,
.title,
.msa-footer__brand,
.msa-footer__title{
  font-family: inherit;
}

a{color:inherit;text-decoration:none}
a:hover{opacity:.85}
img{max-width:100%;height:auto;display:block}

.container{max-width:var(--max);margin-inline:auto;padding-inline:16px}

/* Pages: same minimal feel as homepage */
.page-msa{padding:32px 0 56px}
.page-msa__head{margin:0 0 18px}
.page-msa__title{font-size:40px;line-height:1.1;margin:0;font-weight:500;letter-spacing:-.02em}
.page-msa__content{max-width:780px}
.page-msa__content p{line-height:1.95}
.page-msa__content a{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}

/* إطار بخطين جانبيين كما في التصميم */
.frame{border-inline:1px solid var(--line)}

/* Header */
.site-header{background:var(--paper);border-bottom:1px solid var(--line)}
.header-row{display:flex;align-items:center;gap:14px;padding:16px 0;justify-content:flex-start}
.brand{display:flex;align-items:center;gap:10px;min-width:0;flex:0 1 auto;margin-inline-end:auto}
.brand img{max-height:60px;width:auto}
.brand .site-title{font-weight:400;letter-spacing:0;font-size:34px;line-height:1.1}

/* في RTL: نريد القائمة بمحاذاة اليسار */
.primary-nav{margin:0}
.primary-nav ul{display:flex;align-items:center;gap:18px;list-style:none;padding:0;margin:0;flex-wrap:wrap}
.primary-nav a{display:inline-block;padding:8px 6px;border-radius:0;color:var(--muted);font-weight:400}
.primary-nav .current-menu-item>a,
.primary-nav a:hover{color:var(--ink);text-decoration:underline;text-underline-offset:10px;text-decoration-thickness:2px}

.header-actions{display:flex;align-items:center;gap:10px}
.icon-btn{width:40px;height:40px;border:1px solid var(--line);border-radius:0;background:#fff;display:grid;place-items:center}
.icon-btn svg{width:18px;height:18px}
/* Hide burger on desktop; show only on small screens */
.menu-toggle{display:none !important}

.follow-btn{border:1px solid var(--line);background:#fff;border-radius:999px;padding:10px 14px;font-weight:400}

/* Layout */
.main{padding:18px 0 30px}

/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;border:1px solid var(--line);background:#fff;border-radius:0;font-weight:400;color:var(--ink)}
.btn:hover{opacity:.9}

/* HERO الجديد (مستلهم من الصورة) */
.hero-msa{border-bottom:0}
.hero-msa__box{padding:70px 18px 60px;text-align:center}
.hero-msa__kicker{margin:0 0 18px;font-size:20px;color:var(--muted)}
.hero-msa__title{margin:0 auto 26px;max-width:18ch;font-size:64px;line-height:1.05;font-weight:400;letter-spacing:-.4px}
.hero-msa__bullets{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin:0 0 26px;color:var(--muted);font-weight:400}
.hero-msa__bullet{border:1px solid var(--line);padding:8px 12px;display:inline-flex;align-items:center;gap:8px;color:inherit;text-decoration:none}
.hero-msa__bullet:hover{background:rgba(0,0,0,.03)}
.hero-msa__btn{display:inline-flex;align-items:center;justify-content:center;padding:12px 18px;border:1px solid var(--line);background:var(--ink);color:#fff;font-weight:400}
.hero-msa__btn:hover{opacity:.92}

/* HERO: single big card */
.hero-single{margin-top:18px}
.hero-card{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;display:grid;grid-template-columns: 55% 45%}
.hero-media{background:#f0f0f0;aspect-ratio:16/9;min-height:280px}
.hero-media img{width:100%;height:100%;object-fit:cover}
.hero-content{padding:18px;display:flex;flex-direction:column;gap:10px;justify-content:center}
.hero-title{margin:0;font-size:34px;line-height:1.2;font-weight:400}
.hero-text{margin:0;color:var(--muted);font-size:15px;line-height:1.9}
.hero-bullets{margin:4px 0 0;padding:0 18px;color:var(--ink);line-height:1.9}
.hero-bullets li{margin:0 0 4px}

/* Latest grid (smaller cards) */
.latest-grid{gap:12px}

.card{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
.card--no-media{display:block}
.card-pad{padding:14px}
.kicker{font-size:12px;color:var(--muted);font-weight:400;letter-spacing:.2px}
.title{margin:6px 0 0;font-size:20px;line-height:1.35;font-weight:400}
.excerpt{margin:8px 0 0;color:var(--muted);font-size:14px}
.meta{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12px;margin-top:10px}
.meta svg{width:14px;height:14px}

.card-xl .title{font-size:26px}
.media{position:relative;aspect-ratio: 16/9;background:#f0f0f0}
.media img{width:100%;height:100%;object-fit:cover}

.split{display:grid;grid-template-columns:.95fr 1fr;gap:12px;align-items:stretch}
.split .media{aspect-ratio: 4/3;border-radius:0;overflow:hidden;margin:14px 0 14px 14px}
.split .card-pad{padding:14px 14px 14px 0}

.section{margin-top:18px}
.section--tight{margin-top:0;padding:18px}
.section--tight .section-head{margin:0 0 12px}
.section--tight{border-bottom:1px solid var(--line)}
.section-head{display:flex;align-items:end;justify-content:space-between;gap:12px;margin:18px 0 10px}
.section-head h2{margin:0;font-size:18px}
.section-head a{color:var(--muted);font-weight:400}

.cards-3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.cards-2{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}

/* Single */
.content-wrap{display:grid;grid-template-columns: 1fr 320px;gap:18px}
.article{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:18px}
.article h1{margin:0 0 8px;font-size:30px;line-height:1.25}
.article .post-meta{color:var(--muted);font-size:13px;display:flex;gap:10px;flex-wrap:wrap}
.article .post-thumb{margin:14px 0;border-radius:var(--radius);overflow:hidden}
.article .entry{margin-top:12px}
.article .entry p{margin:0 0 14px}

.sidebar .widget{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:14px;margin-bottom:14px}
.sidebar .widget-title{margin:0 0 10px;font-size:15px;color:var(--ink);font-weight:700}

/* Lists */
.post-list{display:flex;flex-direction:column;gap:12px}
.mini{padding:10px 12px;border:1px solid var(--line);background:var(--paper);border-radius:0}
.mini .title{font-size:12.8px;margin:0;line-height:1.35}
.latest-grid{gap:12px}

/* شبكة أحدث التدوينات: كروت أصغر */
.latest-grid--mini{gap:12px}
.latest-grid--mini .card{border-width:1px}
.latest-grid--mini .card-pad{padding:12px}
.latest-grid--mini .mini{padding:8px 10px}
.latest-grid--mini .mini .title{font-size:15px;line-height:1.55}

/* الصفحة الرئيسية: بدون إطار حول كروت أحدث التدوينات */
.home .latest-grid--mini .mini{
  border:0 !important;
  background:transparent;
  padding:6px 0;
}

/* صفحة التدوينة: احذف الإطارات من الكروت/السايدبار (مع إبقاء الفوتر) */
.single .article,
.single .sidebar .widget,
.single .card,
.single .mini{
  border:0 !important;
}
.single .article{padding:0;background:transparent}
.single .sidebar .widget{padding:0;background:transparent}

/* Footer (مثل الصورة: جدول 4 أعمدة + صف سوشال) */
.msa-footer{border-top:1px solid var(--line);background:var(--paper);padding:0}
.msa-footer__grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));}
.msa-footer__cell{min-width:0;padding:28px 20px;border-inline-start:1px solid var(--line)}
.msa-footer__cell:first-child{border-inline-start:0}
.msa-footer__cell--dark{background:#000;color:#fff}
.msa-footer__brand{margin:0 0 10px;font-size:18px;font-weight:400}
.msa-footer__about{margin:0 0 14px;color:rgba(255,255,255,.85);line-height:1.9;max-width:40ch}
/* (تم حذف نموذج الاشتراك من الفوتر) */
.msa-footer__title{margin:0 0 12px;font-size:16px;font-weight:700}
.msa-footer ul{list-style:none;margin:0;padding:0}
.msa-footer a{display:block;padding:2px 0}

/* Widgets: tighter lists + larger link text */
.sidebar .widget ul{list-style:none;margin:0;padding:0}
.sidebar .widget li{margin:0 0 2px}
.sidebar .widget a{display:inline-block;padding:1px 0;font-size:15px;font-weight:400;border:0!important;background:transparent!important;box-shadow:none!important;outline:0}

/* اجعل ويدجات الصفحات بنفس ستايل التدوينات (بدون إطارات) */
.page .sidebar .widget{border:0 !important;background:transparent;padding:0}
.sidebar .widget a:focus{outline:0;box-shadow:none}

/* Remove borders that may appear on block/navigation widget links */
.sidebar .widget .wp-block-pages-list__item__link,
.sidebar .widget .wp-block-categories-list__item__link,
.sidebar .widget .wp-block-archives-list__item__link,
.sidebar .widget .wp-block-latest-posts__post-title,
.sidebar .widget .wp-block-navigation a{border:0!important;background:transparent!important;box-shadow:none!important}
.sidebar .widget a:hover{opacity:.92}
.msa-footer__social{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid var(--line)}
.msa-footer__socialitem{padding:14px 20px;border-inline-start:1px solid var(--line);font-weight:400;text-align:center}
.msa-footer__socialitem:first-child{border-inline-start:0}
.msa-footer__bottom{border-top:1px solid var(--line);padding:18px 20px;text-align:center;color:var(--muted);font-size:12px}

/* Search */
.search-form{display:flex;gap:8px}
.search-form input[type="search"]{flex:1;border:1px solid var(--line);border-radius:0;padding:12px 12px;background:#fff}
.search-form button{border:1px solid var(--line);border-radius:0;padding:12px 12px;background:#fff;font-weight:400}

/* RTL helpers */
body{direction:rtl}
.split .media{margin:14px 14px 14px 0}
.split .card-pad{padding:14px 0 14px 14px}

/* Responsive */
@media (max-width: 900px){
  .content-wrap{grid-template-columns:1fr}
  .cards-3{grid-template-columns:1fr 1fr}
  .hero-msa__title{font-size:44px}
  .msa-footer__grid,.msa-footer__social{grid-template-columns:1fr 1fr}
  .msa-footer__cell,.msa-footer__socialitem{border-inline-start:0;border-top:1px solid var(--line)}
  .msa-footer__grid .msa-footer__cell:nth-child(-n+2){border-top:0}
  .msa-footer__social .msa-footer__socialitem:nth-child(-n+2){border-top:0}
}
@media (max-width: 640px){
  .header-row{justify-content:flex-start;gap:10px}
  /* في RTL: الشعار يمين والبرقر يسار */
  .brand{min-width:auto;margin-inline-end:auto}
  .brand .site-title{font-size:22px;max-width:70vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .menu-toggle{display:grid !important}
  /* RTL off-canvas: افتح القائمة من اليسار */
  .primary-nav{margin:0;display:block;position:fixed;top:0;inset-inline-end:0;height:100vh;width:min(320px,85vw);background:var(--paper);border-inline-start:1px solid var(--line);padding:84px 16px 16px;transform:translateX(-105%);transition:transform .2s ease;z-index:9999;overflow:auto}
  body.nav-open .primary-nav{transform:translateX(0)}
  body.nav-open{overflow:hidden}
  .primary-nav ul{flex-direction:column;align-items:stretch;gap:8px}
  .primary-nav a{padding:12px 12px;border:1px solid var(--line);border-radius:0;background:#fff;color:var(--ink);text-decoration:none}
  .primary-nav .current-menu-item>a{background:#fafafa}
  .mobile-backdrop{display:none;position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:9998}
  body.nav-open .mobile-backdrop{display:block}

  .cards-3,.cards-2{grid-template-columns:1fr}
  .split{grid-template-columns:1fr}
  .split .media{margin:0;border-radius:0;aspect-ratio:16/9}
  .split .card-pad{padding:14px}

  .hero-msa__box{padding:52px 16px 42px}
  .hero-msa__title{font-size:36px}
  .msa-footer__grid,.msa-footer__social{grid-template-columns:1fr}
  .msa-footer__cell,.msa-footer__socialitem{border-inline-start:0;border-top:1px solid var(--line)}
  .msa-footer__grid .msa-footer__cell:first-child{border-top:0}
  .msa-footer__social .msa-footer__socialitem:first-child{border-top:0}
}

/* Optional grayscale images (enabled via body class) */
body.altaseah-grayscale img{filter:grayscale(1)}
