/* AI Gossips brand + Arabic/RTL layer for casper-aigossips.
   Loaded after built/screen.css; only applies direction-safe overrides. */

:root {
  --aig-ink: #1a1a1a;
  --aig-intelligence: #4A2535;
  --aig-intelligence-tint: #6E3A4F;
  --aig-talent: #D4860B;
  --aig-talent-tint: #E8A23A;
  --aig-agenda: #1A3D7C;
  --aig-agenda-tint: #3A5FA8;
  --ghost-accent-color: var(--aig-ink);
}

html[dir="rtl"] body {
  font-family: "Cairo", "Noto Sans Arabic", -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  letter-spacing: 0;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6,
html[dir="rtl"] .site-title,
html[dir="rtl"] .post-card-title,
html[dir="rtl"] .article-title {
  font-family: "Cairo", "Noto Sans Arabic", -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  letter-spacing: 0;
}

/* Latin-heavy UI metadata keeps LTR flow inside the RTL page */
html[dir="rtl"] pre,
html[dir="rtl"] code,
html[dir="rtl"] kbd,
html[dir="rtl"] .kg-bookmark-metadata,
html[dir="rtl"] .gh-post-upgrade-cta {
  direction: ltr;
}

html[dir="rtl"] .post-card-meta-date,
html[dir="rtl"] .byline-meta-date {
  unicode-bidi: plaintext;
}

/* Keep the burger/search icons usable when flexbox flips */
html[dir="rtl"] .gh-head-brand,
html[dir="rtl"] .gh-head-menu,
html[dir="rtl"] .gh-head-actions {
  direction: rtl;
}

/* Brand: flat corners like the liebling-aigossips design language */
html[dir="rtl"] .post-card-image,
html[dir="rtl"] .gh-head-button,
html[dir="rtl"] .gh-portal-btn {
  border-radius: 0;
}

html[dir="rtl"] .gh-head-button {
  background: var(--aig-ink);
  color: #fff;
}

/* Logo sizing consistent with the live theme header */
html[dir="rtl"] .gh-head-logo img {
  max-height: 34px;
  width: auto;
}

/* Brand hero: solid black, white logo, clean description — replaces the
   publication cover image which had the logo baked in (overlap bug). */
.site-header-content.aig-hero {
  background: #000;
  color: #fff;
  min-height: unset;
  padding-top: 10vmin;
  padding-bottom: 10vmin;
  text-align: center;
}
.aig-hero .aig-hero-logo {
  max-height: 140px;
  max-width: min(80vw, 560px);
  width: auto;
  margin: 0 auto;
}
.aig-hero .site-description {
  color: rgba(255, 255, 255, 0.88);
  text-shadow: none;
  font-size: 1.9rem;
  line-height: 1.6;
  max-width: 640px;
  margin: 2.4rem auto 0;
}
@media (max-width: 600px) {
  .aig-hero .aig-hero-logo { max-height: 90px; }
  .aig-hero .site-description { font-size: 1.7rem; padding: 0 4vmin; }
}
/* Header nav sits over the hero on has-cover: keep it readable on black */
.has-cover .gh-head { background: #000; }

/* News-agency card: explicit read-full-article link after the excerpt */
.aig-read-more {
  display: inline-block;
  margin-top: 10px;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--aig-ink);
  border-bottom: 2px solid currentColor;
}
.post-card-content-link:hover .aig-read-more {
  opacity: 0.7;
}

/* Edition wayfinding (Mother DNA §03 / Branch DNA §02): accent per section
   on card tags, read-more links, and article-page primary tags. */
.post-card.tag-intelligence .post-card-primary-tag,
.article.tag-intelligence .article-tag a,
.post-card.tag-intelligence .aig-read-more { color: var(--aig-intelligence); }
.post-card.tag-talent .post-card-primary-tag,
.article.tag-talent .article-tag a,
.post-card.tag-talent .aig-read-more { color: var(--aig-talent); }
.post-card.tag-agenda .post-card-primary-tag,
.article.tag-agenda .article-tag a,
.post-card.tag-agenda .aig-read-more { color: var(--aig-agenda); }

/* Publication wayfinding v2: unmistakable accent badges independent of imagery */
.article-tag .post-card-primary-tag a,
.post-card .post-card-primary-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 2px;
  color: #fff !important;
  background: var(--aig-ink);
  font-weight: 700;
  letter-spacing: 0;
}
.article.tag-intelligence .article-tag .post-card-primary-tag a,
.post-card.tag-intelligence .post-card-primary-tag { background: var(--aig-intelligence); }
.article.tag-talent .article-tag .post-card-primary-tag a,
.post-card.tag-talent .post-card-primary-tag { background: var(--aig-talent); }
.article.tag-agenda .article-tag .post-card-primary-tag a,
.post-card.tag-agenda .post-card-primary-tag { background: var(--aig-agenda); }

/* Accent spine on every card: publication readable at a glance in any grid */
.post-card { border-top: 3px solid transparent; padding-top: 12px; }
.post-card.tag-intelligence { border-top-color: var(--aig-intelligence); }
.post-card.tag-talent { border-top-color: var(--aig-talent); }
.post-card.tag-agenda { border-top-color: var(--aig-agenda); }

