/* ===== Offers Slider V3 Container ===== */
.offer-slider-V3 {
    position: relative;
    overflow: visible; /* Changed for ScrollTrigger pin */
    z-index: 1;
}

.theSlideContainer-V3 {
    position: relative;
}

.slider-container-V3 {
    position: relative;
    width: 100%;
}

/* ===== Horizontal Wrapper V3 ===== */
.horizontal-wrapper-V3 {
    position: relative;
    transition: background-color 0.3s ease;
    overflow: hidden; /* Added for proper containment */
    width: 100%;
    will-change: transform;
}

.horizontal-wrapper-V3.scroll-active-V3 {
    background-color: rgba(204, 44, 51, 0.02);
}

.horizontal-wrapper-V3 .inner-V3 {
    display: flex;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    align-items: stretch;
    padding: 20px 0;
    position: relative;
}

/* ===== Slide Blocks V3 ===== */
.horizontal-wrapper-V3 .h-block-V3 {
    width: 500px;
    height: 95vh; /* Consistent full height */
    flex-shrink: 0;
    padding: 0 15px;
    display: flex;
    align-items: stretch;
}

.horizontal-wrapper-V3 .h-block-V3:last-of-type {
    width: 550px;
    max-width: 100vw;
    padding-right: 50px;
}

.slide-V3.theSlide-V3 {
    position: relative;
}

/* ===== Slide Link Wrapper V3 ===== */
.slide-link-wrapper-V3 {
    display: block;
    text-decoration: none;
    width: 100%;
    transition: transform 0.3s ease;

    text-decoration: none !important;
    border-bottom: 0 !important;
}

.slide-link-wrapper-V3:hover {
    transform: translateY(-5px);
}

