@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Performance optimizations */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
    font-display: swap;
}

/* Image loading optimizations */
img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[data-src].loaded {
    opacity: 1;
}

.image-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Reduce animations on low-end devices */
@media (prefers-reduced-motion: reduce) {
    .image-placeholder {
        animation: none;
        background: #f0f0f0;
    }
    
    .tour-card {
        transition: none;
    }
}

.sidebar-item.active {
    background-color: #8B5CF6;
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.sidebar-item:hover i {
    color: white;
}

.sidebar-item.active i {
    color: white;
}

.tour-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    margin: 0;
    height: 280px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.tour-card:hover,
.tour-card.row-hover {
    height: 450px;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.tour-card:hover .p-4,
.tour-card.row-hover .p-4 {
    background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 50%, #60a5fa 100%);
}

.tour-card .tour-description {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    padding: 0;
    opacity: 0;
    transform: translateY(20px);
}

.tour-card:hover .tour-description,
.tour-card.row-hover .tour-description {
    max-height: 180px;
    padding: 1rem;
    opacity: 1;
    transform: translateY(0);
}

.tour-description {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border-radius: 0 0 12px 12px;
    display: flex;
    flex-direction: column;
}

.tour-description .description-content {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    max-height: 100px;
}

.tour-description .description-content::-webkit-scrollbar {
    width: 4px;
}

.tour-description .description-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.tour-description .description-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.tour-description .description-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.tour-description p {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    margin: 0;
}

.tour-card .p-4 {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 50%, #93c5fd 100%);
    border-top: 1px solid #e0e7ff;
}

.mobile-menu-item.active {
    color: #8B5CF6;
    border-top: 2px solid #8B5CF6;
    background-color: rgba(139, 92, 246, 0.1);
}

.swiper {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.swiper-slide {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    width: 100%;
    height: 100%;
}

.swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.swiper-wrapper {
    height: 100%;
}

/* Animación de fade-in */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}
