/*
* haat-modern.css
* Haat Global — modern design layer loaded on every page after the theme CSS.
* Brand palette extracted from the Haat Global logo:
*   blue  #0a4b8d  ("هات" + frame)
*   purple #9b4e9a ("HAAT")
* Pure CSS overrides: no markup changes required for it to take effect.
* Note: page-level vendor CSS (page-landing.css, ...) loads AFTER this file,
* so rules that fight it carry !important deliberately.
******************************************************************************/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */
:root {
  /* Logo colors */
  --haat-blue: #0a4b8d;
  --haat-blue-rgb: 10, 75, 141;
  --haat-blue-bright: #1668c0;
  --haat-blue-soft: #eaf1fa;
  --haat-purple: #9b4e9a;
  --haat-purple-rgb: 155, 78, 154;
  --haat-purple-bright: #b163b0;

  /* Derived shades */
  --haat-navy: #082a52;
  --haat-navy-deep: #051a33;
  --haat-ink: #20304d;
  --haat-muted: #5a6a87;
  --haat-surface: #ffffff;
  --haat-surface-soft: #f4f8fd;

  /* Signature gradient: logo blue -> logo purple */
  --haat-gradient: linear-gradient(135deg, var(--haat-blue) 0%, #5f4a95 55%, var(--haat-purple) 100%);
  --haat-gradient-soft: linear-gradient(180deg, #f4f8fd 0%, #ffffff 100%);

  --haat-radius-sm: 0.5rem;
  --haat-radius: 0.875rem;
  --haat-radius-lg: 1.25rem;
  --haat-shadow-sm: 0 2px 8px rgba(8, 42, 82, 0.06);
  --haat-shadow: 0 8px 24px rgba(8, 42, 82, 0.1);
  --haat-shadow-lg: 0 20px 45px rgba(8, 42, 82, 0.16);
  --haat-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Re-point Bootstrap variables at the brand */
  --bs-primary: var(--haat-blue);
  --bs-primary-rgb: var(--haat-blue-rgb);
  --bs-link-color: var(--haat-blue-bright);
  --bs-link-hover-color: var(--haat-purple);
}

/* ==========================================================================
   2. Base typography & rendering
   ========================================================================== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Proper Arabic typeface for RTL pages (loaded in styles.blade.php) */
[dir="rtl"] body,
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3,
[dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6,
[dir="rtl"] .btn, [dir="rtl"] .form-control, [dir="rtl"] .nav-link,
[dir="rtl"] .menu-link, [dir="rtl"] .dropdown-item, [dir="rtl"] .badge {
  font-family: "IBM Plex Sans Arabic", "Tajawal", "IBM Plex Sans", "Rubik", -apple-system, BlinkMacSystemFont, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.01em;
  color: var(--haat-ink);
}

[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3,
[dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6 {
  letter-spacing: 0; /* negative tracking breaks connected Arabic script */
  line-height: 1.5;
}

p {
  line-height: 1.8;
}

[dir="rtl"] p {
  line-height: 1.9;
}

::selection {
  background: var(--haat-blue);
  color: #fff;
}

a {
  color: var(--haat-blue-bright);
  transition: color var(--haat-transition);
}

a:hover {
  color: var(--haat-purple);
}

/* Slim modern scrollbar (WebKit) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--haat-surface-soft);
}
::-webkit-scrollbar-thumb {
  background: #b9cde6;
  border-radius: 10px;
  border: 2px solid var(--haat-surface-soft);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--haat-blue);
}

/* ==========================================================================
   3. Brand color overrides for theme components
   (vendor CSS hardcodes the old template blue #5a8dee)
   ========================================================================== */
.text-primary {
  color: var(--haat-blue) !important;
}

.bg-primary,
.badge.bg-primary {
  background-color: var(--haat-blue) !important;
}

.border-primary,
.border-label-primary {
  border-color: rgba(var(--haat-blue-rgb), 0.5) !important;
}

.btn-outline-primary {
  color: var(--haat-blue);
  border-color: var(--haat-blue);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background: var(--haat-blue) !important;
  border-color: var(--haat-blue) !important;
  color: #fff !important;
}

.btn-label-primary {
  background: rgba(var(--haat-blue-rgb), 0.12) !important;
  color: var(--haat-blue) !important;
  border: 0;
}

.btn-label-primary:hover,
.btn-label-primary:focus {
  background: var(--haat-blue) !important;
  color: #fff !important;
}

.form-check-input:checked,
.switch-input:checked ~ .switch-toggle-slider {
  background-color: var(--haat-blue) !important;
  border-color: var(--haat-blue) !important;
}

.page-item.active .page-link {
  background-color: var(--haat-blue) !important;
  border-color: var(--haat-blue) !important;
  color: #fff !important;
}

.nav-pills .nav-link.active,
.nav-pills .nav-link.active:hover {
  background-color: var(--haat-blue) !important;
}

.progress-bar {
  background-color: var(--haat-blue);
}

.menu-horizontal .menu-item.active > .menu-link {
  color: var(--haat-blue) !important;
}

/* ==========================================================================
   4. Navbar
   ========================================================================== */
.layout-navbar {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.86) !important;
  transition: box-shadow var(--haat-transition), background var(--haat-transition);
}

.layout-navbar.haat-nav-scrolled {
  box-shadow: 0 4px 24px rgba(8, 42, 82, 0.1);
  background: rgba(255, 255, 255, 0.96) !important;
}

.layout-navbar a {
  transition: color var(--haat-transition);
}

.layout-navbar a:hover {
  color: var(--haat-blue);
}

/* Horizontal menu links: animated underline */
.menu-horizontal .menu-item > .menu-link {
  position: relative;
  font-weight: 500;
  transition: color var(--haat-transition);
}

.menu-horizontal .menu-item > .menu-link::after {
  content: "";
  position: absolute;
  inset-inline-start: 1rem;
  inset-inline-end: 1rem;
  bottom: 0.35rem;
  height: 2px;
  border-radius: 2px;
  background: var(--haat-gradient);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--haat-transition);
}

.menu-horizontal .menu-item:hover > .menu-link::after,
.menu-horizontal .menu-item.active > .menu-link::after {
  transform: scaleX(1);
}

/* Dropdown menus */
.dropdown-menu {
  border: 0;
  border-radius: var(--haat-radius);
  box-shadow: var(--haat-shadow-lg);
  overflow: hidden;
}

.dropdown-item {
  transition: background var(--haat-transition), color var(--haat-transition), padding-inline-start var(--haat-transition);
}

.dropdown-item:hover {
  background: var(--haat-surface-soft);
  color: var(--haat-blue);
  padding-inline-start: 1.6rem;
}

/* ==========================================================================
   5. Buttons
   ========================================================================== */
.btn {
  border-radius: var(--haat-radius-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform var(--haat-transition), box-shadow var(--haat-transition),
    background var(--haat-transition), color var(--haat-transition), border-color var(--haat-transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--haat-blue-bright) 0%, var(--haat-blue) 60%, #0a3d72 100%);
  border: 0;
  box-shadow: 0 6px 18px rgba(var(--haat-blue-rgb), 0.35);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, var(--haat-blue) 0%, #5f4a95 65%, var(--haat-purple) 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(var(--haat-purple-rgb), 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-white:hover,
.btn-label-primary:hover,
.btn-outline-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--haat-shadow);
}

/* ==========================================================================
   6. Badges / section labels
   ========================================================================== */
.badge.bg-label-primary {
  background: rgba(var(--haat-blue-rgb), 0.08) !important;
  color: var(--haat-blue) !important;
  border: 1px solid rgba(var(--haat-purple-rgb), 0.3);
  border-radius: 50rem;
  padding: 0.55em 1.3em;
  font-weight: 600;
  letter-spacing: 0.03em;
}

[dir="rtl"] .badge.bg-label-primary {
  letter-spacing: 0;
}

.section-title {
  position: relative;
  display: inline-block;
  background: linear-gradient(120deg, var(--haat-navy) 0%, var(--haat-blue) 55%, var(--haat-purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-title::after,
.section-title::before {
  border-radius: 4px;
}

/* ==========================================================================
   7. Cards
   ========================================================================== */
.card {
  border-radius: var(--haat-radius);
  transition: transform var(--haat-transition), box-shadow var(--haat-transition), border-color var(--haat-transition);
}

.landing-features .card:hover,
.landing-pricing .card:hover,
.scrollspy-example .card:hover {
  transform: translateY(-6px);
  box-shadow: var(--haat-shadow-lg);
}

/* Feature icon boxes (landing + about + service pages) */
.features-icon-box {
  padding: 2rem 1.5rem;
  border-radius: var(--haat-radius-lg);
  transition: transform var(--haat-transition), box-shadow var(--haat-transition), background var(--haat-transition);
}

.features-icon-box:hover {
  background: var(--haat-surface);
  transform: translateY(-8px);
  box-shadow: var(--haat-shadow-lg);
}

.features-icon-box img {
  max-height: 64px;
  transition: transform var(--haat-transition);
}

.features-icon-box:hover img {
  transform: translateY(-4px) scale(1.08);
}

.features-icon-box h5 {
  font-weight: 700;
  color: var(--haat-ink);
}

.features-icon-description {
  color: var(--haat-muted);
}

/* ==========================================================================
   8. Hero
   The template paints a Riyadh skyline photo behind the hero (page-landing.css).
   We keep it and add a navy veil + tech grid so the text is always readable,
   then replace the pastel color-cycling title with a clean white gradient.
   ========================================================================== */
.landing-hero {
  position: relative;
  overflow: hidden;
}

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

/* Readability veil over the photo (template already positions ::after full-size) */
.light-style .landing-hero::after {
  background:
    linear-gradient(rgba(150, 180, 235, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 180, 235, 0.07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(5, 26, 51, 0.45) 0%, rgba(5, 26, 51, 0.72) 100%) !important;
  background-size: 38px 38px, 38px 38px, 100% 100% !important;
  z-index: 0 !important;
}

.landing-hero .hero-title {
  background: linear-gradient(120deg, #ffffff 0%, #dbe7ff 55%, #e3c4e2 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  font-size: clamp(1.75rem, 4vw, 3rem) !important;
  animation: none !important; /* replaces the template's color-cycling animation */
  text-shadow: none;
}

.landing-hero .hero-sub-title {
  max-width: 760px;
  margin-inline: auto;
  color: rgba(255, 255, 255, 0.88) !important;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 400;
  line-height: 1.9 !important;
}

/* Secondary hero CTA reads as frosted glass on the photo */
.landing-hero .btn-label-primary {
  background: rgba(255, 255, 255, 0.92) !important;
  color: var(--haat-navy) !important;
  border: 0;
  backdrop-filter: blur(6px);
}

.landing-hero .btn-label-primary:hover {
  background: #ffffff !important;
  color: var(--haat-blue) !important;
}

/* ==========================================================================
   9. CTA / banner sections (ZATCA, DGA, CRM, HRM, Matjar, ...)
   ========================================================================== */
.landing-cta,
.landing-hrm,
.landing-crm,
.landing-hm {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0d4a8a 0%, var(--haat-navy) 55%, var(--haat-navy-deep) 100%) !important;
}

.landing-cta::before,
.landing-hrm::before,
.landing-crm::before,
.landing-hm::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(150, 180, 235, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 180, 235, 0.06) 1px, transparent 1px),
    radial-gradient(ellipse 50% 80% at 85% 20%, rgba(var(--haat-purple-rgb), 0.3), transparent 60%),
    radial-gradient(ellipse 40% 60% at 10% 90%, rgba(var(--haat-blue-rgb), 0.4), transparent 60%);
  background-size: 38px 38px, 38px 38px, 100% 100%, 100% 100%;
  pointer-events: none;
}

.landing-cta .container,
.landing-hrm .container,
.landing-crm .container,
.landing-hm .container {
  position: relative;
  z-index: 1;
}

.landing-cta .btn-white,
.landing-hrm .btn-white,
.landing-crm .btn-white,
.landing-hm .btn-white {
  background: #fff;
  color: var(--haat-navy);
  font-weight: 700;
  border-radius: var(--haat-radius-sm);
}

/* ==========================================================================
   10. Logo carousels (partners / customers / products)
   ========================================================================== */
.partner-logo,
.client-logo {
  filter: grayscale(1);
  opacity: 0.65;
  transition: filter var(--haat-transition), opacity var(--haat-transition), transform var(--haat-transition);
}

.partner-logo:hover,
.client-logo:hover {
  filter: grayscale(0);
  opacity: 1;
  transform: scale(1.06);
}

.swiper-logo-carousel .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   11. Stats strip (landing)
   ========================================================================== */
.haat-stats {
  background:
    linear-gradient(rgba(var(--haat-blue-rgb), 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--haat-blue-rgb), 0.05) 1px, transparent 1px),
    var(--haat-surface);
  background-size: 38px 38px, 38px 38px, 100% 100%;
}

.haat-stat-card {
  text-align: center;
  padding: 2rem 1rem;
  border-radius: var(--haat-radius-lg);
  background: var(--haat-surface-soft);
  border: 1px solid rgba(var(--haat-blue-rgb), 0.12);
  transition: transform var(--haat-transition), box-shadow var(--haat-transition), border-color var(--haat-transition);
  height: 100%;
}

.haat-stat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--haat-shadow);
  border-color: rgba(var(--haat-purple-rgb), 0.4);
}

.haat-stat-card .haat-stat-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(var(--haat-blue-rgb), 0.16), rgba(var(--haat-purple-rgb), 0.12));
  color: var(--haat-blue);
  font-size: 1.6rem;
  box-shadow: 0 0 0 1px rgba(var(--haat-blue-rgb), 0.2), 0 0 18px rgba(var(--haat-blue-rgb), 0.18);
  transition: box-shadow var(--haat-transition);
}

