/* CamSME Motion & Micro-Interaction Styles (DESIGN.md Compliant) */

.cs-hdr-bar {
  transition: height 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.28s ease,
              border-color 0.28s ease;
}
.cs-hdr-bar.is-scrolled {
  height: 62px;
  background: rgba(255, 255, 255, 0.96);
  border-color: #ECE7DE;
  box-shadow: 0 12px 28px -10px rgba(12, 12, 12, 0.12);
}

/* Desktop Pointer Hover Lift (DESIGN.md: Single Depth Rule, 8px-14px radius, #03624C hover border) */
@media (hover: hover) and (pointer: fine) {
  .camsme-bento-single-card,
  #cs_card_billing,
  #cs_card_pos,
  #cs_card_school,
  #cs_feat_tourbooker,
  .bento-tile:not(.bento-accent-cta) {
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.22s ease;
  }
  .camsme-bento-single-card:hover,
  #cs_card_billing:hover,
  #cs_card_pos:hover,
  #cs_card_school:hover,
  #cs_feat_tourbooker:hover,
  .bento-tile:not(.bento-accent-cta):hover {
    transform: translate3d(0, -4px, 0);
    border-color: rgba(255, 255, 255, 0.92) !important;
    box-shadow: 0 12px 28px rgba(3, 98, 76, 0.08);
  }
}

/* Mobile Tab Bar Smooth Horizontal Scroll */
@media (max-width: 767px) {
  .bento-nav-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .bento-nav-bar::-webkit-scrollbar {
    display: none;
  }
  .bento-nav-btn {
    scroll-snap-align: start;
    flex-shrink: 0;
  }
}

/* ==========================================================================
   Interactive Ambient Stage (Seamless Feathered Gradient Clouds + 64px Grid)
   ========================================================================== */
.cs-khmer-stage {
  position: relative;
  overflow: hidden;
}

.cs-khmer-stage > .e-con-inner,
.cs-khmer-stage > .elementor-element {
  position: relative;
  z-index: 2;
}

.cs-stage-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.cs-stage-grid-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 1;
}

/* Seamless feathered gradient clouds:
   - closest-side guarantees 0% alpha BEFORE touching the element box
   - static filter:blur(44px) is rasterized once on GPU layer (zero per-frame repaint) */
.cs-stage-blob {
  position: absolute;
  pointer-events: none;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  filter: blur(44px);
  -webkit-filter: blur(44px);
}

.cs-stage-blob--emerald {
  width: 660px;
  height: 580px;
  top: -10%;
  left: -6%;
  background: radial-gradient(
    closest-side,
    rgba(3, 98, 76, 0.24) 0%,
    rgba(3, 98, 76, 0.14) 36%,
    rgba(3, 98, 76, 0.04) 68%,
    rgba(3, 98, 76, 0) 100%
  );
  animation: csBlobRoamA 24s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate;
}

.cs-stage-blob--blue {
  width: 700px;
  height: 620px;
  top: -4%;
  right: -8%;
  background: radial-gradient(
    closest-side,
    rgba(29, 88, 205, 0.21) 0%,
    rgba(29, 88, 205, 0.12) 38%,
    rgba(29, 88, 205, 0.035) 70%,
    rgba(29, 88, 205, 0) 100%
  );
  animation: csBlobRoamB 28s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate;
}

.cs-stage-blob--aurora {
  width: 620px;
  height: 540px;
  bottom: 0%;
  left: 32%;
  background: radial-gradient(
    closest-side,
    rgba(3, 98, 76, 0.16) 0%,
    rgba(29, 88, 205, 0.14) 40%,
    rgba(29, 88, 205, 0.03) 72%,
    rgba(29, 88, 205, 0) 100%
  );
  animation: csBlobRoamC 26s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate;
}

/* Full-stage roaming + organic scale/skew morphing (GPU transform only) */
@keyframes csBlobRoamA {
  0%   { transform: translate3d(0vw, 0px, 0) rotate(0deg) scale(1, 0.92); }
  33%  { transform: translate3d(26vw, 110px, 0) rotate(28deg) scale(1.22, 0.84); }
  66%  { transform: translate3d(48vw, 35px, 0) rotate(62deg) scale(0.86, 1.24); }
  100% { transform: translate3d(18vw, 240px, 0) rotate(95deg) scale(1.16, 0.90); }
}

