/* =========================================================
   Home AI Card Section
   Main wrapper for the whole module
========================================================= */
section[data-module="home-ai-card"] {
  position: relative;
  overflow: visible !important;
  background: #ffffff;
  font-family: "Open Sans", sans-serif;
}

section[data-module="home-ai-card"] * {
  box-sizing: border-box;
}




/* =========================================================
   Pin Scroll Area
   This area creates the scroll height for the JS stacking effect
========================================================= */
section[data-module="home-ai-card"] .haic-pin-space {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: visible !important;
}


/* =========================================================
   Fixed Stage
   JS will change this between absolute and fixed while scrolling
========================================================= */
section[data-module="home-ai-card"] .haic-pin-stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
}


/* =========================================================
   Main Card Position
   Each card is positioned in the center and controlled by JS
========================================================= */
section[data-module="home-ai-card"] .haic-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(1440px, calc(100vw - 120px));
  opacity: 0;
  transform-origin: center top;
  will-change: transform, opacity;
  pointer-events: auto;
}


/* =========================================================
   Card Container
   Main enGreen card design
========================================================= */
section[data-module="home-ai-card"] .haic-card-inner {
  position: relative;
  width: 100%;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.85fr);
  gap: 54px;
  padding: 46px 54px 58px;
  border-radius: 34px;
  background: #d2c8c3;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
  overflow: hidden;
  transform-origin: center top;
  will-change: filter;
}

section[data-module="home-ai-card"] .haic-small-text {
  max-width: 700px;
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.45;
  color: #111111;
}


/* Graphic pattern layer covering the full card background */
section[data-module="home-ai-card"] .haic-card-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: url('/wp-content/uploads/2026/05/card-bullet.png');
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: cover;
  pointer-events: none;
}

/* Soft highlight layer */
section[data-module="home-ai-card"] .haic-card-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 78% 20%,
    rgba(255, 255, 255, 0.28) 0%,
    rgba(255, 255, 255, 0) 38%
  );
  pointer-events: none;
}


/* =========================================================
   Icon Badge
========================================================= */
section[data-module="home-ai-card"] .haic-icon-badge {
  position: absolute;
  left: 54px;
  top: 50px;
  z-index: 3;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: #f9d067;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

section[data-module="home-ai-card"] .haic-icon-badge img {
  max-width: 42px;
  max-height: 42px;
  display: block;
}


/* =========================================================
   Left Content
========================================================= */
section[data-module="home-ai-card"] .haic-left {
  position: relative;
  z-index: 2;
  max-width: 780px;
  padding-top: 130px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

section[data-module="home-ai-card"] .haic-title {
  margin: 0 0 24px;
  font-family: "Raleway", sans-serif;
  font-size: 50px;
  line-height: 1.15;
  font-weight: 700;
  color: #156082;
}

section[data-module="home-ai-card"] .haic-lead {
  max-width: 900px;
  margin: 0 0 18px;
  font-family: "Open Sans", sans-serif;
  font-size: 22px;
  line-height: 1.45;
  font-weight: 700;
  color: #111111;
}

section[data-module="home-ai-card"] .haic-desc {
  max-width: 890px;
  margin: 0;
  font-family: "Open Sans", sans-serif;
  font-size: 18px;
  line-height: 1.55;
  color: rgba(17, 17, 17, 0.78);
}


/* =========================================================
   More Button
   Smooth flat yellow button with blue ripple hover
========================================================= */
section[data-module="home-ai-card"] .haic-more-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-top: 34px;
  padding: 9px 12px 9px 22px;
  border-radius: 999px;
  background: #f9d067;
  border: 1px solid #f9d067;
  text-decoration: none;
  overflow: hidden;
  cursor: pointer;
  isolation: isolate;
  box-shadow: none;
  transition:
    transform 0.35s ease,
    border-color 0.35s ease;
}

/* Blue ripple layer */
section[data-module="home-ai-card"] .haic-more-btn::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: 0;
  height: 0;
  border-radius: 999px;
  background: #156082;
  transform: translate(-50%, -50%);
  transition:
    width 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Very soft surface highlight */
section[data-module="home-ai-card"] .haic-more-btn::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

/* Button text */
section[data-module="home-ai-card"] .haic-more-text {
  position: relative;
  z-index: 2;
  font-family: "Open Sans", sans-serif;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.01em;
  color: #111111;
  white-space: nowrap;
  transition:
    color 0.38s ease,
    transform 0.38s ease;
}

/* Icon circle */
section[data-module="home-ai-card"] .haic-more-icon {
  position: relative;
  z-index: 2;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: #156082;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.38s ease,
    transform 0.38s ease;
}

/* Arrow icon */
section[data-module="home-ai-card"] .haic-more-icon::before {
  content: "";
  width: 13px;
  height: 13px;
  background-color: #f9d067;
  -webkit-mask: url('/wp-content/uploads/2026/04/button-right.png') no-repeat center / contain;
  mask: url('/wp-content/uploads/2026/04/button-right.png') no-repeat center / contain;
  transition:
    background-color 0.38s ease,
    transform 0.38s ease;
}

/* Hover */
section[data-module="home-ai-card"] .haic-more-btn:hover {
  transform: translateY(-1px);
  border-color: #156082;
}

section[data-module="home-ai-card"] .haic-more-btn:hover::before {
  width: 260px;
  height: 260px;
}

section[data-module="home-ai-card"] .haic-more-btn:hover::after {
  opacity: 1;
}

section[data-module="home-ai-card"] .haic-more-btn:hover .haic-more-text {
  color: #ffffff;
  transform: translateX(1px);
}

/* Hover icon remains blue, arrow becomes white */
section[data-module="home-ai-card"] .haic-more-btn:hover .haic-more-icon {
  background: #156082;
  transform: translateX(3px);
}

section[data-module="home-ai-card"] .haic-more-btn:hover .haic-more-icon::before {
  background-color: #ffffff;
  transform: translateX(1px);
}

section[data-module="home-ai-card"] .haic-more-btn:active {
  transform: scale(0.98);
}


/* =========================================================
   Right Media Area
   Fixed height makes all photos display in one consistent size
========================================================= */
section[data-module="home-ai-card"] .haic-right {
  position: relative;
  z-index: 2;
  min-width: 0;
  width: 100%;
  height: 570px;
  display: block;
}


/* Each media link is stacked on top of each other */
section[data-module="home-ai-card"] .haic-media-link {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}


/* Only active slide is visible */
section[data-module="home-ai-card"] .haic-media-link.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}


