/* ══════════════════════════════════════════════════════════
   Shatt Al-Arab theme layer — loaded after styles/index.css
   Palette: river navy · teal · palm green · date brown · sunset gold
   Works in both directions (Arabic RTL / English LTR)
   ══════════════════════════════════════════════════════════ */

:root {
  --sa-navy:   #0E2A3A;
  --sa-teal:   #1D6A6B;
  --sa-palm:   #3B5E37;
  --sa-date:   #8A5A23;
  --sa-gold:   #E0A458;
  --sa-gold-d: #C98B3E;
  --sa-mist:   #CFE0E3;
  --sa-mist-2: #A9C4C9;
  --sa-bg:     #F3F6F5;
  --sa-line:   #DCE6E4;
  --sa-ink:    #12232E;
  --sa-muted:  #4A5D66;
  --sa-radius: 14px;
  --sa-display: 'Reem Kufi', 'Readex Pro', sans-serif;
  --sa-body:    'Readex Pro', 'Segoe UI', Tahoma, sans-serif;
}

/* ── Base ── */
body {
  font-family: var(--sa-body) !important;
  color: var(--sa-ink);
  background: var(--sa-bg);
}
h1, h2, h3, h4 { color: var(--sa-navy); }
a { color: var(--sa-teal); }
a:hover { color: var(--sa-navy); }
.page-content { background: transparent; }

.btn-primary {
  background: var(--sa-teal) !important;
  border-color: var(--sa-teal) !important;
  border-radius: 999px !important;
}
.btn-primary:hover {
  background: var(--sa-navy) !important;
  border-color: var(--sa-navy) !important;
}

/* ── Announcement bar ── */
.ijici-announce {
  background: #081C27 !important;
  color: var(--sa-mist) !important;
  font-size: 13px;
  text-align: center;
  padding: 8px 16px;
}
.ijici-announce a { color: var(--sa-gold) !important; }