/* ===== Slide Content V3 ===== */
.slide-content-V3 {
    position: relative;
    background: #fff;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.slide-link-wrapper-V3:hover .slide-content-V3 {
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

/* ===== Vertical Text V3 ===== */
.slide-content-V3-image-holder {
    position: relative;
}

.vertical-text-V3 {
    position: absolute;
    bottom: 20px;
    left: 20px;
    writing-mode: sideways-lr;
    text-orientation: mixed;
    font-weight: 600;
    letter-spacing: 2px;
    letter-spacing: 1px;
    font-size: var(--xs);
    text-transform: uppercase;
    color: var(--white, #fff);
    background: rgba(0,0,0,0.6);
    padding: 10px 5px;
    z-index: 2;
    border-radius: 4px;
}

/* ===== Slide Image V3 with Dynamic Aspect Ratio ===== */
.slide-content-V3 img.slide-image-V3 {
    width: 100%;
    height: auto;
    /* Dynamic aspect ratio and height will be set by JavaScript */
    object-fit: cover;
    display: block;
    border-radius: 8px 8px 0 0;
    /* Remove constraints that conflict with JavaScript sizing */
}

/* ===== Slide Info V3 - Enhanced for dynamic measurement ===== */
.slide-info-V3 {
    padding: 20px;
    display: flex;
    flex-direction: column;
    /* Let content determine height, don't flex-grow to fill space */
    flex-shrink: 0;
}

.slide-info-V3 h3.slide-title-V3 {
    font-weight: bold;
    font-size: 1.2rem;
    margin: 0 0 15px 0;
    color: #333;
}

.slide-description-V3 {
    font-weight: normal;
    line-height: 1.6;
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
    min-height: 60px;
}

.slide-notice-V3 {
    color: #999;
    font-style: italic;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* ===== Book Button V3 ===== */
.book-btn-V3.vc_general.vc_btn3 {
    display: inline-block;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #cc2c33;
    border: 2px solid #cc2c33;
    padding: 10px 20px;
    background: transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    margin-top: auto;
    border-radius: 4px;
    font-size: 0.9rem;
    align-self: flex-start; /* Added for better button alignment */
}

.slide-link-wrapper-V3:hover .book-btn-V3 {
    background: #cc2c33;
    color: #fff;
    transform: translateY(-2px);
}

/* ===== ScrollTrigger Pin Spacer Fix ===== */
.pin-spacer {
    pointer-events: none;
}

.pin-spacer .horizontal-wrapper-V3 {
    pointer-events: all;
}

/* ===== Loading State V3 ===== */
.horizontal-wrapper-V3.loading .inner-V3 {
    opacity: 0.5;
    pointer-events: none;
}

.horizontal-wrapper-V3.is-loading .inner-V3 {
    opacity: 0.3;
    pointer-events: none;
}

/* ===== Loading state during aspect ratio calculation ===== */
.horizontal-wrapper-V3.calculating-aspect-ratio .slide-image-V3 {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

/* ===== Animation States V3 ===== */
@keyframes slideInV3 {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-V3 {
    animation: slideInV3 0.6s ease-out backwards;
}

.slide-V3:nth-child(1) { animation-delay: 0.1s; }
.slide-V3:nth-child(2) { animation-delay: 0.2s; }
.slide-V3:nth-child(3) { animation-delay: 0.3s; }
.slide-V3:nth-child(4) { animation-delay: 0.4s; }
.slide-V3:nth-child(5) { animation-delay: 0.5s; }
.slide-V3:nth-child(6) { animation-delay: 0.6s; }
.slide-V3:nth-child(7) { animation-delay: 0.7s; }
.slide-V3:nth-child(8) { animation-delay: 0.8s; }

/* ===== Header Management Styles ===== */
/* Smooth header transition when class is added/removed */
.wb-hide-header {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    position: relative;
}

/* Hide header when class is present - FOR ALL CASES */
body.header-hidden .wb-hide-header {
    transform: translateY(-200%);
}

/* ===== Slider Optimization Styles ===== */
.inner-V3 {
    will-change: transform;
    transition: transform 0.1s linear;
}

.offer-slider-V3 {
    will-change: transform;
}

/* ===== Responsive Design V3 - Maintain Full Height with Spacing ===== */
@media (max-width: 1200px) {
    .horizontal-wrapper-V3 .h-block-V3 {
        width: 380px;
        height: calc(100vh - 20px - 15px); /* Maintain full height with spacing */
    }
}

@media (max-width: 768px) {
    .horizontal-wrapper-V3 .h-block-V3 {
        width: 350px;
        padding: 0 10px;
        height: calc(100vh - 20px - 15px); /* Maintain full height with spacing */
    }

    .horizontal-wrapper-V3 {
        margin-top: 15px; /* Slightly less top spacing on mobile */
    }

    .vertical-text-V3 {
        letter-spacing: 1px;
        font-size: 0.8rem;
    }

    .slide-info-V3 {
        padding: 15px;
    }

    .horizontal-wrapper-V3 .inner-V3 {
        padding: 15px 0;
    }
}

@media (max-width: 575px) {
    .horizontal-wrapper-V3 .h-block-V3 {
        width: 320px;
        min-width: 320px;
        height: calc(100vh - 15px - 15px); /* Less top spacing on small mobile */
    }

    .horizontal-wrapper-V3 {
        margin-top: 15px; /* Consistent with tablet */
    }

    .slide-info-V3 {
        padding: 12px; /* Slightly reduced padding for mobile */
    }

    .slide-description-V3 {
        min-height: 40px;
    }

    .book-btn-V3.vc_general.vc_btn3 {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

/* ===== Print Styles V3 ===== */
@media print {
    .offer-slider-V3 {
        display: none;
    }
}

/* ===== High Contrast Mode V3 ===== */
@media (prefers-contrast: high) {
    .slide-content-V3 {
        border: 2px solid #000;
    }

    .book-btn-V3.vc_general.vc_btn3 {
        border-width: 3px;
    }
}

/* ===== Reduced Motion V3 ===== */
@media (prefers-reduced-motion: reduce) {
    .horizontal-wrapper-V3 .inner-V3,
    .slide-link-wrapper-V3,
    .slide-content-V3,
    .book-btn-V3 {
        transition: none !important;
    }

    .slide-V3 {
        animation: none !important;
    }

    /* Disable gallery hover animations */
    .wb-single-image-gallery-holder,
    .wb-single-image-gallery-holder a,
    .wb-single-image-gallery-holder img,
    .wb-single-image-gallery-holder .wb-image-gallery-icon {
        transition: none !important;
    }

    .wb-single-image-gallery-holder a::before,
    .wb-single-image-gallery-holder a::after {
        animation: none !important;
        transition: none !important;
    }

    /* Also disable aspect ratio transitions for reduced motion */
    .slide-content-V3 img.slide-image-V3 {
        transition: none !important;
    }
}

/* ===== Smooth Scrolling Support ===== */
@supports (scroll-behavior: smooth) {
    .horizontal-wrapper-V3 {
        scroll-behavior: smooth;
    }
}

/* ===== Fix for Safari ===== */
@supports (-webkit-touch-callout: none) {
    .horizontal-wrapper-V3 .inner-V3 {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* ===== Enhanced Mobile Responsive Design V3 ===== */

/* Large tablets and small desktops (below 1200px but above 991px) */
@media (max-width: 1200px) and (min-width: 992px) {
    .horizontal-wrapper-V3 .h-block-V3 {
        width: 380px;
        height: 95vh; /* Consistent full height */
    }
}

/* Mobile and small tablets (below 991px) - Full width cards */
@media (max-width: 991px) {
    /* Make cards full width on mobile */
    .horizontal-wrapper-V3 .h-block-V3 {
        width: calc(100vw - 30px); /* Full width minus small margins */
        min-width: calc(100vw - 30px);
        padding: 0 15px;
        height: 90vh; /* Consistent full height */
        max-height: none;
        min-height: 90vh; /* Ensure minimum height too */
    }

    /* Adjust slider container spacing */
    .horizontal-wrapper-V3 .inner-V3 {
        padding: 15px 0;
    }

    /* Optimize slide content for mobile */
    .slide-content-V3 {
        min-height: 0;
        height: 100%;
    }

    /* Images will be sized by JavaScript */
    .slide-content-V3 img.slide-image-V3 {
        width: 100%;
        height: auto;
        object-fit: cover;
        display: block;
        border-radius: 8px 8px 0 0;
    }

    /* Compact slide info on mobile */
    .slide-info-V3 {
        padding: 15px;
        min-height: auto;
    }

    .slide-info-V3 h3.slide-title-V3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .slide-description-V3 {
        font-size: 0.9rem;
        line-height: 1.5;
        min-height: 40px;
        margin-bottom: 10px;
    }

    .slide-notice-V3 {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }

    /* Compact button for mobile */
    .book-btn-V3.vc_general.vc_btn3 {
        padding: 8px 16px;
        font-size: 0.8rem;
        margin-top: 10px;
    }

    /* Adjust vertical text for mobile */
    .vertical-text-V3 {
        font-size: 0.7rem;
        padding: 8px 4px;
        letter-spacing: 0.5px;
    }
}

/* Very small mobile devices (below 576px) */
@media (max-width: 575px) {
    .horizontal-wrapper-V3 .h-block-V3 {
        width: 100vw; /* Full viewport width */
        min-width: 100vw;
        padding: 0 15px; /* Internal padding instead of reducing width */
        height: 90vh; /* Consistent full height */
        max-height: none;
        min-height: 90vh; /* Ensure minimum height too */
    }

    /* Tighter spacing on very small screens */
    .slide-info-V3 {
        padding: 12px;
    }

    .slide-info-V3 h3.slide-title-V3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .slide-description-V3 {
        font-size: 0.85rem;
        min-height: 30px;
        margin-bottom: 8px;
    }

    .slide-notice-V3 {
        font-size: 0.75rem;
        margin-bottom: 8px;
    }

    .book-btn-V3.vc_general.vc_btn3 {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .vertical-text-V3 {
        font-size: 0.6rem;
        padding: 6px 3px;
        bottom: 15px;
        left: 15px;
    }

    /* Images sized by JavaScript */
    .slide-content-V3 img.slide-image-V3 {
        width: 100%;
        height: auto;
        object-fit: cover;
        display: block;
        border-radius: 8px 8px 0 0;
    }
}

/* Landscape mobile orientation adjustments */
@media (max-width: 991px) and (orientation: landscape) {
    .horizontal-wrapper-V3 .h-block-V3 {
        height: 85vh; /* Slightly smaller in landscape but still consistent */
        min-height: 85vh;
    }
}

/* Touch-specific optimizations for mobile */
@media (pointer: coarse) {
    /* Larger touch targets */
    .slide-link-wrapper-V3 {
        padding: 5px;
        margin: -5px; /* Negative margin to maintain visual spacing */
    }

    /* More pronounced hover effects for touch */
    .slide-link-wrapper-V3:hover {
        transform: translateY(-3px); /* Reduced from -5px for mobile */
    }

    /* Better button touch targets */
    .book-btn-V3.vc_general.vc_btn3 {
        min-height: 44px; /* iOS recommended touch target */
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
