/*
Theme Name: Captainz Blog
Theme URI: https://captainzsa.com/ar/blog
Author: Captainz
Description: Simple RTL blog theme matching the Captainz landing page — blog index (grid) and article pages only.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: captainz-blog
*/

/* ---------- tokens (mirror the Next.js landing) ---------- */
:root{
  --brand:#E63946; --brand-d:#c32430; --brand-soft:#fdeef0;
  --ink:#1d1b22; --muted:#6e6b7b; --line:#ece9ef; --bg:#fbfafc; --card:#ffffff;
  --footer:#1b1418; --radius:16px; --maxw:1200px; --readw:760px;
}
*{box-sizing:border-box}
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth }
body{ margin:0; background:var(--bg); color:var(--ink);
  font-family:"Tajawal",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  line-height:1.6; -webkit-font-smoothing:antialiased; }
a{ color:inherit; text-decoration:none }
img{ max-width:100% }
.cz-wrap{ max-width:var(--maxw); margin:0 auto; padding:0 20px }

/* ---------- header ---------- */
.cz-header{ position:sticky; top:0; z-index:50; background:rgba(255,255,255,.86);
  backdrop-filter:saturate(180%) blur(14px); border-bottom:1px solid var(--line); }
.cz-header .cz-wrap{ display:flex; align-items:center; justify-content:space-between; gap:14px; height:66px }
.cz-logo{ display:flex; align-items:center; gap:10px }
.cz-logo img{ width:46px; height:46px; object-fit:contain; border-radius:14px;
  box-shadow:0 1px 2px rgba(0,0,0,.06); }
