/* ==========================================================================
   Mizan Website Stylesheet - Task W2c
   Strictly vanilla CSS, self-hosted fonts, RTL-first logical properties.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Font Definitions (Readex Pro: 400, 600, 700 - Arabic & Latin)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Readex Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/readex-pro-arabic-400-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}

@font-face {
  font-family: 'Readex Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/readex-pro-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Readex Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/readex-pro-arabic-600-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}

@font-face {
  font-family: 'Readex Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/readex-pro-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Readex Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/readex-pro-arabic-700-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}

@font-face {
  font-family: 'Readex Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/readex-pro-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   2. Design Tokens & CSS Variables
   -------------------------------------------------------------------------- */
:root {
  --base: #043E31;
  --green: #07765E;
  --green-light: #58B9A0; /* Updated in W2c from #4BAB93; contrast on --base is 5.1:1 */
  --gold: #CF961A;
  --ink: #16241F;
  --ink-70: rgba(22, 36, 31, 0.7);
  --white: #FFFFFF;
}

/* --------------------------------------------------------------------------
   3. Document Reset & Core Typography
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: 'Readex Pro', system-ui, -apple-system, sans-serif;
  color: var(--white);
  background-color: var(--base);
  direction: rtl;
  text-align: right;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--base);
  color: var(--white);
  line-height: 1.6;
}

main {
  flex: 1 0 auto;
}

img, picture, svg, video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Visible focus outline on every interactive element */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.container {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 32px;
}

@media (max-width: 720px) {
  .container {
    padding-inline: 16px;
  }
}

/* --------------------------------------------------------------------------
   4. Shared Header
   -------------------------------------------------------------------------- */
.site-header {
  background-color: var(--base);
  width: 100%;
  position: relative;
  z-index: 20;
}

.hero-surface .site-header {
  background-color: transparent;
}

.header-inner {
  display: flex;
  align-items: center;
  min-height: 84px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--white);
  flex-shrink: 0;
}

.logo-img {
  width: 36px;
  height: 36px;
  display: block;
  flex-shrink: 0;
}

.logo-text {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

/* Desktop navigation */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin-inline-start: auto; /* Pushes the links group to the left, leaving the middle empty */
}

.nav-link {
  font-size: 15px;
  font-weight: 400;
  color: var(--white);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-link:hover {
  color: var(--green-light);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-inline-start: 24px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 44px;
  padding-inline: 20px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.btn-outline {
  background-color: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.header-cta {
  font-size: 14px;
  min-height: 44px;
}

/* Mobile navigation details toggle */
.mobile-nav {
  display: none;
}

/* Header mobile (up to 720px) */
@media (max-width: 720px) {
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    padding-block: 8px;
    gap: 6px;
    position: relative;
  }

  .logo {
    gap: 6px;
    min-height: 44px;
    flex-shrink: 1;
    min-width: 0;
  }

  .logo-img {
    width: 28px;
    height: 28px;
  }

  .logo-text {
    font-size: 20px;
    white-space: nowrap;
  }

  .desktop-nav {
    display: none;
  }

  .header-actions {
    margin-inline-start: auto;
    gap: 6px;
    flex-shrink: 0;
  }

  .header-cta {
    padding-inline: 8px;
    font-size: 12px;
    min-height: 44px;
    border-width: 1.5px;
    white-space: nowrap;
  }

  .mobile-nav {
    display: block;
    position: relative;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding-inline: 10px;
    border: 1.5px solid var(--green-light);
    border-radius: 6px;
    background-color: var(--green);
    color: var(--white);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    user-select: none;
    white-space: nowrap;
  }

  .nav-toggle::-webkit-details-marker {
    display: none;
  }

  .mobile-nav:not([open]) .mobile-nav-links {
    display: none;
  }

  .mobile-nav[open] .mobile-nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 6px);
    inset-inline-end: 0;
    min-width: 200px;
    max-width: calc(100vw - 32px);
    background-color: #03271F;
    border: 1px solid var(--green-light);
    border-radius: 6px;
    padding-block: 4px;
    list-style: none;
    z-index: 100;
  }

  .mobile-nav-link {
    min-height: 44px;
    padding-inline: 16px;
    display: flex;
    align-items: center;
    color: var(--white);
    font-size: 14px;
    border-bottom: 1px solid rgba(75, 171, 147, 0.2);
    white-space: nowrap;
  }

  .mobile-nav-links li:last-child .mobile-nav-link {
    border-bottom: none;
  }
}