.haat-stat-card:hover .haat-stat-icon {
  box-shadow: 0 0 0 1px rgba(var(--haat-purple-rgb), 0.4), 0 0 26px rgba(var(--haat-purple-rgb), 0.3);
}

.haat-stat-card .haat-stat-value {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  background: linear-gradient(120deg, var(--haat-blue) 0%, var(--haat-purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.haat-stat-card .haat-stat-label {
  color: var(--haat-muted);
  font-weight: 500;
  margin-bottom: 0;
}

/* ==========================================================================
   12. Footer
   ========================================================================== */
footer.footer {
  background: linear-gradient(180deg, #0e3f74 0%, var(--haat-navy) 45%, var(--haat-navy-deep) 100%) !important;
}

.footer-link {
  position: relative;
  transition: color var(--haat-transition), padding-inline-start var(--haat-transition);
}

footer .list-unstyled .footer-link:hover {
  color: #fff !important;
  padding-inline-start: 0.35rem;
}

.footer-title {
  color: #949494;
  position: relative;
  padding-bottom: 0.6rem;
}

.footer-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 2.25rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--haat-blue-bright), var(--haat-purple-bright));
}

/* Social icons */
footer .bx.bxl-linkedin, footer .bx.bxl-youtube, footer .bx.bxl-instagram,
footer .bx.bxl-facebook, footer .bx.bxl-twitter {
  font-size: 1.15rem;
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transition: background var(--haat-transition), transform var(--haat-transition), color var(--haat-transition);
}

footer .bx.bxl-linkedin:hover, footer .bx.bxl-youtube:hover, footer .bx.bxl-instagram:hover,
footer .bx.bxl-facebook:hover, footer .bx.bxl-twitter:hover {
  background: var(--haat-purple);
  color: #fff;
  transform: translateY(-3px);
}

/* Newsletter form */
.footer-form .form-control {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  transition: border-color var(--haat-transition), background var(--haat-transition);
}

.footer-form .form-control::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.footer-form .form-control:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--haat-purple-bright);
  box-shadow: none;
  color: #fff;
}

