/* ============================================
   Cleanex Chemicals - Premium Animation Styles
   ============================================ */
:root {
  --theme-rgb: 0, 120, 200;
}

/* --- Contact page: Google map embed --- */
.contact-map-area .contact-map-wrapper {
  width: 100%;
  overflow: hidden;
}
.contact-map-area iframe {
  min-height: 400px;
}
@media (max-width: 576px) {
  .contact-map-area iframe {
    min-height: 320px;
  }
}

/* --- Page breadcrumb: reduced height on all pages --- */
.page-breadcrumb-area {
  padding-top: 120px !important;
  padding-bottom: 60px !important;
}
.page-breadcrumb-area.style-2 {
  padding-bottom: 180px !important;
}
@media (max-width: 767px) {
  .page-breadcrumb-area {
    padding-top: 80px !important;
    padding-bottom: 48px !important;
  }
  .page-breadcrumb-area.style-2 {
    padding-bottom: 100px !important;
  }
}

/* --- Lenis smooth scroll (no layout change) --- */
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}
.lenis.lenis-smooth iframe {
  pointer-events: none;
}

/* --- Hero: particle canvas layer --- */
.hero-premium {
  position: relative;
  overflow: hidden;
}
.hero-particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.hero-premium .slider-overlay,
.hero-premium .single-slider,
.hero-premium .slider-content-wrapper,
.hero-premium .slider-content {
  position: relative;
  z-index: 1;
}
.hero-premium .reveal-line {
  overflow: hidden;
  display: inline-block;
}
.hero-premium .reveal-line span {
  display: inline-block;
  transform: translateY(100%);
  will-change: transform;
}
.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.9);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.hero-scroll-indicator .mouse {
  width: 24px;
  height: 38px;
  border: 2px solid currentColor;
  border-radius: 12px;
  position: relative;
}
.hero-scroll-indicator .wheel {
  width: 4px;
  height: 8px;
  background: currentColor;
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 2s ease-in-out infinite;
}
@keyframes scrollWheel {
  0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.3; transform: translateX(-50%) translateY(8px); }
}

/* --- Workflow section (reference model): vertical line + numbered steps + gallery --- */
.workflow-section .workflow-items {
  position: relative;
}
.workflow-section .workflow-item {
  position: relative;
  padding-left: 56px;
  padding-bottom: 2rem;
}
.workflow-section .workflow-item:last-child {
  padding-bottom: 0;
}
.workflow-section .workflow-line {
  position: absolute;
  left: 17px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(0,0,0,0.12);
  border-radius: 2px;
}
.workflow-section .wf-line-progress {
  position: absolute;
  left: 17px;
  top: 18px;
  width: 2px;
  height: 0;
  background: rgba(var(--theme-rgb), 1);
  border-radius: 2px;
  transition: height 0.5s ease-out;
  z-index: 1;
  transform-origin: top center;
}
.workflow-section .workfow-count {
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(0,0,0,0.15);
  color: #475569;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 2;
  transition: background 0.4s ease, border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}
.workflow-section .workflow-item--active .workfow-count {
  background: rgba(var(--theme-rgb), 1);
  border-color: rgba(var(--theme-rgb), 1);
  color: #fff;
  box-shadow: 0 2px 12px rgba(var(--theme-rgb), 0.4);
}
.workflow-section .workflow-info h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  line-height: 1.3;
  color: #1a1a1a;
}
.workflow-section .workflow-info p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #475569;
  margin: 0;
}
.workflow-section .manufacturing-gallery {
  position: relative;
}
.workflow-section .workflow-gallery-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.workflow-section .manufacturing-gallery .col-12:first-child .workflow-gallery-img {
  margin-bottom: 12px;
}
.workflow-section .manufacturing-gallery .col-12:last-child .workflow-gallery-img {
  margin-top: 8px;
}
@media (max-width: 991px) {
  .workflow-section .manufacturing-gallery {
    margin-top: 2.5rem;
  }
}
@media (max-width: 576px) {
  .workflow-section .workflow-item {
    padding-left: 48px;
    padding-bottom: 1.5rem;
  }
  .workflow-section .workflow-line,
  .workflow-section .wf-line-progress {
    left: 13px;
  }
  .workflow-section .workfow-count {
    width: 30px;
    height: 30px;
    font-size: 0.875rem;
  }
  .workflow-section .wf-line-progress {
    top: 15px;
  }
  .workflow-section .workflow-info h3 {
    font-size: 1rem;
  }
  .workflow-section .workflow-info p {
    font-size: 0.875rem;
  }
}

