/*
Theme Name: Jood Al Iraq
Theme URI: https://joodiraq.com
Author: Jood Al Iraq Scientific Bureau
Description: Bilingual (Arabic / English) theme for Jood Al Iraq Scientific Bureau, built on the Jood Al Iraq brand guidelines.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: jood
*/

:root {
  --jood-deep: #006956;
  --jood-leaf: #00A43C;
  --jood-mint: #5FD38A;
  --ground: #023E33;
  --ink: #0D2B25;
  --ink-muted: #4A625C;
  --mist: #EEF5F1;
  --line: #D3E3DB;
  --on-dark: #CFE3DC;
  --white: #FFFFFF;
  --font-display: 'Readex Pro', Tahoma, sans-serif;
  --font-body: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.8; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--jood-deep); }
a:hover { color: var(--ground); }
h1, h2, h3 { font-family: var(--font-display); margin: 0; line-height: 1.3; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--jood-leaf); outline-offset: 2px; }

.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 24px; }
.section { padding-block: 96px; }
.bg-mist { background: var(--mist); }
.bg-ground { background: var(--ground); color: var(--white); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.head { display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin-bottom: 44px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--jood-deep); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 10px; height: 22px; border-radius: 999px; background: linear-gradient(var(--jood-leaf) 0 46%, transparent 46% 54%, var(--jood-deep) 54%); transform: rotate(15deg); }
[dir="rtl"] .eyebrow::before { transform: rotate(-15deg); }
.bg-ground .eyebrow, .hero .eyebrow { color: var(--jood-mint); }
.bg-ground .eyebrow::before, .hero .eyebrow::before { background: linear-gradient(var(--jood-mint) 0 46%, transparent 46% 54%, var(--white) 54%); }
.h2 { font-size: 38px; font-weight: 700; color: var(--jood-deep); }
.bg-ground .h2 { color: var(--white); }
.lead { font-size: 18px; line-height: 1.85; }
.muted { color: var(--ink-muted); }
.bg-ground .muted, .bg-ground .lead { color: var(--on-dark); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 1.2; padding: 14px 28px; border-radius: 999px; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background .15s, color .15s; }
.btn-primary { background: var(--jood-deep); color: var(--white); }
.btn-primary:hover { background: var(--ground); color: var(--white); }
.btn-leaf { background: var(--jood-leaf); color: var(--white); }
.btn-leaf:hover { background: var(--jood-deep); color: var(--white); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.7); }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: var(--white); }
.btn-white { background: var(--white); color: var(--jood-deep); }
.btn-white:hover { background: var(--mist); color: var(--ground); }
.link-arrow { font-weight: 600; text-decoration: none; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.admin-bar .site-header { top: 32px; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 12px; }
.brand img { height: 52px; width: auto; }
.nav { display: flex; gap: 32px; font-size: 16px; font-weight: 500; }
.nav a { color: var(--ink); text-decoration: none; padding-bottom: 4px; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--jood-deep); }
.nav a.current { color: var(--jood-deep); font-weight: 600; border-bottom-color: var(--jood-leaf); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.lang-switch { font-size: 14px; font-weight: 600; color: var(--ink-muted); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
.header-actions .btn { padding: 11px 22px; font-size: 15px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--ground); color: var(--white); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(to left, rgba(2,62,51,.94) 0%, rgba(2,62,51,.82) 38%, rgba(2,62,51,.15) 75%, rgba(2,62,51,0) 100%); }
[dir="ltr"] .hero-shade { background: linear-gradient(to right, rgba(2,62,51,.94) 0%, rgba(2,62,51,.82) 38%, rgba(2,62,51,.15) 75%, rgba(2,62,51,0) 100%); }
[dir="ltr"] .hero-img { object-position: 70% 50%; transform: scaleX(-1); }
.hero .wrap { position: relative; padding-block: 120px 130px; }
.hero-copy { max-width: 600px; display: flex; flex-direction: column; gap: 22px; }
.hero h1 { font-size: 56px; font-weight: 700; line-height: 1.2; }
.hero p { font-size: 19px; line-height: 1.8; color: #DCEBE5; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 8px; }

.page-hero { position: relative; overflow: hidden; }
.page-hero h1 { font-size: 46px; font-weight: 700; line-height: 1.25; }
.capsule-deco { position: absolute; inset-inline-end: 80px; top: -60px; width: 130px; height: 320px; border-radius: 999px; background: linear-gradient(var(--jood-mint) 0 46%, transparent 46% 52%, rgba(255,255,255,.12) 52%); transform: rotate(-15deg); pointer-events: none; }
[dir="ltr"] .capsule-deco { transform: rotate(15deg); }

/* Partners strip */
.partners { border-bottom: 1px solid var(--line); }
.partners .wrap { padding-block: 36px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.partners-title { font-size: 15px; font-weight: 600; color: var(--ink-muted); text-align: center; }
.logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 36px; }
.logos img { height: 48px; width: auto; }

/* Split rows */
.split { display: flex; gap: 64px; align-items: center; }
.split > * { flex: 1 1 0; min-width: 0; }
.photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.photo-wrap { position: relative; }
.photo-wrap::after { content: ""; position: absolute; inset-inline-end: -18px; bottom: -22px; width: 40px; height: 92px; border-radius: 999px; background: linear-gradient(var(--jood-leaf) 0 46%, var(--white) 46% 52%, var(--jood-deep) 52%); transform: rotate(-15deg); }
[dir="ltr"] .photo-wrap::after { transform: rotate(15deg); }

.band { display: flex; align-items: stretch; }
.band > div { flex: 1 1 0; min-width: 0; }
.band-text { padding-block: 90px; padding-inline-end: 56px; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.band-img { position: relative; min-height: 460px; }
.band-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Cards and grids */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.card h3 { font-size: 21px; font-weight: 600; }
.card p { font-size: 16px; line-height: 1.75; color: var(--ink-muted); }
.card .num { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--jood-leaf); line-height: 1; }
.card-deep { background: var(--jood-deep); border-color: var(--jood-deep); color: var(--white); }
.card-deep p { color: var(--on-dark); }
.card-deep .num { color: var(--jood-mint); }
.card ul { margin: 0; padding-inline-start: 20px; font-size: 15px; line-height: 1.9; }
.card-lg { padding: 32px; border-radius: var(--radius); }
.card-lg h3 { font-size: 23px; }
.tag { font-size: 13px; font-weight: 700; color: var(--jood-leaf); }
.card-deep .tag { color: var(--jood-mint); }

.pillar { border-top: 2px solid var(--jood-deep); padding-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.pillar svg { width: 36px; height: 36px; }
.pillar h3 { font-size: 21px; font-weight: 600; }
.pillar p { font-size: 16px; line-height: 1.75; color: var(--ink-muted); }
.bg-ground .pillar { border-top-color: var(--jood-mint); }
.bg-ground .pillar p { color: var(--on-dark); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { border: 1px solid #2E6A5D; border-radius: 999px; padding: 6px 14px; font-size: 14px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step .dot { width: 44px; height: 44px; border-radius: 999px; background: var(--jood-deep); color: var(--white); font-family: var(--font-display); font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step h3 { font-family: var(--font-body); font-size: 19px; font-weight: 600; }
.step p { font-size: 16px; line-height: 1.75; color: var(--ink-muted); margin-top: 6px; }

.list-rows { display: flex; flex-direction: column; gap: 14px; font-size: 17px; line-height: 1.8; }
.list-rows > div { border-top: 1px solid var(--line); padding-top: 12px; }

.dept { background: var(--mist); border-radius: 14px; padding: 22px; }
.dept h3 { font-family: var(--font-body); font-size: 18px; font-weight: 600; }
.dept p { font-size: 15px; line-height: 1.7; color: var(--ink-muted); margin-top: 6px; }
.dept-deep { background: var(--jood-deep); color: var(--white); }
.dept-deep p { color: var(--on-dark); }

/* CTA */
.cta { padding-block: 0 100px; }
.cta-box { position: relative; overflow: hidden; background: var(--jood-deep); color: var(--white); border-radius: 24px; padding: 64px 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.cta-box h2 { font-size: 34px; font-weight: 700; }
.cta-box p { font-size: 18px; color: #DCEBE5; margin-top: 12px; }
.cta-box > * { position: relative; }
.cta-box .capsule-deco { inset-inline-end: auto; inset-inline-start: 40px; top: -40px; height: 300px; width: 120px; }

/* Contact */
.contact-grid { display: flex; gap: 48px; align-items: flex-start; }
.contact-form { flex: 3 1 0; min-width: 0; border: 1px solid var(--line); border-radius: 20px; padding: 36px; display: flex; flex-direction: column; gap: 18px; }
.contact-side { flex: 2 1 0; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea { font-family: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); width: 100%; }
.fields-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.hp { position: absolute; inset-inline-start: -9999px; }
.notice { background: var(--mist); border-radius: 10px; padding: 12px 16px; font-weight: 600; color: var(--jood-deep); }
.notice-error { color: #B3261E; }
.info-box { background: var(--mist); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.info-row { display: flex; gap: 14px; align-items: flex-start; }
.info-row svg { width: 26px; height: 26px; flex-shrink: 0; }
.info-row .k { font-size: 14px; font-weight: 600; color: var(--jood-deep); }
.map-box { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); min-height: 240px; }
.map-box iframe { width: 100%; height: 280px; border: 0; display: block; }

/* Footer */
.site-footer { background: var(--ink); color: var(--on-dark); font-size: 15px; }
.site-footer .wrap { padding-block: 64px 28px; display: flex; flex-direction: column; gap: 40px; }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr 1fr; gap: 36px; }
.footer-cols h4 { margin: 0 0 10px; font-size: 15px; font-weight: 600; color: var(--white); }
.footer-cols a { color: var(--on-dark); text-decoration: none; display: block; margin-bottom: 6px; }
.footer-cols a:hover { color: var(--white); }
.footer-logo img { height: 64px; width: auto; margin-bottom: 14px; }
.footer-bottom { border-top: 1px solid #23443B; padding-top: 20px; font-size: 13px; color: #A3BDB4; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer-bottom a { color: #A3BDB4; text-decoration: none; }
.footer-bottom a:hover { color: #fff; }
.form-consent { margin: 0; font-size: 13px; color: var(--ink-muted); }
.form-consent a { color: var(--jood-deep); }

/* Legal page */
.legal { max-width: 820px; }
.legal-date { font-size: 14px; font-weight: 500; color: var(--ink-muted); margin: 0 0 8px; }
.legal h2 { font-size: 24px; font-weight: 700; color: var(--jood-deep); margin: 44px 0 12px; }
.legal p, .legal li { font-size: 16.5px; line-height: 1.9; }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 14px; padding-inline-start: 22px; }
.legal li { margin-bottom: 6px; }
.legal li::marker { color: var(--jood-leaf); }
.legal a { color: var(--jood-deep); }
.legal-contact { margin-top: 48px; }
.legal-contact h3 { font-size: 18px; color: var(--jood-deep); margin-bottom: 10px; }
.legal-contact p { margin: 0; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* Responsive */
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; top: 100%; inset-inline: 0; background: var(--white); flex-direction: column; gap: 0; border-bottom: 1px solid var(--line); padding: 8px 24px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .header-actions .btn { display: none; }
  .hero h1 { font-size: 38px; }
  .hero .wrap { padding-block: 80px 90px; }
  .page-hero h1 { font-size: 34px; }
  .h2, .cta-box h2 { font-size: 28px; }
  .section { padding-block: 64px; }
  .split, .band, .contact-grid { flex-direction: column; }
  .band-text { padding-inline-end: 0; padding-block: 56px; }
  .band-img { min-height: 280px; width: 100%; }
  .grid-2, .grid-3, .grid-4, .steps, .fields-2, .footer-cols { grid-template-columns: minmax(0, 1fr); }
  .cta-box { padding: 40px 28px; }
  .contact-form { padding: 24px; }
}
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
