/*
 AL BADI HOME V5
 Orange + Ocean Blue
 Scoped homepage redesign
*/

/* ==========================================
   1. FULL BLEED HOMEPAGE HERO
========================================== */

body:has(.abfh) {
  background: #f5fbff;
}

body:has(.abfh) .abfh {
  position: relative !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 0 34px !important;
  background: #f5fbff !important;
}

body:has(.abfh) .abfh-layout {
  position: relative !important;
  width: 100% !important;
  min-height: 760px !important;
  height: auto !important;
  margin: 0 !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  background: #0577b8 !important;
}

body:has(.abfh) .abfh-image {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
}

body:has(.abfh) .abfh-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center 56% !important;
  border-radius: 0 !important;
}

body:has(.abfh) .abfh-layout::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
  background: linear-gradient(
    90deg,
    rgba(0,34,76,.82) 0%,
    rgba(0,52,93,.61) 29%,
    rgba(0,54,97,.18) 55%,
    transparent 78%
  ) !important;
}

/* ==========================================
   2. HERO TYPOGRAPHY
========================================== */

body:has(.abfh) .abfh-copy {
  position: relative !important;
  z-index: 3 !important;
  width: min(56%,760px) !important;
  max-width: 760px !important;
  padding: 155px 0 160px clamp(30px,7vw,120px) !important;
}

body:has(.abfh) .abfh-copy h1 {
  font-size: clamp(48px,5.2vw,82px) !important;
  line-height: 1.07 !important;
  letter-spacing: -.055em !important;
  color: #fff !important;
  text-wrap: balance;
}

body:has(.abfh) .abfh-copy h1 span {
  color: #ffbb80 !important;
}

body:has(.abfh) .abfh-copy p {
  max-width: 520px !important;
  font-size: clamp(16px,1.3vw,19px) !important;
  line-height: 1.7 !important;
  color: #fff !important;
}

body:has(.abfh) .abfh-eyebrow {
  color: #fff !important;
  background: rgba(255,255,255,.14) !important;
  border: 1px solid rgba(255,255,255,.45) !important;
  border-radius: 50px !important;
}

body:has(.abfh) .abfh-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 14px !important;
  margin-top: 28px !important;
}

body:has(.abfh) .abfh-actions a {
  min-height: 56px !important;
  border-radius: 16px !important;
  font-weight: 750 !important;
  transition: transform .25s ease,box-shadow .25s ease;
}

body:has(.abfh) .abfh-actions a:hover {
  transform: translateY(-3px);
}

