/* Final Monday homepage overrides loaded after the large stylesheet. */

/* Keep Utilities/Admin arrows locked in place on desktop hover and mobile tap. */
html body .services-suite-frame:has(.suite-link-utilities:hover) #Utilities-Registration > path:last-child,
html body .services-suite-frame:has(.suite-link-utilities:focus-visible) #Utilities-Registration > path:last-child,
html body .services-suite-frame:has(.suite-arrow-utilities:hover) #Utilities-Registration > path:last-child,
html body .services-suite-frame:has(.suite-arrow-utilities:focus-visible) #Utilities-Registration > path:last-child,
html body .services-suite-frame:has(.suite-link-admin:hover) #Admin-Support > path:last-child,
html body .services-suite-frame:has(.suite-link-admin:focus-visible) #Admin-Support > path:last-child,
html body .services-suite-frame:has(.suite-arrow-admin:hover) #Admin-Support > path:last-child,
html body .services-suite-frame:has(.suite-arrow-admin:focus-visible) #Admin-Support > path:last-child {
  animation: none !important;
  transform: none !important;
  transform-box: fill-box !important;
  transform-origin: center center !important;
}

/* Desktop homepage hero carousel: make the outer frame hug the image closely. */
@media (min-width: 821px) {
  html body .hero-service-carousel.product-scene {
    width: min(392px, 100%) !important;
    min-height: 520px !important;
  }

  html body .hero-carousel-frame {
    width: min(372px, 100%) !important;
    min-height: 502px !important;
    border-radius: 20px !important;
  }

  html body .hero-carousel-track {
    min-height: 502px !important;
  }

  html body .hero-service-slide {
    padding: 6px !important;
  }

  html body .hero-slide-visual {
    width: 100% !important;
    height: 488px !important;
    border-radius: 18px !important;
  }
}

@media (min-width: 821px) and (max-width: 1100px) {
  html body .hero-service-carousel.product-scene {
    min-height: 462px !important;
  }

  html body .hero-carousel-frame,
  html body .hero-carousel-track {
    min-height: 442px !important;
  }

  html body .hero-slide-visual {
    height: 430px !important;
  }
}

html body .services-suite-frame:has(.suite-link-utilities:hover) #Utilities-Registration > circle:last-of-type,
html body .services-suite-frame:has(.suite-link-utilities:focus-visible) #Utilities-Registration > circle:last-of-type,
html body .services-suite-frame:has(.suite-arrow-utilities:hover) #Utilities-Registration > circle:last-of-type,
html body .services-suite-frame:has(.suite-arrow-utilities:focus-visible) #Utilities-Registration > circle:last-of-type,
html body .services-suite-frame:has(.suite-link-admin:hover) #Admin-Support > circle:last-of-type,
html body .services-suite-frame:has(.suite-link-admin:focus-visible) #Admin-Support > circle:last-of-type,
html body .services-suite-frame:has(.suite-arrow-admin:hover) #Admin-Support > circle:last-of-type,
html body .services-suite-frame:has(.suite-arrow-admin:focus-visible) #Admin-Support > circle:last-of-type {
  animation: none !important;
  transform: none !important;
  transform-box: fill-box !important;
  transform-origin: center center !important;
}

/* Softer Google review lead text. */
html body .reviews-lead span {
  font-weight: 560 !important;
}

/* Mobile: keep the review promo readable instead of cutting the RM5 voucher text. */
@media (max-width: 640px) {
  html body > .monday-review-promo {
    min-height: 36px !important;
    padding: 5px 8px !important;
    gap: 6px !important;
    justify-content: space-between !important;
  }

  html body > .monday-review-promo .review-promo-message {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: none !important;
    gap: 6px !important;
    justify-content: flex-start !important;
    font-size: clamp(0.64rem, 2.55vw, 0.78rem) !important;
    line-height: 1.15 !important;
    text-align: left !important;
  }

  html body > .monday-review-promo .review-promo-message > span:last-child {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
  }

  html body > .monday-review-promo .review-promo-dot {
    width: 6px !important;
    height: 6px !important;
    box-shadow: 0 0 0 4px rgba(213, 155, 63, 0.13) !important;
  }

  html body > .monday-review-promo .review-promo-updates {
    position: static !important;
    flex: 0 0 auto !important;
    transform: none !important;
    font-size: clamp(0.64rem, 2.55vw, 0.78rem) !important;
    line-height: 1 !important;
  }
}

