/* Atlas UI layer (pairs with atlas-ui.js): one look for cards, motion, the home hero and the footer.
 *
 * Loaded last on every public page, after atlas-nav.css. It doesn't restyle each page; it gives the pieces
 * the pages share (the card types listed below, section headings, buttons, the footer the site script builds)
 * one finish, and the scroll motion. Everything moves only for people who haven't asked their system for
 * reduced motion.
 */

:root {
  --aui-red: #e4002b;
  --aui-red-2: #ff2a4a;
  --aui-ink: #f4f5f7;
  --aui-muted: rgba(244, 245, 247, .66);
  --aui-line: rgba(255, 255, 255, .09);
  --aui-line-2: rgba(255, 255, 255, .16);
  --aui-card: rgba(255, 255, 255, .035);
  --aui-ease: cubic-bezier(.2, .8, .2, 1);
}

/* Arabic / English text pairs anywhere on the site (was only defined on the catalog pages) */
html[lang="en"] .ca-ar { display: none !important; }
html:not([lang="en"]) .ca-en { display: none !important; }

/* ------------------------------------------------------------------ buttons */

.aui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s var(--aui-ease), background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.aui-btn:active { transform: scale(.98); }
.aui-btn--primary { background: var(--aui-red); border: 1px solid var(--aui-red); color: #fff !important; box-shadow: 0 14px 34px rgba(228, 0, 43, .32); }
.aui-btn--primary:hover { background: #c40025; transform: translateY(-2px); box-shadow: 0 18px 40px rgba(228, 0, 43, .42); }
.aui-btn--ghost { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .24); color: #fff !important;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.aui-btn--ghost:hover { background: rgba(255, 255, 255, .14); transform: translateY(-2px); }
.aui-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ------------------------------------------------------------------ home hero */

html body .hero-video-landing:not(#aui) .home-video-copy {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 16px !important;
  max-width: 920px !important;
  margin-inline: auto !important;
  text-align: center !important;
}
html body .hero-video-landing:not(#aui) .home-video-copy h1 {
  margin: 0 !important;
  font-size: clamp(30px, 4.6vw, 62px) !important;
  line-height: 1.18 !important;
  font-weight: 800 !important;
  letter-spacing: -.01em !important;
  text-wrap: balance;
  text-shadow: 0 6px 30px rgba(0, 0, 0, .45) !important;
}
.aui-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 99px;
  background: rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.aui-hero-badge > i { width: 8px; height: 8px; border-radius: 50%; background: #2bd47d; box-shadow: 0 0 0 4px rgba(43, 212, 125, .22); }
.aui-hero-sub {
  margin: 0;
  max-width: 640px;
  color: rgba(255, 255, 255, .86);
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.85;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .5);
}
.aui-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
html body .hero-video-landing:not(#aui) .home-video-overlay { gap: 26px !important; }
@media (max-width: 640px) {
  .aui-hero-badge { font-size: 12.5px; }
  .aui-hero-actions { width: 100%; }
  .aui-hero-actions .aui-btn { flex: 1 1 0; min-width: 0; padding: 0 14px; font-size: 15px; min-height: 48px; }
}

/* ------------------------------------------------------------------ cards: one behaviour everywhere */

:is(.atlas-center-card, .service-card, .service-detail-card, .eco-card, .franchise-process-card, .ca-card, .warranty-flow-card,
    .auto-service-card, .center-region-card, .biz-card, .atlas-tech-card, .process-card, .franchise-value-card,
    .contact-routing-card, .auto-package-card, .content-card, .plan, .stat) {
  transition: transform .35s var(--aui-ease), border-color .35s ease, box-shadow .35s ease, background-color .35s ease !important;
  will-change: transform;
}
@media (hover: hover) and (pointer: fine) {
  :is(.atlas-center-card, .service-card, .service-detail-card, .eco-card, .franchise-process-card, .ca-card, .warranty-flow-card,
      .auto-service-card, .center-region-card, .biz-card, .atlas-tech-card, .process-card, .franchise-value-card,
      .contact-routing-card, .auto-package-card, .content-card, .plan):hover {
    transform: translateY(-6px) !important;
    border-color: rgba(255, 42, 74, .42) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 42, 74, .16) inset !important;
  }
  :is(.service-card, .auto-service-card, .ca-card, .atlas-center-card, .content-card) img { transition: transform .7s var(--aui-ease) !important; }
  :is(.service-card, .auto-service-card, .ca-card, .atlas-center-card, .content-card):hover img { transform: scale(1.06) !important; }
}
/* the light that follows the pointer (atlas-ui.js adds .aui-glow and sets --aui-x / --aui-y) */
.aui-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
  background: radial-gradient(420px circle at var(--aui-x, 50%) var(--aui-y, 50%), rgba(255, 42, 74, .16), transparent 60%);
}
.aui-has-glow:hover > .aui-glow { opacity: 1; }
/* the light sits under the card's content without touching any child's positioning */
.aui-has-glow { isolation: isolate; }
.aui-has-glow > .aui-glow { z-index: -1; }

/* center cards: no fake rating (there is no review data yet; it showed five stars next to 0.0),
   and the actions as one clear booking button over three equal ones */
.atlas-center-card .center-rating { display: none !important; }
html body .atlas-center-card .center-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-top: auto !important;
  padding-top: 6px !important;
}
html body .atlas-center-card .center-actions > a {
  width: 100% !important;
  max-width: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 0 8px !important;
  border-radius: 11px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  text-align: center !important;
}
html body .atlas-center-card .center-actions > a.primary-btn,
html body .atlas-center-card .center-actions > a[data-i18n="book_now"] {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 46px !important;
  font-size: 15px !important;
  font-weight: 800 !important;
}
html body .atlas-center-card { display: flex !important; flex-direction: column !important; }