.cz-logo b{ font-size:20px; font-weight:800 }
.cz-nav{ display:flex; align-items:center; gap:2px }
.cz-nav a{ padding:8px 12px; border-radius:10px; font-size:15px; font-weight:600; color:var(--muted); transition:.15s }
.cz-nav a:hover{ color:var(--ink); background:#f3f1f6 }
.cz-nav a.is-ext{ color:var(--brand); font-weight:700 }
.cz-nav a.is-ext:hover{ background:var(--brand-soft) }
.cz-nav a[aria-current="page"]{ color:var(--brand); background:var(--brand-soft) }
.cz-cta{ display:inline-flex; align-items:center; justify-content:center; height:42px; padding:0 20px;
  border-radius:999px; background:var(--brand); color:#fff; font-weight:800; font-size:15px; transition:.15s }
.cz-cta:hover{ background:var(--brand-d) }
/* mobile menu (CSS-only) */
.cz-burger,.cz-menu-toggle,.cz-mobile{ display:none }
.cz-burger{ width:42px; height:42px; border:1px solid var(--line); border-radius:12px; background:#fff;
  align-items:center; justify-content:center; cursor:pointer }
.cz-burger svg{ width:20px; height:20px }
@media (max-width:860px){
  .cz-nav{ display:none }
  .cz-header .cz-cta{ display:none }
  .cz-burger{ display:inline-flex }
  .cz-menu-toggle:checked ~ .cz-mobile{ display:block }
  .cz-mobile{ display:none; border-top:1px solid var(--line); background:#fff }
  .cz-mobile .cz-wrap{ flex-direction:column; height:auto; align-items:stretch; padding-block:10px; gap:2px }
  .cz-mobile a{ padding:12px 8px; border-radius:10px; font-weight:600; color:var(--ink) }
  .cz-mobile a:hover{ background:#f3f1f6 }
  .cz-mobile .cz-cta{ display:inline-flex; margin-top:8px }
}

/* ---------- hero (index) ---------- */
.cz-hero{ padding:40px 0 6px }
.cz-hero h1{ margin:0; font-size:36px; font-weight:800; letter-spacing:-.01em }
.cz-hero p{ margin:8px 0 0; color:var(--muted); font-size:16px }

/* ---------- grid ---------- */
.cz-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:22px; padding:26px 0 8px }
.cz-card{ display:flex; flex-direction:column; background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius); overflow:hidden; transition:transform .18s, box-shadow .18s, border-color .18s }
.cz-card:hover{ transform:translateY(-4px); box-shadow:0 14px 30px rgba(29,27,34,.10); border-color:#e0dce6 }
/* Match the featured-image proportions (uniform 768x357 ≈ 2.15:1) and use `contain`
   so the full image is always shown without cropping; uniform images fill edge-to-edge. */
.cz-thumb{ position:relative; aspect-ratio:768/357; background:#f4f2f7; overflow:hidden }
.cz-thumb img{ width:100%; height:100%; object-fit:contain; display:block }
.cz-ph{ position:absolute; inset:0; display:flex; flex-direction:column; gap:6px; align-items:center; justify-content:center;
  background:linear-gradient(135deg,var(--brand),var(--brand-d)) }
.cz-ph-ic{ width:34px; height:34px; color:#fff; opacity:.9 }
.cz-ph-mark{ color:#fff; font-weight:800; font-size:22px; opacity:.95 }
.cz-cbody{ padding:16px 16px 18px; display:flex; flex-direction:column; gap:10px; flex:1 }
.cz-cbody h2{ margin:0; font-size:17px; line-height:1.5; font-weight:700;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden }
.cz-meta{ margin-top:auto; color:var(--muted); font-size:13px; display:flex; align-items:center; gap:8px }
.cz-dot{ width:4px; height:4px; border-radius:50%; background:var(--brand) }

/* ---------- pagination ---------- */
.cz-pag{ display:flex; flex-wrap:wrap; gap:8px; justify-content:center; padding:30px 0 56px }
.cz-pag .page-numbers{ min-width:42px; text-align:center; padding:9px 13px; border:1px solid var(--line);
  border-radius:10px; background:#fff; font-weight:600; font-size:14px }
.cz-pag .page-numbers.current{ background:var(--brand); border-color:var(--brand); color:#fff }
.cz-pag .page-numbers:hover:not(.current){ border-color:var(--brand); color:var(--brand) }
.cz-pag .dots{ border:none; background:none }

/* ---------- single article ---------- */
.cz-article{ padding:34px 0 10px }
.cz-bread{ font-size:14px; color:var(--muted); margin-bottom:18px }
.cz-bread a:hover{ color:var(--brand) }
.cz-article h1{ margin:0; font-size:32px; line-height:1.35; font-weight:800; letter-spacing:-.01em; max-width:var(--readw) }
.cz-amet{ display:flex; align-items:center; gap:8px; color:var(--muted); font-size:14px; margin-top:12px }
.cz-banner{ margin:24px 0 8px; border-radius:20px; overflow:hidden; border:1px solid var(--line); aspect-ratio:16/7; background:#f1eef5 }
.cz-banner img{ width:100%; height:100%; object-fit:cover; display:block }
.cz-content{ max-width:var(--readw); font-size:18px; line-height:1.95; color:#26242c; padding-top:8px }
.cz-content p{ margin:0 0 18px }
.cz-content strong{ display:block; margin:30px 0 6px; font-size:20px; font-weight:800; color:var(--ink) }
.cz-content ol,.cz-content ul{ margin:0 0 18px; padding-inline-start:26px }
.cz-content li{ margin:6px 0 }
.cz-content a{ color:var(--brand); text-decoration:underline; text-underline-offset:3px }
.cz-content img{ height:auto; border-radius:14px; margin:18px 0 }
.cz-content h2,.cz-content h3{ font-weight:800; line-height:1.4; margin:30px 0 10px }
.cz-content h2{ font-size:24px } .cz-content h3{ font-size:20px }
.cz-content blockquote{ margin:18px 0; padding:6px 18px; border-inline-start:4px solid var(--brand);
  background:var(--brand-soft); border-radius:0 12px 12px 0; color:#4a3b3e }
.cz-back{ display:inline-flex; align-items:center; gap:8px; margin:30px 0 6px; padding:11px 20px;
  border:1px solid var(--line); border-radius:999px; font-weight:700; background:#fff; transition:.15s }
.cz-back:hover{ border-color:var(--brand); color:var(--brand) }
/* more articles strip */
.cz-more{ border-top:1px solid var(--line); margin-top:40px; padding-top:8px }
.cz-more h3{ font-size:20px; font-weight:800; margin:24px 0 4px }

/* ---------- footer (dark, mirrors landing) ---------- */
.cz-footer{ background:var(--footer); color:#fff; margin-top:50px }
.cz-footer .cz-wrap{ padding:56px 20px 34px }
.cz-fgrid{ display:grid; grid-template-columns:1.6fr 1fr 1.3fr; gap:40px }
.cz-fbrand .cz-logo b{ color:#fff }
.cz-fbrand p{ color:rgba(255,255,255,.7); max-width:380px; margin:14px 0 0 }
.cz-fcol h4{ font-size:13px; letter-spacing:.08em; text-transform:uppercase; color:#fff; margin:0 0 16px }
.cz-fcol ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:11px }
.cz-fcol a{ color:rgba(255,255,255,.72) } .cz-fcol a:hover{ color:#fff }
.cz-badges{ margin-top:40px; padding-top:28px; border-top:1px solid rgba(255,255,255,.1);
  display:flex; flex-wrap:wrap; gap:12px; align-items:center }
.cz-badge{ display:flex; align-items:center; gap:12px; background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.1); border-radius:14px; padding:10px 14px }
.cz-badge .cz-blab{ font-size:11px; color:rgba(255,255,255,.6) }
.cz-badge .cz-bval{ font-weight:700; font-size:13px; font-family:ui-monospace,monospace }
.cz-badge img{ width:46px; height:46px; object-fit:contain; background:#fff; border-radius:8px; padding:4px }
.cz-copy{ margin-top:26px; padding-top:18px; border-top:1px solid rgba(255,255,255,.1);
  display:flex; flex-wrap:wrap; gap:10px; justify-content:space-between; color:rgba(255,255,255,.6); font-size:13px }
@media (max-width:860px){
  .cz-hero h1{ font-size:28px } .cz-article h1{ font-size:25px } .cz-content{ font-size:17px }
  .cz-grid{ grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:14px }
  .cz-cbody h2{ font-size:15px }
  .cz-fgrid{ grid-template-columns:1fr; gap:30px }
}
