/* =====================================================
   OXACODE — FINAL PRODUCTION POLISH
   Global theme, section headings, floating actions, responsive
   ===================================================== */

/* Consistent page gutters */
:root {
  --oxa-page-gutter: clamp(1.25rem, 4.2vw, 4.75rem);
  --oxa-section-space: clamp(5rem, 8vw, 7.5rem);
  --oxa-heading-max: 760px;
  --oxa-copy-max: 650px;
}

body { overflow-x: hidden; }

.oxa-navbar > .container-fluid,
main > section > .container-fluid,
.oxa-footer > .container-fluid {
  padding-inline: var(--oxa-page-gutter) !important;
}

/* Unified, calmer section headings */
.section-head,
.services-section-head,
.about-section-head,
.service-detail-section-head,
.portfolio-toolbar__copy,
.portfolio-capabilities__head,
.project-detail-stack__head,
.project-gallery__head,
.project-results__head {
  width: min(100%, var(--oxa-heading-max));
  margin-inline: auto;
  text-align: center;
}

.section-head .eyebrow,
.services-section-head .eyebrow,
.about-section-head .eyebrow {
  display: inline-flex;
  justify-content: center;
}

.section-title,
.services-section-head .section-title,
.about-section-head .section-title {
  max-width: var(--oxa-heading-max);
  margin-inline: auto;
  font-size: clamp(2rem, 3.15vw, 3.2rem) !important;
  line-height: 1.1 !important;
  letter-spacing: -0.042em !important;
}

.section-sub,
.services-section-head .section-sub,
.about-section-head .section-sub {
  max-width: var(--oxa-copy-max) !important;
  margin-inline: auto !important;
  font-size: clamp(.92rem, 1vw, 1rem) !important;
  line-height: 1.78 !important;
  text-align: center;
}

/* Home page: ensure every major title block is centered */
.oxa-services .section-head,
.oxa-process .section-head,
.oxa-portfolio .portfolio-head,
.oxa-testimonials .section-head,
.oxa-cta .cta-box {
  text-align: center;
}

.oxa-portfolio .portfolio-head {
  align-items: center !important;
}

.oxa-portfolio .portfolio-head__copy {
  width: min(100%, var(--oxa-heading-max));
  margin-inline: auto;
  text-align: center;
}

.oxa-portfolio .portfolio-head__actions {
  justify-content: center;
}

.cta-title {
  max-width: 820px;
  margin-inline: auto;
  font-size: clamp(2rem, 3.3vw, 3.35rem) !important;
  line-height: 1.1 !important;
}

.cta-sub {
  max-width: 650px;
  margin-inline: auto;
}

/* Aurora light mode — tailored to OxaCode logo */
html[data-theme="light"] body {
  background: #f7f9ff;
  color: var(--text-100);
}

