@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@600;700;800;900&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Cinzel:wght@600;700&display=swap');

:root {
  --navy: #16233d;
  --navy-2: #101a2f;
  --navy-3: #0a1220;
  --gold: #9c7a42;
  --gold-2: #b99a63;
  --gold-soft: rgba(156, 122, 66, 0.12);
  --light: #faf7f2;
  --light-2: #f1ebe0;
  --text: #262b3a;
  --muted: #6b7280;
  --border: rgba(22, 35, 61, 0.14);
  --white: #ffffff;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.05);
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 44px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--gold) var(--light);
  scrollbar-width: thin;
}

body {
  margin: 0;
  font-family: 'IBM Plex Sans Arabic', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--light);
  line-height: 1.85;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--light);
}

::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 999px;
  border: 2px solid var(--light);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--navy);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

p {
  margin: 0 0 1rem;
}

ul {
  margin: 0 0 1rem;
}

.container {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
}

.section {
  position: relative;
  padding: 92px 0;
}

.section-soft {
  background: var(--light-2);
}

.section-dark {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: var(--navy);
}

.section-dark::after {
  content: '';
  position: absolute;
  bottom: -110px;
  right: -90px;
  width: 380px;
  height: 380px;
  background: url('../images/emblem-motif.svg') center / contain no-repeat;
  opacity: 0.05;
  pointer-events: none;
}

.section-dark .container {
  position: relative;
  z-index: 1;
}

.section-title {
  position: relative;
  margin: 0 0 1rem;
  padding-bottom: 18px;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 1.4;
  color: var(--navy);
}

.section-dark .section-title,
.page-hero h1,
.cta-inline h2,
.cta-inline h3,
.site-footer .footer-title {
  color: var(--white);
}

.section-title::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 56px;
  height: 2px;
  background: var(--gold);
}

.section-dark .section-title::after,
.page-hero h1::after {
  background: var(--gold-2);
}

.lead {
  font-size: 1.07rem;
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.98rem;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: var(--white);
  background: var(--navy);
}

.btn-primary:hover {
  background: var(--navy-2);
}

.btn-outline {
  color: var(--navy);
  background: transparent;
  border-color: var(--navy);
}

.btn-outline:hover {
  color: var(--white);
  background: var(--navy);
}

.btn-light {
  color: var(--navy);
  background: var(--white);
  border-color: rgba(255,255,255,0.4);
}

.btn-light:hover {
  background: var(--gold-2);
  border-color: var(--gold-2);
}

.btns {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .25s ease;
}

.site-header.scrolled {
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.nav-wrap {
  position: relative;
  min-height: 100px;
  display: flex;
  align-items: center;
  gap: 26px;
  direction: rtl;
}

.header-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border);
  transition: transform .3s ease, border-color .3s ease;
}

.header-logo:hover {
  transform: scale(1.05);
  border-color: var(--gold);
}

.header-logo img {
  width: auto;
  height: 70px;
  max-width: 80px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
}

.main-nav a {
  position: relative;
  padding: 10px 14px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.98rem;
  transition: color .2s ease;
}

.main-nav a::after {
  content: '';
  position: absolute;
  right: 14px;
  left: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--navy);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-actions a[aria-label='واتساب'] {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: var(--navy);
  background: transparent;
  border: 1px solid var(--border);
  font-size: 1.1rem;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.nav-actions a[aria-label='واتساب']:hover {
  color: var(--white);
  background: #1fa855;
  border-color: #1fa855;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--navy);
  font-size: 1.2rem;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.menu-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.mobile-menu {
  display: none;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 128px 0 96px;
  background: var(--light);
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: '';
  position: absolute;
  top: -130px;
  left: -150px;
  width: 480px;
  height: 480px;
  background: url('../images/emblem-motif.svg') center / contain no-repeat;
  opacity: 0.05;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  margin: 0 0 1.3rem;
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 4.6vw, 4.2rem);
  line-height: 1.32;
  color: var(--navy);
}

.hero .lead {
  max-width: 680px;
  font-size: 1.12rem;
}

.hero-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 34px;
  background: var(--white);
}

.hero-mini-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 26px;
  border-top: 1px solid var(--border);
}

.mini-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 22px 10px 4px;
  border-inline-end: 1px solid var(--border);
}

.mini-card:last-child {
  border-inline-end: 0;
}

.mini-card i {
  color: var(--gold);
  font-size: 1.25rem;
}

.mini-card span {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.92rem;
  line-height: 1.6;
}