/* --- Process Timeline: Dots with numbers inside, dotted line, scroll fill-in --- */
.process-timeline {
  position: relative;
  padding: 2rem 0 3rem;
}
.process-timeline__left {
  position: relative;
}
.process-timeline__line-wrap {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 44px;
  pointer-events: none;
  z-index: 0;
}
.process-timeline__line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  transform-origin: top center;
}
.process-timeline__line--dotted {
  background: repeating-linear-gradient(
    180deg,
    rgba(0,0,0,0.15) 0,
    rgba(0,0,0,0.15) 2px,
    transparent 2px,
    transparent 10px
  );
}
.process-timeline__line--fill {
  height: 0;
  background: rgba(var(--theme-rgb), 1);
  transition: height 0.35s ease-out;
  z-index: 1;
}
.process-timeline__steps {
  position: relative;
  z-index: 1;
}
.process-timeline__step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 1rem;
  align-items: start;
  margin-bottom: 2rem;
}
.process-timeline__step:last-child {
  margin-bottom: 0;
}
.process-timeline__node {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(0,0,0,0.12);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.process-timeline__step--active .process-timeline__node {
  background: rgba(var(--theme-rgb), 1);
  border-color: rgba(var(--theme-rgb), 1);
  box-shadow: 0 0 0 3px rgba(var(--theme-rgb), 0.2);
}
.process-timeline__num {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #334155;
  line-height: 1;
  transition: color 0.3s ease;
}
.process-timeline__step--active .process-timeline__num {
  color: #fff;
}
.process-timeline__content {
  min-width: 0;
}
.process-timeline__title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  line-height: 1.3;
  color: #1a1a1a;
}
.process-timeline__desc {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #475569;
  margin: 0;
}
.process-timeline__images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  grid-template-rows: auto auto auto;
  align-content: start;
}
.process-timeline__img-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  background: #f8fafc;
}
.process-timeline__img-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.process-timeline__img-card--wide {
  grid-column: 1 / -1;
  aspect-ratio: 2 / 1;
}
.process-timeline__img-card:not(.process-timeline__img-card--wide):not(.process-timeline__img-card--tall) {
  aspect-ratio: 1;
}
.process-timeline__img-card--tall {
  grid-row: span 2;
  min-height: 200px;
}
@media (max-width: 991px) {
  .process-timeline__images {
    margin-top: 2rem;
  }
}
@media (max-width: 576px) {
  .process-timeline__line-wrap {
    width: 36px;
  }
  .process-timeline__step {
    grid-template-columns: 36px 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }
  .process-timeline__node {
    width: 30px;
    height: 30px;
  }
  .process-timeline__num {
    font-size: 0.8125rem;
  }
  .process-timeline__title {
    font-size: 1rem;
  }
  .process-timeline__desc {
    font-size: 0.875rem;
  }
}