/* Same-publication recommendations heading */
.aig-read-more-heading {
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0 0 12px;
}
.read-more-wrap { border-top: 1px solid #eaeaea; padding-top: 32px; }

/* Press-image credit: small, quiet, under the hero — newspaper style */
.article-image figcaption,
.gh-canvas figcaption {
  font-size: 1.25rem;
  color: #9a9a9a;
  text-align: left;
  direction: ltr;
  padding-top: 6px;
}

/* ---------- Landing page: three-edition gateway ---------- */
.aig-editions { padding: 6vmin 4vmin 2vmin; }
.aig-editions-title {
  text-align: center; font-size: 2.6rem; font-weight: 700; margin: 0 0 28px;
  color: var(--aig-ink);
}
.aig-editions-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  max-width: 1200px; margin: 0 auto;
}
@media (max-width: 900px) { .aig-editions-grid { grid-template-columns: 1fr; } }
.aig-edition-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 36px 28px 30px; color: #fff; text-decoration: none;
  min-height: 240px; position: relative; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.aig-edition-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(0,0,0,.22); color:#fff; }
.aig-ed-intelligence { background: linear-gradient(135deg, var(--aig-intelligence), #17090F); }
.aig-ed-talent { background: linear-gradient(135deg, var(--aig-talent), #2A1A02); }
.aig-ed-agenda { background: linear-gradient(135deg, var(--aig-agenda), #060D1C); }
.aig-edition-wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem; letter-spacing: 4px; opacity: .75; direction: ltr; text-align: right;
}
.aig-edition-name { font-size: 3.4rem; font-weight: 800; line-height: 1.1; }
.aig-edition-promise { font-size: 1.55rem; line-height: 1.7; opacity: .92; flex-grow: 1; }
.aig-edition-cta { font-weight: 700; font-size: 1.5rem; border-bottom: 2px solid rgba(255,255,255,.6); align-self: flex-start; padding-bottom: 2px; }

/* Landing per-edition feed rows */
.aig-home-section { padding: 2vmin 4vmin; }
.aig-home-section .inner { max-width: 1200px; }
.aig-home-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-right: 6px solid var(--aig-ink); padding-right: 14px; margin: 26px 0 18px;
}
.aig-home-section-head h2 { margin: 0; font-size: 2.4rem; }
.aig-home-section-head h2 a { color: var(--aig-ink); }
.aig-home-section-head .aig-en {
  font-family: Georgia, serif; font-size: 1.2rem; letter-spacing: 3px;
  color: #9a9a9a; margin-right: 10px;
}
.aig-head-intelligence { border-right-color: var(--aig-intelligence); }
.aig-head-talent { border-right-color: var(--aig-talent); }
.aig-head-agenda { border-right-color: var(--aig-agenda); }
.aig-see-all { font-weight: 700; font-size: 1.4rem; color: var(--aig-ink); }
.aig-home-section .post-feed { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .aig-home-section .post-feed { grid-template-columns: 1fr; } }

/* Read-more heading: publication name selected by article tag class (no template scope issues) */
.aig-read-more-heading span { display: none; }
.tag-intelligence ~ * .aig-rm-intelligence { display: inline; }
.aig-rm-intelligence, .aig-rm-talent, .aig-rm-agenda { display: none; }
body:has(.article.tag-intelligence) .aig-rm-intelligence { display: inline; color: var(--aig-intelligence); }
body:has(.article.tag-talent) .aig-rm-talent { display: inline; color: var(--aig-talent); }
body:has(.article.tag-agenda) .aig-rm-agenda { display: inline; color: var(--aig-agenda); }

/* A11y + hero kicker (evals pass, 2026-07-06) */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.aig-skip {
  position: absolute; top: -48px; right: 12px; z-index: 9999;
  background: var(--aig-ink); color: #fff; padding: 8px 16px; font-weight: 700;
  transition: top .15s ease;
}
.aig-skip:focus { top: 8px; color: #fff; }
.aig-hero-kicker {
  color: rgba(255,255,255,.65); font-size: 1.45rem; margin: 1.4rem auto 0;
  letter-spacing: 0;
}

/* Op8: Talent type badges (outlined chip, distinct from edition accent chip) */
.post-card .aig-type-badge { display: none; }
.post-card.tag-type-job .post-card-tags::after,
.post-card.tag-type-freelance .post-card-tags::after,
.post-card.tag-type-course .post-card-tags::after,
.post-card.tag-type-report .post-card-tags::after,
.post-card.tag-type-analysis .post-card-tags::after {
  display: inline-block; margin-right: 8px; padding: 2px 10px;
  border: 1.5px solid var(--aig-talent); color: var(--aig-talent);
  border-radius: 2px; font-size: 1.15rem; font-weight: 700;
}
.post-card.tag-type-job .post-card-tags::after { content: "وظيفة"; }
.post-card.tag-type-freelance .post-card-tags::after { content: "عمل حر"; }
.post-card.tag-type-course .post-card-tags::after { content: "دورة"; }
.post-card.tag-type-report .post-card-tags::after { content: "تقرير"; }
.post-card.tag-type-analysis .post-card-tags::after { content: "تحليل سوق"; }

/* Filter chip bar on /talent/ */
.aig-filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 8px; }
.aig-chip {
  padding: 6px 18px; border: 1.5px solid var(--aig-ink); border-radius: 2px;
  color: var(--aig-ink); font-weight: 700; font-size: 1.35rem;
}
.aig-chip:hover, .aig-chip-active { background: var(--aig-talent); border-color: var(--aig-talent); color: #fff; }

/* Op7: Gamma-embed issue page */
.aig-issue-embed { margin: 24px 0; }
.aig-issue-embed iframe { min-height: 560px; }
.aig-issue-open {
  display: inline-block; padding: 10px 24px; background: var(--aig-ink);
  color: #fff !important; font-weight: 700; border-radius: 2px;
}
