/* General styling */
@import url("https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400..700&family=Quicksand:wght@300..700&display=swap");

/* Scope semua style ke dalam .content-guide agar tidak bocor ke header/footer */

.content-guide {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 10px;
}

/* h1 hanya dalam konten guide */
.content-guide h1 {
  font-family: 'Dancing Script', cursive;
}

/* Stack guide container to hold the stack of cards */
.stack-guide-container {
  display: flex;
  justify-content: center;
  margin-bottom: 290px; /* Spasi antara gambar dan teks */
}

.stack-guide {
  position: flex; /* Memastikan posisi tetap di kanan atas meski halaman di-scroll */
  top: 100px; /* Jarak dari atas viewport */
  right: 15px; /* Jarak dari sisi kanan viewport */
  display: absolute;
  flex-direction: column;
  gap: 2px; /* Jarak antar kartu */
  position: relative;
  max-width: 220px;
}

.card5 {
  width: 240px; /* Default width of card */
  height: 310px; /* Default height of card */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: absolute;
  transform: translate(-10%, 10%);
  transition: transform 0.5s;
}

.card5 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  pointer-events: none;
}

/* Stack effect adjustments for card */
.card5:nth-last-child(n + 5) {
  --x: calc(-50% + 90px);
  transform: translate(var(--x), -50%) scale(0.85);
  box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.01);
}

.card5:nth-last-child(4) {
  --x: calc(-50% + 60px);
  transform: translate(var(--x), -50%) scale(0.9);
}

.card5:nth-last-child(3) {
  --x: calc(-50% + 30px);
  transform: translate(var(--x), -50%) scale(0.95);
}

.card5:nth-last-child(2) {
  --x: calc(-50%);
  transform: translate(var(--x), -50%) scale(1);
}

.card5:nth-last-child(1) {
  --x: calc(-50% - 30px);
  transform: translate(var(--x), -50%) scale(1.05);
}

.card5:nth-last-child(1) img {
  box-shadow: 0 1px 5px 5px rgba(255, 193, 111, 0.5);
}

/* Add animation for swap effect */
.swap {
  animation: swap 1.3s ease-out forwards;
}

@keyframes swap {
  30% {
    transform: translate(calc(var(--x) - 250px), -50%) scale(0.85) rotate(-5deg) rotateY(65deg);
  }
  100% {
    transform: translate(calc(var(--x) - 30px), -50%) scale(0.5);
    z-index: -1;
  }
}

/* Paragraph styling below the cards */
.text-container {
  max-width: 900px; /* Limit max width */
  padding: 20px;
  line-height: 1.6; /* Line height for readability */
  text-align: justify; /* Justify the text */
  margin: 20px auto; /* Center the container horizontally */
  margin-top: 20px; /* Space above the paragraph */
  margin-bottom: 20px; /* Space below the paragraph */
}



.text-container p {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.8rem; /* Set font size for the paragraph */
  color: #000000; /* Text color */
  text-align: justify center; /* This will center the text inside the paragraph */
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .card5 {
    width: 250px;
    height: 380px;
  }
}

@media (max-width: 1050px) {
  .card5 {
    width: 220px;
    height: 350px;
  }
}

@media (max-width: 650px) {
  .content-guide {
    padding: 10px;
  }
  .card5 {
    width: 180px;
    height: 260px;
  }
  .content-guide h1 {
    font-size: 1.2rem;
    margin-bottom: 50px;
  }
  .text-container {
    padding: 10px;
  }
  .text-container p {
    font-size: 1.4rem;
  }
}

/* ── Accordion styling ── */
.accordion-button.custom-button {
    background-color: #fffcf4;
    color: #000000;
    border: none;
    font-weight: normal;
    transition: background-color 0.3s, color 0.3s;
}
.accordion-button.custom-button:hover {
    background-color: #ffc340bd;
    color: #000;
}
.accordion-item {
    margin-bottom: 2px;
}
.accordion-body {
    font-size: 1.6rem;
    line-height: 1.6;
}
.content-guide .text-center {
    margin: 10px 0;
    font-size: 2.0rem;
    text-align: center;
    font-weight: bold;
    color: #000000;
}