/* --------------------------------------------------------------------------
   5. Hero Section (index.html)
   -------------------------------------------------------------------------- */
.hero-surface {
  background-color: var(--base);
  background-image: url('../hero-bg.svg');
  background-repeat: no-repeat;
  background-position: left bottom; /* Anchored to left bottom per W2c */
  background-size: cover;
  width: 100%;
}

.hero-section {
  padding-block-start: 24px;
  padding-block-end: 80px;
  width: 100%;
  overflow-x: clip; /* Contains the negative --brush-l stroke offset from causing page horizontal scroll */
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 56px;
  align-items: start; /* Desktop alignment: both columns start at exact same top position */
}

/* Hero text column */
.hero-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-top: 0;
  padding-top: 0;
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 0;
  margin-block-end: 20px;
  line-height: 1; /* line-height 1 for exact top alignment with screenshot title bar */
}

/* Big word "ميزان": reduced ~10% more */
.hero-brand {
  font-size: clamp(50px, 6vw, 112px);
  font-weight: 700;
  line-height: 1;
  color: var(--white);
  display: block;
  margin-top: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

/* Sentence under big word: reduced ~12% with balanced wrap */
.hero-subhead {
  font-size: clamp(19px, 1.9vw, 25px);
  text-wrap: balance;
  font-weight: 600;
  line-height: 1.35;
  color: var(--white);
  display: block;
  overflow-wrap: break-word;
  word-break: normal;
}

/* Lead line under heading: reduced ~12%; meets minimum >= 15px */
.hero-lead {
  font-size: clamp(15px, 1.1vw, 17px);
  font-weight: 600;
  line-height: 1.5;
  color: var(--green-light);
  margin-block-end: 32px;
  overflow-wrap: break-word;
  word-break: normal;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.btn-primary {
  background-color: var(--gold);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  min-height: 52px;
  padding-inline: 28px;
  border-radius: 6px;
  border: none;
}

.btn-secondary {
  background-color: transparent;
  color: var(--white);
  border: 2px solid var(--white);
  font-size: 16px;
  font-weight: 600;
  min-height: 52px;
  padding-inline: 28px;
  border-radius: 6px;
}

/* Hero program screenshot column */
.hero-visual {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  position: relative;
  margin-top: 0;
  padding-top: 0;
  --brush-w: 140%;
  --brush-l: -25%;
  --brush-t: -15%;
}

/* Screenshot block wrapper */
.hero-figure {
  width: 100%;
  margin: 0;
  position: relative;
  isolation: isolate;
  z-index: 1;
  text-align: left; /* Physical left: positions the inline-block caption chip at the left edge */
  --brush-w: 140%;
  --brush-l: -25%;
  --brush-t: -15%;
}

/* Desktop floating frame shadow and alignment (above 900px) */
@media (min-width: 901px) {
  .hero-figure {
    margin-block-start: clamp(16px, 1.8vw, 26px);
  }

  .program-frame {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25), 0 24px 48px -12px rgba(0, 0, 0, 0.55), 0 60px 90px -30px rgba(0, 0, 0, 0.45);
  }
}

/* Framed block holding title bar and screenshot */
.program-frame {
  width: 100%;
  margin: 0;
  margin-top: 0;
  position: relative;
  z-index: 1;
  border: 1px solid var(--green-light);
  border-radius: 6px;
  background-color: var(--white);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25), 0 24px 48px -12px rgba(0, 0, 0, 0.55);
  --brush-w: 140%;
  --brush-l: -25%;
  --brush-t: -15%;
}