/* Certification logos in footer */
footer img[alt='Saudi_Vision_2030_logo'],
footer img[alt='rexpo-2030'],
footer img[alt='DGA License'],
footer img[alt='iso'],
footer img[alt='microsoft-partner'] {
  filter: grayscale(0.4) brightness(1.05);
  opacity: 0.85;
  transition: filter var(--haat-transition), opacity var(--haat-transition), transform var(--haat-transition);
}

footer img[alt='Saudi_Vision_2030_logo']:hover,
footer img[alt='rexpo-2030']:hover,
footer img[alt='DGA License']:hover,
footer img[alt='iso']:hover,
footer img[alt='microsoft-partner']:hover {
  filter: none;
  opacity: 1;
  transform: scale(1.04);
}

/* ==========================================================================
   13. Forms (global)
   ========================================================================== */
.form-control,
.form-select {
  border-radius: var(--haat-radius-sm);
  transition: border-color var(--haat-transition), box-shadow var(--haat-transition);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--haat-blue) !important;
  box-shadow: 0 0 0 0.25rem rgba(var(--haat-blue-rgb), 0.12) !important;
}

.form-label {
  font-weight: 600;
  color: var(--haat-ink);
}

.input-group-text {
  transition: border-color var(--haat-transition);
}

/* ==========================================================================
   14. Accordion (FAQ / help center)
   ========================================================================== */