/* Mobile homepage: How it works shows all 4 steps in one row, no sideways scroll. */
@media (max-width: 760px) {
  html body .process {
    padding-left: 4px !important;
    padding-right: 4px !important;
  }

  html body .process .section-title {
    margin-bottom: 16px !important;
  }

  html body .process .section-title h2 {
    max-width: 92vw !important;
    margin-inline: auto !important;
    font-size: clamp(1.58rem, 7vw, 2.4rem) !important;
    line-height: 1.05 !important;
  }

  html body .process-grid {
    display: grid !important;
    grid-auto-flow: initial !important;
    grid-auto-columns: initial !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
    width: calc(100% + 8px) !important;
    max-width: calc(100% + 8px) !important;
    margin-inline: -4px !important;
    padding: 0 !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    scroll-snap-type: none !important;
  }

  html body .process-grid::before,
  html body .process-grid .process-step::before,
  html body .process-grid .process-step::after {
    display: none !important;
    content: none !important;
  }

  html body .process-grid .process-step {
    min-width: 0 !important;
    min-height: 132px !important;
    padding: 11px 5px 10px !important;
    border: 1px solid rgba(99, 82, 246, 0.13) !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 10px 24px rgba(24, 27, 52, 0.07) !important;
    text-align: center !important;
  }

  html body .process-grid .process-step small {
    position: static !important;
    width: 28px !important;
    height: 28px !important;
    margin: 0 auto 7px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    display: inline-grid !important;
    place-items: center !important;
    font-size: 0.62rem !important;
    line-height: 1 !important;
  }

  html body .process-grid .process-illustration {
    width: 32px !important;
    height: 32px !important;
    margin: 0 auto 7px !important;
    border-radius: 10px !important;
  }

  html body .process-grid .process-illustration::before {
    width: 19px !important;
    height: 19px !important;
  }

  html body .process-grid .process-step h3 {
    margin: 0 auto 3px !important;
    max-width: 82px !important;
    font-size: clamp(0.66rem, 2.55vw, 0.82rem) !important;
    line-height: 1.08 !important;
  }

  html body .process-grid .process-step p {
    max-width: 84px !important;
    margin: 0 auto !important;
    font-size: clamp(0.5rem, 2.05vw, 0.64rem) !important;
    line-height: 1.22 !important;
  }
}

/* Canonical card interaction rules: one stable hover scale, no drifting or
   arrow transforms that can detach from the card. */
html body .services-suite-svg #cards > g {
  --suite-card-scale: 1;
  transform-box: fill-box !important;
  transform-origin: center center !important;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), filter 220ms ease !important;
}

@media (min-width: 761px) {
  html body .services-suite-frame:not(.suite-zoom-active) .services-suite-svg #cards > g {
    animation: none !important;
    opacity: 1 !important;
    transform: scale(var(--suite-card-scale)) !important;
  }
}

html body .services-suite-frame:has(.suite-link-lhdn:hover) #LHDN-Stamping,
html body .services-suite-frame:has(.suite-link-ssm:hover) #SSM-Registration,
html body .services-suite-frame:has(.suite-link-tax:hover) #Taxation-\\&-Accounting,
html body .services-suite-frame:has(.suite-link-licence:hover) #Business-License-\\&-Signboard,
html body .services-suite-frame:has(.suite-link-tenancy:hover) #Draft-Tenancy-Agreement,
html body .services-suite-frame:has(.suite-link-utilities:hover) #Utilities-Registration,
html body .services-suite-frame:has(.suite-link-admin:hover) #Admin-Support {
  --suite-card-scale: 1.045;
  filter: drop-shadow(0 16px 24px rgba(31, 38, 85, 0.14)) !important;
}

html body .services-suite-svg #cards > g > path:last-child,
html body .services-suite-svg #cards > g > circle:last-of-type {
  animation: none !important;
  transform: none !important;
  transform-box: fill-box !important;
  transform-origin: center center !important;
}

/* Mobile homepage: Tenancy + stamping support keeps layout, removes big middle copy, enlarges samples. */
@media (max-width: 760px) {
  html body .documents {
    padding-left: 4px !important;
    padding-right: 4px !important;
  }

  html body .documents .document-workspace {
    width: min(100%, 620px) !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
    padding: 8px !important;
    border-radius: 24px !important;
  }

  html body .documents .doc-center {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    order: -1 !important;
    min-height: auto !important;
    padding: 2px 0 4px !important;
  }

  html body .documents .doc-center h3,
  html body .documents .doc-center a {
    display: none !important;
  }

  html body .documents .doc-center span {
    max-width: none !important;
    color: var(--primary-dark) !important;
    font-size: clamp(0.72rem, 3vw, 0.95rem) !important;
    line-height: 1.15 !important;
    font-weight: 850 !important;
    letter-spacing: 0.08em !important;
    text-align: center !important;
  }

  html body .documents .doc-stack {
    display: contents !important;
  }

  html body .documents .doc-stack img {
    width: 100% !important;
    height: clamp(214px, 57vw, 276px) !important;
    max-height: none !important;
    padding: 2px !important;
    object-fit: contain !important;
    object-position: center center !important;
    border-radius: 15px !important;
  }

  html body .documents .doc-stack:first-child img:nth-child(1) {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  html body .documents .doc-stack.reverse img:nth-child(1) {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }

  html body .documents .doc-stack:first-child img:nth-child(2) {
    grid-column: 1 !important;
    grid-row: 3 !important;
  }

  html body .documents .doc-stack.reverse img:nth-child(2) {
    grid-column: 2 !important;
    grid-row: 3 !important;
  }

  html body .documents .doc-stack {
    align-content: center !important;
  }

  html body .documents .doc-stack:first-child img {
    object-position: center center !important;
  }

  html body .documents .doc-stack.reverse img {
    object-position: center center !important;
  }
}

@media (max-width: 390px) {
  html body .documents .document-workspace {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
    padding: 7px !important;
  }

  html body .documents .doc-stack img {
    height: 222px !important;
  }
}

/* Safety: desktop service-suite cards must always remain visible and in place. */
@media (min-width: 761px) {
  html body .services-suite-svg #cards > g {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    animation: none !important;
  }
}

