/**
 * Quy trình Bảo hành & Bàn giao (Accordion / Split Columns) Styles
 *
 * @package Flatsome Child
 */

:root {
  --quy-trinh-height: 480px;
  --quy-trinh-radius: 0px;
  --quy-trinh-gap: 0px;
}

/* ============================================================
   Parent Container
   ============================================================ */
.quy-trinh-box {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.quy-trinh-items-wrap {
  display: flex;
  width: 100%;
  height: var(--quy-trinh-height, 480px);
  border-radius: var(--quy-trinh-radius, 0px);
  overflow: hidden;
  gap: var(--quy-trinh-gap, 0px);
  box-sizing: border-box;
}

/* ============================================================
   Child Item (Column)
   ============================================================ */
.quy-trinh-item {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
  text-decoration: none !important;
  color: #ffffff !important;
  cursor: pointer;
  background-color: var(--item-bg-color, #132b4b);
  transition: flex 0.5s cubic-bezier(0.25, 1, 0.45, 1),
    filter 0.4s ease,
    opacity 0.4s ease;
}

/* Hover Accordion expansion on Desktop */
.quy-trinh-box.hover-expand-true .quy-trinh-items-wrap:hover .quy-trinh-item {
  flex: 0.85 1 0;
  filter: brightness(0.92);
}

.quy-trinh-box.hover-expand-true .quy-trinh-items-wrap .quy-trinh-item:hover {
  flex: 1.6 1 0;
  filter: brightness(1.05);
}

/* ============================================================
   Background Image & Color Overlay
   ============================================================ */
.quy-trinh-item__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.quy-trinh-item__bg img,
.quy-trinh-item__bg .quy-trinh-item-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.7s cubic-bezier(0.25, 1, 0.45, 1);
}

.quy-trinh-item__bg .quy-trinh-item-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.25) 100%);
}

.quy-trinh-item:hover .quy-trinh-item__bg img,
.quy-trinh-item:hover .quy-trinh-item__bg .quy-trinh-item-bg-img {
  transform: scale(1.08);
}

/* Duotone / Colored overlay matching reference design */
.quy-trinh-item__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  background-color: var(--item-bg-color, #132b4b);
  opacity: var(--item-opacity, 0.78);
  mix-blend-mode: multiply;
  transition: opacity 0.4s ease;
}

/* Gradient shadow overlay for crystal-clear readability */
.quy-trinh-item__gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  background: linear-gradient(to bottom,
      rgba(10, 25, 40, 0.35) 0%,
      rgba(10, 25, 40, 0.2) 40%,
      rgba(5, 15, 25, 0.88) 85%,
      rgba(5, 15, 25, 0.96) 100%);
  transition: opacity 0.4s ease;
}

.quy-trinh-item:hover .quy-trinh-item__overlay {
  opacity: calc(var(--item-opacity, 0.78) - 0.08);
}

/* ============================================================
   Inner Content
   ============================================================ */
.quy-trinh-item__inner {
  position: relative;
  z-index: 4;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 42px 32px;
  box-sizing: border-box;
}

/* Step Badge / Number */
.quy-trinh-item__step {
  display: inline-block;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 12px;
  text-transform: uppercase;
}

/* Main Title */
.quy-trinh-item__title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff !important;
  margin: 0 0 14px 0 !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  letter-spacing: -0.2px;
  transition: color 0.3s ease;
}

/* Description Text */
.quy-trinh-item__desc {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88) !important;
  margin: 0 0 22px 0 !important;
  max-width: 90%;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Bottom Action & Arrow */
.quy-trinh-item__action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 10px;
}

.quy-trinh-item__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  background-color: transparent;
  transition: all 0.35s cubic-bezier(0.25, 1, 0.45, 1);
}

.quy-trinh-item__arrow svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2.2;
  transition: transform 0.35s ease;
}

.quy-trinh-item:hover .quy-trinh-item__arrow {
  background-color: #ffffff;
  border-color: #ffffff;
  color: #0b2545;
  transform: translate(2px, -2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.quy-trinh-item:hover .quy-trinh-item__arrow svg {
  transform: scale(1.1);
}

/* ============================================================
   Responsive (Mobile & Tablet)
   ============================================================ */
@media (max-width: 991px) {
  .quy-trinh-item__inner {
    padding: 32px 24px;
  }

  .quy-trinh-item__title {
    font-size: 22px;
  }

  .quy-trinh-item__desc {
    font-size: 18px;
    max-width: 100%;
  }
}

@media (max-width: 767px) {

  /* Scroll Mode on Mobile (Recommended: Peek horizontal swipe) */
  .quy-trinh-box.mobile-scroll .quy-trinh-items-wrap {
    height: auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 15px 15px 12px 15px;
    gap: 14px;
  }

  .quy-trinh-box.mobile-scroll .quy-trinh-items-wrap::-webkit-scrollbar {
    height: 4px;
  }

  .quy-trinh-box.mobile-scroll .quy-trinh-items-wrap::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
  }

  .quy-trinh-box.mobile-scroll .quy-trinh-item {
    flex: 0 0 85% !important;
    min-width: 85% !important;
    height: 380px !important;
    scroll-snap-align: center;
    /* border-radius: 14px; */
    filter: none !important;
  }

  /* Stack Mode on Mobile (Vertical cards) */
  .quy-trinh-box.mobile-stack .quy-trinh-items-wrap {
    flex-direction: column;
    height: auto;
    gap: 14px;
    padding: 0 15px;
  }

  .quy-trinh-box.mobile-stack .quy-trinh-item {
    flex: 1 1 auto !important;
    height: 320px !important;
    border-radius: 14px;
    filter: none !important;
  }

  .quy-trinh-item__inner {
    padding: 28px 22px;
  }

  .quy-trinh-item__title {
    font-size: 26px;
  }

  .quy-trinh-item__desc {
    font-size: 16px;
    -webkit-line-clamp: 2;
    margin-bottom: 14px !important;
  }
}