/* ── Header & navigation ── */
.main-header {
  background: var(--sa-navy) !important;
  border-bottom: 3px solid var(--sa-gold);
}
.navbar-logo-text {
  font-family: var(--sa-display);
  font-weight: 700;
  color: #fff !important;
}
.navbar-logo a:hover .navbar-logo-text,
.navbar-logo-text:hover { color: var(--sa-gold) !important; }
.main-header .nav-link {
  color: var(--sa-mist) !important;
  font-weight: 500;
}
.main-header .nav-link:hover,
.main-header .nav-link:focus,
.main-header .active > .nav-link { color: #fff !important; }
.main-header .dropdown-menu {
  border: 1px solid var(--sa-line);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(14,42,58,.15);
  text-align: start;
}
.main-header .dropdown-item { color: var(--sa-ink); }
.main-header .dropdown-item:hover { background: var(--sa-bg); color: var(--sa-teal); }
.navbar-toggler { border-color: rgba(255,255,255,.4) !important; }
.navbar-toggler-icon { filter: invert(1); }

/* ── Shared pieces ── */
.sa-btn {
  display: inline-block;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 30px;
  border-radius: 999px;
  text-decoration: none !important;
  border: 1.5px solid transparent;
  transition: background .15s, color .15s;
  text-align: center;
}
.sa-btn-gold  { background: var(--sa-gold); color: var(--sa-navy) !important; }
.sa-btn-gold:hover { background: var(--sa-gold-d); }
.sa-btn-ghost { border-color: rgba(255,255,255,.6); color: #fff !important; }
.sa-btn-ghost:hover { background: rgba(255,255,255,.1); }
.sa-btn-navy  { background: var(--sa-navy); color: #fff !important; }
.sa-btn-navy:hover { background: var(--sa-teal); }
.sa-btn-block { display: block; }
.sa-h2 {
  font-family: var(--sa-display);
  font-size: 26px;
  color: var(--sa-navy);
  margin: 0 0 18px;
}
.sa-eyebrow { font-size: 13px; font-weight: 600; color: var(--sa-teal); }
.sa-link { font-size: 14px; font-weight: 500; text-align: center; }

/* ── Hero ── */
.sa-hero {
  background: var(--sa-navy);
  color: #fff;
  overflow: hidden;
}
.sa-hero-inner {
  text-align: center;
  padding-top: 64px;
}
.sa-pill {
  display: inline-block;
  font-size: 13px;
  color: var(--sa-gold);
  border: 1px solid rgba(224,164,88,.5);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.sa-hero-title {
  font-family: var(--sa-display);
  font-weight: 700;
  font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1.4;
  color: #fff !important;
  max-width: 920px;
  margin: 0 auto 16px;
}
.sa-hero-desc {
  font-size: 17px;
  line-height: 1.9;
  font-weight: 300;
  color: var(--sa-mist);
  max-width: 680px;
  margin: 0 auto 28px;
}
.sa-hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 22px;
}
.sa-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: center;
  font-size: 13px;
  color: var(--sa-mist-2);
}
.sa-hero-meta b { color: var(--sa-gold); font-weight: 600; }
.sa-hero-art {
  display: block;
  width: 100%;
  height: 200px;
  margin-top: 8px;
}
.sa-sun   { fill: var(--sa-gold); opacity: .9; }
.sa-bridge line { stroke: var(--sa-mist-2); stroke-width: 2; opacity: .75; }
.sa-bridge .sa-deck { stroke-width: 5; }
.sa-wave1 { fill: var(--sa-teal); }
.sa-wave2 { fill: var(--sa-bg); }

/* ── Stats ── */
.sa-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  padding-top: 8px;
  padding-bottom: 40px;
}
.sa-stat {
  background: #fff;
  border: 1px solid var(--sa-line);
  border-radius: var(--sa-radius);
  padding: 20px 22px;
}
.sa-stat-val {
  font-family: var(--sa-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--sa-teal);
  line-height: 1.2;
}
.sa-stat-lbl { font-size: 14px; color: var(--sa-muted); }

/* ── Fields of publication ── */
.sa-fields { padding-bottom: 48px; }
.sa-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.sa-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px;
  border-radius: var(--sa-radius);
  color: #fff !important;
  text-decoration: none !important;
  transition: transform .15s, box-shadow .15s;
}
.sa-field:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(14,42,58,.18); }
.sa-field-1 { background: var(--sa-navy); }
.sa-field-2 { background: var(--sa-teal); }
.sa-field-3 { background: var(--sa-palm); }
.sa-field-4 { background: var(--sa-date); }
.sa-field-name { font-family: var(--sa-display); font-size: 20px; }
.sa-field-sub  { font-size: 13px; opacity: .85; }

/* ── Announcements ── */
.sa-announcements { padding-bottom: 48px; }
.sa-announce-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.sa-announce {
  background: #fff;
  border: 1px solid var(--sa-line);
  border-radius: var(--sa-radius);
  padding: 22px;
}
.sa-announce-date { color: var(--sa-muted); }
.sa-announce-title { font-size: 17px; margin: 6px 0 8px; }
.sa-announce-title a { color: var(--sa-navy); text-decoration: none; }
.sa-announce-text { font-size: 14px; color: var(--sa-muted); line-height: 1.8; }

/* ── Current issue ── */
.sa-issue {
  background: #fff;
  border-top: 1px solid var(--sa-line);
  border-bottom: 1px solid var(--sa-line);
}
.sa-issue-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding-top: 52px;
  padding-bottom: 52px;
}
.sa-issue-side {
  flex: 1 1 240px;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sa-issue-series {
  font-family: var(--sa-display);
  font-size: 26px;
  color: var(--sa-navy);
  line-height: 1.4;
}
.sa-issue-date { font-size: 14px; color: var(--sa-muted); }
.sa-issue-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 4;
  border-radius: var(--sa-radius);
  background: #E4EDEB;
  overflow: hidden;
  color: var(--sa-muted);
  text-decoration: none !important;
  box-shadow: 0 8px 24px rgba(14,42,58,.12);
}
.sa-issue-cover img { width: 100%; height: 100%; object-fit: cover; }
.sa-issue-main { flex: 999 1 560px; min-width: 0; }