/* Main image card */
section[data-module="home-ai-card"] .haic-media {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 42px;
  overflow: hidden;
  background: #d9d9d9;
}


/* Image always fills the same fixed frame */
section[data-module="home-ai-card"] .haic-media-img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform 0.35s ease, opacity 0.25s ease;
}


/* Normal image overlay */
section[data-module="home-ai-card"] .haic-media-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.04) 0%,
      rgba(255, 255, 255, 0) 34%,
      rgba(21, 96, 130, 0.30) 68%,
      rgba(21, 96, 130, 0.84) 100%
    );
  transition: all 0.35s ease;
}



/* Media text content */
section[data-module="home-ai-card"] .haic-media-content {
  position: absolute;
  left: 38px;
  right: 38px;
  bottom: 84px;
  z-index: 2;
  color: #ffffff;
}

section[data-module="home-ai-card"] .haic-media-title {
  margin: 0 0 14px;
  font-family: "Raleway", sans-serif;
  font-size: 32px;
  line-height: 1.18;
  font-weight: 700;
  color: #ffffff;
}

section[data-module="home-ai-card"] .haic-media-desc {
  margin: 0;
  font-family: "Open Sans", sans-serif;
  font-size: 18px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.95);
}



/* =========================================================
   Left / Right Navigation Arrows
========================================================= */
section[data-module="home-ai-card"] .haic-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 54px;
  height: 54px;
  border: 2px solid #f9d067;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
  transition: all 0.25s ease;
}

section[data-module="home-ai-card"] .haic-nav span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
  background-color: #f9d067;
  -webkit-mask: url('/wp-content/uploads/2026/04/button-right.png') no-repeat center / contain;
  mask: url('/wp-content/uploads/2026/04/button-right.png') no-repeat center / contain;
  transition: background-color 0.25s ease;
}

section[data-module="home-ai-card"] .haic-nav-prev {
  left: -26px;
}

section[data-module="home-ai-card"] .haic-nav-prev span {
  transform: translate(-50%, -50%) rotate(180deg);
}

section[data-module="home-ai-card"] .haic-nav-next {
  right: -26px;
}


/* Hover state */
section[data-module="home-ai-card"] .haic-nav:hover {
  background: #f9d067;
}

section[data-module="home-ai-card"] .haic-nav:hover span {
  background-color: #156082;
}


/* Clickable state
   If there is still a slide to go, arrow stays like hover active */
section[data-module="home-ai-card"] .haic-nav.can-click {
  background: #f9d067;
  border-color: #f9d067;
}

section[data-module="home-ai-card"] .haic-nav.can-click span {
  background-color: #156082;
}


/* Disabled state
   First slide disables left arrow, last slide disables right arrow */
section[data-module="home-ai-card"] .haic-nav.is-disabled {
  background: transparent;
  border-color: #f9d067;
  cursor: not-allowed;
}

section[data-module="home-ai-card"] .haic-nav.is-disabled span {
  background-color: #f9d067;
}

section[data-module="home-ai-card"] .haic-nav.is-disabled:hover {
  background: transparent;
  border-color: #f9d067;
}