/* Gold brush stroke behind the program frame (shown on all screens: mobile & desktop) */
.program-frame::before {
  content: '';
  position: absolute;
  /* Physical left/top used on purpose: the decoration is anchored to the physical
     top-left of the screenshot frame, which sits on the left in this RTL layout */
  left: var(--brush-l);
  top: var(--brush-t);
  width: var(--brush-w);
  aspect-ratio: 1600 / 940;
  background-image: url('../assets/img/gold-brush.webp');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: -1;
}

.zoom-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: zoom-in;
  border-radius: inherit;
}

/* Windows desktop application title bar: uses physical LTR layout (icon left, buttons right) to accurately represent desktop OS chrome */
.window-titlebar {
  height: 32px;
  background-color: var(--white);
  border-bottom: 1px solid var(--green-light);
  box-shadow: none;
  display: flex;
  direction: ltr; /* Physical LTR: window title at left, minimize/maximize/close buttons at right */
  align-items: center;
  justify-content: space-between;
  user-select: none;
  box-sizing: border-box;
  position: relative;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}

.window-title-left {
  display: flex;
  align-items: center;
  padding-left: 10px;
}

.window-title-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  pointer-events: none;
}

.window-title-center svg {
  display: block;
  color: var(--ink);
}

.window-app-icon {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

.window-app-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-70);
  line-height: 1;
  margin-inline-start: 6px;
}

.window-controls-right {
  display: flex;
  align-items: center;
  height: 100%;
}

.win-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 100%;
  color: var(--ink-70);
  background-color: transparent;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.win-btn svg {
  display: block;
}

.win-minimize:hover,
.win-maximize:hover {
  background-color: #E5E5E5;
}

.win-close:hover {
  background-color: #E81123;
  color: var(--white);
}

.hero-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border: none;
  border-radius: 0 0 5px 5px;
  box-shadow: none;
}

.hero-caption {
  margin-block-start: 12px;
  display: inline-block;
  background-color: var(--base);
  padding: 10px 14px;
  border-radius: 4px;
  box-shadow: none;
  max-width: 40%;
  font-size: 14px;
  line-height: 1.5;
  color: var(--white);
  overflow-wrap: break-word;
  word-break: normal;
  text-align: right; /* Keeps Arabic text lines RTL inside the left-anchored chip */
}

.hero-caption-title {
  display: block;
  font-weight: 700;
  color: var(--white);
  margin-block-end: 2px;
}

.hero-caption-text {
  display: block;
  font-weight: 400;
  color: var(--white);
}

/* Hero mobile (up to 720px) */
@media (max-width: 720px) {
  .hero-surface {
    background-image: none;
    background-color: var(--base);
  }

  .hero-section {
    padding-block-start: 16px;
    padding-block-end: 44px;
  }

  .hero-grid {
    display: flex;
    flex-direction: column;
    gap: 28px;
  }

  /* Big word on mobile: reduced ~10% more */
  .hero-brand {
    font-size: clamp(31px, 9.5vw, 44px);
  }

  .hero-subhead {
    font-size: clamp(18px, 4.8vw, 21px);
  }

  .hero-lead {
    font-size: 15px; /* Meets minimum >= 15px */
    margin-block-end: 24px;
  }

  .hero-content {
    width: 100%;
  }

  .hero-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 48px;
    padding-inline: 16px;
  }

  .hero-visual {
    width: 100%;
    max-width: 100%;
    position: relative;
    padding-block-end: 24px;
    padding-inline: 0;
    padding-block-start: 16px;
    background-image: none;
    border-radius: 6px;
  }

  /* Title bar on mobile: 26px height */
  .window-titlebar {
    height: 26px;
  }

  .window-title-left {
    gap: 6px;
    padding-left: 8px;
  }

  .window-app-icon {
    width: 14px;
    height: 14px;
  }

  .window-app-name {
    font-size: 11px;
  }

  .win-btn {
    width: 36px;
  }
}