.accordion-item {
  border-radius: var(--haat-radius) !important;
  overflow: hidden;
  box-shadow: var(--haat-shadow-sm);
}

.accordion-button {
  font-weight: 600;
}

.accordion-button:not(.collapsed) {
  color: var(--haat-blue);
  background: var(--haat-surface-soft);
  box-shadow: none;
}

/* ==========================================================================
   15. Scroll-reveal animation (driven by haat-modern.js)
   ========================================================================== */
.haat-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transition-delay: var(--haat-reveal-delay, 0s);
  will-change: opacity, transform;
}

.haat-reveal.haat-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .haat-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   16. Back-to-top button (injected by haat-modern.js)
   ========================================================================== */
.haat-back-to-top {
  position: fixed;
  bottom: 85px;
  inset-inline-end: 19px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--haat-navy);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: var(--haat-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--haat-transition), transform var(--haat-transition),
    visibility var(--haat-transition), background var(--haat-transition);
  z-index: 99999;
}

.haat-back-to-top.haat-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.haat-back-to-top:hover {
  background: var(--haat-purple);
  transform: translateY(-3px);
}

/* WhatsApp button: subtle attention pulse */
#ht-ctc-chat svg {
  transition: transform var(--haat-transition);
}

#ht-ctc-chat:hover svg {
  transform: scale(1.1);
}