section[data-module="home-ai-card"] .haic-nav.is-disabled:hover span {
  background-color: #f9d067;
}


/* =========================================================
   Indicators
========================================================= */
section[data-module="home-ai-card"] .haic-indicators {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 10px;
}

section[data-module="home-ai-card"] .haic-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: white;
  cursor: pointer;
  transition: all 0.25s ease;
}

section[data-module="home-ai-card"] .haic-dot.is-active {
  width: 26px;
  background: #37c2e3;
  border-color: #37c2e3;
}


/* =========================================================
   Laptop Enhancement
   Desktop 保持不动，只优化 1299px 以下
   目标：整体高度缩短，内容更紧凑
========================================================= */
/* =========================================================
   Laptop Enhancement
   Desktop 保持不动，只优化 1499px 以下
   目标：整体高度缩短，内容更紧凑
========================================================= */
@media (max-width: 1499px) and (min-width: 992px) {
  section[data-module="home-ai-card"] .haic-card {
    width: min(1120px, calc(100vw - 70px));
  }

  section[data-module="home-ai-card"] {
    padding-bottom: 120px;
  }

  section[data-module="home-ai-card"] .haic-pin-stage {
    height: calc(100vh - 90px);
    top: 90px;
    overflow: visible;
  }

  section[data-module="home-ai-card"] .haic-card-inner {
    min-height: 450px;
    grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
    gap: 34px;
    padding: 34px 38px 42px;
    border-radius: 30px;
  }

  section[data-module="home-ai-card"] .haic-icon-badge {
    left: 38px;
    top: 34px;
    width: 64px;
    height: 64px;
  }

  section[data-module="home-ai-card"] .haic-icon-badge img {
    max-width: 34px;
    max-height: 34px;
  }

  section[data-module="home-ai-card"] .haic-left {
    padding-top: 80px;
    max-width: 690px;
  }

  section[data-module="home-ai-card"] .haic-title {
    font-size: 38px;
    line-height: 1.14;
    margin-bottom: 18px;
  }

  section[data-module="home-ai-card"] .haic-lead {
    font-size: 18px;
    line-height: 1.42;
    margin-bottom: 14px;
  }

  section[data-module="home-ai-card"] .haic-desc,
  section[data-module="home-ai-card"] .haic-small-text {
    font-size: 16px;
    line-height: 1.5;
  }

  /* More Button - Laptop */
  section[data-module="home-ai-card"] .haic-more-btn {
    margin-top: 26px;
    padding: 12px 14px 12px 24px;
    gap: 12px;
  }

  section[data-module="home-ai-card"] .haic-more-text {
    font-size: 16px;
  }

  section[data-module="home-ai-card"] .haic-more-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  section[data-module="home-ai-card"] .haic-more-icon::before {
    width: 12px;
    height: 12px;
  }

  section[data-module="home-ai-card"] .haic-more-btn:hover::before {
    width: 230px;
    height: 230px;
  }

  section[data-module="home-ai-card"] .haic-more-btn:hover .haic-more-icon {
    background: #156082;
    transform: translateX(2px);
  }

  section[data-module="home-ai-card"] .haic-more-btn:hover .haic-more-icon::before {
    background-color: #ffffff;
    transform: translateX(1px);
  }

  section[data-module="home-ai-card"] .haic-right {
    height: 450px;
  }

  section[data-module="home-ai-card"] .haic-media {
    border-radius: 34px;
  }

  section[data-module="home-ai-card"] .haic-media-content {
    left: 30px;
    right: 30px;
    bottom: 72px;
  }

  section[data-module="home-ai-card"] .haic-media-title {
    font-size: 26px;
    margin-bottom: 10px;
  }

  section[data-module="home-ai-card"] .haic-media-desc {
    font-size: 16px;
    line-height: 1.42;
  }

  section[data-module="home-ai-card"] .haic-nav {
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }

  section[data-module="home-ai-card"] .haic-nav span {
    width: 14px;
    height: 14px;
  }

  section[data-module="home-ai-card"] .haic-nav-prev {
    left: -22px;
  }

  section[data-module="home-ai-card"] .haic-nav-next {
    right: -22px;
  }
}


