
/* ===================== DESKTOP FLEX SLIDER ===================== */

.flex-container {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.flex-slide {
  flex: 1;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: flex-grow 1.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* smooth expand */
.flex-slide:hover {
  flex-grow: 1.6;
}

/* background image */
.flex-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.78) contrast(1.05);
  transform: scale(1);
  transition:
    transform 1.5s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.6s ease;
}

/* zoom image on hover */
.flex-slide:hover::after {
  transform: scale(1.08);
  filter: brightness(0.9);
}

/* gradient overlay */
.flex-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.2),
    rgba(0,0,0,0.75)
  );
  z-index: 1;
}

/* ===================== TEXT ===================== */

.flex-title,
.flex-about {
  position: absolute;
  width: 82%;
  left: 50px;
  color: #fff;
  opacity: 0;
  z-index: 3;
}

/* title */
.flex-title {
  top: 32%;
  font-size: 42px;
  font-weight: 700;
  transform: translateY(26px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* description */
.flex-about {
  top: 52%;
  font-size: 20px;
  background: rgba(255,255,255,0.14);
  padding: 24px 28px;
  border-radius: 18px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  transform: translateY(38px);
  transition:
    opacity 1s ease 0.12s,
    transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* reveal text */
.flex-slide:hover .flex-title,
.flex-slide:hover .flex-about {
  opacity: 1;
  transform: translateY(0);
}

/* ===================== BUTTON ===================== */

.know-more {
  margin-top: 16px;
  padding: 12px 30px;
  border-radius: 40px;
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.know-more:hover {
  background: #fff;
  color: #000;
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(255,255,255,0.35);
}

/* hide arrows on desktop */
.arrow-btn,
.arrow-left,
.arrow-right {
  display: none !important;
}

/* ===================== TABLET ===================== */

@media screen and (min-width: 769px) and (max-width: 1199px) {

  .flex-container {
    height: 90vh;
  }

  .flex-slide:hover {
    flex-grow: 1.55;
  }

  .flex-title {
    font-size: 36px;
    top: 30%;
  }

  .flex-about {
    font-size: 19px;
    top: 50%;
    width: 75%;
  }

  .arrow-btn,
  .arrow-left,
  .arrow-right {
    display: flex !important;
  }
}

/* ===================== MOBILE ===================== */

@media screen and (max-width: 768px) {

  .flex-container {
    display: block;
    height: auto;
  }

  .flex-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(60px) scale(0.97);
    transition:
      opacity 0.8s ease,
      transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
  }

  .flex-slide.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
    z-index: 2;
  }

  .flex-title {
    left: 50%;
    top: 14%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 30px;
    opacity: 1 !important;
  }

  .flex-about {
    width: 95%;
    left: 50%;
    top: 35%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 16px;
    opacity: 1 !important;
  }

  /* dots */
  .dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
  }

  .dot {
    width: 14px;
    height: 14px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
  }

  .dot.active {
    background: #fff;
    transform: scale(1.2);
  }

  /* arrows */
  .arrow-btn {
    position: absolute;
    top: 95%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border: 2px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(6px);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    color: #fff;
    cursor: pointer;
  }

  .arrow-left { left: 18px; }
  .arrow-right { right: 18px; }
}