/* ==========================================================================
   17. Loader polish
   ========================================================================== */
#overlay {
  backdrop-filter: blur(4px);
  transition: opacity 0.4s ease;
}

#logo-image {
  height: 8rem !important;
  animation: haat-logo-pulse 1.4s ease-in-out infinite;
}

@keyframes haat-logo-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(0.97); }
}

/* ==========================================================================
   18. Team / partner / customer cards (.landing-team)
   Used by team, gm-preface, partners, customers and product pages.
   ========================================================================== */
.landing-team .card,
.landing-team .card .team-image-box {
  border-top-left-radius: var(--haat-radius-lg) !important;
  border-top-right-radius: var(--haat-radius-lg) !important;
}

.landing-team .card {
  /* keep overflow visible: avatar PNGs intentionally pop above the image box */
  border: 1px solid rgba(var(--haat-blue-rgb), 0.14);
  border-radius: var(--haat-radius-lg) !important;
  background: var(--haat-surface);
  box-shadow: var(--haat-shadow-sm) !important;
  transition: transform var(--haat-transition), box-shadow var(--haat-transition), border-color var(--haat-transition);
}

.landing-team .card:hover {
  transform: translateY(-8px);
  border-color: rgba(var(--haat-purple-rgb), 0.45);
  box-shadow: 0 18px 40px rgba(8, 42, 82, 0.16), 0 0 22px rgba(var(--haat-purple-rgb), 0.16) !important;
}

