/* ==============================================
   DESTINATION MODAL & 3D CAROUSEL STYLES
   ============================================== */

/* Destination Modal - No overlay, gallery in front of globe */
.destination-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.destination-modal.active {
    display: flex;
}

.modal-content {
    background: transparent;
    max-width: 900px;
    width: 90%;
    height: auto;
    overflow: visible;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    transform: translateY(80px);
    opacity: 0;
    animation: slideInGallery 0.5s ease 1.5s forwards;
}

.modal-close {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    z-index: 1001;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.modal-close:hover {
    background: white;
    transform: scale(1.1);
}

/* 3D Carousel Container - Smaller, in front of globe */
.destination-carousel {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 400px;
    perspective: 1000px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 380px;
    height: 280px;
    transform-origin: center center;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Center slide - larger and prominent */
.carousel-slide.center {
    transform: translate(-50%, -50%) translateZ(100px) scale(1.2);
    z-index: 10;
    opacity: 1;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Left slide */
.carousel-slide.left {
    transform: translate(-150%, -50%) translateZ(-100px) rotateY(35deg) scale(0.75);
    z-index: 5;
    opacity: 0.6;
    filter: brightness(0.7);
}

/* Right slide */
.carousel-slide.right {
    transform: translate(50%, -50%) translateZ(-100px) rotateY(-35deg) scale(0.75);
    z-index: 5;
    opacity: 0.6;
    filter: brightness(0.7);
}

/* Far left slide - barely visible */
.carousel-slide.far-left {
    transform: translate(-250%, -50%) translateZ(-200px) rotateY(45deg) scale(0.5);
    z-index: 1;
    opacity: 0.3;
    filter: brightness(0.5);
}

/* Far right slide - barely visible */
.carousel-slide.far-right {
    transform: translate(150%, -50%) translateZ(-200px) rotateY(-45deg) scale(0.5);
    z-index: 1;
    opacity: 0.3;
    filter: brightness(0.5);
}

/* Hidden slides */
.carousel-slide.hidden {
    opacity: 0;
    pointer-events: none;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.carousel-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev { left: 2rem; }
.carousel-next { right: 2rem; }

/* Destination Info - Compact version */
.destination-info {
    position: relative;
    margin-top: 1.5rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    backdrop-filter: blur(10px);
    z-index: 50;
}

.destination-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.destination-subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInGallery {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.destination-carousel {
    animation: scaleIn 0.4s ease 0.1s backwards;
}

.destination-info {
    animation: fadeIn 0.4s ease 0.3s backwards;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .destination-carousel {
        height: 400px;
        perspective: 800px;
    }
    
    .carousel-slide {
        width: 350px;
        height: 280px;
    }
    
    .carousel-slide.center {
        transform: translate(-50%, -50%) translateZ(50px) scale(1.1);
    }
    
    .carousel-slide.left {
        transform: translate(-120%, -50%) translateZ(-80px) rotateY(35deg) scale(0.65);
    }
    
    .carousel-slide.right {
        transform: translate(20%, -50%) translateZ(-80px) rotateY(-35deg) scale(0.65);
    }
    
    .carousel-slide.far-left,
    .carousel-slide.far-right {
        opacity: 0;
        pointer-events: none;
    }
    
    .carousel-nav {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .carousel-prev { left: 0.5rem; }
    .carousel-next { right: 0.5rem; }
    
    .destination-info {
        bottom: 1.5rem;
        padding: 1.5rem 2rem;
        max-width: 90%;
    }
    
    .destination-title {
        font-size: 2rem;
    }
    
    .destination-subtitle {
        font-size: 1rem;
    }
    
    .modal-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}
