/**
 * Popular Destinations Responsive Design
 * ETS Tur style - compact, colorful, mobile-friendly
 */

/* Section spacing */
.popular-destinations-section {
    padding: 3rem 0;
    background-color: #f9fafb;
}

@media (max-width: 768px) {
    .popular-destinations-section {
        padding: 2rem 0;
    }
}

/* Circular cards - smaller and more compact */
.popular-destinations-section .flex-shrink-0 {
    width: 120px;
}

@media (max-width: 768px) {
    .popular-destinations-section .flex-shrink-0 {
        width: 100px;
    }
}

/* Circular image */
.popular-destinations-section .w-\[140px\] {
    width: 120px !important;
    height: 120px !important;
}

@media (max-width: 768px) {
    .popular-destinations-section .w-\[140px\] {
        width: 90px !important;
        height: 90px !important;
    }
}

/* Title below circle - responsive */
.popular-destinations-section .w-\[160px\] {
    width: 130px !important;
}

@media (max-width: 768px) {
    .popular-destinations-section .w-\[160px\] {
        width: 110px !important;
    }
    
    .popular-destinations-section h3 {
        font-size: 0.75rem !important;
        line-height: 1.2;
    }
    
    .popular-destinations-section p {
        font-size: 0.7rem !important;
    }
}

/* Horizontal scroll improvements */
.popular-destinations-section .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #0066cc #e5e7eb;
}

.popular-destinations-section .overflow-x-auto::-webkit-scrollbar {
    height: 6px;
}

.popular-destinations-section .overflow-x-auto::-webkit-scrollbar-track {
    background: #e5e7eb;
    border-radius: 3px;
}

.popular-destinations-section .overflow-x-auto::-webkit-scrollbar-thumb {
    background: #0066cc;
    border-radius: 3px;
}

.popular-destinations-section .overflow-x-auto::-webkit-scrollbar-thumb:hover {
    background: #0052a3;
}

/* Prevent layout shift */
.popular-destinations-section .flex {
    min-height: 180px;
}

@media (max-width: 768px) {
    .popular-destinations-section .flex {
        min-height: 150px;
    }
}

/* Card hover effects */
.popular-destinations-section a {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.popular-destinations-section a:hover {
    transform: translateY(-4px) scale(1.03);
}

.popular-destinations-section a:active {
    transform: translateY(-2px) scale(1.01);
}

/* Colorful gradient backgrounds (if no image) */
.rainbow-gradient-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.rainbow-gradient-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.rainbow-gradient-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.rainbow-gradient-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.rainbow-gradient-5 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.rainbow-gradient-6 {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

/* Detail panel on hover - hide on mobile */
@media (max-width: 768px) {
    .popular-destinations-section [x-show="showDetail"] {
        display: none !important;
    }
}

/* Loading skeleton */
.popular-destinations-section .skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Text truncation */
.popular-destinations-section .line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Accessibility improvements */
.popular-destinations-section a:focus {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
    border-radius: 50%;
}

/* RTL support for Arabic */
[dir="rtl"] .popular-destinations-section .flex {
    flex-direction: row-reverse;
}

/* Touch target size for mobile */
@media (max-width: 768px) {
    .popular-destinations-section a {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Section header responsive */
.popular-destinations-section h2 {
    font-size: 2rem;
    color: #4b5563;
}

@media (max-width: 768px) {
    .popular-destinations-section h2 {
        font-size: 1.5rem;
    }
}

.popular-destinations-section p {
    color: #6b7280;
}

/* Gap adjustments for mobile */
@media (max-width: 640px) {
    .popular-destinations-section .flex {
        gap: 1rem !important;
    }
}