/* Image boxes: one clean gradient instead of the mixed label colors */
.landing-team .team-image-box {
  background:
    linear-gradient(rgba(var(--haat-blue-rgb), 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--haat-blue-rgb), 0.07) 1px, transparent 1px),
    linear-gradient(180deg, #eef4fc 0%, #dde9f9 100%) !important;
  background-size: 30px 30px, 30px 30px, 100% 100% !important;
}

.landing-team .team-image-box .card-img-position {
  transition: transform var(--haat-transition);
  border-radius: var(--haat-radius) var(--haat-radius) 0 0; /* softens rectangular photos */
}

.landing-team .card:hover .team-image-box .card-img-position {
  transform: translateX(-50%) scale(1.04);
}

[dir="rtl"] .landing-team .card:hover .team-image-box .card-img-position {
  transform: translateX(50%) scale(1.04) !important; /* template's RTL rule uses !important */
}

/* Card body: soft top accent line instead of the colored frame border */
.landing-team .card .card-body {
  border: 0 !important;
  position: relative;
  padding-top: 1.25rem;
}

.landing-team .card .card-body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3rem;
  height: 3px;
  border-radius: 3px;
  background: var(--haat-gradient);
  transition: width var(--haat-transition);
}

.landing-team .card:hover .card-body::before {
  width: 70%;
}

.landing-team .card .card-title {
  font-weight: 700;
  color: var(--haat-ink);
}

/* Partner / customer logo boxes: white stage so logos sit cleanly */
.landing-team .bg-label-secondary.team-image-box {
  background:
    linear-gradient(rgba(var(--haat-blue-rgb), 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--haat-blue-rgb), 0.05) 1px, transparent 1px),
    #ffffff !important;
  background-size: 30px 30px, 30px 30px, 100% 100% !important;
}

.landing-team .bg-label-secondary.team-image-box .card-img-position {
  height: 11rem !important;
  bottom: 0.5rem !important;
  object-fit: contain;
}

/* ==========================================================================
   19. GM introduction / featured person card
   ========================================================================== */
#gmIntriduction .card {
  border-color: rgba(var(--haat-purple-rgb), 0.35);
  box-shadow: 0 14px 36px rgba(8, 42, 82, 0.14), 0 0 24px rgba(var(--haat-purple-rgb), 0.16) !important;
}

#gmIntriduction .bg-label-warning.team-image-box {
  background:
    linear-gradient(rgba(var(--haat-blue-rgb), 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--haat-blue-rgb), 0.07) 1px, transparent 1px),
    linear-gradient(180deg, #eef4fc 0%, #d6e4f8 100%) !important;
  background-size: 30px 30px, 30px 30px, 100% 100% !important;
}

/* ==========================================================================
   20. Content / article pages
   (about, virtual reality, mobile apps, websites & hosting, e-commerce,
    haat sign, e-invoice, haat aqar, academy, terms, privacy, refund, GM word)
   ========================================================================== */
/* Article hero image: modern frame */
.article-hero {
  border-radius: 0 0 2rem 2rem !important;
  height: clamp(11rem, 32vw, 20rem) !important;
  box-shadow: var(--haat-shadow);
}