/* --------------------------------------------------------------------------
   6. Shared Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--base);
  border-top: 1px solid rgba(75, 171, 147, 0.2);
  padding-block: 28px;
  width: 100%;
  margin-block-start: auto;
}

.footer-inner {
  font-size: 14px;
  font-weight: 400;
  color: var(--white);
  text-align: center;
  overflow-wrap: break-word;
  word-break: normal;
}

/* --------------------------------------------------------------------------
   7. Fallback Page Main Headings (for other pages in W2b/W2c)
   -------------------------------------------------------------------------- */
.page-fallback-main {
  padding-block: 64px;
}

.page-fallback-main h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: var(--white);
}

/* --------------------------------------------------------------------------
   8. Zoom Modal Dialog (Native <dialog class="zoom">)
   -------------------------------------------------------------------------- */
dialog.zoom {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: none;
  background-color: rgba(4, 62, 49, 0.96);
  color: var(--white);
  box-sizing: border-box;
  z-index: 1000;
}

dialog.zoom:not([open]) {
  display: none;
}

dialog.zoom[open] {
  display: flex;
  flex-direction: column;
}

dialog.zoom::backdrop {
  background-color: rgba(4, 62, 49, 0.96);
}

.zoom-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 16px 24px;
  width: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
}

.zoom-close {
  min-height: 44px;
  min-width: 80px;
  padding-inline: 20px;
  padding-block: 8px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  color: var(--white);
  background-color: rgba(255, 255, 255, 0.12);
  border: 1.5px solid var(--green-light);
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.zoom-close:hover {
  background-color: rgba(255, 255, 255, 0.22);
}

.zoom-container {
  width: 100%;
  flex: 1;
  overflow: auto;
  touch-action: pan-x pan-y pinch-zoom;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16px 24px 32px;
  box-sizing: border-box;
}

.zoom-img {
  display: block;
  height: auto;
  width: 1366px; /* Natural width on screens narrower than 1366px for scrolling & pinch-zoom */
  max-width: none;
  flex-shrink: 0;
  border-radius: 4px;
}

@media (min-width: 1366px) {
  .zoom-img {
    width: min(96vw, 1366px);
    max-width: 100%;
  }
}

/* --------------------------------------------------------------------------
   9. Section "لمين" (Audience Section)
   -------------------------------------------------------------------------- */
.audience-section {
  background-color: #F4F7F5;
  color: var(--ink);
  width: 100%;
  padding-block: clamp(56px, 8vw, 112px);
}

.audience-container {
  max-width: 1100px;
  margin-inline: auto;
}

.audience-title {
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  margin-top: 0;
  margin-block-end: clamp(32px, 4vw, 48px);
}

.audience-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-block-start: 1px solid rgba(7, 118, 94, 0.18);
}

.audience-item {
  display: flex;
  align-items: flex-start;
  gap: clamp(16px, 2.5vw, 24px);
  padding-block: clamp(20px, 2.5vw, 28px);
  border-block-end: 1px solid rgba(7, 118, 94, 0.18);
}

.audience-num {
  font-size: clamp(32px, 3.5vw, 44px);
  font-weight: 700;
  line-height: 1;
  color: var(--green);
  flex-shrink: 0;
  min-width: 32px;
}

.audience-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 70ch;
}