.quick-facts {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 58px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.fact {
  position: relative;
  padding: 24px 16px;
  border-inline-end: 1px solid var(--border);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.98rem;
  text-align: center;
  transition: color .2s ease;
}

.fact:last-child {
  border-inline-end: 0;
}

.fact:hover {
  color: var(--gold);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px;
  align-items: center;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.card {
  position: relative;
  height: 100%;
  padding: 32px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--white);
  transition: border-color .25s ease, transform .25s ease;
}

.card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
}

.card h3,
.card h2 {
  position: relative;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.6rem;
  line-height: 1.5;
  font-size: 1.25rem;
}

.icon-box {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}

.icon-box i,
.feature i {
  font-size: 1.35rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 170px;
  padding: 28px 20px;
  text-align: center;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.16);
  background: transparent;
  transition: border-color .25s ease;
}

.feature:hover {
  border-color: var(--gold-2);
}

.feature i {
  font-size: 1.5rem;
  color: var(--gold-2);
}

.feature h3,
.feature {
  color: var(--white);
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.7;
}

.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 26px 22px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--white);
  transition: border-color .25s ease;
}

.step:hover {
  border-color: var(--gold);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--navy);
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.95rem;
}

.step h3 {
  margin: 0;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  color: var(--navy);
  font-size: 1.05rem;
  line-height: 1.7;
}

.article-card img,
.article-thumb {
  margin-bottom: 18px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
}

.article-thumb {
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--gold-2);
  font-size: 1.8rem;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border: 0;
  background: transparent;
  color: var(--navy);
  text-align: right;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 1.08rem;
  cursor: pointer;
}

.faq-q i {
  color: var(--gold);
  transition: transform .25s ease;
  flex-shrink: 0;
}

.faq-item.open .faq-q i {
  transform: rotate(45deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}

.faq-a p {
  margin-top: 0;
  padding-bottom: 20px;
  color: var(--muted);
}

.faq-item.open .faq-a {
  max-height: 280px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 68px;
  color: var(--white);
  background: var(--navy-2);
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: -140px;
  left: -70px;
  width: 420px;
  height: 420px;
  background: url('../images/emblem-motif.svg') center / contain no-repeat;
  opacity: 0.06;
  pointer-events: none;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  margin: 0;
  padding-bottom: 16px;
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 3.6vw, 3.6rem);
  line-height: 1.3;
}

.page-hero h1::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  margin-top: 16px;
}

.breadcrumbs {
  color: rgba(255,255,255,0.78);
}

.content-box {
  padding: 34px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--white);
}

.service-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.service-row:last-child {
  border-bottom: 0;
}

.service-row .icon-box {
  width: 70px;
  height: 70px;
  border-radius: var(--radius);
}

.service-row .icon-box i {
  font-size: 1.5rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr);
  gap: 32px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

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

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--navy);
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font: inherit;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.field textarea {
  min-height: 160px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.form-msg {
  margin-top: 16px;
  font-weight: 700;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 38px;
  align-items: start;
}

.article-body {
  font-size: 1.08rem;
}

.article-body h2,
.article-body h3 {
  color: var(--navy);
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  line-height: 1.5;
}

.article-body h2 {
  margin-top: 2.3rem;
}

.article-body h3 {
  margin-top: 1.8rem;
}

.article-body ul {
  padding-right: 1.15rem;
}

.notice,
.cta-inline {
  padding: 26px;
  margin: 32px 0;
  border-radius: var(--radius);
}

.notice {
  background: var(--light-2);
  border-inline-start: 3px solid var(--gold);
}

.cta-inline {
  color: var(--white);
  background: var(--navy);
  border: 1px solid rgba(255,255,255,0.1);
}

.sidebar {
  position: sticky;
  top: 128px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 7px 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--navy);
  font-size: 0.9rem;
}

.site-footer {
  position: relative;
  overflow: hidden;
  padding: 76px 0 26px;
  color: rgba(226, 230, 240, 0.82);
  background: var(--navy-3);
}

.site-footer .container {
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 34px;
}

.footer-grid::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: url('../images/emblem-motif.svg') center / contain no-repeat;
  opacity: 0.85;
}

.footer-logo {
  max-width: 230px;
  max-height: 190px;
  margin-bottom: 14px;
  object-fit: contain;
}

.footer-title {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: rgba(226,230,240,0.82);
  transition: color .2s ease;
}

.footer-links a:hover {
  color: var(--gold-2);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.12);
  color: rgba(226,230,240,0.62);
  font-size: 0.9rem;
}