.scrollspy-example p.fs-5 {
  font-size: 1.05rem !important;
  line-height: 2.05 !important;
  color: var(--haat-muted);
  max-width: 56rem;
  margin-inline: auto;
  margin-bottom: 1.15rem;
}

/* Markdown-rendered content (e-invoice and similar) */
#article-hero h1, #article-hero h2, #article-hero h3, #article-hero h4 {
  color: var(--haat-ink);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

#article-hero h2 { font-size: 1.45rem; }
#article-hero h3 { font-size: 1.25rem; }

#article-hero ul,
#article-hero ol {
  padding-inline-start: 1.4rem;
  line-height: 2;
  color: var(--haat-muted);
}

#article-hero li {
  margin-bottom: 0.35rem;
}

#article-hero li::marker {
  color: var(--haat-purple);
  font-weight: 700;
}

#article-hero strong {
  color: var(--haat-ink);
}

#article-hero table {
  width: 100%;
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  margin-block: 1.5rem;
}

#article-hero table th,
#article-hero table td {
  border: 1px solid rgba(var(--haat-blue-rgb), 0.15);
  padding: 0.6rem 1rem;
  text-align: start;
}

#article-hero table th {
  background: var(--haat-blue-soft);
  color: var(--haat-blue);
}

#article-hero hr {
  border: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(var(--haat-blue-rgb), 0.3), rgba(var(--haat-purple-rgb), 0.3), transparent);
  margin-block: 2rem;
}

/* Page-title badges on article pages read as headings */
.scrollspy-example .badge.bg-label-primary.fs-3,
.scrollspy-example .badge.bg-label-primary.fs-4,
.scrollspy-example .badge.bg-label-primary.fs-5 {
  font-weight: 700;
}

/* "Last updated" / contact note */
#article-hero span.text-primary {
  display: inline-block;
  background: rgba(var(--haat-blue-rgb), 0.08);
  border: 1px solid rgba(var(--haat-blue-rgb), 0.2);
  border-radius: 50rem;
  padding: 0.4em 1.1em;
  font-size: 0.9rem;
}

/* Social share buttons under article titles */
#social-links a,
div#social-links a {
  transition: transform var(--haat-transition), opacity var(--haat-transition);
}

#social-links a:hover {
  transform: translateY(-3px);
}

/* ==========================================================================
   21. Sitemap
   ========================================================================== */
#article-hero ul a h1,
#article-hero ul a h2,
#article-hero ul li h1,
#article-hero ul li h2 {
  display: inline-block;
  margin-bottom: 0.35rem;
  transition: color var(--haat-transition), transform var(--haat-transition);
}

#article-hero ul a h2 {
  color: var(--haat-blue-bright);
  font-weight: 500;
}

#article-hero ul a:hover h1,
#article-hero ul a:hover h2 {
  color: var(--haat-purple);
  transform: translateX(4px);
}

[dir="rtl"] #article-hero ul a:hover h1,
[dir="rtl"] #article-hero ul a:hover h2 {
  transform: translateX(-4px);
}

/* ==========================================================================
   22. Help center
   ========================================================================== */
