/*
Theme Name: Wadiftak
Theme URI: https://wadiftak.online/
Author: Wadiftak
Description: قالب عربي RTL بسيط وحديث لموقع الوظائف والمباريات بالمغرب.
Version: 1.0.2
Text Domain: wadiftak
*/
:root{--navy:#123B65;--blue:#2474B9;--teal:#16A69A;--orange:#F49A38;--ink:#172536;--muted:#66758a;--line:#e6ebf1;--bg:#f5f8fc}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:Tahoma,Arial,sans-serif;line-height:1.8;direction:rtl;text-align:right}a{color:var(--blue);text-decoration:none}a:hover{color:var(--teal)}img{max-width:100%;height:auto}.container{width:min(1160px,92%);margin:auto}
.site-header{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}.header-inner{display:flex;direction:rtl;align-items:center;justify-content:space-between;gap:24px;min-height:78px}.brand{font-size:28px;font-weight:800;color:var(--navy)}.brand span{color:var(--teal)}.tagline{display:block;font-size:12px;color:var(--muted);font-weight:400;margin-top:-8px}.main-nav ul{display:flex;direction:rtl;gap:20px;list-style:none;margin:0;padding:0}.main-nav a{color:var(--ink);font-weight:600;font-size:14px}.menu-toggle{display:none;border:1px solid var(--line);background:#fff;border-radius:8px;padding:8px 12px}
.hero{background:linear-gradient(125deg,var(--navy),#1e5d8d);color:#fff;padding:62px 0 54px}.hero h1{font-size:clamp(28px,4vw,44px);line-height:1.35;margin:0 0 10px}.hero p{color:#e5f0fa;margin:0 0 25px}.search-form{display:flex;direction:rtl;gap:10px;max-width:720px;background:#fff;padding:7px;border-radius:12px;text-align:right}.search-form input{flex:1;min-width:0;border:0;padding:12px 14px;font:inherit;outline:0}.search-form button,.btn{background:var(--orange);color:#172536;border:0;border-radius:9px;padding:11px 22px;font:inherit;font-weight:700;cursor:pointer}.section{padding:38px 0}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:20px}.section-heading h2{font-size:23px;color:var(--navy);margin:0}.category-grid{display:grid;direction:rtl;grid-template-columns:repeat(4,1fr);gap:14px}.category-card,.post-card,.content-card{background:#fff;border:1px solid var(--line);border-radius:13px;padding:18px;box-shadow:0 4px 18px rgba(18,59,101,.04)}.category-card{font-weight:700;color:var(--navy);transition:.2s}.category-card:hover{transform:translateY(-3px);border-color:var(--teal)}.category-card small{display:block;color:var(--muted);font-weight:400}.posts-grid{display:grid;direction:rtl;grid-template-columns:repeat(3,1fr);gap:18px}.post-card h3{font-size:18px;line-height:1.5;margin:8px 0}.post-card h3 a{color:var(--navy)}.post-meta{font-size:12px;color:var(--muted)}.post-thumb img{width:100%;height:180px;object-fit:cover;border-radius:9px}.read-more{font-weight:700}.content-card{padding:clamp(20px,4vw,38px);margin:35px auto}.content-card h1{color:var(--navy);line-height:1.4}.entry-content{overflow-wrap:anywhere}.entry-content img{border-radius:10px}.site-footer{background:#102f4d;color:#dce8f3;padding:32px 0;margin-top:40px}.footer-inner{display:flex;direction:rtl;justify-content:space-between;gap:20px;flex-wrap:wrap}.site-footer a{color:#fff}.pagination{margin:25px 0}.pagination .page-numbers{display:inline-block;background:#fff;padding:7px 12px;border-radius:7px;margin:3px}.empty-state{background:#fff;border:1px dashed #cbd5e1;border-radius:12px;padding:25px;text-align:center;color:var(--muted)}
@media(max-width:850px){.category-grid{grid-template-columns:repeat(2,1fr)}.posts-grid{grid-template-columns:repeat(2,1fr)}.main-nav{display:none;position:absolute;top:78px;right:0;left:0;background:#fff;padding:16px 4%;border-bottom:1px solid var(--line)}.main-nav.is-open{display:block}.main-nav ul{flex-direction:column;gap:10px}.menu-toggle{display:block}}
@media(max-width:560px){.posts-grid{grid-template-columns:1fr}.hero{padding:42px 0}.search-form{flex-direction:column}.search-form button{width:100%}.section-heading h2{font-size:20px}}


/* RTL refinements */
input, textarea, select { direction: rtl; text-align: right; }
.main-nav a { display: inline-block; }
.post-meta, .entry-content, .content-card { text-align: right; }
.pagination { direction: rtl; text-align: right; }
@media(max-width:850px) {
  .main-nav ul { align-items: stretch; }
}


/* Header refinement: brand right, navigation compact and single-line */
.header-inner { direction: rtl; flex-direction: row; align-items: center; }
.header-inner > div:first-child { flex: 0 0 auto; margin-inline-start: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; line-height: 1.25; }
.brand span { display: inline; }
.tagline { margin-top: 3px; }
.main-nav { margin-inline-end: auto; }
.main-nav ul { direction: rtl; flex-wrap: nowrap; align-items: center; gap: clamp(10px, 1.4vw, 22px); }
.main-nav li { white-space: nowrap; }
.main-nav a { font-size: clamp(12px, 1vw, 14px); }
@media (max-width: 1050px) and (min-width: 851px) {
  .header-inner { gap: 14px; }
  .main-nav ul { gap: 10px; }
  .main-nav a { font-size: 12px; }
}
@media (max-width: 850px) {
  .header-inner > div:first-child { margin-inline-start: auto; }
  .main-nav { margin-inline-end: 0; }
}
