/* ==========================================
   CUSTOM PACKAGE CAROUSEL SECTION
   packages.css — loaded only on packages page
   ========================================== */

/* Section background */
.package-section {
    position: relative;
    background-image: url('../images/package/bg.jpg');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    align-items: center;
    padding: 160px 0 80px;
    z-index: 1;
}

.package-container {
    max-width: 1700px;
    width: 96%;
    margin: 0 auto;
    z-index: 2;
}

/* Typographic image (Left Column) */
.package-typo-wrapper {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    padding-left: 30px;
}

/* Carousel + Arrow row — [prev] [image] [next] */
.package-carousel-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    width: 100%;
    padding-right: 40px;
}

.package-typo-img {
    width: 100%;
    max-width: 600px;
    height: auto;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.08));
    animation: fadeInUp 1s ease-out;
}

/* Carousel Container (Right Column) */
.package-carousel-container {
    position: relative;
    flex: 0 0 auto;
    width: 560px;
    max-width: 80vw;
}

/* Viewport for slider */
.package-carousel-viewport {
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
    background-color: #f5f3f3;
    position: relative;
    touch-action: pan-y; /* Allows scrolling page vertically, but intercepts horizontal swipes */
}

/* Slide track */
.package-carousel-track {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Individual slide */
.package-carousel-slide {
    min-width: 100%;
    height: 100%;
    flex-shrink: 0;
}

.package-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    pointer-events: none;
}

/* Navigation buttons — flex siblings beside the carousel */
.package-carousel-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.25s ease;
    z-index: 10;
    outline: none;
}

.package-carousel-btn img {
    width: 32px;
    height: auto;
    display: block;
    /* Tint arrow image to #A9A9A9 */
    filter: brightness(0) invert(1) brightness(0.663);
    transition: filter 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}

/* Mirror arrow.png horizontally for the left (prev) button */
.arrow-flip {
    transform: scaleX(-1);
    filter: brightness(0) invert(1) brightness(0.663);
}

.package-carousel-btn:hover {
    opacity: 1;
}

.package-carousel-btn:hover img {
    filter: none;
}

.package-carousel-btn:hover img:not(.arrow-flip) {
    transform: scale(1.1);
}

.package-carousel-btn:hover .arrow-flip {
    transform: scaleX(-1) scale(1.1);
}

.package-carousel-btn:active img {
    opacity: 0.5;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   RESPONSIVE — TABLET (≤ 991px)
   ========================================== */
@media (max-width: 991px) {
    .package-section {
        background-attachment: scroll;
        min-height: auto;
        padding: 100px 0 60px;
    }

    /* Reset desktop right-push so carousel centres on mobile */
    .package-carousel-row {
        justify-content: center;
        padding-right: 0;
        gap: 8px;
    }

    .package-typo-wrapper {
        padding-left: 0;
        justify-content: center;
        padding-top: 20px;
    }

    .package-typo-img {
        max-width: 70%;
        margin-bottom: 30px;
    }

    /* Carousel card width = screen width minus both arrows (24px each) and gaps (8px each) */
    .package-carousel-container {
        width: calc(90vw - 70px);
        max-width: calc(90vw - 70px);
        margin-top: 0;
    }

    .package-carousel-btn img {
        width: 24px;
    }
}

/* ==========================================
   RESPONSIVE — PHONE (≤ 575px)
   ========================================== */
@media (max-width: 575px) {
    .package-section {
        padding-top: 80px;
    }

    .package-typo-wrapper {
        padding-top: 30px;
    }

    .package-typo-img {
        max-width: 85%;
    }

    .package-carousel-container {
        width: calc(92vw - 60px);
        max-width: calc(92vw - 60px);
    }

    .package-carousel-row {
        gap: 6px;
    }

    .package-carousel-btn img {
        width: 20px;
    }
}