.help-center-header {
  background: linear-gradient(135deg, #0d4a8a 0%, var(--haat-navy) 60%, var(--haat-navy-deep) 100%) !important;
  position: relative;
}

.help-center-header h3,
.help-center-header p {
  color: #fff !important;
}

.help-center-header .input-wrapper .form-control {
  border-radius: var(--haat-radius-sm);
}

.help-center-knowledge-base .card,
.help-center-popular-articles .card {
  border: 1px solid rgba(var(--haat-blue-rgb), 0.12);
  box-shadow: var(--haat-shadow-sm);
}

.help-center-knowledge-base .card:hover,
.help-center-popular-articles .card:hover {
  border-color: rgba(var(--haat-purple-rgb), 0.4);
  transform: translateY(-5px);
  box-shadow: var(--haat-shadow);
}

/* ==========================================================================
   23. Login / authentication pages
   ========================================================================== */
.authentication-wrapper {
  background:
    linear-gradient(rgba(var(--haat-blue-rgb), 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--haat-blue-rgb), 0.05) 1px, transparent 1px),
    radial-gradient(ellipse 70% 60% at 80% 0%, rgba(var(--haat-purple-rgb), 0.1), transparent 60%),
    radial-gradient(ellipse 60% 50% at 10% 100%, rgba(var(--haat-blue-rgb), 0.12), transparent 60%),
    var(--haat-surface-soft);
  background-size: 38px 38px, 38px 38px, 100% 100%, 100% 100%, 100% 100%;
}

.authentication-wrapper .card {
  border: 1px solid rgba(var(--haat-blue-rgb), 0.12);
  border-radius: var(--haat-radius-lg);
  box-shadow: var(--haat-shadow-lg);
}

.authentication-wrapper .app-brand-link img {
  height: 6.5rem !important; /* the blade hardcodes 10rem inline */
}

/* ==========================================================================
   24. Misc / utilities
   ========================================================================== */
img {
  max-width: 100%;
}

.section-py {
  scroll-margin-top: 90px;
}

.table {
  border-radius: var(--haat-radius);
  overflow: hidden;
}

.pagination .page-link {
  border-radius: var(--haat-radius-sm) !important;
  margin-inline: 0.15rem;
  transition: background var(--haat-transition), color var(--haat-transition);
}

/* ==========================================================================
   25. Responsive refinements (all screen sizes)
   ========================================================================== */
/* Fluid headings on front pages */
.scrollspy-example h3,
.section-py h3 {
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
}

@media (max-width: 991.98px) {
  .section-py {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
}

@media (max-width: 767.98px) {
  html {
    scroll-padding-top: 70px;
  }

  .features-icon-box {
    padding: 1.5rem 1rem;
  }

  /* Footer columns breathe on mobile */
  footer .footer-title {
    margin-top: 0.5rem;
  }

  footer img[alt='Saudi_Vision_2030_logo'],
  footer img[alt='rexpo-2030'],
  footer img[alt='DGA License'] {
    height: 3rem !important;
  }
}

@media (max-width: 575.98px) {
  /* Cleaner reading rhythm: justify looks broken in narrow columns */
  .features-icon-description,
  p[style*="text-align: justify"] {
    text-align: start !important;
  }

  /* Hero CTAs stack full-width */
  .landing-hero .landing-hero-btn .d-flex {
    flex-direction: column;
    width: 100%;
  }

  .landing-hero .landing-hero-btn .d-flex .btn {
    width: 100%;
  }

  .landing-hero .landing-hero-btn {
    width: 100%;
  }

  /* Stats: two compact columns instead of a long stack */
  #landingStats .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  #landingStats .row > * {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  .haat-stat-card {
    padding: 1.25rem 0.5rem;
  }

  .haat-stat-card .haat-stat-icon {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }

  /* Badges and titles scale down */
  .badge.bg-label-primary.fs-3,
  .badge.bg-label-primary.fs-4 {
    font-size: 1rem !important;
  }

  .scrollspy-example p.fs-5 {
    font-size: 0.98rem !important;
    line-height: 1.95 !important;
  }

  /* Keep floating buttons clear of each other */
  .haat-back-to-top {
    bottom: 80px;
    inset-inline-end: 15px;
    width: 38px;
    height: 38px;
  }

  /* Logo carousels: smaller logos */
  .partner-logo,
  .client-logo {
    max-height: 4.5rem;
    object-fit: contain;
  }

  /* Tables scroll instead of overflowing */
  .scrollspy-example .table-responsive,
  .scrollspy-example table {
    display: block;
    overflow-x: auto;
  }
}
