/**
 * Slider tampilan seperti webgis-simpati (Bootstrap 5)
 * #fw_al_007 - Full width animated carousel
 */

/* Section hero: tanpa padding, slider penuh dari atas */
#hero {
  padding: 0 !important;
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
}

/* Container slider - penuh viewport agar background sampai atas */
#fw_al_007 {
  overflow: hidden;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  max-height: none;
  position: relative;
  background: #181717;
}
#fw_al_007:hover {
  cursor: grab;
}
#fw_al_007:active {
  cursor: grabbing;
}

/* Carousel inner & item penuh tinggi */
#fw_al_007 .carousel-inner,
#fw_al_007 .carousel-inner .carousel-item {
  height: 100%;
  min-height: 100vh;
}
#fw_al_007 .carousel-inner .carousel-item {
  min-height: 100vh;
}

/* Gambar background slide saja (bukan logo) - full width & full height, sampai atas */
#fw_al_007 .carousel-inner .carousel-item > img {
  opacity: 0.4;
  margin: 0;
  width: 100% !important;
  height: 100% !important;
  min-height: 100vh;
  object-fit: cover;
  object-position: center top;
}

/* Efek transisi rotate scale - durasi smooth (2s) */
.ps_rotate_scale_c {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}
.ps_rotate_scale_c .carousel-item {
  top: 0;
  z-index: 1;
  opacity: 0;
  width: 100%;
  position: absolute;
  left: 0;
  display: block;
  transform: scale(1.5) rotate(20deg);
  transition: transform 2s cubic-bezier(0.230, 1.000, 0.320, 1.000) 0s, opacity 2s cubic-bezier(0.230, 1.000, 0.320, 1.000);
}
.ps_rotate_scale_c .carousel-item:first-child {
  top: auto;
  position: relative;
}
.ps_rotate_scale_c .carousel-item.active {
  opacity: 1;
  z-index: 2;
  transform: scale(1) rotate(0deg);
  transition: transform 2s cubic-bezier(0.230, 1.000, 0.320, 1.000) 0s, opacity 2s cubic-bezier(0.230, 1.000, 0.320, 1.000);
}

/* Override Bootstrap 5 default carousel slide transition classes
   Tanpa ini, Bootstrap menerapkan translateX() yang menimpa scale()/rotate() custom,
   menyebabkan transisi cepat dan kasar di production */
.ps_rotate_scale_c .carousel-item-next,
.ps_rotate_scale_c .carousel-item-prev {
  position: absolute;
  top: 0;
  display: block;
  opacity: 0;
  transform: scale(1.5) rotate(20deg);
  transition: transform 2s cubic-bezier(0.230, 1.000, 0.320, 1.000) 0s,
              opacity 2s cubic-bezier(0.230, 1.000, 0.320, 1.000);
}

/* Slide masuk: dari scaled/rotated menjadi normal */
.ps_rotate_scale_c .carousel-item-next.carousel-item-start,
.ps_rotate_scale_c .carousel-item-prev.carousel-item-end {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* Slide keluar: dari normal menjadi scaled/rotated */
.ps_rotate_scale_c .active.carousel-item-start,
.ps_rotate_scale_c .active.carousel-item-end {
  opacity: 0;
  transform: scale(1.5) rotate(20deg);
}

/* Pastikan Bootstrap tidak menerapkan translateX default */
.ps_rotate_scale_c .carousel-item-next:not(.carousel-item-start),
.ps_rotate_scale_c .active.carousel-item-end {
  opacity: 0;
  transform: scale(1.5) rotate(20deg);
}
.ps_rotate_scale_c .carousel-item-prev:not(.carousel-item-end),
.ps_rotate_scale_c .active.carousel-item-start {
  opacity: 0;
  transform: scale(1.5) rotate(-20deg);
}

/* Easing transisi */
.ps_easeOutQuint .carousel-inner .carousel-item {
  transition-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
}

/* Tombol prev/next - kotak putar 45deg seperti webgis-simpati */
#fw_al_007 .carousel-control-prev,
#fw_al_007 .carousel-control-next {
  top: 45%;
  opacity: 0;
  width: 40px;
  height: 40px;
  z-index: 100;
  color: #000;
  font-size: 14px;
  cursor: pointer;
  line-height: 40px;
  text-shadow: none;
  position: absolute;
  font-weight: normal;
  background: rgba(255, 255, 255, 0.8);
  transform: rotate(45deg);
  border: none;
  border-radius: 0;
}
#fw_al_007:hover .carousel-control-prev,
#fw_al_007:hover .carousel-control-next {
  opacity: 1;
  transition: all 1s cubic-bezier(0.230, 1.000, 0.320, 1.000);
}
#fw_al_007 .carousel-control-prev span,
#fw_al_007 .carousel-control-next span {
  transform: rotate(-45deg);
  display: inline-block;
}
#fw_al_007 .carousel-control-prev {
  left: 3%;
}
#fw_al_007 .carousel-control-next {
  right: 3%;
}
#fw_al_007 .carousel-control-prev:hover,
#fw_al_007 .carousel-control-next:hover {
  color: #fff;
  background: #f04d4e;
  opacity: 1;
}

