/* ===============================================
   PREMIUM UNIQUE DESTINATIONS - SPLIT GALLERY
   =============================================== */

.unique-destinations-premium.split-layout {
    padding: 40px 0;
    /* Reduced padding from 80px */
    background: #fff;
    overflow: hidden;
    /* Prevent horizontal scrollbar on body */
}

.split-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    padding: 0 20px;
}

/* LEFT CONTENT (Text) */
.section-content-left {
    flex: 1;
    min-width: 300px;
    padding-right: 20px;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Badge Centered as requested */
/* Badge rule removed - moved to global header */

/* Removed .section-badge-simple as we use .section-badge from main.css */

.section-content-left h2 {
    font-size: 3rem;
    line-height: 1.1;
    color: var(--dark);
    margin-bottom: 25px;
    font-weight: 700;
    align-self: flex-start;
    text-align: left;
    width: 100%;
}

.section-content-left p {
    font-size: 1.1rem;
    color: var(--gray);
    line-height: 1.6;
    margin: 0 0 35px 0;
    max-width: 500px;
}

.btn-text-arrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--dark);
    font-weight: 700;
    text-decoration: none;
    font-size: 1rem;
    transition: gap 0.3s ease;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 5px;
}

.btn-text-arrow:hover {
    gap: 15px;
    color: var(--primary);
}

/* RIGHT CONTENT (Gallery) */
/* RIGHT CONTENT (Gallery) - EXPANDING EFFECT */
.section-gallery-right {
    flex: 1.5;
    width: 100%;
    min-width: 300px;
    height: 500px;
    /* Fixed height for expanding effect */
}

.gallery-track {
    display: flex;
    gap: 15px;
    height: 100%;
    width: 100%;
    padding-bottom: 0;
    /* Remove scroll padding */
    overflow: visible;
    /* No scroll, expanding */
}

/* Portrait Card - Expanding Style */
.gallery-card-portrait {
    flex: 1;
    /* Default expanded state */
    height: 100%;
    border-radius: 30px;
    /* Rounder corners */
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.3s ease;
    background: #000;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    /* Remove fixed width */
    flex-basis: 0;
    min-width: 0;
}

.gallery-card-portrait:hover {
    flex: 3;
    /* Expand on hover */
    transform: none;
    /* expanding effect replaces scale */
    z-index: 2;
}

.gallery-image {
    width: 100%;
    height: 100%;
    position: relative;
}

.gallery-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    /* Darker bottom */
    z-index: 1;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

/* Optional: Slight zoom on expand */
.gallery-card-portrait:hover .gallery-image img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 30px;
    left: 20px;
    right: 20px;
    z-index: 2;
    transform: none;
    /* Always visible or animate? Reference keeps label visible */
    padding: 0;
    width: auto;
    background: transparent;
    transition: opacity 0.3s;
}

/* Hide extra details when collapsed to keep clean, show on hover/expand? 
   Or keeps simple label like reference. Let's keep existing content but positioned like reference. */
.gallery-overlay h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: white;
    margin: 0;
    white-space: nowrap;
    opacity: 0;
    /* Hide text by default on collapsed cards for cleaner look? */
    transition: opacity 0.4s ease 0.1s;
}

.gallery-card-portrait:hover .gallery-overlay h3 {
    opacity: 1;
}

/* Always show badge if possible, or just text? Reference has just a label. 
   Let's keep badge but vertically styled. */
/* Fixed Badge Position (Above Text, like Mobile) */
.gallery-badge {
    position: absolute;
    top: auto;
    /* Remove top anchoring */
    bottom: 100%;
    /* Push above the text overlay */
    left: 0;
    /* Align with text */

    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.8rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);

    margin-bottom: 10px;
    /* Space above text */
    border: none;
    backdrop-filter: none;

    /* Ensure visibility */
    opacity: 0;
    transition: opacity 0.3s;
}

/* Show badge on hover along with text */
.gallery-card-portrait:hover .gallery-badge {
    opacity: 1;
}


/* Duplicate gallery-badge rule removed */

.gallery-overlay h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    margin: 0;
    line-height: 1.2;
    font-weight: 600;
    color: white;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .split-container {
        flex-direction: column;
        gap: 30px;
    }

    .section-content-left {
        text-align: center;
        padding-right: 0;
        align-items: center;
    }

    .section-content-left h2 {
        font-size: 2.2rem;
    }

    /* INTERACTIVE DECK LAYOUT (Click-to-Shuffle) */

    .section-gallery-right {
        width: 100%;
        margin-left: 0;
        padding-left: 0;
        overflow: visible;
        height: auto;
        padding-top: 20px;
        padding-bottom: 20px;
        /* Center content */
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Keep Pagination for status indication */
    .gallery-pagination {
        display: flex;
        justify-content: center;
        gap: 12px;
        margin-top: 20px;
        /* Adjusted: Track already has height */
        position: relative;
        z-index: 30;
    }

    .gallery-dot {
        width: 8px;
        height: 8px;
        background: #ccc;
        border-radius: 50%;
        transition: all 0.3s;
    }

    .gallery-dot.active {
        width: 25px;
        border-radius: 10px;
        background: var(--primary);
    }

    .gallery-track {
        display: block;
        /* No flex needed for absolute children */
        position: relative;
        /* Anchor for absolute cards */
        width: 100%;
        max-width: 350px;
        /* Constrain deck width */
        height: 450px;
        /* Fixed height for the pile */
        margin: 0 auto;
    }

    .gallery-card-portrait {
        /* Absolute Positioning for Deck Pile */
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        margin: 0 auto;
        /* Center horizontally */

        width: 100%;
        height: 100%;

        border-radius: 25px;
        overflow: hidden;
        background: #000;

        transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);

        /* Default State (Hidden/Bottom) */
        opacity: 0;
        transform: scale(0.8) translateY(40px);
        z-index: 0;
        pointer-events: none;
        /* Only top card clickable */
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    /* DECK POSITIONS (Managed by JS) */

    /* Position 0: TOP (Hero) */
    .gallery-card-portrait.deck-pos-0 {
        opacity: 1;
        transform: scale(1) translateY(0);
        z-index: 10;
        pointer-events: auto;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    /* Position 1: MIDDLE (Peeking behind) */
    .gallery-card-portrait.deck-pos-1 {
        opacity: 0.6;
        transform: scale(0.92) translateY(25px);
        /* Push down slightly */
        z-index: 5;
        filter: brightness(0.6);
    }

    /* Position 2: BOTTOM (Peeking further) */
    .gallery-card-portrait.deck-pos-2 {
        opacity: 0.3;
        transform: scale(0.84) translateY(50px);
        z-index: 1;
        filter: brightness(0.4);
    }

    /* Animation helper: When card leaves top */
    .gallery-card-portrait.deck-leave {
        transform: translateX(120%) rotate(10deg) !important;
        opacity: 0 !important;
    }

    /* Text Styles */
    .gallery-overlay {
        padding: 30px;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent);
        /* Ensure it is positioned correctly */
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 2;
    }

    .gallery-overlay h3 {
        font-size: 2.2rem;
        margin-bottom: 5px;
        opacity: 1 !important;
        /* Force Visible */
        white-space: normal;
        /* Allow wrap */
    }

    .gallery-badge {
        /* Fix Overlap: Anchor to top of overlay */
        position: absolute;
        top: auto !important;
        /* Reset top */
        bottom: 100% !important;
        /* Push above the overlay container */
        left: 25px;
        font-size: 0.9rem;
        padding: 6px 14px;
        opacity: 1 !important;
        /* Pull it down closer to the text (eating into the container padding) */
        margin-bottom: -15px;
    }
}