/*
 AL BADI FAMILY HERO V4.3
 Overrides V4.2 only.
*/

/* SHARED */
.abfh {
  width: 100%;
  max-width: none;
  margin: 0 auto 46px;
  padding: 0 clamp(16px,3.4vw,58px) 28px;
  overflow: visible;
  background: #f6fbfd;
}

.abfh-layout {
  position: relative;
  display: block;
  min-height: 680px;
  overflow: hidden;
  border-radius: 0 0 28px 28px;
  background: #077cb4;
  isolation: isolate;
}

.abfh-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
}

.abfh-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 54%;
  animation: abfh-image-in 1.5s ease-out both;
}

.abfh-layout::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(3,27,55,.91) 0%,
    rgba(3,36,67,.79) 25%,
    rgba(3,42,72,.37) 49%,
    rgba(3,42,72,0) 76%
  );
}

.abfh-copy {
  position: relative;
  z-index: 3;
  width: min(52%,660px);
  max-width: 660px;
  padding: 110px 0 145px clamp(28px,5vw,85px);
  animation: abfh-rise .85s ease-out both;
}

.abfh-eyebrow {
  color: #fff;
  background: rgba(255,255,255,.17);
  border: 1px solid rgba(255,255,255,.3);
  backdrop-filter: blur(8px);
}

.abfh-copy h1 {
  font-size: clamp(43px,4.3vw,70px);
  line-height: 1.08;
  letter-spacing: -.05em;
  color: #fff;
  text-wrap: balance;
  text-shadow: 0 3px 22px rgba(0,20,40,.18);
}

.abfh-copy h1 span {
  color: #ffe0a1;
}

.abfh-copy p {
  max-width: 470px;
  font-size: clamp(15px,1.3vw,18px);
  color: #f2f8fc;
  line-height: 1.7;
}

.abfh-actions {
  position: relative;
  z-index: 4;
  margin-top: 28px;
  gap: 12px;
}

.abfh-actions a {
  transition: transform .22s ease,box-shadow .22s ease;
}

.abfh-actions a:hover,
.abfh-planner-cta:hover {
  transform: translateY(-3px);
}

.abfh-btn-primary {
  background: #fa873d;
  color: #fff !important;
}

.abfh-btn-secondary {
  color: #fff !important;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.65);
  backdrop-filter: blur(8px);
}

/* PLANNER IS BELOW IMAGE — FAMILY REMAINS VISIBLE */
.abfh-planner {
  position: relative;
  z-index: 5;
  top: auto;
  right: auto;
  transform: none;
  width: min(1100px,calc(100% - 56px));
  max-width: 1100px;
  margin: -62px auto 0;
  padding: 26px 30px;
  border: 1px solid #e3edf2;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(11,53,83,.14);
  animation: abfh-rise 1s .15s ease-out both;
}

.abfh-planner h2 {
  font-size: clamp(21px,2vw,27px);
}

.abfh-planner > p {
  margin-bottom: 20px;
}

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

.abfh-services a {
  min-width: 0;
  min-height: 92px;
  padding: 16px;
  border-radius: 15px;
  background: #f5fafc;
  transition: background .2s ease,transform .2s ease;
}

.abfh-services a:hover {
  background: #e9f7fa;
  transform: translateY(-2px);
}

.abfh-service-icon {
  font-size: 24px;
}

.abfh-services strong {
  font-size: 13px;
}

.abfh-services small {
  font-size: 11px;
}

.abfh-planner-cta {
  min-height: 54px;
  margin-top: 16px;
}

.abfh-benefits {
  width: min(1100px,calc(100% - 56px));
  max-width: 1100px;
  margin: 20px auto 0;
  padding: 20px 12px;
  box-shadow: 0 10px 30px rgba(11,53,83,.07);
}