/* ── Tombol video ── */
.video-container {
    margin-top: 40px;
}

.btn-intro-video {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 14px 34px 14px 16px;
    background: linear-gradient(135deg, #ffc107 0%, #f59300 45%, #d98200 100%);
    color: #3d2500;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    box-shadow:
        0 10px 24px rgba(217, 139, 6, 0.35),
        0 3px 8px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.28s ease,
                filter 0.28s ease;
}

.btn-intro-video__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #e08600;
    font-size: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    transition: transform 0.28s ease;
}

.btn-intro-video__icon i {
    margin-left: 2px;
}

.btn-intro-video__label {
    white-space: nowrap;
}

/* sheen saat hover */
.btn-intro-video::after {
    content: "";
    position: absolute;
    top: 0;
    left: -140%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        100deg,
        transparent,
        rgba(255, 255, 255, 0.65),
        transparent
    );
    transform: skewX(-20deg);
    transition: left 0.65s ease;
    pointer-events: none;
    z-index: -1;
}

.btn-intro-video:hover {
    transform: translateY(-3px);
    filter: saturate(1.1);
    box-shadow:
        0 16px 32px rgba(217, 139, 6, 0.45),
        0 4px 10px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn-intro-video:hover::after {
    left: 140%;
}

.btn-intro-video:hover .btn-intro-video__icon {
    transform: scale(1.12);
}

.btn-intro-video:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 6px 14px rgba(217, 139, 6, 0.35);
}

.btn-intro-video:focus-visible {
    outline: 3px solid rgba(255, 193, 7, 0.65);
    outline-offset: 3px;
}

/* ── Modal video (mandiri, tanpa Bootstrap) ── */
body.intro-video-modal-open {
    overflow: hidden;
}

.intro-video-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.intro-video-modal[hidden] {
    display: none;
}

.intro-video-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 10, 4, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.25s ease;
    cursor: pointer;
}

.intro-video-modal.is-open .intro-video-modal__backdrop {
    opacity: 1;
}

.intro-video-modal__dialog {
    position: relative;
    width: min(880px, 100%);
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: #fffdf8;
    border-radius: 18px;
    border: 1px solid rgba(217, 139, 6, 0.35);
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    overflow: hidden;
    opacity: 0;
    transform: translateY(24px) scale(0.96);
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.intro-video-modal.is-open .intro-video-modal__dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.intro-video-modal.is-closing .intro-video-modal__dialog {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
}

.intro-video-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 16px 22px;
    background: linear-gradient(135deg, #fff8e6 0%, #ffeec4 100%);
    border-bottom: 1px solid rgba(217, 139, 6, 0.28);
}

.intro-video-modal__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #5a3a00;
}

.intro-video-modal__title i {
    color: #e08600;
    font-size: 20px;
}

.intro-video-modal__title h5 {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.intro-video-modal__close {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    line-height: 1;
    color: #6b4a12;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(217, 139, 6, 0.35);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.intro-video-modal__close:hover {
    background: #e08600;
    color: #fff;
    transform: rotate(90deg);
}

.intro-video-modal__close:focus-visible {
    outline: 3px solid rgba(255, 193, 7, 0.7);
    outline-offset: 2px;
}

.intro-video-modal__body {
    padding: 18px;
    background: #1c1408;
}

.intro-video-modal__body video {
    display: block;
    width: 100%;
    max-height: calc(100vh - 190px);
    border-radius: 12px;
    background: #000;
    outline: none;
    /* pastikan kontrol video berada di atas backdrop */
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

@media (max-width: 650px) {
    .btn-intro-video {
        padding: 12px 24px 12px 12px;
        font-size: 14px;
        gap: 10px;
    }
    .btn-intro-video__icon {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
    .intro-video-modal {
        padding: 12px;
    }
    .intro-video-modal__body {
        padding: 12px;
    }
    .intro-video-modal__body video {
        max-height: calc(100vh - 170px);
    }
}