.audience-name {
  font-size: clamp(22px, 2.2vw, 26px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  display: block;
}

.audience-desc {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
}

.audience-link {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.audience-link:hover {
  color: var(--base);
}

.audience-link:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.audience-faq {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
  margin-block-start: clamp(24px, 3vw, 32px);
  margin-block-end: 0;
  max-width: 70ch;
}

.audience-note {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  margin-block-start: clamp(16px, 2vw, 24px);
  margin-block-end: 0;
  max-width: 70ch;
}

/* --------------------------------------------------------------------------
   10. Section "عرض أول العملاء" (Offer Band)
   -------------------------------------------------------------------------- */
.offer-section {
  background-color: var(--gold);
  color: var(--ink);
  width: 100%;
  padding-block: clamp(56px, 8vw, 112px);
}

.offer-container {
  max-width: 1100px;
  margin-inline: auto;
}

.offer-title {
  margin-top: 0;
  margin-block-end: 16px;
}

.offer-label {
  display: block;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  color: var(--ink);
  margin-block-end: 8px;
}

.offer-headline {
  display: block;
  font-size: clamp(32px, 3.8vw, 44px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

.offer-desc {
  font-size: clamp(17px, 1.3vw, 19px);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  max-width: 70ch;
  margin-block-start: 0;
  margin-block-end: 32px;
}

.offer-actions {
  display: flex;
  align-items: center;
}

.btn-ink {
  background-color: var(--ink);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  min-height: 52px;
  padding-inline: 28px;
  border-radius: 6px;
  border: none;
}

.btn-ink:hover {
  background-color: #03271F;
}

.offer-section a:focus-visible,
.offer-section button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   11. Closing Section ("عايز تجرب؟")
   -------------------------------------------------------------------------- */
.closing-section {
  background-color: var(--base);
  color: var(--white);
  width: 100%;
  padding-block: clamp(56px, 8vw, 112px);
}

.closing-container {
  max-width: 1100px;
  margin-inline: auto;
}

.closing-title {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--white);
  margin-top: 0;
  margin-block-end: 16px;
}

.closing-desc {
  font-size: clamp(17px, 1.3vw, 20px);
  font-weight: 400;
  line-height: 1.6;
  color: var(--white);
  max-width: 70ch;
  margin-block-start: 0;
  margin-block-end: 32px;
}

.closing-actions {
  display: flex;
  align-items: center;
}

/* Responsive button behavior for screens up to 600px */
@media (max-width: 600px) {
  .offer-actions .btn,
  .closing-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   12. Desktop Hero & Audience Adjustments (min-width: 1100px / 1280px)
   -------------------------------------------------------------------------- */
@media (min-width: 1100px) {
  .header-inner {
    min-height: 72px;
  }

  .hero-grid {
    grid-template-columns: 1fr 1.4fr;
    gap: 48px;
  }

  .hero-section {
    min-height: calc(100vh - 72px);
    min-height: calc(100dvh - 72px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block-start: 16px;
    padding-block-end: 24px;
    box-sizing: border-box;
  }

  .hero-figure {
    margin-block-start: 12px;
    margin-bottom: 0;
  }

  .hero-caption {
    margin-block-start: 8px;
    padding: 8px 12px;
    max-width: 65%;
  }
}

@media (min-width: 1280px) {
  .audience-section {
    background: #F4F7F5 url('../assets/img/section-dots.svg') center / cover no-repeat;
  }
}

/* --------------------------------------------------------------------------
   13. Section "معرض شاشات البرنامج" (Screenshots Gallery Coverflow Carousel)
   -------------------------------------------------------------------------- */
.gallery-section {
  background-color: #F4F7F5;
  color: var(--ink);
  width: 100%;
  padding-block: clamp(48px, 6vw, 96px);
  overflow: hidden;
  border-block-start: 1px solid rgba(7, 118, 94, 0.12);
}

.gallery-container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 20px;
}

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-block-end: clamp(24px, 3vw, 40px);
  flex-wrap: wrap;
}

.gallery-title {
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  margin: 0;
}

.gallery-counter-wrap {
  display: flex;
  align-items: center;
}

.gallery-counter {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  min-width: 56px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  background-color: var(--white);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(7, 118, 94, 0.2);
}

.gallery-carousel {
  position: relative;
  width: 100%;
}

.gallery-carousel .gallery-btn {
  position: absolute;
  top: calc(50% - 16px);
  transform: translateY(-50%);
  z-index: 15;
  min-width: 48px;
  min-height: 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
  color: var(--green);
  border: 2px solid var(--green);
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.gallery-carousel .gallery-btn:hover {
  background-color: var(--green);
  color: var(--white);
  transform: translateY(-50%) scale(1.08);
}

.gallery-carousel .gallery-btn:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.gallery-carousel .gallery-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

/* RTL positioning: In Arabic RTL,
   gallery-prev (Previous / السابق) is on the right side: inset-inline-start
   gallery-next (Next / التالي) is on the left side: inset-inline-end */
.gallery-carousel .gallery-prev {
  inset-inline-start: clamp(12px, 3vw, 40px);
}

.gallery-carousel .gallery-next {
  inset-inline-end: clamp(12px, 3vw, 40px);
}

@media (max-width: 600px) {
  .gallery-carousel .gallery-btn {
    min-width: 42px;
    min-height: 42px;
    width: 42px;
    height: 42px;
  }
  .gallery-carousel .gallery-prev {
    inset-inline-start: 8px;
  }
  .gallery-carousel .gallery-next {
    inset-inline-end: 8px;
  }
}

.gallery-track {
  display: flex;
  gap: clamp(16px, 2.5vw, 32px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-block: 16px 24px;
  padding-inline: max(16px, calc(50% - min(420px, 42vw)));
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  scrollbar-width: thin;
  scrollbar-color: var(--green-light) transparent;
  user-select: none;
  -webkit-user-select: none;
}

.gallery-track::-webkit-scrollbar {
  height: 6px;
}

.gallery-track::-webkit-scrollbar-track {
  background: transparent;
}

.gallery-track::-webkit-scrollbar-thumb {
  background-color: var(--green-light);
  border-radius: 3px;
}

.gallery-card {
  flex: 0 0 clamp(280px, 78vw, 840px);
  scroll-snap-align: center;
  margin: 0;
  position: relative;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform: scale(0.92);
  opacity: 0.65;
  cursor: pointer;
}

.gallery-card.is-active {
  transform: scale(1);
  opacity: 1;
  z-index: 2;
  cursor: default;
}

.gallery-card:hover:not(.is-active) {
  opacity: 0.88;
}

.gallery-card .program-frame::before {
  display: none;
}

.gallery-card .program-frame {
  margin: 0;
  width: 100%;
}

.gallery-card .zoom-link {
  display: block;
  position: relative;
}

.gallery-card .zoom-link:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.gallery-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0 0 5px 5px;
}

.gallery-caption {
  margin-block-start: 12px;
  text-align: center;
  padding-inline: 8px;
}

.gallery-caption-text {
  display: inline-block;
  font-size: clamp(15px, 1.2vw, 17px);
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  .gallery-track {
    scroll-behavior: auto;
  }

  .gallery-btn,
  .gallery-card {
    transition: none;
  }

  .gallery-card {
    transform: none !important;
    opacity: 1 !important;
  }
}

/* --------------------------------------------------------------------------
   14. Problems Page ("المشاكل اللي بيحلها")
   -------------------------------------------------------------------------- */
.problems-top-band,
.page-top-band {
  background-color: var(--base);
  color: var(--white);
  padding-block: clamp(48px, 6vw, 72px);
  width: 100%;
}

.problems-top-container,
.page-top-container {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 20px;
}

.problems-page-title,
.page-top-title {
  font-size: clamp(28px, 3.8vw, 42px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--white);
  margin-top: 0;
  margin-block-end: 16px;
}

.problems-page-intro,
.page-top-intro {
  font-size: clamp(17px, 1.4vw, 20px);
  font-weight: 400;
  line-height: 1.6;
  color: var(--white);
  opacity: 0.95;
  max-width: 65ch;
  margin: 0;
}

.problems-main-content,
.page-main-content {
  background-color: #F4F7F5;
  color: var(--ink);
  width: 100%;
  padding-block: clamp(48px, 6vw, 96px);
}

.problems-main-container,
.page-main-container {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 20px;
}

.problem-item {
  padding-block: clamp(36px, 4.5vw, 64px);
  border-block-end: 1px solid rgba(7, 118, 94, 0.16);
}

.problem-item:last-child {
  border-block-end: none;
}

.problem-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3.5vw, 40px);
}

.problem-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.problem-title {
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  margin-top: 0;
  margin-block-end: 12px;
}

.problem-desc {
  font-size: clamp(16px, 1.2vw, 18px);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  max-width: 68ch;
  margin: 0;
}

.problem-visual {
  width: 100%;
}

.problem-visual .program-frame {
  margin: 0;
  width: 100%;
}

.problem-visual .program-frame::before {
  display: none;
}

.problem-visual .zoom-link {
  display: block;
}

.problem-visual .zoom-link:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.problem-visual .gallery-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0 0 5px 5px;
}

.problem-text-only .problem-content {
  max-width: 72ch;
}

@media (min-width: 900px) {
  .problem-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
    gap: clamp(36px, 4vw, 56px);
  }

  .problem-grid.is-reversed .problem-content {
    order: 2;
  }

  .problem-grid.is-reversed .problem-visual {
    order: 1;
  }
}