/* TABLET */
@media (min-width:761px) and (max-width:1100px) {
  .abfh-layout {
    min-height: 610px;
  }

  .abfh-copy {
    width: 55%;
    max-width: 55%;
    padding: 85px 0 120px 38px;
  }

  .abfh-copy h1 {
    font-size: clamp(39px,4.5vw,56px);
  }

  .abfh-image {
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .abfh-image img {
    object-position: 58% center;
  }

  .abfh-planner {
    width: calc(100% - 40px);
    padding: 23px;
  }
}

/* MOBILE — FULL PHOTO BACKGROUND */
@media (max-width:760px) {
  .abfh {
    padding: 0 0 25px;
    margin-bottom: 25px;
    overflow: visible;
    background: #f5fafc;
  }

  .abfh-layout {
    position: relative;
    display: block;
    min-height: clamp(690px,180vw,850px);
    border-radius: 0 0 26px 26px;
    overflow: hidden;
    background: #067cb9;
  }

  .abfh-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .abfh-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 64% center;
  }

  .abfh-layout::after {
    background: linear-gradient(
      180deg,
      rgba(0,48,97,.90) 0%,
      rgba(0,65,112,.76) 19%,
      rgba(0,78,123,.42) 40%,
      rgba(0,78,123,.05) 64%,
      rgba(0,30,50,.04) 100%
    );
  }

  .abfh-copy {
    position: relative;
    z-index: 3;
    order: initial;
    width: 100%;
    max-width: none;
    padding: 42px 24px 0;
    margin: 0;
  }

  .abfh-eyebrow {
    max-width: 100%;
    padding: 10px 13px;
    font-size: 9px;
    line-height: 1.4;
    letter-spacing: .06em;
    color: #fff;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.27);
  }

  .abfh-copy h1 {
    margin: 24px 0 16px;
    font-size: clamp(40px,10.2vw,56px);
    line-height: 1.08;
    letter-spacing: -.055em;
    color: #fff;
    text-shadow: 0 3px 16px rgba(0,30,65,.18);
  }

  .abfh-copy h1 span {
    display: block;
    color: #ffe0a1;
  }

  .abfh-copy p {
    max-width: 430px;
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,30,65,.22);
  }

  .abfh-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
  }

  .abfh-actions a {
    min-height: 48px;
    padding: 12px 16px;
    font-size: 12px;
    border-radius: 13px;
  }

  .abfh-btn-primary {
    background: #fa873d;
    color: #fff !important;
  }

  .abfh-btn-secondary {
    background: rgba(255,255,255,.14);
    color: #fff !important;
    border-color: rgba(255,255,255,.65);
  }

  /* Card sits AFTER the hero photo */
  .abfh-planner {
    position: relative;
    order: initial;
    top: auto;
    right: auto;
    transform: none;
    width: calc(100% - 28px);
    max-width: none;
    margin: -26px auto 0;
    padding: 24px 19px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 15px 40px rgba(11,53,83,.13);
  }

  .abfh-planner h2 {
    font-size: 24px;
  }

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

  .abfh-services a {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
    min-width: 0;
    min-height: 137px;
    padding: 12px 9px;
    border-radius: 13px;
  }

  .abfh-services strong {
    font-size: 11px;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  .abfh-services small {
    font-size: 10px;
    line-height: 1.35;
  }

  .abfh-services b {
    margin-top: auto;
    align-self: flex-end;
  }

  .abfh-service-icon {
    font-size: 22px;
  }

  .abfh-planner-cta {
    min-height: 54px;
    margin-top: 14px;
    font-size: 13px;
  }

  .abfh-benefits {
    width: calc(100% - 28px);
    margin: 18px auto 0;
    padding: 6px 18px;
    grid-template-columns: 1fr;
  }

  .abfh-benefits > div {
    padding: 14px 4px;
  }

  .abfh-benefits > div + div {
    border-left: 0;
    border-top: 1px solid #e2eaf0;
  }
}

/* SMALL PHONES */
@media (max-width:380px) {
  .abfh-layout {
    min-height: 710px;
  }

  .abfh-copy {
    padding: 34px 18px 0;
  }

  .abfh-copy h1 {
    font-size: 37px;
  }

  .abfh-copy p {
    font-size: 13px;
  }

  .abfh-actions a {
    width: auto;
    flex: 1 1 130px;
    padding: 11px 9px;
    text-align: center;
  }

  .abfh-services a {
    padding: 10px 7px;
  }

  .abfh-services strong {
    font-size: 10px;
  }

  .abfh-services small {
    font-size: 9px;
  }
}

/* MOTION */
@keyframes abfh-rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes abfh-image-in {
  from {
    opacity: .65;
    transform: scale(1.035);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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