/* Animasi masuk konten slide (logo dulu, lalu teks berurutan) */
@keyframes fw_slide_logo {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes fw_slide_text {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Layer teks di atas slide (fw_al_007_slide) - posisi tengah vertikal & horizontal */
.fw_al_007_slide {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
  padding: 20px;
}
/* Logo (logo-app.png): hanya di slide 1, ukuran & posisi jelas */
.fw_al_007_slide > img.fw_slide_logo_img,
.fw_al_007_slide > .fw_slide_logo_img {
  width: 120px;
  max-width: 120px;
  height: auto;
  max-height: 120px;
  flex-shrink: 0;
  display: block;
  margin: 0 auto 14px auto;
  box-shadow: none;
  object-fit: contain;
  border-radius: 12px;
}
.carousel-item.active .fw_al_007_slide > img.fw_slide_logo_img,
.carousel-item.active .fw_al_007_slide > .fw_slide_logo_img {
  animation: fw_slide_logo 0.5s ease-out 0s both;
}
.carousel-item.active .fw_al_007_slide > h3 {
  animation: fw_slide_text 0.45s ease-out 0.12s both;
}
.carousel-item.active .fw_al_007_slide > p {
  animation: fw_slide_text 0.45s ease-out 0.22s both;
}
.carousel-item.active .fw_al_007_slide > h1 {
  animation: fw_slide_text 0.5s ease-out 0.3s both;
}
.fw_al_007_slide > h3 {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  text-shadow: none;
  font-style: normal;
  position: relative;
  padding-bottom: 2px;
  display: inline-block;
  text-transform: uppercase;
}
.fw_al_007_slide > h1 {
  padding: 0;
  color: #fff;
  font-size: 50px;
  font-weight: 900;
  text-shadow: none;
  font-style: normal;
  letter-spacing: 2px;
  margin: 20px 0 0 0;
  text-transform: uppercase;
}
.fw_al_007_slide > h1 > span {
  color: #0c98f5;
}
.fw_al_007_slide > p {
  padding: 0;
  color: #fff;
  font-size: 18px;
  text-shadow: none;
  font-style: normal;
  font-weight: normal;
  letter-spacing: 1px;
  margin: 10px 0 0 0;
}

/* Responsive */
@media only screen and (max-width: 480px) {
  .fw_al_007_slide {
    top: 0;
    padding: 5px;
  }
  .fw_al_007_slide > h1 {
    font-size: 20px;
    letter-spacing: 0;
    margin: 10px 0 0 0;
  }
  .fw_al_007_slide > p {
    font-size: 14px;
    margin: 10px 0 0 0;
    letter-spacing: 0;
  }
  .fw_al_007_slide > img.fw_slide_logo_img,
  .fw_al_007_slide > .fw_slide_logo_img {
    width: 55px;
    max-width: 55px;
    margin-bottom: 8px;
    border-radius: 8px;
  }
  #fw_al_007 .carousel-control-prev,
  #fw_al_007 .carousel-control-next {
    display: none;
  }
}
@media (min-width: 481px) and (max-width: 600px) {
  .fw_al_007_slide {
    top: 5%;
    padding: 5px;
  }
  .fw_al_007_slide > h1 {
    font-size: 35px;
    margin: 10px 0 0 0;
  }
  .fw_al_007_slide > img.fw_slide_logo_img,
  .fw_al_007_slide > .fw_slide_logo_img {
    width: 75px;
    max-width: 75px;
    border-radius: 10px;
  }
}
@media (min-width: 601px) and (max-width: 767px) {
  .fw_al_007_slide {
    top: 10%;
  }
  .fw_al_007_slide > h1 {
    font-size: 50px;
    margin: 10px 0 0 0;
  }
  .fw_al_007_slide > img.fw_slide_logo_img,
  .fw_al_007_slide > .fw_slide_logo_img {
    width: 95px;
    max-width: 95px;
    border-radius: 10px;
  }
}