@keyframes csBlobRoamB {
  0%   { transform: translate3d(0vw, 0px, 0) rotate(0deg) scale(0.94, 1.06); }
  33%  { transform: translate3d(-24vw, 150px, 0) rotate(-32deg) scale(0.84, 1.22); }
  66%  { transform: translate3d(-46vw, 45px, 0) rotate(-68deg) scale(1.24, 0.86); }
  100% { transform: translate3d(-16vw, 260px, 0) rotate(-105deg) scale(1.08, 1.14); }
}

@keyframes csBlobRoamC {
  0%   { transform: translate3d(-22vw, 20px, 0) rotate(-12deg) scale(0.88, 1.16); }
  35%  { transform: translate3d(4vw, -160px, 0) rotate(24deg) scale(1.24, 0.84); }
  70%  { transform: translate3d(26vw, -70px, 0) rotate(58deg) scale(0.86, 1.22); }
  100% { transform: translate3d(-8vw, -210px, 0) rotate(88deg) scale(1.16, 0.90); }
}

@media (max-width: 767px) {
  .cs-stage-blob {
    filter: blur(32px);
    -webkit-filter: blur(32px);
  }
  .cs-stage-blob--emerald,
  .cs-stage-blob--blue {
    width: 360px;
    height: 320px;
  }
  .cs-stage-blob--aurora {
    width: 320px;
    height: 280px;
    left: 15%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-stage-blob {
    animation: none !important;
  }
  .cs-stage-grid-canvas {
    display: none !important;
  }
}

/* Apple-Style Frosted Glass Frame for Image & Product Containers */
.cs-glass-panel {
  background: rgba(255, 255, 255, 0.56) !important;
  backdrop-filter: blur(24px) saturate(165%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(165%) !important;
  border: 1px solid rgba(255, 255, 255, 0.78) !important;
  box-shadow:
    0 20px 48px -12px rgba(15, 23, 42, 0.09),
    0 2px 8px rgba(15, 23, 42, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35) !important;
}

.cs-glass-panel:hover {
  background: rgba(255, 255, 255, 0.68) !important;
  border-color: rgba(255, 255, 255, 0.94) !important;
  box-shadow:
    0 24px 54px -12px rgba(3, 98, 76, 0.13),
    0 4px 14px rgba(29, 88, 205, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.96) !important;
}

.cs-glass-panel .elementor-widget-image img {
  box-shadow: 0 8px 24px -6px rgba(15, 23, 42, 0.08);
}

/* ==========================================================================
   Lower-Section Ambient Color Wash & Frosted Bento Cards
   ========================================================================== */
.cs-ambient-stage {
  position: relative;
  background-color: transparent !important;
  background-image:
    radial-gradient(ellipse 42% 38% at 12% 24%, rgba(3, 98, 76, 0.10) 0%, transparent 72%),
    radial-gradient(ellipse 44% 40% at 88% 68%, rgba(29, 88, 205, 0.09) 0%, transparent 72%),
    radial-gradient(ellipse 36% 34% at 52% 48%, rgba(3, 98, 76, 0.05) 0%, transparent 70%);
}

/* Frosted Glass for Hero Dock & Studio Bento Cards (leaves Benefits & Industry untouched for redesign) */
#cs_hero_dock .camsme-bento-single-card,
#cs_srv_grid .camsme-bento-single-card {
  background: rgba(255, 255, 255, 0.58) !important;
  backdrop-filter: blur(22px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(160%) !important;
  border: 1px solid rgba(255, 255, 255, 0.82) !important;
  box-shadow:
    0 16px 38px -12px rgba(15, 23, 42, 0.08),
    0 2px 6px rgba(15, 23, 42, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
}

#cs_hero_dock .camsme-bento-single-card:hover,
#cs_srv_grid .camsme-bento-single-card:hover {
  background: rgba(255, 255, 255, 0.72) !important;
  border-color: rgba(255, 255, 255, 0.96) !important;
  box-shadow:
    0 22px 46px -12px rgba(15, 23, 42, 0.11),
    0 4px 12px rgba(29, 88, 205, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.98) !important;
}

@media (max-width: 767px) {
  #cs_hero_dock .camsme-bento-single-card,
  #cs_srv_grid .camsme-bento-single-card,
  .cs-glass-panel {
    backdrop-filter: blur(12px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
  }
}