/* =========================================================
   Prin-Ex — Static Site Stylesheet
   Light, elegant, professional. Palette derived from logo:
   white / charcoal / safety orange.
   Bilingual (EN/AR) with RTL support.
   ========================================================= */

/* ---------- Design Tokens ---------- */
:root {
  --orange: #f7941d;
  --orange-dark: #e07d05;
  --orange-soft: #fff3e2;
  --charcoal: #1f2933;
  --charcoal-2: #2b333d;
  --ink: #16202b;
  --gray-700: #3f4a57;
  --gray-500: #6b7682;
  --gray-300: #cfd6dd;
  --gray-100: #eef1f4;
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --bg-dark: #16202b;
  --white: #ffffff;
  --line: #e6e9ed;

  --shadow-sm: 0 1px 3px rgba(22, 32, 43, .08);
  --shadow-md: 0 8px 24px rgba(22, 32, 43, .10);
  --shadow-lg: 0 18px 48px rgba(22, 32, 43, .16);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;

  --container: 1180px;
  --header-h: 76px;

  --font-en: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --font-ar: 'Cairo', 'Tajawal', 'Segoe UI', system-ui, sans-serif;
  --font: var(--font-en);

  --transition: .25s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
}
html[lang="ar"] body { --font: var(--font-ar); font-family: var(--font-ar); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); font-weight: 700; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 22px; }
.section { padding: 84px 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--bg-dark); color: #e8edf2; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }

.section-head { max-width: 720px; margin: 0 auto 52px; text-align: center; }
.section-head.left { margin-inline: 0; text-align: start; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--orange-dark); margin-bottom: 14px;
}
.section--dark .eyebrow { color: var(--orange); }
.section-title { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
.section-sub { margin-top: 14px; color: var(--gray-500); font-size: 1.05rem; }
.section--dark .section-sub { color: #aeb9c4; }

.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.text-center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 600; font-size: .98rem; padding: 13px 26px; border-radius: 50px;
  transition: var(--transition); white-space: nowrap; line-height: 1;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 8px 20px rgba(247,148,29,.32); }
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(247,148,29,.40); }
.btn-dark { background: var(--charcoal); color: #fff; }
.btn-dark:hover { background: #000; transform: translateY(-2px); }
.btn-outline { border: 1.5px solid var(--gray-300); color: var(--ink); background: #fff; }
.btn-outline:hover { border-color: var(--orange); color: var(--orange-dark); transform: translateY(-2px); }
.section--dark .btn-outline { border-color: rgba(255,255,255,.3); color: #fff; background: transparent; }
.section--dark .btn-outline:hover { border-color: var(--orange); color: var(--orange); }
.btn-ghost { color: var(--orange-dark); padding-inline: 4px; }
.btn-ghost:hover { color: var(--orange); }
.btn-sm { padding: 10px 18px; font-size: .88rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h); background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 40px; width: auto; }
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; color: var(--ink); }
.brand-name span { color: var(--orange); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 9px 14px; border-radius: 8px; font-weight: 500; font-size: .96rem;
  color: var(--gray-700); transition: var(--transition);
}
.nav a:hover { color: var(--orange-dark); background: var(--orange-soft); }
.nav a.active { color: var(--orange-dark); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px;
  border: 1.5px solid var(--gray-300); border-radius: 50px; font-weight: 600;
  font-size: .85rem; color: var(--gray-700); transition: var(--transition);
}
.lang-toggle:hover { border-color: var(--orange); color: var(--orange-dark); }
.lang-toggle svg { width: 16px; height: 16px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: var(--transition); }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden; padding: 0 15px; min-height: 85vh;
  background: linear-gradient(120deg, rgba(16,24,33,.92), rgba(16,24,33,.62)), url('../img/industrial-2.jpg') center/cover no-repeat;
}
.hero-inner { padding: 96px 0 104px; max-width: 860px; }
.hero h1 { color: #fff; font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.4; }
.hero .hero-kicker {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; margin-bottom: 22px;
  background: rgba(247,148,29,.16); border: 1px solid rgba(247,148,29,.4);
  color: var(--orange); border-radius: 50px; font-size: .82rem; font-weight: 600; letter-spacing: .04em;
}
.hero p { margin-top: 20px; font-size: 1.15rem; color: #d5dde4; max-width: 620px; }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }
.hero-stats { margin-top: 56px; display: flex; flex-wrap: wrap; gap: 40px; }
.hero-stats .stat strong { display: block; font-size: 2rem; color: #fff; }
.hero-stats .stat span { color: #aeb9c4; font-size: .9rem; }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-sm); transition: var(--transition);
  height: 100%; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: #dfe4e9; }
.card .icon {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
  background: var(--orange-soft); color: var(--orange-dark); margin-bottom: 20px;
}
.card .icon svg { width: 28px; height: 28px; }
.card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.card p { color: var(--gray-500); flex: 1; }
.card .card-cta { margin-top: 20px; }

/* ---------- Offer cards (What I offer) ---------- */
.offer-card { position: relative; overflow: hidden; }
.offer-card::after {
  content: ''; position: absolute; inset-inline-start: 0; top: 0; height: 4px; width: 100%;
  background: linear-gradient(90deg, var(--orange), var(--orange-dark)); transform: scaleX(0);
  transform-origin: inline-start; transition: transform .3s ease;
}
.offer-card:hover::after { transform: scaleX(1); }

/* ---------- Book layout ---------- */
.book {
  display: grid; grid-template-columns: 230px 1fr; gap: 34px; align-items: start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 34px; box-shadow: var(--shadow-sm); margin-bottom: 34px;
}
.book-cover {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md);
  aspect-ratio: 3/4; background: linear-gradient(160deg, var(--charcoal), var(--charcoal-2));
  display: grid; place-items: center; padding: 22px; text-align: center; color: #fff;
}
.book-cover .bc-tag { font-size: .7rem; letter-spacing: .12em; color: var(--orange); text-transform: uppercase; }
.book-cover h4 { color: #fff; font-size: 1.1rem; margin-top: 10px; }
.book-cover .bc-author { margin-top: auto; font-size: .8rem; color: #aeb9c4; }
.book-body h3 { font-size: 1.4rem; margin-bottom: 8px; }
.book-body .muted { color: var(--gray-500); }
.book-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 50px;
  background: var(--gray-100); color: var(--gray-700); font-size: .8rem; font-weight: 500;
}
.book-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* Chapter accordion */
.chapters { margin-top: 18px; border-top: 1px solid var(--line); }
.chapter { border-bottom: 1px solid var(--line); }
.chapter summary {
  cursor: pointer; padding: 15px 4px; font-weight: 600; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; list-style: none;
}
.chapter summary::-webkit-details-marker { display: none; }
.chapter summary::after { content: '+'; color: var(--orange-dark); font-size: 1.3rem; line-height: 1; }
.chapter[open] summary::after { content: '–'; }
.chapter .chapter-body { padding: 0 4px 18px; color: var(--gray-500); }
.chapter .chapter-body li { padding: 4px 0 4px 18px; position: relative; }
.chapter .chapter-body li::before { content: '▸'; color: var(--orange); position: absolute; inset-inline-start: 0; }

/* ---------- Course / pricing cards ---------- */
.course-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.course-media { position: relative; aspect-ratio: 16/9; background: var(--charcoal); }
.course-media img { width: 100%; height: 100%; object-fit: cover; }
.course-media .badge {
  position: absolute; top: 14px; inset-inline-start: 14px; background: var(--orange); color: #fff;
  padding: 5px 12px; border-radius: 50px; font-size: .74rem; font-weight: 600;
}
.course-media .badge.soon { background: var(--gray-700); }
.course-body { padding: 26px; display: flex; flex-direction: column; flex: 1; }
.course-body h3 { font-size: 1.2rem; }
.course-body p { color: var(--gray-500); margin-top: 8px; flex: 1; }
.course-lang { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--orange-dark); font-weight: 600; margin-top: 12px; }
.price { font-size: 1.4rem; font-weight: 700; color: var(--ink); }
.price small { font-size: .85rem; font-weight: 500; color: var(--gray-500); }

/* ---------- Video embed ---------- */
.video-frame {
  position: relative; aspect-ratio: 16/9; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-md); background: #ffffff; display: block;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Split feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 100%; }
.split h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.split p { color: var(--gray-500); margin-top: 16px; }
.check-list { margin-top: 22px; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--gray-700); }
.check-list .ci {
  flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--orange-soft);
  color: var(--orange-dark); display: grid; place-items: center; font-size: .8rem; margin-top: 2px;
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(120deg, var(--charcoal), var(--charcoal-2));
  color: #fff; padding: 64px 0; position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset-inline-end: -80px; top: -80px; width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(247,148,29,.25), transparent 70%);
}
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.8rem); position: relative; }
.page-hero p { color: #c4cdd6; margin-top: 12px; max-width: 640px; position: relative; }
.breadcrumb { font-size: .85rem; color: #93a0ac; margin-bottom: 14px; position: relative; }
.breadcrumb a:hover { color: var(--orange); }

/* ---------- Blog ---------- */
.post-card { overflow: hidden; padding: 0; }
.post-card .post-img { aspect-ratio: 16/10; overflow: hidden; }
.post-card .post-img img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.post-card:hover .post-img img { transform: scale(1.05); }
.post-body { padding: 24px; }
.post-cat { font-size: .76rem; font-weight: 600; color: var(--orange-dark); text-transform: uppercase; letter-spacing: .08em; }
.post-body h3 { font-size: 1.18rem; margin: 10px 0; }
.post-body p { color: var(--gray-500); font-size: .95rem; }
.post-meta { margin-top: 16px; font-size: .82rem; color: var(--gray-500); display: flex; gap: 14px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.contact-list { display: grid; gap: 18px; margin-top: 26px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-item .ci-icon {
  flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--orange-soft);
  color: var(--orange-dark); display: grid; place-items: center;
}
.contact-item .ci-icon svg { width: 22px; height: 22px; }
.contact-item h4 { font-size: 1rem; }
.contact-item a, .contact-item span { color: var(--gray-500); font-size: .95rem; word-break: break-word; }
.contact-item a:hover { color: var(--orange-dark); }

.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 34px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm);
  font-family: inherit; font-size: .96rem; color: var(--ink); transition: var(--transition); background: #fff;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(247,148,29,.15); }
.field textarea { min-height: 140px; resize: vertical; }
.form-note { margin-top: 12px; font-size: .82rem; color: var(--gray-500); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--orange), var(--orange-dark)); color: #fff;
  border-radius: var(--radius-lg); padding: 54px; text-align: center; position: relative; overflow: hidden;
}
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta-band p { color: #fff5e9; margin-top: 12px; max-width: 560px; margin-inline: auto; }
.cta-band .btn-primary { background: #fff; color: var(--orange-dark); box-shadow: var(--shadow-md); }
.cta-band .btn-primary:hover { background: var(--charcoal); color: #fff; }
.cta-band .hero-actions { justify-content: center; margin-top: 28px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: #b9c3cd; padding: 64px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-brand .brand-name, .footer-brand .brand-name span { color: #fff; }
.footer-brand p { margin-top: 16px; font-size: .92rem; color: #94a0ac; max-width: 300px; }
.footer-col h5 { color: #fff; font-size: .95rem; letter-spacing: .04em; margin-bottom: 18px; text-transform: uppercase; }
.footer-col a { display: block; padding: 6px 0; font-size: .92rem; color: #b9c3cd; transition: var(--transition); }
.footer-col a:hover { color: var(--orange); }
.social { display: flex; gap: 12px; margin-top: 20px; }
.social a {
  width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.08);
  display: grid; place-items: center; color: #cfd6dd; transition: var(--transition);
}
.social a:hover { background: var(--orange); color: #fff; transform: translateY(-2px); }
.social svg { width: 19px; height: 19px; }
.footer-bottom {
  margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: #8b97a3;
}

/* ---------- Misc ---------- */
.muted { color: var(--gray-500); }
.lead { font-size: 1.12rem; color: var(--gray-700); }
.divider { height: 1px; background: var(--line); margin: 40px 0; border: 0; }
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].visible { opacity: 1; transform: none; }

/* ---------- RTL adjustments ---------- */
html[dir="rtl"] .hero-stats,
html[dir="rtl"] .hero-actions { direction: rtl; }
html[dir="rtl"] .offer-card::after { transform-origin: right; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav, .header-actions .lang-text-full { display: none; }
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch;
    background: #fff; padding: 14px 22px 22px; gap: 2px; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md); transform: translateY(-130%); transition: transform .3s ease;
  }
  .nav.open { display: flex; transform: translateY(0); }
  .nav a { padding: 13px 12px; border-bottom: 1px solid var(--line); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .book { grid-template-columns: 1fr; }
  .book-cover { max-width: 220px; margin-inline: auto; }
  .section { padding: 60px 0; }
  .hero-inner { padding: 70px 0 76px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 26px; }
  .cta-band { padding: 38px 24px; }
  .brand-name { font-size: 1rem; }
  .brand img { height: 34px; }
}