/* Issue table of contents as a card grid (homepage and issue pages) */
.issue-toc-section {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.issue-toc-section:empty { display: none; }
.issue-toc-section-title {
  grid-column: 1 / -1;
  font-family: var(--sa-display);
  font-size: 18px !important;
  color: var(--sa-teal) !important;
  margin: 8px 0 0 !important;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--sa-line);
}

/* ── Article cards ── */
.article-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--sa-line);
  border-radius: var(--sa-radius);
  padding: 20px 22px;
  margin: 0 !important;
  transition: box-shadow .15s, border-color .15s;
}
.article-summary:hover {
  border-color: var(--sa-mist-2);
  box-shadow: 0 8px 22px rgba(14,42,58,.08);
}
.article-summary .row { margin: 0; }
.article-summary .row > [class*="col"] { padding: 0; }

/* Arabic and English titles each take their own direction */
.article-summary-title,
.article-summary-authors {
  unicode-bidi: plaintext;
  text-align: start;
}
.article-summary-title a {
  color: var(--sa-ink) !important;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
  text-decoration: none !important;
}
.article-summary-title a:hover { color: var(--sa-teal) !important; }
.article-summary-authors { font-size: 13px; color: var(--sa-muted); order: 2; }
.article-summary-title { order: 1; }
.article-summary-pages { font-size: 12px; color: var(--sa-muted); text-align: end !important; }
.article-summary-date  { font-size: 12px; color: var(--sa-muted); order: 3; }
.article-summary-doi   { order: 4; font-size: 12px; overflow-wrap: anywhere; }
.article-summary-doi a { color: var(--sa-muted); }
.article-summary-galleys {
  order: 5;
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.article-summary-galleys .btn {
  background: #E6F0EE !important;
  color: var(--sa-teal) !important;
  border: none !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 5px 14px !important;
  border-radius: 999px !important;
}
.article-summary-galleys .btn:hover {
  background: var(--sa-teal) !important;
  color: #fff !important;
}

/* ── Call to submit ── */
.sa-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 48px;
  padding-bottom: 48px;
}
.sa-cta {
  flex: 2 1 420px;
  background: var(--sa-teal);
  color: #fff;
  border-radius: 18px;
  padding: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}