html[data-theme="light"] .bg-fx {
  background:
    radial-gradient(circle at 4% 3%, rgba(56, 168, 232, .19), transparent 29%),
    radial-gradient(circle at 96% 14%, rgba(120, 87, 217, .16), transparent 31%),
    radial-gradient(circle at 50% 100%, rgba(84, 93, 225, .10), transparent 38%),
    linear-gradient(180deg, #fcfdff 0%, #f7f8ff 48%, #f1f5ff 100%);
}

html[data-theme="light"] .glow-blue { opacity: .22; }
html[data-theme="light"] .glow-purple { opacity: .18; }

html[data-theme="light"] .oxa-navbar.scrolled,
html[data-theme="light"] .oxa-navbar.is-scrolled {
  background: rgba(248, 250, 255, .72) !important;
  border-bottom-color: rgba(74, 101, 170, .12) !important;
  box-shadow: 0 14px 40px rgba(54, 73, 125, .08) !important;
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}

html[data-theme="light"] .service-card,
html[data-theme="light"] .portfolio-card,
html[data-theme="light"] .testi-card,
html[data-theme="light"] .why-stat,
html[data-theme="light"] .why-item,
html[data-theme="light"] .navigate-card,
html[data-theme="light"] .technology-group,
html[data-theme="light"] .service-row,
html[data-theme="light"] .service-detail-card,
html[data-theme="light"] .service-tech-group,
html[data-theme="light"] .about-mission__card,
html[data-theme="light"] .about-expertise__grid article {
  background: linear-gradient(145deg, rgba(255,255,255,.86), rgba(248,249,255,.66)) !important;
  border-color: rgba(73, 101, 174, .12) !important;
  box-shadow: 0 18px 48px rgba(57, 78, 137, .07), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

html[data-theme="light"] .oxa-btn-outline {
  color: #283858;
  background: rgba(255,255,255,.48);
  border-color: rgba(56, 133, 210, .2);
}

html[data-theme="light"] .oxa-btn-outline:hover {
  background: rgba(255,255,255,.82);
  border-color: rgba(111, 78, 222, .28);
  box-shadow: 0 12px 30px rgba(66, 93, 170, .1);
}

html[data-theme="light"] .oxa-footer {
  background:
    radial-gradient(circle at 10% 0%, rgba(56,168,232,.1), transparent 28%),
    radial-gradient(circle at 90% 100%, rgba(120,87,217,.1), transparent 30%),
    rgba(238,243,253,.78);
}

/* Floating contact controls */
.oxa-floating-actions {
  position: fixed;
  z-index: 1050;
  right: clamp(1rem, 2.2vw, 1.75rem);
  bottom: clamp(1rem, 2.2vw, 1.6rem);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .7rem;
  pointer-events: none;
}

html[dir="rtl"] .oxa-floating-actions {
  right: auto;
  left: clamp(1rem, 2.2vw, 1.75rem);
  align-items: flex-start;
}

.oxa-floating-btn {
  position: relative;
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(137, 160, 205, .18);
  border-radius: 50%;
  color: #fff;
  pointer-events: auto;
  transition: transform .25s ease, opacity .25s ease, visibility .25s ease, box-shadow .25s ease;
}

.oxa-floating-btn:hover { transform: translateY(-4px); color: #fff; }

.oxa-floating-btn--whatsapp {
  background: linear-gradient(145deg, #24c96b, #159c50);
  box-shadow: 0 14px 34px rgba(20, 156, 79, .28);
}

.oxa-floating-btn--whatsapp:hover { box-shadow: 0 18px 42px rgba(20, 156, 79, .38); }

.oxa-floating-btn--top {
  background: linear-gradient(145deg, rgba(45,140,255,.95), rgba(111,66,255,.95));
  box-shadow: 0 12px 30px rgba(77, 87, 218, .28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(.92);
}

.oxa-floating-btn--top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.oxa-floating-btn--top.is-visible:hover { transform: translateY(-4px); }

.oxa-floating-btn__tooltip {
  position: absolute;
  top: 50%;
  right: calc(100% + .7rem);
  transform: translateY(-50%) translateX(6px);
  width: max-content;
  max-width: 190px;
  padding: .5rem .7rem;
  color: var(--text-100);
  background: var(--mobile-menu-bg);
  border: 1px solid var(--card-border);
  border-radius: 9px;
  font-size: .7rem;
  font-weight: 600;
  opacity: 0;
  visibility: hidden;
  transition: .22s ease;
  box-shadow: var(--shadow-sm, 0 8px 24px rgba(0,0,0,.2));
}

html[dir="rtl"] .oxa-floating-btn__tooltip {
  right: auto;
  left: calc(100% + .7rem);
  transform: translateY(-50%) translateX(-6px);
}

.oxa-floating-btn:hover .oxa-floating-btn__tooltip,
.oxa-floating-btn:focus-visible .oxa-floating-btn__tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* Responsive final pass */
@media (max-width: 991.98px) {
  :root { --oxa-page-gutter: clamp(1.2rem, 4vw, 2.25rem); }

  .section-title,
  .services-section-head .section-title,
  .about-section-head .section-title {
    font-size: clamp(1.9rem, 5vw, 2.65rem) !important;
  }
}

@media (max-width: 767.98px) {
  :root { --oxa-page-gutter: 1.25rem; }

  .section-head,
  .services-section-head,
  .about-section-head { margin-bottom: 2.25rem; }

  .section-title,
  .services-section-head .section-title,
  .about-section-head .section-title {
    font-size: clamp(1.75rem, 7vw, 2.25rem) !important;
    letter-spacing: -0.032em !important;
  }

  .section-sub { font-size: .92rem !important; }

  .oxa-floating-btn { width: 46px; height: 46px; }
  .oxa-floating-btn__tooltip { display: none; }
}

@media (max-width: 575.98px) {
  :root { --oxa-page-gutter: 1rem; }
  .oxa-floating-actions { right: .85rem; bottom: .85rem; gap: .55rem; }
  html[dir="rtl"] .oxa-floating-actions { left: .85rem; right: auto; }
  .oxa-floating-btn { width: 43px; height: 43px; font-size: .92rem; }
}

@media (prefers-reduced-motion: reduce) {
  .oxa-floating-btn { transition: none; }
}


/* =====================================================
   OXACODE — V2 POLISH
   Split floating controls + refined Arabic typography
   ===================================================== */

/* Keep each floating control in its own screen corner. */
.oxa-floating-actions {
  position: static;
  inset: auto;
  display: block;
  pointer-events: none;
}

.oxa-floating-btn {
  position: fixed;
  bottom: clamp(1rem, 2.2vw, 1.6rem);
  z-index: 1050;
}

/* English / LTR: WhatsApp left, back-to-top right. */
html[dir="ltr"] .oxa-floating-btn--whatsapp {
  left: clamp(1rem, 2.2vw, 1.75rem);
  right: auto;
}

html[dir="ltr"] .oxa-floating-btn--top {
  right: clamp(1rem, 2.2vw, 1.75rem);
  left: auto;
}

/* Arabic / RTL: WhatsApp right, back-to-top left. */
html[dir="rtl"] .oxa-floating-btn--whatsapp {
  right: clamp(1rem, 2.2vw, 1.75rem);
  left: auto;
}

html[dir="rtl"] .oxa-floating-btn--top {
  left: clamp(1rem, 2.2vw, 1.75rem);
  right: auto;
}

/* WhatsApp is a compact branded pill on larger screens. */
.oxa-floating-btn--whatsapp {
  width: auto;
  min-width: 52px;
  padding-inline: 1rem;
  gap: .58rem;
  border-radius: 999px;
}

.oxa-floating-btn--whatsapp::after {
  content: "WhatsApp";
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .01em;
}

html[lang="ar"] .oxa-floating-btn--whatsapp::after {
  content: "واتساب";
  font-family: 'Alexandria', 'Tajawal', sans-serif;
  font-size: .7rem;
  font-weight: 600;
}

/* Tooltips open toward the page center from each side. */
html[dir="ltr"] .oxa-floating-btn--whatsapp .oxa-floating-btn__tooltip,
html[dir="rtl"] .oxa-floating-btn--top .oxa-floating-btn__tooltip {
  left: calc(100% + .7rem);
  right: auto;
  transform: translateY(-50%) translateX(-6px);
}

html[dir="ltr"] .oxa-floating-btn--top .oxa-floating-btn__tooltip,
html[dir="rtl"] .oxa-floating-btn--whatsapp .oxa-floating-btn__tooltip {
  right: calc(100% + .7rem);
  left: auto;
  transform: translateY(-50%) translateX(6px);
}

html[dir="ltr"] .oxa-floating-btn--whatsapp:hover .oxa-floating-btn__tooltip,
html[dir="ltr"] .oxa-floating-btn--whatsapp:focus-visible .oxa-floating-btn__tooltip,
html[dir="rtl"] .oxa-floating-btn--top:hover .oxa-floating-btn__tooltip,
html[dir="rtl"] .oxa-floating-btn--top:focus-visible .oxa-floating-btn__tooltip,
html[dir="ltr"] .oxa-floating-btn--top:hover .oxa-floating-btn__tooltip,
html[dir="ltr"] .oxa-floating-btn--top:focus-visible .oxa-floating-btn__tooltip,
html[dir="rtl"] .oxa-floating-btn--whatsapp:hover .oxa-floating-btn__tooltip,
html[dir="rtl"] .oxa-floating-btn--whatsapp:focus-visible .oxa-floating-btn__tooltip {
  transform: translateY(-50%) translateX(0);
}

/* Refined Arabic typography: calmer, smaller, and more readable. */
html[lang="ar"] body {
  font-family: 'Alexandria', 'Tajawal', sans-serif;
  line-height: 1.8;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] h5,
html[lang="ar"] h6,
html[lang="ar"] .section-title,
html[lang="ar"] .cta-title {
  font-family: 'Alexandria', 'Tajawal', sans-serif !important;
  letter-spacing: 0 !important;
  text-wrap: balance;
}

html[lang="ar"] h1,
html[lang="ar"] .hero-title,
html[lang="ar"] .oxa-hero__title,
html[lang="ar"] .services-hero h1,
html[lang="ar"] .service-detail-hero h1,
html[lang="ar"] .portfolio-hero h1,
html[lang="ar"] .project-detail-hero h1,
html[lang="ar"] .about-page-hero h1 {
  font-size: clamp(2.35rem, 4.3vw, 4.25rem) !important;
  line-height: 1.24 !important;
  font-weight: 600 !important;
}

html[lang="ar"] .section-title,
html[lang="ar"] .services-section-head .section-title,
html[lang="ar"] .about-section-head .section-title,
html[lang="ar"] .service-detail-section-head h2,
html[lang="ar"] .portfolio-toolbar h2,
html[lang="ar"] .portfolio-capabilities__head .section-title,
html[lang="ar"] .project-detail-stack__head h2,
html[lang="ar"] .project-gallery__head h2,
html[lang="ar"] .project-results__head h2 {
  font-size: clamp(1.85rem, 2.85vw, 2.8rem) !important;
  line-height: 1.34 !important;
  font-weight: 600 !important;
}

html[lang="ar"] .cta-title {
  font-size: clamp(1.9rem, 3vw, 2.9rem) !important;
  line-height: 1.34 !important;
  font-weight: 600 !important;
}

html[lang="ar"] p,
html[lang="ar"] .section-sub,
html[lang="ar"] .cta-sub,
html[lang="ar"] .hero-desc,
html[lang="ar"] .oxa-hero__text {
  line-height: 1.95 !important;
}

html[lang="ar"] .oxa-navbar__links,
html[lang="ar"] .oxa-mobile-menu,
html[lang="ar"] .footer-links,
html[lang="ar"] button,
html[lang="ar"] .btn {
  font-family: 'Alexandria', 'Tajawal', sans-serif;
}

html[lang="ar"] .oxa-navbar__links a {
  font-size: .78rem;
  font-weight: 500;
}

html[lang="ar"] .eyebrow {
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .035em !important;
}

@media (max-width: 767.98px) {
  html[lang="ar"] h1,
  html[lang="ar"] .hero-title,
  html[lang="ar"] .oxa-hero__title,
  html[lang="ar"] .services-hero h1,
  html[lang="ar"] .service-detail-hero h1,
  html[lang="ar"] .portfolio-hero h1,
  html[lang="ar"] .project-detail-hero h1,
  html[lang="ar"] .about-page-hero h1 {
    font-size: clamp(2rem, 8.7vw, 3rem) !important;
    line-height: 1.3 !important;
  }

  html[lang="ar"] .section-title,
  html[lang="ar"] .services-section-head .section-title,
  html[lang="ar"] .about-section-head .section-title,
  html[lang="ar"] .service-detail-section-head h2,
  html[lang="ar"] .portfolio-toolbar h2 {
    font-size: clamp(1.65rem, 6.5vw, 2.15rem) !important;
    line-height: 1.38 !important;
  }

  .oxa-floating-btn--whatsapp {
    width: 46px;
    min-width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 50%;
  }

  .oxa-floating-btn--whatsapp::after {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .oxa-floating-btn {
    bottom: .85rem;
  }

  html[dir="ltr"] .oxa-floating-btn--whatsapp { left: .85rem; }
  html[dir="ltr"] .oxa-floating-btn--top { right: .85rem; }
  html[dir="rtl"] .oxa-floating-btn--whatsapp { right: .85rem; }
  html[dir="rtl"] .oxa-floating-btn--top { left: .85rem; }

  html[lang="ar"] p,
  html[lang="ar"] .section-sub,
  html[lang="ar"] .cta-sub {
    font-size: .9rem !important;
  }
}


/* =====================================================
   V3 — final floating controls, home light visual, about motion
   ===================================================== */

/* WhatsApp returns to the approved circular style on every viewport. */
.oxa-floating-btn--whatsapp {
  width: 52px !important;
  min-width: 52px !important;
  height: 52px !important;
  padding: 0 !important;
  gap: 0 !important;
  border-radius: 50% !important;
}

.oxa-floating-btn--whatsapp::after {
  content: none !important;
  display: none !important;
}

/* LTR: WhatsApp left / Back-to-top right. RTL: mirrored. */
html[dir="ltr"] .oxa-floating-btn--whatsapp { left: clamp(1rem, 2.2vw, 1.75rem); right: auto; }
html[dir="ltr"] .oxa-floating-btn--top { right: clamp(1rem, 2.2vw, 1.75rem); left: auto; }
html[dir="rtl"] .oxa-floating-btn--whatsapp { right: clamp(1rem, 2.2vw, 1.75rem); left: auto; }
html[dir="rtl"] .oxa-floating-btn--top { left: clamp(1rem, 2.2vw, 1.75rem); right: auto; }

/* Remove the light-mode rectangular panel behind the home cube. */
html[data-theme="light"] .about-preview__visual {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

html[data-theme="light"] .about-preview__visual::before {
  opacity: .72;
  background: radial-gradient(
    circle,
    rgba(45, 140, 255, .17) 0%,
    rgba(138, 63, 252, .10) 42%,
    transparent 72%
  );
}

/* About-page cards: subtle premium motion, never distracting. */
.about-overview__grid article,
.about-mission__card,
.about-values__timeline article,
.about-expertise__grid article,
.about-process__grid article {
  position: relative;
  overflow: hidden;
  transition:
    transform .34s cubic-bezier(.16, 1, .3, 1),
    border-color .34s ease,
    background .34s ease,
    box-shadow .34s ease;
}

.about-overview__grid article::after,
.about-mission__card::after,
.about-values__timeline article::after,
.about-expertise__grid article::after,
.about-process__grid article::after {
  content: "";
  position: absolute;
  inset: -35% auto auto -30%;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 168, 232, .13), transparent 68%);
  opacity: 0;
  transform: scale(.75);
  pointer-events: none;
  transition: opacity .35s ease, transform .55s cubic-bezier(.16, 1, .3, 1);
}

html[dir="rtl"] .about-overview__grid article::after,
html[dir="rtl"] .about-mission__card::after,
html[dir="rtl"] .about-values__timeline article::after,
html[dir="rtl"] .about-expertise__grid article::after,
html[dir="rtl"] .about-process__grid article::after {
  left: auto;
  right: -30%;
}

.about-overview__grid article:hover,
.about-mission__card:hover,
.about-values__timeline article:hover,
.about-expertise__grid article:hover,
.about-process__grid article:hover {
  transform: translateY(-6px);
  border-color: rgba(111, 126, 255, .27);
  box-shadow: 0 22px 52px rgba(0, 3, 18, .20);
}

.about-overview__grid article:hover::after,
.about-mission__card:hover::after,
.about-values__timeline article:hover::after,
.about-expertise__grid article:hover::after,
.about-process__grid article:hover::after {
  opacity: 1;
  transform: scale(1);
}

.about-expertise__grid article:hover .about-expertise__icon,
.about-mission__card:hover .about-mission__icon,
.about-process__grid article:hover i {
  transform: translateY(-3px) rotate(-3deg);
  color: #fff;
}

html[dir="rtl"] .about-expertise__grid article:hover .about-expertise__icon,
html[dir="rtl"] .about-mission__card:hover .about-mission__icon,
html[dir="rtl"] .about-process__grid article:hover i {
  transform: translateY(-3px) rotate(3deg);
}

.about-expertise__icon,
.about-mission__icon,
.about-process__grid i {
  transition: transform .34s ease, color .34s ease, box-shadow .34s ease;
}

@media (max-width: 767.98px) {
  .oxa-floating-btn--whatsapp {
    width: 46px !important;
    min-width: 46px !important;
    height: 46px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-overview__grid article,
  .about-mission__card,
  .about-values__timeline article,
  .about-expertise__grid article,
  .about-process__grid article,
  .about-expertise__icon,
  .about-mission__icon,
  .about-process__grid i {
    transition: none !important;
    transform: none !important;
  }
}


/* =====================================================
   V4 — Home alignment, mobile stats, and compact brand
   ===================================================== */

/* Portfolio heading and action form one centered composition */
.oxa-portfolio .portfolio-head {
  width: min(100%, 860px);
  display: flex !important;
  flex-direction: column;
  align-items: center !important;
  justify-content: center !important;
  gap: 1.35rem !important;
  margin-inline: auto;
  margin-bottom: 3rem;
  text-align: center;
}

.oxa-portfolio .portfolio-head__content {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.oxa-portfolio .portfolio-head__title,
.oxa-portfolio .portfolio-head__text {
  margin-inline: auto;
  text-align: center;
}

.oxa-portfolio .portfolio-head__button {
  align-self: center;
  min-height: 46px;
  margin: 0;
}

/* Stable stats layout in both LTR and RTL */
@media (max-width: 767.98px) {
  .stats-bar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 1rem !important;
  }

  .stats-bar-divider { display: none !important; }

  .stats-bar-item {
    min-width: 0;
    min-height: 116px;
    justify-content: flex-start !important;
    padding: 1rem;
    border-bottom: 1px solid var(--stats-bar-border);
  }

  .stats-bar-item:nth-of-type(1),
  .stats-bar-item:nth-of-type(5) {
    border-inline-end: 1px solid var(--stats-bar-border);
  }

  .stats-bar-item:nth-of-type(5),
  .stats-bar-item:nth-of-type(7) {
    border-bottom: 0;
  }

  .sb-text {
    min-width: 0;
    font-size: 1.5rem;
  }

  .sb-text small {
    display: inline-block;
    margin-top: .25rem;
    line-height: 1.45;
  }
}

@media (max-width: 420px) {
  .stats-bar { grid-template-columns: 1fr; }

  .stats-bar-item {
    min-height: 96px;
    border-inline-end: 0 !important;
    border-bottom: 1px solid var(--stats-bar-border) !important;
  }

  .stats-bar-item:last-child { border-bottom: 0 !important; }
}

/* Keep the complete brand visible on mobile, stacked under the mark */
@media (max-width: 575.98px) {
  .oxa-navbar .oxa-brand {
    width: 76px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .18rem;
    text-align: center;
  }

  .oxa-navbar .oxa-brand__logo {
    height: 34px;
  }

  .oxa-navbar .oxa-brand__text {
    display: flex !important;
    align-items: center;
    line-height: 1;
  }

  .oxa-navbar .oxa-brand__text strong {
    font-size: .72rem;
    line-height: 1;
  }

  .oxa-navbar .oxa-brand__text small {
    margin-top: .14rem;
    font-size: .38rem;
    line-height: 1.05;
    letter-spacing: .1em;
    white-space: nowrap;
  }

  .oxa-navbar > .container-fluid {
    align-items: center;
  }
}

/* Arabic mobile typography and alignment remain compact and readable */
@media (max-width: 575.98px) {
  html[lang="ar"] .oxa-navbar .oxa-brand__text strong { font-size: .7rem; }
  html[lang="ar"] .oxa-navbar .oxa-brand__text small { font-size: .36rem; }
}


/* =====================================================
   V5 — Portfolio action at the side
   ===================================================== */
@media (min-width: 992px) {
  .oxa-portfolio .portfolio-head {
    position: relative;
    width: 100%;
    min-height: 210px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 3rem;
  }

  .oxa-portfolio .portfolio-head__content {
    width: min(100%, 850px);
    max-width: 850px;
    margin-inline: auto;
    padding-inline: 180px;
    text-align: center;
  }

  .oxa-portfolio .portfolio-head__button {
    position: absolute;
    inset-inline-end: 0;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
  }
}

@media (max-width: 991.98px) {
  .oxa-portfolio .portfolio-head {
    width: 100%;
    min-height: 0;
    display: flex !important;
    flex-direction: column;
    align-items: center !important;
    gap: 1.2rem !important;
  }

  .oxa-portfolio .portfolio-head__content {
    width: 100%;
    max-width: 760px;
    padding-inline: 0;
  }

  .oxa-portfolio .portfolio-head__button {
    position: static;
    transform: none;
  }
}


/* =====================================================
   V6 — Opaline Aurora + final typography and portfolio composition
   ===================================================== */

/* A calmer, brand-specific light surface system */
html[data-theme="light"] body {
  background:
    radial-gradient(circle at 0% 0%, rgba(58, 181, 191, .10), transparent 27%),
    radial-gradient(circle at 100% 8%, rgba(125, 85, 211, .09), transparent 29%),
    linear-gradient(145deg, #F7FCFC 0%, #F4F8FB 48%, #F4F1FA 100%) !important;
}

html[data-theme="light"] .bg-fx {
  background:
    radial-gradient(circle at 2% 4%, rgba(53, 179, 190, .17), transparent 30%),
    radial-gradient(circle at 97% 12%, rgba(124, 83, 210, .14), transparent 31%),
    radial-gradient(circle at 52% 105%, rgba(51, 124, 220, .10), transparent 40%),
    linear-gradient(145deg, #F7FCFC 0%, #F4F8FB 48%, #F4F1FA 100%) !important;
}

html[data-theme="light"] .oxa-navbar.scrolled,
html[data-theme="light"] .oxa-navbar.is-scrolled {
  background: rgba(241, 249, 250, .78) !important;
  border-bottom-color: rgba(55, 109, 145, .13) !important;
  box-shadow: 0 16px 44px rgba(42, 79, 112, .08) !important;
}

html[data-theme="light"] .service-card,
html[data-theme="light"] .portfolio-card,
html[data-theme="light"] .project-card,
html[data-theme="light"] .testi-card,
html[data-theme="light"] .why-stat,
html[data-theme="light"] .why-item,
html[data-theme="light"] .navigate-card,
html[data-theme="light"] .technology-group,
html[data-theme="light"] .service-row,
html[data-theme="light"] .service-detail-card,
html[data-theme="light"] .service-tech-group,
html[data-theme="light"] .about-mission__card,
html[data-theme="light"] .about-expertise__grid article {
  background: linear-gradient(145deg, rgba(252,255,255,.78), rgba(246,247,253,.62)) !important;
  border-color: rgba(62, 104, 151, .13) !important;
  box-shadow: 0 20px 50px rgba(44, 76, 111, .075), inset 0 1px 0 rgba(255,255,255,.92) !important;
}

html[data-theme="light"] .oxa-btn-primary,
html[data-theme="light"] .oxa-btn-cta {
  background: linear-gradient(135deg, #249CCB 0%, #5266E2 54%, #8157D4 100%) !important;
}

html[data-theme="light"] .oxa-footer {
  background:
    radial-gradient(circle at 5% 0%, rgba(55,177,187,.11), transparent 30%),
    radial-gradient(circle at 95% 100%, rgba(124,83,210,.10), transparent 32%),
    rgba(232, 241, 244, .82) !important;
}

/* Refined typography scale */
.section-title,
.services-section-head .section-title,
.about-section-head .section-title {
  font-size: clamp(1.95rem, 2.85vw, 2.9rem) !important;
  line-height: 1.14 !important;
  letter-spacing: -.032em !important;
}

.about-story__content h2,
.service-detail-section-head h2,
.portfolio-toolbar h2,
.project-detail-hero h1,
.service-detail-hero h1,
.about-page-hero h1 {
  letter-spacing: -.035em !important;
}

.about-mission__card h3 {
  font-size: clamp(1.5rem, 2.25vw, 2.25rem) !important;
  line-height: 1.18 !important;
}

html[lang="ar"] .section-title,
html[lang="ar"] .services-section-head .section-title,
html[lang="ar"] .about-section-head .section-title {
  font-size: clamp(1.8rem, 2.55vw, 2.55rem) !important;
  line-height: 1.36 !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

html[lang="ar"] .about-mission__card h3 {
  max-width: 720px;
  font-size: clamp(1.45rem, 2vw, 2rem) !important;
  line-height: 1.48 !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

html[lang="ar"] .about-story__content h2,
html[lang="ar"] .about-page-hero h1,
html[lang="ar"] .service-detail-hero h1,
html[lang="ar"] .project-detail-hero h1 {
  line-height: 1.34 !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

/* Portfolio: centered narrative, restrained side action above the cards */
.oxa-portfolio .portfolio-head__title {
  max-width: 620px !important;
  font-size: clamp(2rem, 2.9vw, 2.85rem) !important;
}

.oxa-portfolio .portfolio-head__text {
  max-width: 610px !important;
}

@media (min-width: 992px) {
  .oxa-portfolio .portfolio-head {
    min-height: 245px !important;
    padding-bottom: 58px;
    align-items: flex-start !important;
  }

  .oxa-portfolio .portfolio-head__content {
    width: min(100%, 760px) !important;
    max-width: 760px !important;
    padding-inline: 0 !important;
  }

  .oxa-portfolio .portfolio-head__button {
    top: auto !important;
    bottom: 0;
    inset-inline-end: 0;
    transform: none !important;
    min-height: 44px;
    padding-inline: 1.1rem;
    font-size: .82rem;
  }
}

/* Polished card movement without exaggerated motion */
.about-expertise__grid article,
.about-mission__card,
.project-card,
.service-card {
  transition: transform .34s var(--ease-out, ease), border-color .34s ease, box-shadow .34s ease !important;
}

.about-expertise__grid article:hover,
.about-mission__card:hover,
.project-card:hover,
.service-card:hover {
  transform: translateY(-7px) !important;
}

@media (max-width: 767.98px) {
  .section-title,
  .services-section-head .section-title,
  .about-section-head .section-title {
    font-size: clamp(1.75rem, 7vw, 2.25rem) !important;
  }

  html[lang="ar"] .section-title,
  html[lang="ar"] .services-section-head .section-title,
  html[lang="ar"] .about-section-head .section-title {
    font-size: clamp(1.65rem, 6.6vw, 2.1rem) !important;
    line-height: 1.42 !important;
  }
}

/* =====================================================
   V7 — Final home hero scale + portfolio mobile layout
   ===================================================== */

/* Home hero: calmer typography without changing the composition */
.oxa-hero .hero-title {
  max-width: 660px;
  font-size: clamp(2.25rem, 4.35vw, 3.45rem) !important;
  line-height: 1.12 !important;
  letter-spacing: -0.035em !important;
  margin-bottom: 1.3rem;
}

.oxa-hero .hero-desc {
  max-width: 540px;
  font-size: clamp(.94rem, 1.15vw, 1.02rem) !important;
  line-height: 1.78;
}

html[lang="ar"] .oxa-hero .hero-title {
  max-width: 690px;
  font-size: clamp(2.05rem, 3.75vw, 3rem) !important;
  line-height: 1.38 !important;
  letter-spacing: 0 !important;
  font-weight: 600 !important;
}

/* Home portfolio cards: preserve a balanced desktop grid */
.oxa-portfolio .portfolio-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.oxa-portfolio .project-card {
  width: 100%;
  min-width: 0;
}

.oxa-portfolio .project-card__media {
  min-height: 220px;
}

.oxa-portfolio .project-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Tablet and mobile: every project occupies its own row */
@media (max-width: 991.98px) {
  .oxa-hero .hero-title {
    max-width: 620px;
    font-size: clamp(2.15rem, 6vw, 3.05rem) !important;
  }

  html[lang="ar"] .oxa-hero .hero-title {
    font-size: clamp(2rem, 5.6vw, 2.75rem) !important;
  }

  .oxa-portfolio .portfolio-grid {
    grid-template-columns: 1fr !important;
    gap: 1.35rem !important;
  }

  .oxa-portfolio .project-card {
    max-width: 760px;
    margin-inline: auto;
  }

  .oxa-portfolio .project-card__media {
    height: clamp(230px, 48vw, 390px) !important;
    min-height: 230px;
  }
}

@media (max-width: 575.98px) {
  .oxa-hero .hero-title {
    max-width: 100%;
    font-size: clamp(1.9rem, 9.3vw, 2.55rem) !important;
    line-height: 1.16 !important;
    letter-spacing: -0.025em !important;
  }

  html[lang="ar"] .oxa-hero .hero-title {
    font-size: clamp(1.78rem, 8.5vw, 2.3rem) !important;
    line-height: 1.43 !important;
  }

  .oxa-hero .hero-desc {
    max-width: 100%;
    font-size: .92rem !important;
    line-height: 1.72;
  }

  .oxa-portfolio .portfolio-grid {
    gap: 1.15rem !important;
  }

  .oxa-portfolio .project-card {
    max-width: none;
    border-radius: 1.1rem;
  }

  .oxa-portfolio .project-card__media {
    height: 220px !important;
    min-height: 220px;
  }

  .oxa-portfolio .project-card__body,
  .oxa-portfolio .project-card__content {
    padding: 1.25rem !important;
  }

  .oxa-portfolio .project-card h3,
  .oxa-portfolio .project-card__title {
    font-size: 1.15rem !important;
    line-height: 1.35 !important;
  }
}