body:has(.abfh) .abfh-btn-primary {
  color: #fff !important;
  background: linear-gradient(135deg,#ff8a35,#ff6225) !important;
  border: 0 !important;
  box-shadow: 0 12px 30px rgba(255,104,40,.22);
}

body:has(.abfh) .abfh-btn-secondary {
  color: #fff !important;
  background: rgba(255,255,255,.1) !important;
  border: 1px solid rgba(255,255,255,.8) !important;
}

/* ==========================================
   3. PLANNING PANEL
========================================== */

body:has(.abfh) .abfh-planner {
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  width: min(1340px,calc(100% - 64px)) !important;
  max-width: 1340px !important;
  margin: -45px auto 0 !important;
  padding: 28px !important;
  z-index: 6 !important;
  border: 1px solid #e4eef5 !important;
  border-radius: 26px !important;
  background: #fff !important;
  box-shadow: 0 20px 50px rgba(10,58,91,.13) !important;
}

body:has(.abfh) .abfh-services {
  display: grid !important;
  grid-template-columns: repeat(3,minmax(0,1fr)) !important;
  gap: 12px !important;
}

body:has(.abfh) .abfh-services a {
  min-width: 0 !important;
  min-height: 86px !important;
  padding: 17px !important;
  border: 1px solid #e1eef6 !important;
  border-radius: 16px !important;
  background: #f6fbfe !important;
  transition: background .2s ease,transform .2s ease;
}

body:has(.abfh) .abfh-services a:hover {
  background: #eaf7fd !important;
  transform: translateY(-2px);
}

body:has(.abfh) .abfh-planner-cta {
  min-height: 58px !important;
  background: linear-gradient(110deg,#05a4bc,#006ca9) !important;
  border-radius: 15px !important;
}

body:has(.abfh) .abfh-benefits {
  width: min(1340px,calc(100% - 64px)) !important;
  max-width: 1340px !important;
  margin: 18px auto 0 !important;
  border-radius: 22px !important;
}

/* ==========================================
   4. HEADER — FLOATING STYLE
   Uses existing navigation, not a second menu.
========================================== */

body:has(.abfh) header {
  position: relative;
  z-index: 50;
}

body:has(.abfh) header nav {
  border-radius: 22px;
}

body:has(.abfh) header a {
  transition: color .2s ease,background .2s ease;
}

body:has(.abfh) header a:hover {
  color: #ff712d;
}

/* ==========================================
   5. TABLET
========================================== */

@media (min-width:761px) and (max-width:1100px) {
  body:has(.abfh) .abfh-layout {
    min-height: 680px !important;
  }

  body:has(.abfh) .abfh-copy {
    width: 60% !important;
    padding: 115px 0 130px 42px !important;
  }

  body:has(.abfh) .abfh-copy h1 {
    font-size: clamp(45px,5vw,64px) !important;
  }
}

/* ==========================================
   6. MOBILE — FULL BACKGROUND HERO
========================================== */

@media (max-width:760px) {

  body:has(.abfh) .abfh {
    padding: 0 0 24px !important;
  }

  body:has(.abfh) .abfh-layout {
    position: relative !important;
    width: 100% !important;
    min-height: 780px !important;
    height: auto !important;
    border-radius: 0 !important;
    overflow: hidden !important;
  }

  body:has(.abfh) .abfh-image {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  body:has(.abfh) .abfh-image img {
    object-fit: cover !important;
    object-position: 64% center !important;
  }

  body:has(.abfh) .abfh-layout::after {
    background: linear-gradient(
      180deg,
      rgba(0,39,84,.89) 0%,
      rgba(0,50,94,.72) 27%,
      rgba(0,50,94,.12) 58%,
      transparent 83%
    ) !important;
  }

  body:has(.abfh) .abfh-copy {
    position: relative !important;
    z-index: 3 !important;
    width: 100% !important;
    max-width: none !important;
    padding: 54px 23px 40px !important;
  }

  body:has(.abfh) .abfh-copy h1 {
    font-size: clamp(38px,9.2vw,55px) !important;
    line-height: 1.09 !important;
  }

  body:has(.abfh) .abfh-copy h1 span {
    color: #ffbc80 !important;
  }

  body:has(.abfh) .abfh-copy p {
    max-width: 420px !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
  }

  body:has(.abfh) .abfh-actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    margin-top: 25px !important;
  }

  body:has(.abfh) .abfh-actions a {
    flex: 0 0 auto !important;
    width: auto !important;
    min-height: 49px !important;
    padding: 13px 19px !important;
    font-size: 13px !important;
  }

  body:has(.abfh) .abfh-planner {
    width: calc(100% - 24px) !important;
    margin: -16px auto 0 !important;
    padding: 23px 17px !important;
    border-radius: 23px !important;
  }

  body:has(.abfh) .abfh-services {
    grid-template-columns: 1fr !important;
    gap: 9px !important;
  }

  body:has(.abfh) .abfh-services a {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    min-height: 73px !important;
    padding: 12px !important;
  }

  body:has(.abfh) .abfh-services strong {
    font-size: 13px !important;
  }

  body:has(.abfh) .abfh-services small {
    font-size: 11px !important;
  }

  body:has(.abfh) .abfh-services b {
    margin: 0 0 0 auto !important;
    align-self: center !important;
  }

  body:has(.abfh) .abfh-benefits {
    width: calc(100% - 24px) !important;
    margin: 17px auto 0 !important;
    grid-template-columns: 1fr !important;
  }

  body:has(.abfh) .abfh-benefits > div {
    padding: 13px 6px !important;
  }
}

/* ==========================================
   7. MOTION ACCESSIBILITY
========================================== */

@media (prefers-reduced-motion:reduce) {
  body:has(.abfh) .abfh *,
  body:has(.abfh) .abfh *::before,
  body:has(.abfh) .abfh *::after {
    animation: none !important;
    transition: none !important;
  }
}
