/*
Theme Name: LOOP لوب
Theme URI: https://allub.net
Author: LOOP
Description: LOOP — Saudi digital media platform theme. Warm paper background, huge Cairo headlines, hand-drawn illustration style, navy/red/amber identity with hard sticker shadows. RTL-first.
Version: 1.0.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: loop
*/

/* ============ LOOP · لوب — Design System ============ */
/* Reference style: warm paper, huge headlines, hand-drawn illustration,
   one hard accent + LOOP identity: navy/red/amber + hard sticker shadow */

:root {
  --paper:   #F6F1E8;
  --paper-2: #EFE8DB;
  --ink:     #14141F;
  --navy:    #252766;
  --navy-d:  #191A44;
  --navy-m:  #2E3178;
  --red:     #EE2929;
  --red-d:   #C41F1F;
  --amber:   #FCB315;
  --off:     #F1F2F2;
  --mute:    #6E6A5E;
  --mute-2:  #9B9688;
  --line:    #E2DACA;
  --shadow:  #14141F;
  --ok:      #1F8A4C;
  --warn:    #D98A00;
  --max: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  background: var(--paper);
  color: var(--ink);
  direction: rtl;
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, .display { font-family: 'Cairo', 'IBM Plex Sans Arabic', sans-serif; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- handwritten accent (like the reference's script line) ---------- */
.script {
  font-family: 'Aref Ruqaa', serif;
  color: var(--red);
  font-size: 1.45rem;
  display: inline-block;
  transform: rotate(-1.2deg);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff;
  font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 1rem;
  padding: 14px 30px; border-radius: 999px;
  text-decoration: none; border: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 rgba(20,20,31,.25); }
.btn.red { background: var(--red); }
.btn.navy { background: var(--navy); }
.btn.ghost {
  background: transparent; color: var(--ink);
  border: 2px solid var(--ink);
}
.btn.ghost:hover { background: var(--ink); color: #fff; }

/* ---------- sticker card (LOOP hard shadow motif) ---------- */
.sticker {
  background: #fff; border: 2px solid var(--ink);
  box-shadow: 7px 7px 0 var(--shadow);
  border-radius: 14px;
}
.sticker.navy { background: var(--navy); color: var(--off); }
.sticker.red { background: var(--red); color: #fff; }
.sticker.amber { background: var(--amber); color: var(--ink); }
.sticker.paper { background: var(--paper); }

/* ---------- nav ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,241,232,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.nav .logo img { height: 44px; display: block; }
.nav ul { display: flex; gap: 28px; list-style: none; }
.nav ul a {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem;
  padding-bottom: 4px; border-bottom: 2px solid transparent;
}
.nav ul a:hover, .nav ul a.on { border-color: var(--red); }
.nav .btn { padding: 10px 22px; font-size: .9rem; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 0; position: relative; }
.hero .kicker { margin-bottom: 14px; }
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 900; line-height: 1.22; letter-spacing: -.5px;
  max-width: 820px;
}
.hero h1 .u { position: relative; white-space: nowrap; }
.hero h1 .u::after {
  content: ""; position: absolute; right: 0; left: 0; bottom: 6px;
  height: 14px; background: var(--amber); z-index: -1; transform: rotate(-.6deg);
}
.hero p.dek { max-width: 620px; color: var(--mute); font-size: 1.15rem; margin: 22px 0 30px; }
.hero .cta-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.hero .side-note {
  position: absolute; left: 24px; top: 180px; width: 260px;
  color: var(--mute); font-size: .95rem; text-align: left;
}
.hero-art { margin-top: 40px; position: relative; }
.hero-art img { width: 100%; display: block; border-radius: 18px 18px 0 0; }

/* ---------- now strip ---------- */
.now { background: var(--navy); color: var(--off); padding: 46px 0 54px; position: relative; }
.now .strip-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 26px; }
.now .strip-head .dot { width: 14px; height: 14px; background: var(--red); border-radius: 50%; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
.now h2 { font-size: 1.7rem; font-weight: 800; color: #fff; }
.now .hint { color: #9FA1BC; font-size: .9rem; }
.now-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.now-card {
  background: var(--navy-m); border-radius: 12px; padding: 18px 20px;
  border: 1px solid #3A3D8A; box-shadow: 5px 5px 0 rgba(0,0,0,.35);
}
.now-card .t { font-weight: 700; font-family: 'Cairo'; font-size: 1.02rem; color: #fff; margin-bottom: 6px; }
.now-card .why { font-size: .88rem; color: #C9CBE4; }
.now-card .why b { color: var(--amber); font-weight: 700; }

/* certainty tags */
.tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 10px; border-radius: 99px; margin-bottom: 10px; }
.tag.ok { background: var(--ok); color: #fff; }
.tag.mid { background: var(--warn); color: #fff; }
.tag.chk { background: var(--red); color: #fff; }

/* ---------- section shells ---------- */
section.block { padding: 84px 0; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 40px; flex-wrap: wrap; }
.sec-head .k { color: var(--red); font-weight: 700; font-size: .85rem; letter-spacing: 2px; margin-bottom: 8px; font-family: 'Cairo'; }
.sec-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 900; line-height: 1.3; }
.sec-head .more { color: var(--ink); font-weight: 700; text-decoration: none; border-bottom: 3px solid var(--amber); padding-bottom: 2px; white-space: nowrap; }
.sec-head .more:hover { border-color: var(--red); }

/* ---------- programs ---------- */
.progs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.prog {
  background: #fff; border: 2px solid var(--ink); border-radius: 12px;
  box-shadow: 5px 5px 0 var(--shadow); padding: 18px 16px; text-align: center;
  transition: transform .15s ease;
}
.prog:hover { transform: translate(-2px,-2px); }
.prog .nm { font-family: 'Cairo'; font-weight: 900; font-size: 1.25rem; }
.prog .en { font-size: .68rem; letter-spacing: 1.5px; color: var(--mute-2); font-weight: 700; margin: 2px 0 8px; }
.prog .d { font-size: .82rem; color: var(--mute); line-height: 1.5; }
.prog .bar { height: 5px; border-radius: 3px; margin-top: 12px; }

/* ---------- report cards ---------- */
.reports-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
@media (max-width: 900px) { .reports-grid { grid-template-columns: 1fr; } }
.rep-card { display: block; text-decoration: none; color: var(--ink); }
.rep-card .art { border: 2px solid var(--ink); border-radius: 14px; box-shadow: 8px 8px 0 var(--shadow); overflow: hidden; }
.rep-card .art img { width: 100%; display: block; transition: transform .3s ease; }
.rep-card:hover .art img { transform: scale(1.03); }
.rep-card .meta { margin-top: 20px; }
.rep-card .cat { color: var(--red); font-weight: 700; font-size: .85rem; font-family: 'Cairo'; }
.rep-card h3 { font-size: 1.55rem; font-weight: 900; margin: 6px 0 8px; line-height: 1.4; }
.rep-card p { color: var(--mute); font-size: .98rem; max-width: 520px; }
.rep-card .read { display: inline-block; margin-top: 12px; font-weight: 700; border-bottom: 3px solid var(--amber); padding-bottom: 2px; }

/* ---------- watch ---------- */
.watch { background: var(--paper-2); }
.watch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 26px; }
.vid-card { background: #fff; border: 2px solid var(--ink); border-radius: 14px; box-shadow: 7px 7px 0 var(--shadow); overflow: hidden; }
.vid-card video { width: 100%; display: block; background: var(--navy-d); }
.vid-card .vc-body { padding: 16px 18px 20px; }
.vid-card .vc-tag { font-size: .72rem; font-weight: 800; color: #fff; background: var(--red); padding: 2px 10px; border-radius: 99px; }
.vid-card h4 { font-size: 1.1rem; font-weight: 800; margin: 10px 0 4px; }
.vid-card p { font-size: .85rem; color: var(--mute); }

/* ---------- number of the day ---------- */
.number-band { background: var(--red); color: #fff; padding: 70px 0; position: relative; overflow: hidden; }
.number-band .big {
  font-family: 'Cairo'; font-weight: 900;
  font-size: clamp(4rem, 10vw, 7.5rem); line-height: 1; direction: ltr; display: inline-block;
}
.number-band .exp { font-size: 1.2rem; max-width: 560px; margin-top: 10px; color: #FFE3E3; }
.number-band .src { font-size: .8rem; color: #FFB9B9; margin-top: 14px; }

/* ---------- newsletter ---------- */
.news-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; }
@media (max-width: 860px) { .news-grid { grid-template-columns: 1fr; } }
.news-grid img { width: 100%; max-width: 420px; display: block; margin: 0 auto; }
.subscribe { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.subscribe input {
  flex: 1; min-width: 240px; padding: 14px 22px; font-size: 1rem;
  font-family: inherit; border: 2px solid var(--ink); border-radius: 999px; background: #fff;
  outline: none;
}
.subscribe input:focus { box-shadow: 4px 4px 0 var(--amber); }

/* ---------- footer ---------- */
footer.site {
  background: var(--navy-d); color: #9FA1BC; padding: 60px 0 30px; margin-top: 40px;
}
footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 40px; }
@media (max-width: 800px) { footer .cols { grid-template-columns: 1fr 1fr; } }
footer img.flogo { height: 54px; margin-bottom: 14px; }
footer h5 { color: #fff; font-size: .95rem; margin-bottom: 14px; font-family: 'Cairo'; }
footer a { display: block; color: #9FA1BC; text-decoration: none; font-size: .88rem; margin-bottom: 8px; }
footer a:hover { color: var(--amber); }
footer .base { border-top: 1px solid #2E3178; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .8rem; }
footer .script { color: var(--amber); font-size: 1.2rem; }

/* ============ ARTICLE / REPORT PAGES ============ */
.art-hero { padding: 60px 0 30px; border-bottom: 2px solid var(--ink); }
.art-hero .cat { color: var(--red); font-family: 'Cairo'; font-weight: 800; letter-spacing: 1px; }
.art-hero h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 900; line-height: 1.3; margin: 14px 0 18px; max-width: 900px; }
.art-hero .dek { font-size: 1.2rem; color: var(--mute); max-width: 760px; }
.art-hero .meta { display: flex; gap: 18px; margin-top: 26px; font-size: .85rem; color: var(--mute-2); flex-wrap: wrap; align-items: center; }
.art-hero .meta b { color: var(--ink); }

.art-cover { margin: 40px 0; }
.art-cover img { width: 100%; border: 2px solid var(--ink); border-radius: 16px; box-shadow: 10px 10px 0 var(--shadow); display: block; }
.art-cover .cap { font-size: .8rem; color: var(--mute-2); margin-top: 10px; }

article.body { max-width: 780px; margin: 0 auto; padding: 20px 24px 80px; font-size: 1.08rem; }
article.body > p { margin-bottom: 22px; }
article.body h2 { font-size: 1.8rem; font-weight: 900; margin: 60px 0 18px; position: relative; }
article.body h2 .num { color: var(--red); font-size: 1rem; display: block; letter-spacing: 2px; }
article.body h3 { font-size: 1.25rem; font-weight: 800; margin: 34px 0 12px; }
article.body strong { font-weight: 700; }
article.body .lead { font-size: 1.25rem; font-weight: 500; }

/* why-it-matters box */
.why-box {
  background: #fff; border: 2px solid var(--ink); border-radius: 14px;
  box-shadow: 7px 7px 0 var(--red); padding: 26px 28px; margin: 36px 0;
}
.why-box .wt { font-family: 'Cairo'; font-weight: 900; color: var(--red); font-size: 1.1rem; margin-bottom: 12px; }
.why-box ul { list-style: none; }
.why-box li { padding-right: 22px; position: relative; margin-bottom: 10px; font-size: 1rem; }
.why-box li::before { content: "◾"; color: var(--red); position: absolute; right: 0; font-size: .8rem; top: 2px; }

/* stat grid */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; margin: 36px 0; }
.stat {
  background: #fff; border: 2px solid var(--ink); border-radius: 12px;
  box-shadow: 5px 5px 0 var(--shadow); padding: 18px; text-align: center;
}
.stat .v { font-family: 'Cairo'; font-weight: 900; font-size: 1.9rem; color: var(--navy); direction: ltr; }
.stat .v.red { color: var(--red); }
.stat .l { font-size: .8rem; color: var(--mute); margin-top: 6px; line-height: 1.5; }

/* quote / thesis */
.thesis {
  background: var(--navy); color: var(--off); border-radius: 16px;
  box-shadow: 8px 8px 0 var(--red); padding: 34px 36px; margin: 40px 0;
  border: 2px solid var(--ink);
}
.thesis .tt { color: var(--amber); font-family: 'Cairo'; font-weight: 800; font-size: .95rem; letter-spacing: 1.5px; margin-bottom: 12px; }
.thesis p { font-size: 1.25rem; font-weight: 600; line-height: 1.9; }
.thesis p b { color: var(--amber); }

/* bars (CSS chart) */
.bars { margin: 30px 0; }
.bars .row { display: grid; grid-template-columns: 110px 1fr 90px; align-items: center; gap: 14px; margin-bottom: 12px; }
.bars .bl { font-size: .85rem; font-weight: 700; color: var(--mute); }
.bars .track { background: var(--paper-2); border-radius: 6px; height: 30px; position: relative; border: 1.5px solid var(--line); }
.bars .fill { position: absolute; top: 0; right: 0; bottom: 0; border-radius: 5px; }
.bars .bv { font-family: 'Cairo'; font-weight: 800; font-size: .95rem; direction: ltr; text-align: left; }
.bars .note { font-size: .78rem; color: var(--mute-2); margin-top: 8px; }

/* timeline */
.tl { border-right: 3px solid var(--ink); margin: 30px 0; padding-right: 28px; }
.tl .ev { position: relative; margin-bottom: 30px; }
.tl .ev::before {
  content: ""; position: absolute; right: -37px; top: 8px;
  width: 15px; height: 15px; background: var(--red); border: 2.5px solid var(--ink); border-radius: 50%;
}
.tl .ev.gold::before { background: var(--amber); }
.tl .ev .dt { font-family: 'Cairo'; font-weight: 800; color: var(--red); font-size: .9rem; }
.tl .ev h4 { font-size: 1.1rem; font-weight: 800; margin: 4px 0 6px; }
.tl .ev p { font-size: .95rem; color: var(--mute); }

/* verdict table */
.vtable { width: 100%; border-collapse: collapse; margin: 30px 0; font-size: .9rem; }
.vtable th { background: var(--navy); color: #fff; padding: 12px 14px; text-align: right; font-family: 'Cairo'; }
.vtable td { padding: 12px 14px; border-bottom: 1.5px solid var(--line); vertical-align: top; }
.vtable tr:nth-child(even) td { background: #FBF8F2; }
.vtable .verdict { font-weight: 800; white-space: nowrap; }
.vtable .verdict.bad { color: var(--red); }
.vtable .verdict.good { color: var(--ok); }
.vtable .verdict.mix { color: var(--warn); }

/* two-col win/fail */
.wf { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin: 36px 0; }
@media (max-width: 760px) { .wf { grid-template-columns: 1fr; } }
.wf .col { border: 2px solid var(--ink); border-radius: 14px; padding: 24px 26px; box-shadow: 6px 6px 0 var(--shadow); background: #fff; }
.wf .col.win { box-shadow: 6px 6px 0 var(--ok); }
.wf .col.fail { box-shadow: 6px 6px 0 var(--red); }
.wf h3 { margin-top: 0 !important; }
.wf ol { padding-right: 20px; }
.wf li { margin-bottom: 12px; font-size: .95rem; }

/* roadmap stage */
.stage { display: grid; grid-template-columns: 60px 1fr; gap: 18px; margin-bottom: 26px; }
.stage .n {
  width: 52px; height: 52px; background: var(--amber); border: 2px solid var(--ink);
  border-radius: 12px; box-shadow: 4px 4px 0 var(--shadow);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cairo'; font-weight: 900; font-size: 1.3rem;
}
.stage h4 { font-size: 1.15rem; font-weight: 800; margin-bottom: 6px; }
.stage p { font-size: .95rem; color: var(--mute); }
.stage .crit { font-size: .85rem; margin-top: 8px; color: var(--navy); font-weight: 700; background: var(--paper-2); border-radius: 8px; padding: 8px 14px; display: inline-block; }

/* callout */
.callout { border-right: 6px solid var(--amber); background: #FCF8EF; border-radius: 10px; padding: 20px 24px; margin: 28px 0; font-size: .98rem; }
.callout.red { border-color: var(--red); background: #FDF1F1; }
.callout b { font-weight: 800; }

/* sources */
.sources { font-size: .85rem; color: var(--mute); border-top: 2px solid var(--ink); padding-top: 24px; margin-top: 60px; }
.sources h3 { margin-top: 0 !important; }
.sources a { color: var(--navy); }

/* media kit page */
.kit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.kit-item { background: #fff; border: 2px solid var(--ink); border-radius: 12px; box-shadow: 5px 5px 0 var(--shadow); overflow: hidden; }
.kit-item img { width: 100%; display: block; }
.kit-item .ki { padding: 12px 14px; }
.kit-item .ki .sz { font-size: .72rem; color: var(--mute-2); font-weight: 700; direction: ltr; text-align: right; }
.kit-item .ki .nm { font-weight: 700; font-size: .9rem; }

/* misc */
.center { text-align: center; }
img.spot { max-width: 340px; }
::selection { background: var(--amber); color: var(--ink); }

/* ---------- responsive fixes ---------- */
@media (max-width: 1150px) {
  .hero .side-note { display: none; }
}
@media (max-width: 900px) {
  .nav { height: auto; padding: 12px 0; flex-wrap: wrap; gap: 10px; justify-content: center; }
  .nav ul { gap: 18px; order: 3; width: 100%; justify-content: center; flex-wrap: wrap; }
  .hero { padding-top: 40px; }
  .hero h1 { font-size: clamp(2rem, 8.5vw, 3rem); }
  section.block { padding: 56px 0; }
  .art-hero h1 { font-size: clamp(1.7rem, 7vw, 2.4rem); }
  .bars .row { grid-template-columns: 84px 1fr 74px; gap: 8px; }
  .vtable { display: block; overflow-x: auto; }
  footer .cols { grid-template-columns: 1fr; }
}


/* ---------- WordPress specifics ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }
.post-card { background: #fff; border: 2px solid var(--ink); border-radius: 14px; box-shadow: 6px 6px 0 var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease; }
.post-card:hover { transform: translate(-2px,-2px); }
.post-card a { text-decoration: none; color: var(--ink); }
.post-card .thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--paper-2); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .pc-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.post-card .pc-cat { color: var(--red); font-family: 'Cairo'; font-weight: 800; font-size: .78rem; }
.post-card h3 { font-size: 1.12rem; font-weight: 800; line-height: 1.5; margin: 6px 0 8px; }
.post-card p { color: var(--mute); font-size: .88rem; flex: 1; }
.post-card .pc-date { font-size: .75rem; color: var(--mute-2); margin-top: 12px; }
article.body img { max-width: 100%; height: auto; border-radius: 12px; }
article.body figure { margin: 26px 0; }
article.body video { max-width: 100%; border-radius: 12px; border: 2px solid var(--ink); }
article.body ul, article.body ol { padding-right: 24px; margin-bottom: 22px; }
article.body li { margin-bottom: 8px; }
article.body blockquote { border-right: 5px solid var(--amber); padding: 14px 22px; background: #FCF8EF; border-radius: 10px; margin: 24px 0; }
.pagination { display: flex; gap: 10px; justify-content: center; margin: 40px 0; font-family: 'Cairo'; font-weight: 800; }
.pagination .page-numbers { padding: 8px 16px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; color: var(--ink); text-decoration: none; }
.pagination .page-numbers.current { background: var(--red); color: #fff; }
.cat-hero { padding: 56px 0 34px; }
.cat-hero h1 { font-size: clamp(2rem,4.5vw,3.2rem); font-weight: 900; }
.cat-hero p { color: var(--mute); max-width: 640px; margin-top: 10px; }
.wp-video, .wp-video video { max-width: 100% !important; }
.screen-reader-text { position: absolute; clip: rect(0,0,0,0); }