.footer-bottom a {
  transition: color .2s ease;
}

.footer-bottom a:hover {
  color: var(--gold-2);
}

.floating-wa,
.mobile-call,
.back-top {
  position: fixed;
  z-index: 950;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--white);
  box-shadow: var(--shadow);
}

.floating-wa {
  left: 24px;
  bottom: 24px;
  background: #1fa855;
}

.mobile-call {
  right: 24px;
  bottom: 24px;
  display: none;
  background: var(--gold);
}

.back-top {
  right: 24px;
  bottom: 90px;
  border: 0;
  opacity: 0;
  pointer-events: none;
  background: var(--navy);
  transition: opacity .25s ease, transform .25s ease;
  transform: translateY(10px);
}

.back-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (max-width: 1100px) {
  .hero-grid,
  .article-layout,
  .contact-grid,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .hero-mini-grid,
  .quick-facts,
  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 980px) {
  .nav-wrap {
    min-height: 84px;
  }

  .main-nav,
  .nav-actions .btn-primary,
  .nav-actions a[aria-label='واتساب'] {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .mobile-menu {
    position: absolute;
    top: calc(100% + 1px);
    right: 12px;
    left: 12px;
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--white);
    box-shadow: var(--shadow);
    display: none;
  }

  .mobile-menu.open {
    display: grid;
    gap: 8px;
  }

  .mobile-menu a {
    padding: 12px 14px;
    border-radius: 4px;
    font-weight: 700;
    color: var(--navy);
  }

  .mobile-menu a.active,
  .mobile-menu a:hover {
    background: var(--light-2);
  }

  .mobile-menu .btn {
    width: 100%;
    margin-top: 6px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .container {
    width: min(100% - 28px, 1240px);
  }

  .section {
    padding: 64px 0;
  }

  .header-logo {
    width: 78px;
    height: 78px;
  }

  .header-logo img {
    height: 58px;
    max-width: 68px;
  }

  .hero {
    padding: 78px 0 58px;
  }

  .hero-card {
    padding: 26px 20px;
  }

  .hero-mini-grid,
  .quick-facts,
  .cards,
  .features,
  .steps,
  .footer-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .mini-card,
  .fact {
    border-inline-end: 0;
    border-bottom: 1px solid var(--border);
  }

  .mini-card:last-child,
  .fact:last-child {
    border-bottom: 0;
  }

  .content-box,
  .card,
  .notice,
  .cta-inline {
    padding: 22px;
  }

  .service-row {
    grid-template-columns: 1fr;
  }

  .mobile-call {
    display: grid;
  }

  .footer-bottom {
    display: block;
  }

  .article-body {
    font-size: 1rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}


/* تحسينات الهيدر والشعار وأزرار التواصل */
.hero-brand-logo {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-brand-logo img {
  display: block;
  width: min(100%, 360px);
  height: auto;
  max-height: 390px;
  object-fit: contain;
}

@keyframes attention-pulse {
  0%, 100% { transform: scale(1); box-shadow: var(--shadow), 0 0 0 0 rgba(184, 132, 56, 0.34); }
  50% { transform: scale(1.08); box-shadow: var(--shadow), 0 0 0 12px rgba(184, 132, 56, 0); }
}

@keyframes whatsapp-pulse {
  0%, 100% { transform: scale(1); box-shadow: var(--shadow), 0 0 0 0 rgba(31, 168, 85, 0.34); }
  50% { transform: scale(1.08); box-shadow: var(--shadow), 0 0 0 12px rgba(31, 168, 85, 0); }
}

.floating-wa { animation: whatsapp-pulse 1.8s ease-in-out infinite; }
.mobile-call { animation: attention-pulse 1.8s ease-in-out .35s infinite; }

@media (max-width: 980px) {
  .nav-wrap {
    justify-content: space-between;
    gap: 16px;
  }

  .nav-actions {
    display: none;
  }

  .menu-toggle {
    order: 0;
    margin: 0;
  }

  .header-logo {
    order: 1;
    margin: 0;
  }

  .hero-brand-logo img {
    width: min(100%, 300px);
    max-height: 330px;
  }
}

@media (max-width: 768px) {
  .hero-brand-logo {
    margin-top: 22px;
    margin-bottom: 6px;
  }

  .hero-brand-logo img {
    width: min(78vw, 245px);
    max-height: 275px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating-wa,
  .mobile-call {
    animation: none;
  }
}

/* ضبط موضع شعار الواجهة وتناسق المسافات على سطح المكتب والآيباد */
.hero {
  padding: 72px 0 64px;
}

.hero-grid {
  align-items: start;
  gap: 44px;
}

.hero-side {
  display: grid;
  gap: 22px;
  align-content: start;
}

.hero-brand-logo {
  margin: 0;
  min-height: 0;
}

.hero-brand-logo img {
  width: min(100%, 430px);
  max-height: 330px;
  object-fit: contain;
}

.hero-card {
  margin: 0;
}

@media (max-width: 1100px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr);
    gap: 32px;
  }

  .hero-brand-logo img {
    width: min(100%, 360px);
    max-height: 285px;
  }
}

@media (max-width: 900px) {
  .hero {
    padding: 54px 0 48px;
  }

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

  .hero-side {
    gap: 18px;
  }

  .hero-brand-logo img {
    width: min(72vw, 330px);
    max-height: 300px;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 42px 0 40px;
  }

  .hero-brand-logo {
    margin: 0;
  }

  .hero-brand-logo img {
    width: min(76vw, 270px);
    max-height: 250px;
  }
}

/* Single consultation CTA in the home hero */
.hero-cta {
  width: 100%;
  justify-content: center;
}

.hero-cta .btn {
  min-width: 190px;
  justify-content: center;
}

@media (max-width: 768px) {
  .hero-cta .btn {
    width: min(100%, 260px);
  }
}

/* Home hero title refinement */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-title {
  margin: 0 0 1.2rem;
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: clamp(2.15rem, 3.7vw, 3.65rem);
  line-height: 1.35;
  color: var(--navy);
}

.hero-title span {
  display: block;
}

.reveal-title {
  opacity: 0;
  transform: translateY(24px);
  animation: heroTitleReveal 0.9s ease forwards, heroTitleGlow 3.8s ease-in-out 1s infinite;
}

@keyframes heroTitleReveal {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroTitleGlow {
  0%, 100% {
    text-shadow: 0 0 0 rgba(156, 122, 66, 0);
  }
  50% {
    text-shadow: 0 8px 24px rgba(156, 122, 66, 0.14);
  }
}

.hero-content .lead {
  max-width: 680px;
}

@media (max-width: 1100px) {
  .hero-title {
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.4;
  }
}

@media (max-width: 768px) {
  .hero-content {
    align-items: center;
    text-align: center;
  }

  .hero-title {
    font-size: 1.95rem;
    line-height: 1.55;
    margin-bottom: 1rem;
  }

  .hero-content .lead {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-title {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* Final responsive two-line animated home title */
.hero-title {
  width: 100%;
  max-width: 760px;
  overflow: hidden;
}

.hero-title span {
  display: block;
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(26px);
  background: linear-gradient(100deg, var(--navy) 0%, var(--navy) 42%, var(--gold) 50%, var(--navy) 58%, var(--navy) 100%);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: titleLineIn .8s cubic-bezier(.2,.75,.25,1) forwards,
             titleShine 5s ease-in-out 1.8s infinite;
}

.hero-title span:nth-child(2) {
  animation-delay: .18s, 2.05s;
}

@keyframes titleLineIn {
  from {
    opacity: 0;
    transform: translateY(26px);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes titleShine {
  0%, 72%, 100% { background-position: 100% 0; }
  84% { background-position: 0 0; }
}

.reveal-title {
  opacity: 1;
  transform: none;
  animation: none;
}

@media (max-width: 1100px) {
  .hero-title {
    max-width: 650px;
    font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  }
}

@media (max-width: 768px) {
  .hero-title {
    max-width: 100%;
    font-size: clamp(1.32rem, 6vw, 1.62rem);
    line-height: 1.65;
    margin-bottom: .9rem;
  }

  .hero-title span {
    width: 100%;
    max-width: none;
    white-space: nowrap;
    text-align: center;
  }
}

@media (max-width: 390px) {
  .hero-title {
    font-size: clamp(1.18rem, 5.7vw, 1.42rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-title span {
    opacity: 1;
    transform: none;
    filter: none;
    color: var(--navy);
    background: none;
    animation: none;
  }
}

/* Mobile homepage overflow fix */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.hero-grid,
.hero-grid > *,
.hero-content,
.hero-side,
.hero-card,
.hero-brand-logo {
  min-width: 0;
  max-width: 100%;
}

.hero-title,
.hero-title span,
.hero-content .lead {
  box-sizing: border-box;
  max-width: 100%;
}

.hero-title span {
  width: auto;
}

@media (max-width: 768px) {
  .hero {
    padding: 38px 0 34px;
  }

  .hero-grid {
    width: 100%;
    gap: 24px;
  }

  .hero-content {
    width: 100%;
    padding-inline: 0;
  }

  .hero-title {
    width: 100%;
    max-width: 100%;
    margin: 0 auto .9rem;
    font-size: clamp(1.12rem, 5.25vw, 1.38rem);
    line-height: 1.65;
    text-align: center;
    overflow: visible;
  }

  .hero-title span {
    display: block;
    width: 100%;
    max-width: 100%;
    white-space: nowrap;
    text-align: center;
    letter-spacing: -0.025em;
  }

  .hero-content .lead {
    width: 100%;
    margin-inline: auto;
    padding-inline: 2px;
    font-size: .98rem;
    line-height: 2;
    overflow-wrap: anywhere;
  }

  .hero-cta {
    width: 100%;
    justify-content: center;
  }

  .hero-cta .btn {
    width: min(100%, 260px);
    min-width: 0;
  }

  .hero-side {
    width: 100%;
    overflow: hidden;
  }

  .hero-brand-logo img {
    width: min(72vw, 255px);
    max-width: 100%;
    margin-inline: auto;
  }

  .hero-card {
    width: 100%;
    padding: 22px 18px;
  }
}

@media (max-width: 390px) {
  .hero-title {
    font-size: clamp(1.02rem, 5vw, 1.2rem);
  }
}

/* Definitive home hero layout fix — prevents clipping on desktop and mobile */
.hero .container,
.hero-grid,
.hero-content,
.hero-side {
  min-width: 0;
}

.hero-content {
  width: 100%;
}

.hero-title {
  direction: rtl;
  width: 100%;
  max-width: 780px;
  overflow: visible;
  padding-inline: 4px;
  font-size: clamp(2.25rem, 3.65vw, 3.55rem);
  line-height: 1.38;
  text-align: right;
}

.hero-title span {
  display: block;
  width: 100%;
  max-width: 100%;
  white-space: nowrap;
  text-align: inherit;
}

@media (max-width: 1100px) {
  .hero-title {
    max-width: 100%;
    font-size: clamp(1.85rem, 3.8vw, 2.75rem);
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 34px 0 32px;
  }

  .hero-content {
    align-items: center;
    text-align: center;
  }

  .hero-title {
    width: 100%;
    max-width: 100%;
    padding-inline: 0;
    margin: 0 auto 1rem;
    font-size: clamp(1.18rem, 5.4vw, 1.48rem);
    line-height: 1.65;
    text-align: center;
    letter-spacing: -0.02em;
  }

  .hero-title span {
    width: 100%;
    white-space: nowrap;
  }

  .hero-content .lead {
    font-size: .94rem;
    line-height: 1.95;
    padding-inline: 4px;
  }

  .hero-brand-logo img {
    width: min(64vw, 225px);
    max-height: 235px;
  }
}

@media (max-width: 360px) {
  .hero-title {
    font-size: 1.08rem;
    letter-spacing: -0.035em;
  }
}

/* FINAL CACHE-SAFE HERO FIX */
.hero,
.hero .container,
.hero-grid,
.hero-content,
.hero-side {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.hero-grid {
  overflow: hidden !important;
}

.hero-title {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-inline: 0 !important;
  padding-inline: 0 !important;
  overflow: hidden !important;
  text-wrap: balance;
}

.hero-title span {
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

@media (min-width: 769px) {
  .hero-title {
    font-size: clamp(2rem, 3.25vw, 3.2rem) !important;
    line-height: 1.42 !important;
    text-align: right !important;
  }

  .hero-title span {
    white-space: normal !important;
  }
}

@media (max-width: 768px) {
  .hero .container {
    width: calc(100% - 28px) !important;
  }

  .hero-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .hero-content {
    overflow: hidden !important;
  }

  .hero-title {
    font-size: clamp(1.28rem, 5.75vw, 1.58rem) !important;
    line-height: 1.55 !important;
    letter-spacing: -0.035em !important;
    text-align: center !important;
  }

  .hero-title span {
    white-space: nowrap !important;
    text-align: center !important;
  }

  .hero-content .lead {
    font-size: .92rem !important;
    line-height: 1.9 !important;
    text-align: center !important;
  }
}

@media (max-width: 390px) {
  .hero-title {
    font-size: 1.22rem !important;
  }
}

@media (max-width: 350px) {
  .hero-title {
    font-size: 1.08rem !important;
  }
}