/* TRUE FINAL: desktop mouse hover zoom, after all safety rules. */
@media (min-width: 761px) and (hover: hover) and (pointer: fine) {
  html body .services-suite-svg #cards > g {
    transform-box: fill-box !important;
    transform-origin: center center !important;
    transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), filter 180ms ease !important;
  }

  html body .services-suite-frame:has(.suite-link-lhdn:hover) #LHDN-Stamping,
  html body .services-suite-frame:has(.suite-arrow-lhdn:hover) #LHDN-Stamping,
  html body .services-suite-frame:has(.suite-link-ssm:hover) #SSM-Registration,
  html body .services-suite-frame:has(.suite-arrow-ssm:hover) #SSM-Registration,
  html body .services-suite-frame:has(.suite-link-tax:hover) #Taxation-\&-Accounting,
  html body .services-suite-frame:has(.suite-arrow-tax:hover) #Taxation-\&-Accounting,
  html body .services-suite-frame:has(.suite-link-licence:hover) #Business-License-\&-Signboard,
  html body .services-suite-frame:has(.suite-arrow-licence:hover) #Business-License-\&-Signboard,
  html body .services-suite-frame:has(.suite-link-tenancy:hover) #Draft-Tenancy-Agreement,
  html body .services-suite-frame:has(.suite-arrow-tenancy:hover) #Draft-Tenancy-Agreement,
  html body .services-suite-frame:has(.suite-link-utilities:hover) #Utilities-Registration,
  html body .services-suite-frame:has(.suite-arrow-utilities:hover) #Utilities-Registration,
  html body .services-suite-frame:has(.suite-link-admin:hover) #Admin-Support,
  html body .services-suite-frame:has(.suite-arrow-admin:hover) #Admin-Support {
    opacity: 1 !important;
    visibility: visible !important;
    animation: none !important;
    filter: drop-shadow(0 18px 24px rgba(31, 38, 85, 0.14)) !important;
    transform: scale(1.035) !important;
  }

  html body .services-suite-frame:has(.suite-link:hover) .services-suite-svg #cards > g > circle:last-of-type,
  html body .services-suite-frame:has(.suite-arrow-link:hover) .services-suite-svg #cards > g > circle:last-of-type,
  html body .services-suite-frame:has(.suite-link:hover) .services-suite-svg #cards > g > path:last-child,
  html body .services-suite-frame:has(.suite-arrow-link:hover) .services-suite-svg #cards > g > path:last-child,
  html body .services-suite-frame:has(.suite-link-lhdn:hover) #LHDN-Stamping > rect:nth-of-type(4),
  html body .services-suite-frame:has(.suite-arrow-lhdn:hover) #LHDN-Stamping > rect:nth-of-type(4),
  html body .services-suite-frame:has(.suite-link-lhdn:hover) #LHDN-Stamping > text:nth-of-type(6),
  html body .services-suite-frame:has(.suite-arrow-lhdn:hover) #LHDN-Stamping > text:nth-of-type(6) {
    animation: none !important;
    filter: none !important;
    transform: none !important;
  }

  html body .services-suite-frame:has(.suite-link-lhdn:hover) #LHDN-Stamping > rect:nth-of-type(4),
  html body .services-suite-frame:has(.suite-arrow-lhdn:hover) #LHDN-Stamping > rect:nth-of-type(4),
  html body .services-suite-frame:has(.suite-link-lhdn:hover) #LHDN-Stamping > text:nth-of-type(6),
  html body .services-suite-frame:has(.suite-arrow-lhdn:hover) #LHDN-Stamping > text:nth-of-type(6),
  html body .services-suite-frame:has(.suite-link-lhdn:hover) #LHDN-Stamping > path:last-child,
  html body .services-suite-frame:has(.suite-arrow-lhdn:hover) #LHDN-Stamping > path:last-child {
    animation: none !important;
    filter: none !important;
    transform: none !important;
    transition: none !important;
  }
}