/* =========================================================
   FORCE Mobile Clean Layout
   Put this at the very bottom of CSS file
========================================================= */
@media (max-width: 767px) {

  section[data-module="home-ai-card"] {
    padding: 32px 14px !important;
  }

  section[data-module="home-ai-card"] .haic-pin-space {
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  section[data-module="home-ai-card"] .haic-pin-stage {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
    pointer-events: auto !important;
  }

  section[data-module="home-ai-card"] .haic-card {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    opacity: 1 !important;
    transform: none !important;
    z-index: auto !important;
    pointer-events: auto !important;
  }

  section[data-module="home-ai-card"] .haic-card-inner {
    display: flex !important;
    flex-direction: column !important;
    min-height: auto !important;
    padding: 0 !important;
    gap: 0 !important;
    border-radius: 22px !important;
    overflow: hidden !important;
    filter: none !important;
  }

  section[data-module="home-ai-card"] .haic-card-inner::before {
    inset: 0 !important;
    width: auto !important;
    height: auto !important;
    background-size: cover !important;
    background-position: left bottom !important;
  }

  section[data-module="home-ai-card"] .haic-card-inner::after {
    display: none !important;
  }

  section[data-module="home-ai-card"] .haic-icon-badge {
    left: 18px !important;
    top: 18px !important;
    width: 52px !important;
    height: 52px !important;
  }

  section[data-module="home-ai-card"] .haic-icon-badge img {
    max-width: 28px !important;
    max-height: 28px !important;
  }

  section[data-module="home-ai-card"] .haic-left {
    position: relative !important;
    z-index: 3 !important;
    max-width: 100% !important;
    padding: 88px 18px 22px !important;
  }

  section[data-module="home-ai-card"] .haic-title {
    font-size: 24px !important;
    line-height: 1.16 !important;
    margin-bottom: 14px !important;
  }

  section[data-module="home-ai-card"] .haic-lead {
    font-size: 15px !important;
    line-height: 1.45 !important;
    margin-bottom: 10px !important;
  }

  section[data-module="home-ai-card"] .haic-desc,
  section[data-module="home-ai-card"] .haic-small-text {
    font-size: 13.5px !important;
    line-height: 1.55 !important;
  }

  /* More Button - Mobile */
  section[data-module="home-ai-card"] .haic-more-btn {
    margin-top: 20px !important;
    padding: 11px 12px 11px 22px !important;
    gap: 10px !important;
  }

  section[data-module="home-ai-card"] .haic-more-text {
    font-size: 15px !important;
  }

  section[data-module="home-ai-card"] .haic-more-icon {
    width: 28px !important;
    height: 28px !important;
    flex-basis: 28px !important;
    background: #156082 !important;
  }

  section[data-module="home-ai-card"] .haic-more-icon::before {
    width: 11px !important;
    height: 11px !important;
  }

  section[data-module="home-ai-card"] .haic-more-btn:hover {
    transform: translateY(-1px) !important;
    border-color: #156082 !important;
  }

  section[data-module="home-ai-card"] .haic-more-btn:hover::before {
    width: 220px !important;
    height: 220px !important;
  }

  section[data-module="home-ai-card"] .haic-more-btn:hover .haic-more-text {
    color: #ffffff !important;
    transform: translateX(1px) !important;
  }

  section[data-module="home-ai-card"] .haic-more-btn:hover .haic-more-icon {
    background: #156082 !important;
    transform: translateX(2px) !important;
  }

  section[data-module="home-ai-card"] .haic-more-btn:hover .haic-more-icon::before {
    background-color: #ffffff !important;
    transform: translateX(1px) !important;
  }

  section[data-module="home-ai-card"] .haic-right {
    position: relative !important;
    z-index: 3 !important;
    width: calc(100% - 28px) !important;
    height: 245px !important;
    margin: 0 auto 18px !important;
  }

  section[data-module="home-ai-card"] .haic-media {
    border-radius: 18px !important;
  }

  section[data-module="home-ai-card"] .haic-media-overlay {
    background:
      linear-gradient(
        180deg,
        rgba(21, 96, 130, 0.05) 0%,
        rgba(21, 96, 130, 0.28) 42%,
        rgba(21, 96, 130, 0.90) 100%
      ) !important;
  }

  section[data-module="home-ai-card"] .haic-media-content {
    left: 16px !important;
    right: 48px !important;
    bottom: 48px !important;
    text-align: center !important;
  }

  section[data-module="home-ai-card"] .haic-media-title {
    font-size: 18px !important;
    line-height: 1.18 !important;
    margin-bottom: 6px !important;
  }

  section[data-module="home-ai-card"] .haic-media-desc {
    display: none !important;
  }

  section[data-module="home-ai-card"] .haic-nav {
    width: 34px !important;
    height: 34px !important;
    border-radius: 9px !important;
  }

  section[data-module="home-ai-card"] .haic-nav span {
    width: 11px !important;
    height: 11px !important;
  }

  section[data-module="home-ai-card"] .haic-nav-prev {
    left: 8px !important;
  }

  section[data-module="home-ai-card"] .haic-nav-next {
    right: 8px !important;
  }

  section[data-module="home-ai-card"] .haic-indicators {
    bottom: 16px !important;
    gap: 8px !important;
  }

  section[data-module="home-ai-card"] .haic-dot {
    width: 8px !important;
    height: 8px !important;
  }

  section[data-module="home-ai-card"] .haic-dot.is-active {
    width: 22px !important;
  }
}