.sa-cta-text { max-width: 480px; }
.sa-cta-title {
  font-family: var(--sa-display);
  font-size: 24px;
  color: #fff !important;
  margin: 0 0 6px;
}
.sa-cta p { margin: 0; color: #D7ECEA; line-height: 1.8; }
.sa-quicklinks {
  flex: 1 1 260px;
  background: #fff;
  border: 1px solid var(--sa-line);
  border-radius: 18px;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sa-quicklinks-title {
  font-family: var(--sa-display);
  font-size: 18px;
  margin: 0 0 4px;
}
.sa-additional { padding-bottom: 48px; }

/* ── Footer ── */
.site-footer.sa-footer {
  background: var(--sa-navy) !important;
  color: var(--sa-mist-2);
  border-top: 3px solid var(--sa-gold);
  padding: 0 !important;
  margin: 0 !important;
}
.sa-footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  justify-content: space-between;
  padding-top: 44px;
  padding-bottom: 28px;
  font-size: 14px;
  line-height: 1.9;
}
.sa-footer-col { flex: 1 1 180px; display: flex; flex-direction: column; }
.sa-footer-about { flex: 2 1 320px; }
.sa-footer-name {
  font-family: var(--sa-display);
  font-size: 19px;
  color: #fff;
  margin-bottom: 4px;
}
.sa-footer-head { color: #fff; font-weight: 500; margin-bottom: 4px; }
.sa-footer a { color: var(--sa-mist-2) !important; text-decoration: none; }
.sa-footer a:hover { color: #fff !important; }
.sa-footer p { margin: 0; }
.sa-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 16px;
  padding-bottom: 20px;
  font-size: 12px;
}
.sa-footer .footer-brand-image { max-height: 32px; opacity: .6; }

/* ── Phones ── */
@media (max-width: 575px) {
  .sa-hero-inner { padding-top: 44px; }
  .sa-hero-art { height: 120px; }
  .sa-issue-side { max-width: none; }
  .issue-toc-section { grid-template-columns: 1fr; }
  .sa-cta { padding: 26px; }
}

/* ── Header title: keep clear of the language switcher and user menu (both directions) ── */
@media (min-width: 992px) {
  .main-header .navbar-logo { justify-content: center; text-align: center; padding: 0 190px; }
  .main-header .navbar-logo-text { display: block; white-space: normal; line-height: 1.4; }
}

/* ══ Footer sidebar blocks (OJS blocks shown in the footer) ══
   Clean columns instead of boxes; empty blocks hidden; feed badges as chips */
.site-footer-sidebar { padding-top: 40px; padding-bottom: 8px; }
.site-footer-sidebar > .row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  margin: 0;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.site-footer-sidebar .pkp_block {
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  max-width: none !important;
  text-align: start;
}
.site-footer-sidebar .pkp_block .title {
  font-family: var(--sa-body);
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #fff !important;
  margin: 0 0 14px !important;
  padding: 0 0 10px !important;
  border: none !important;
  position: relative;
}
.site-footer-sidebar .pkp_block .title::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 28px;
  height: 2px;
  background: var(--sa-gold);
}
.site-footer-sidebar .pkp_block ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer-sidebar .pkp_block ul li {
  border: none !important;
  padding: 4px 0 !important;
}
.site-footer-sidebar .pkp_block a {
  color: var(--sa-mist-2) !important;
  font-size: 14px;
  text-decoration: none !important;
  transition: color .15s;
}
.site-footer-sidebar .pkp_block a:hover { color: #fff !important; }

/* Empty "Browse" block */
.site-footer-sidebar .pkp_block:not(:has(li)):not(.block_make_submission):not(.block_custom) { display: none; }

/* Language block: current language marked */
.site-footer-sidebar .block_language li.current a { color: var(--sa-gold) !important; }

/* Web feeds: replace the old image badges with small chips */
.site-footer-sidebar .block_web_feed ul { display: flex; flex-wrap: wrap; gap: 8px; }
.site-footer-sidebar .block_web_feed li { padding: 0 !important; }
.site-footer-sidebar .block_web_feed img { display: none; }
.site-footer-sidebar .block_web_feed a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  direction: ltr;
  font-size: 12px !important;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2);
}
.site-footer-sidebar .block_web_feed a::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--sa-gold);
}
.site-footer-sidebar .block_web_feed a:hover { border-color: var(--sa-gold); }
.site-footer-sidebar .block_web_feed a[href$="/atom"]::after { content: "Atom"; }
.site-footer-sidebar .block_web_feed a[href$="/rss2"]::after { content: "RSS 2.0"; }
.site-footer-sidebar .block_web_feed a[href$="/rss"]::after  { content: "RSS 1.0"; }

/* "Make a submission" block as a button */
.site-footer-sidebar .block_make_submission { align-self: center; }
.site-footer-sidebar a.block_make_submission_link {
  display: inline-block;
  background: var(--sa-gold);
  color: var(--sa-navy) !important;
  font-weight: 600;
  font-size: 14px;
  padding: 11px 24px;
  border-radius: 999px;
}
.site-footer-sidebar a.block_make_submission_link:hover {
  background: var(--sa-gold-d);
  color: var(--sa-navy) !important;
}

/* Screen-reader-only headings must stay hidden */
.pkp_screen_reader {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sa-cta-text { flex: 1 1 280px; }