/* partner logos: calm until hovered */
@media (hover: hover) {
  .partner-logo-card { transition: transform .3s var(--aui-ease), filter .3s ease, border-color .3s ease !important; filter: grayscale(.55) brightness(.92); }
  .partner-logo-card:hover { filter: none; transform: translateY(-3px); border-color: rgba(255, 255, 255, .22) !important; }
}

/* ------------------------------------------------------------------ scroll motion (atlas-ui.js) */

@media (prefers-reduced-motion: no-preference) {
  .aui-pre {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .8s var(--aui-ease), transform .8s var(--aui-ease) !important;
    transition-delay: var(--aui-delay, 0ms) !important;
  }
  .aui-pre.aui-in { opacity: 1; transform: none; }
  .aui-pre.aui-in:hover { transition-delay: 0ms !important; }
}

/* ------------------------------------------------------------------ footer (built by atlas.js, styled here) */

html body footer.atlas-footer:not(#aui) {
  display: block !important;
  max-width: 1280px !important;
  margin: 80px auto 0 !important;
  padding: 0 max(20px, env(safe-area-inset-right, 0px)) max(28px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)) !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--aui-ink) !important;
  font-family: Tajawal, "Segoe UI", Tahoma, Arial, sans-serif;
}

/* the call to action that opens the footer */
html body footer.atlas-footer:not(#aui) .atlas-footer-cta {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 28px !important;
  margin: 0 0 22px !important;
  padding: 44px 48px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 42, 74, .28) !important;
  border-radius: 28px !important;
  background:
    radial-gradient(600px 260px at 85% 0%, rgba(228, 0, 43, .36), transparent 70%),
    radial-gradient(500px 240px at 0% 100%, rgba(228, 0, 43, .14), transparent 70%),
    linear-gradient(180deg, #16080c, #0d0e12) !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45) !important;
}
html body footer.atlas-footer:not(#aui) .atlas-footer-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .06) 50%, transparent 60%);
  transform: translateX(-100%);
  animation: aui-sheen 7s var(--aui-ease) infinite;
}
@keyframes aui-sheen { 0%, 70% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
html body footer.atlas-footer:not(#aui) .atlas-footer-eyebrow {
  display: inline-block !important;
  margin: 0 0 10px !important;
  color: var(--aui-red-2) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: .08em !important;
}
html body footer.atlas-footer:not(#aui) .atlas-footer-cta h2 {
  margin: 0 0 8px !important;
  color: #fff !important;
  font-size: clamp(24px, 3vw, 38px) !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
  text-wrap: balance;
}
html body footer.atlas-footer:not(#aui) .atlas-footer-cta p { margin: 0 !important; color: var(--aui-muted) !important; font-size: 16px !important; line-height: 1.8 !important; }
html body footer.atlas-footer:not(#aui) .atlas-footer-cta-actions { display: flex !important; gap: 10px !important; flex-wrap: wrap !important; }
html body footer.atlas-footer:not(#aui) .atlas-footer-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 52px !important;
  padding: 0 26px !important;
  border-radius: 14px !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  transition: transform .2s var(--aui-ease), background .2s ease, box-shadow .2s ease !important;
}
html body footer.atlas-footer:not(#aui) .atlas-footer-button-primary { background: var(--aui-red) !important; color: #fff !important; border: 1px solid var(--aui-red) !important; box-shadow: 0 14px 34px rgba(228, 0, 43, .35) !important; }
html body footer.atlas-footer:not(#aui) .atlas-footer-button-primary:hover { background: #c40025 !important; transform: translateY(-2px); }
html body footer.atlas-footer:not(#aui) .atlas-footer-button-secondary { background: rgba(255, 255, 255, .06) !important; color: #fff !important; border: 1px solid var(--aui-line-2) !important; }
html body footer.atlas-footer:not(#aui) .atlas-footer-button-secondary:hover { background: rgba(255, 255, 255, .12) !important; transform: translateY(-2px); }

/* brand, links, contact */
html body footer.atlas-footer:not(#aui) .atlas-footer-top {
  display: grid !important;
  grid-template-columns: minmax(260px, 1.2fr) minmax(0, 2fr) !important;
  gap: 48px !important;
  margin: 0 !important;
  padding: 44px 48px !important;
  border: 1px solid var(--aui-line) !important;
  border-radius: 28px 28px 0 0 !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .015)) !important;
}
html body footer.atlas-footer:not(#aui) .footer-brand-side { display: flex !important; flex-direction: column !important; gap: 18px !important; align-items: flex-start !important; text-align: start !important; }
html body footer.atlas-footer:not(#aui) .footer-logos { display: flex !important; align-items: center !important; gap: 14px !important; }
html body footer.atlas-footer:not(#aui) .footer-logos img { width: auto !important; max-width: none !important; min-height: 0 !important; flex: 0 0 auto !important; object-fit: contain !important; }
html body footer.atlas-footer:not(#aui) .footer-logos img[alt="Atlas"] { height: 40px !important; max-height: 40px !important; }
html body footer.atlas-footer:not(#aui) .footer-logos img[alt="3M"] { height: 30px !important; max-height: 30px !important; }
html body footer.atlas-footer:not(#aui) .footer-logos span { width: 1px !important; height: 28px !important; background: var(--aui-line-2) !important; color: transparent !important; font-size: 0 !important; overflow: hidden; }
html body footer.atlas-footer:not(#aui) .footer-brand-side p { margin: 0 !important; max-width: 380px !important; color: var(--aui-muted) !important; font-size: 15px !important; line-height: 1.9 !important; text-align: start !important; }
html body footer.atlas-footer:not(#aui) .footer-social { display: flex !important; flex-wrap: wrap !important; gap: 10px !important; justify-content: flex-start !important; }
html body footer.atlas-footer:not(#aui) .footer-social a {
  display: grid !important;
  place-items: center !important;
  width: 44px !important;
  height: 44px !important;
  border: 1px solid var(--aui-line-2) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, .04) !important;
  color: var(--aui-ink) !important;
  font-size: 18px !important;
  transition: transform .2s var(--aui-ease), background .2s ease, border-color .2s ease, color .2s ease !important;
}
html body footer.atlas-footer:not(#aui) .footer-social a:hover { background: var(--aui-red) !important; border-color: var(--aui-red) !important; color: #fff !important; transform: translateY(-3px); }
html body footer.atlas-footer:not(#aui) .footer-links-side { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 28px !important; }
html body footer.atlas-footer:not(#aui) .footer-column { display: flex !important; flex-direction: column !important; gap: 4px !important; align-items: flex-start !important; text-align: start !important; }
html body footer.atlas-footer:not(#aui) .footer-column h3 {
  align-self: stretch !important;
  text-align: start !important;
  position: relative !important;
  margin: 0 0 12px !important;
  padding-bottom: 10px !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 800 !important;
}
html body footer.atlas-footer:not(#aui) .footer-column h3::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 28px; height: 2px; border-radius: 2px; background: var(--aui-red-2); }
html body footer.atlas-footer:not(#aui) .footer-column a,
html body footer.atlas-footer:not(#aui) .footer-column span {
  display: inline-block !important;
  padding: 5px 0 !important;
  color: var(--aui-muted) !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
  text-decoration: none !important;
  transition: color .2s ease, transform .2s var(--aui-ease) !important;
}
html body footer.atlas-footer:not(#aui) .footer-column a:hover { color: #fff !important; transform: translateX(-4px); }
html[dir="ltr"] body footer.atlas-footer:not(#aui) .footer-column a:hover { transform: translateX(4px); }
html body footer.atlas-footer:not(#aui) .footer-contact a[href^="tel:"] { color: #fff !important; font-weight: 800 !important; font-size: 17px !important; direction: ltr; unicode-bidi: isolate; }

/* legal strip */
html body footer.atlas-footer:not(#aui) .atlas-footer-bottom {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 12px 24px !important;
  margin: 0 !important;
  padding: 18px 48px !important;
  border: 1px solid var(--aui-line) !important;
  border-top: 0 !important;
  border-radius: 0 0 28px 28px !important;
  background: rgba(255, 255, 255, .02) !important;
  color: var(--aui-muted) !important;
  font-size: 13.5px !important;
}
html body footer.atlas-footer:not(#aui) .atlas-footer-bottom div { display: flex !important; flex-wrap: wrap !important; gap: 6px 20px !important; }
html body footer.atlas-footer:not(#aui) .atlas-footer-bottom a { color: var(--aui-muted) !important; text-decoration: none !important; font-size: 13.5px !important; }
html body footer.atlas-footer:not(#aui) .atlas-footer-bottom a:hover { color: #fff !important; }

@media (max-width: 1024px) {
  html body footer.atlas-footer:not(#aui) .atlas-footer-top { grid-template-columns: 1fr !important; gap: 36px !important; }
}
@media (max-width: 720px) {
  html body footer.atlas-footer:not(#aui) { margin-top: 56px !important; padding-bottom: 96px !important; }   /* room under the floating WhatsApp / call buttons */
  html body footer.atlas-footer:not(#aui) .atlas-footer-cta { grid-template-columns: 1fr !important; padding: 30px 22px !important; border-radius: 22px !important; text-align: start !important; }
  html body footer.atlas-footer:not(#aui) .atlas-footer-cta-actions { display: grid !important; grid-template-columns: 1fr 1fr !important; }
  html body footer.atlas-footer:not(#aui) .atlas-footer-button { padding: 0 12px !important; font-size: 15px !important; }
  html body footer.atlas-footer:not(#aui) .atlas-footer-top { padding: 30px 22px !important; border-radius: 22px 22px 0 0 !important; }
  html body footer.atlas-footer:not(#aui) .footer-links-side { grid-template-columns: 1fr 1fr !important; gap: 24px 16px !important; }
  html body footer.atlas-footer:not(#aui) .footer-contact { grid-column: 1 / -1 !important; }
  html body footer.atlas-footer:not(#aui) .atlas-footer-bottom { padding: 18px 22px !important; border-radius: 0 0 22px 22px !important; flex-direction: column !important; align-items: flex-start !important; }
}

@media (prefers-reduced-motion: reduce) {
  html body footer.atlas-footer:not(#aui) .atlas-footer-cta::after { animation: none; }
  .aui-btn, html body footer.atlas-footer:not(#aui) .atlas-footer-button { transition: none !important; }
}

/* ------------------------------------------------------------------ the pointer ring (atlas-cursor.js)
   The system pointer stays; this ring follows it and takes the shape of what it is over. The red glow that used to
   follow the pointer is retired. Pages can recolour the ring with --aui-cur-ink / --aui-cur-accent / --aui-cur-bg. */

:root { --aui-cur-ink: 255, 255, 255; --aui-cur-accent: 255, 42, 74; --aui-cur-bg: 9, 10, 14; }
.cursor-glow, #cursorGlow { display: none !important; }
.aui-cur {
  position: fixed; left: 0; top: 0; z-index: 2147483600; pointer-events: none; box-sizing: border-box;
  width: 34px; height: 34px; border-radius: 17px; border: 1.5px solid rgba(var(--aui-cur-ink), .55);
  display: grid; place-items: center; opacity: 0; will-change: transform;
  transition: opacity .25s ease, background-color .25s ease, border-color .25s ease, box-shadow .25s ease, scale .18s ease;
}
.aui-cur.on { opacity: 1; }
.aui-cur.is-link { background: rgba(var(--aui-cur-ink), .08); border-color: rgba(var(--aui-cur-ink), .85); }
.aui-cur.is-wrap { border-color: rgba(var(--aui-cur-accent), .9); box-shadow: 0 0 0 4px rgba(var(--aui-cur-accent), .12), 0 0 26px rgba(var(--aui-cur-accent), .35); }
.aui-cur.is-label { background: rgb(var(--aui-cur-ink)); border-color: rgb(var(--aui-cur-ink)); box-shadow: 0 14px 40px rgba(0, 0, 0, .35); }
.aui-cur.is-hide { opacity: 0 !important; }
/* the older stylesheets paint spans white; on the light disc the label must be dark */
html body .aui-cur span { font: 800 11px/1 Inter, Tajawal, sans-serif; letter-spacing: .1em; color: rgb(var(--aui-cur-bg)) !important; opacity: 0; transition: opacity .2s ease; white-space: nowrap; }
html body .aui-cur.is-label span { opacity: 1; }
.aui-cur.down { scale: .8; }
.aui-ripple {
  position: fixed; z-index: 2147483599; pointer-events: none; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  border: 2px solid rgba(var(--aui-cur-accent), .85); animation: aui-ripple .6s cubic-bezier(.2, .8, .2, 1) forwards;
}
@keyframes aui-ripple { to { transform: scale(4.5); opacity: 0; } }
@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) { .aui-cur, .aui-ripple { display: none !important; } }