.problem-closing-note {
  margin-block-start: clamp(40px, 5vw, 64px);
  padding-block-start: clamp(24px, 3vw, 36px);
  border-block-start: 1px solid rgba(7, 118, 94, 0.2);
}

.problem-closing-text {
  font-size: clamp(16px, 1.2vw, 18px);
  font-weight: 500;
  line-height: 1.65;
  color: var(--ink);
  max-width: 72ch;
  margin: 0;
}

.problems-home-link {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.problems-home-link:hover {
  color: var(--base);
}

.problems-home-link:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   15. How it Works Page ("إزاي بيشتغل")
   -------------------------------------------------------------------------- */
.steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-block-start: 1px solid rgba(7, 118, 94, 0.18);
  max-width: 76ch;
}

.steps-item {
  display: flex;
  align-items: flex-start;
  gap: clamp(16px, 2.5vw, 24px);
  padding-block: clamp(28px, 3.5vw, 40px);
  border-block-end: 1px solid rgba(7, 118, 94, 0.18);
}

.steps-num {
  font-size: clamp(32px, 3.5vw, 44px);
  font-weight: 700;
  line-height: 1;
  color: var(--green);
  flex-shrink: 0;
  min-width: 32px;
}

.steps-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.steps-title {
  font-size: clamp(22px, 2.2vw, 26px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  margin: 0;
}

.steps-desc {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  margin: 0;
}

/* --------------------------------------------------------------------------
   16. FAQ Page ("أسئلة شائعة")
   -------------------------------------------------------------------------- */
.faq-list {
  max-width: 76ch;
  border-block-start: 1px solid rgba(7, 118, 94, 0.18);
}

.faq-item {
  border-block-end: 1px solid rgba(7, 118, 94, 0.18);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 52px; /* Meets tap target >= 44px */
  padding-block: clamp(14px, 2vw, 20px);
  padding-inline: 0;
  cursor: pointer;
  list-style: none;
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  user-select: none;
  -webkit-user-select: none;
}

.faq-question::-webkit-details-marker,
.faq-question::marker {
  display: none;
  content: "";
}

.faq-question:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}

.faq-question-text {
  flex: 1;
  margin-inline-end: 16px;
}

/* CSS-only rotating chevron icon */
.faq-icon {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-inline-end: 2.5px solid var(--green);
  border-block-end: 2.5px solid var(--green);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

details[open] > .faq-question .faq-icon {
  transform: rotate(-135deg);
}

.faq-answer {
  padding-block-end: clamp(16px, 2.5vw, 24px);
  padding-block-start: 4px;
}

.faq-answer-text {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  max-width: 68ch;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .faq-icon {
    transition: none;
  }
}