/* --- Product cards: premium with image --- */
.product-card-premium,
.product-card-v2 {
  position: relative;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  /* NOTE: transform-style: preserve-3d intentionally removed —
     it breaks overflow:hidden in WebKit/Blink, causing corners not to clip */
  transition: box-shadow 0.4s ease;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.06);
  isolation: isolate;
}
/* Equal height/width for product cards on all pages (home + products list) */
.product-card-v2 {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.product-card-premium::before,
.product-card-v2::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(var(--theme-rgb), 0.25), rgba(var(--theme-rgb), 0.05));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.product-card-premium:hover,
.product-card-v2:hover {
  /* No translateY: keeps card height/position stable, avoids layout shift */
  box-shadow: 0 24px 48px -12px rgba(0,0,0,0.18);
}
.product-card-premium:hover::before,
.product-card-v2:hover::before {
  opacity: 1;
}
/* Image box: full-width, fixed height, top corners rounded to match card */
.product-card-v2__img {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #f1f5f9;
  flex-shrink: 0;
  border-radius: 16px 16px 0 0;
  /* Explicit isolation: ensures overflow:hidden clips even when
     a parent creates a new stacking or compositing context */
  isolation: isolate;
  z-index: 0;
}
.product-card-v2__img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 16px 16px 0 0;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
/* --contain: lighter bg for product photos on white/transparent backgrounds */
.product-card-v2__img--contain {
  background: #f4f6f3;
}
.product-card-v2__img--contain img {
  object-fit: contain;
  top: 0.75rem;
  left: 0.75rem;
  width: calc(100% - 1.5rem);
  height: calc(100% - 1.5rem);
  border-radius: 12px 12px 0 0;
}
.product-card-v2:hover .product-card-v2__img--contain img,
.product-card-v2:hover .product-card-v2__img img {
  transform: scale(1.06);
}
/* Card body: flex column, content flows top, action button sticks to bottom */
.product-card-v2__body {
  padding: 1.375rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
a:hover .product-card-v2__title {
  color: #1c1f19;
}
.product-card-v2__title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  color: #1a1a1a;
  transition: color 0.25s ease;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.product-card-v2__desc {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #475569;
  margin-bottom: 0.375rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.product-card-v2__meta {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-bottom: 0;
}
/* "View Details" action — bottom-aligned lime pill button */
.product-card-v2__action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  margin-top: auto;
  padding: 7px 16px;
  background: #CFF480;
  color: #1c1f19;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 20px;
  transition: background 0.22s ease, gap 0.22s ease;
  white-space: nowrap;
}
.product-card-v2__action i {
  font-size: 10px;
  transition: transform 0.22s ease;
}
a:hover .product-card-v2__action {
  background: #bce96e;
  gap: 11px;
}
a:hover .product-card-v2__action i {
  transform: translateX(3px);
}
@media (max-width: 576px) {
  .product-card-v2__body {
    padding: 1.125rem 1.25rem 1.25rem;
  }
  .product-card-v2__title {
    font-size: 1rem;
  }
  .product-card-v2__desc {
    -webkit-line-clamp: 2;
  }
}
/* Legacy product-card-premium (text-only cards) --- */
.product-card-premium .content-wrapper {
  transition: transform 0.4s ease;
}
.product-card-premium:hover .content-wrapper {
  transform: translateY(0);
}
.product-card-premium .content-wrapper {
  padding: 1.5rem;
}

/* --- Section reveal (GSAP targets) --- */
.reveal-section {
  opacity: 0;
  transform: translateY(40px);
  will-change: opacity, transform;
}
.reveal-item {
  opacity: 0;
  transform: translateY(28px);
  will-change: opacity, transform;
}

/* --- Buttons: glow + scale --- */
.theme-btn-premium {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.theme-btn-premium::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, rgba(255,255,255,0.4), transparent 50%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.theme-btn-premium:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.theme-btn-premium:hover::before {
  opacity: 1;
}
.circle-arrow-btn {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.circle-arrow-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* --- Navbar: scroll state --- */
.header-menu-area.sticky-header {
  transition: background-color 0.35s ease, backdrop-filter 0.35s ease, box-shadow 0.35s ease;
}
.header-menu-area.sticky-header.navbar-scrolled {
  background-color: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.header-menu-area.sticky-header.navbar-scrolled .main-menu a {
  color: #1a1a1a;
}
.nav-link-underline {
  position: relative;
}
.nav-link-underline::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width 0.3s ease;
}
.nav-link-underline:hover::after,
.main-menu li.active .nav-link-underline::after {
  width: 100%;
}

/* --- Image zoom on hover --- */
.img-zoom-wrap {
  overflow: hidden;
  border-radius: inherit;
}
.img-zoom-wrap img {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}
.img-zoom-wrap:hover img {
  transform: scale(1.06);
}

/* --- Icon consistency (24px) --- */
.icon-24 {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-24 svg {
  width: 24px;
  height: 24px;
}
/* Uniform icon size across site (24px) */
.icon-wrapper .icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-wrapper .icon i {
  font-size: 1.25rem !important;
}

/* Why Choose Us: theme-colored icons + equal card height/width */
.why-choose-us-section .icon-wrapper .icon i {
  color: rgba(var(--theme-rgb), 1);
}
.why-choose-us-section .row.gy-4 {
  align-items: stretch;
}
.why-choose-us-section .info-card.style-2 {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.why-choose-us-section .info-card.style-2 .info-card-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  padding: 28px 24px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.why-choose-us-section .info-card.style-2 .content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.why-choose-us-section .info-card.style-2 .title-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 120px;
}
.why-choose-us-section .info-card.style-2 .title-wrapper .title {
  margin-top: 16px;
}
.icon-28 {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-28 svg {
  width: 28px;
  height: 28px;
}

/* --- Fun Fact section: alignment, round circle colors, reduced inner space --- */
.fun-fact-section .section-title .title {
  margin-bottom: 0;
}
.fun-fact-section .fun-fact-grid {
  align-items: stretch;
}
.fun-fact-section .fun-fact-card .content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 1rem;
  gap: 0.25rem;
  text-align: center;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1px solid #7ECAEB;
}
.fun-fact-section .fun-fact-card .content .number {
  margin-bottom: 0;
}
.fun-fact-section .fun-fact-card .content .title {
  margin: 0;
  line-height: 1.3;
}
/* Round colors: 2nd = green fill, 4th = yellow fill (1st & 3rd = white + blue outline) */
.fun-fact-section .fun-fact-grid .col:nth-child(2) .fun-fact-card .content {
  background-color: #CFF480 !important;
  border: none;
}
.fun-fact-section .fun-fact-grid .col:nth-child(4) .fun-fact-card .content {
  background-color: #FFF089 !important;
  border: none;
}

/* --- Scroll up button --- */
#scrollTop.scroll-revealed {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* --- Preloader: hide after load --- */
body.animations-ready #preloader {
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
body.animations-ready #preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
