/* Travel Cards Widget Styles */
.farways-travel-cards-widget {
    text-align: center;
    padding: 60px 20px;
    background: transparent;
}

.travel-cards-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.2;
}

.travel-cards-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.travel-cards-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.travel-cards-container {
    display: flex;
    gap: 40px;
    overflow: hidden;
    background: transparent;
}

.travel-cards-grid {
    flex-wrap: wrap;
    justify-content: center;
}

.travel-cards-carousel {
    transition: transform 0.3s ease;
}

.travel-card {
    position: relative;
    height: 400px;
    border-radius: 12px;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    transition: transform 0.3s ease;
    cursor: pointer;
    margin-bottom: 20px;
}

/* Dynamic card widths based on slides to show - Desktop */
.travel-cards-container[data-slides-to-show="1"] .travel-card {
    flex: 0 0 100%;
}

.travel-cards-container[data-slides-to-show="2"] .travel-card {
    flex: 0 0 calc(50% - 20px);
}

.travel-cards-container[data-slides-to-show="3"] .travel-card {
    flex: 0 0 calc(33.333% - 26.67px);
}

.travel-cards-container[data-slides-to-show="4"] .travel-card {
    flex: 0 0 calc(25% - 30px);
}

/* Responsive classes for tablet */
.travel-cards-container.slides-tablet-1 .travel-card {
    flex: 0 0 100%;
}

.travel-cards-container.slides-tablet-2 .travel-card {
    flex: 0 0 calc(50% - 20px);
}

.travel-cards-container.slides-tablet-3 .travel-card {
    flex: 0 0 calc(33.333% - 26.67px);
}

.travel-cards-container.slides-tablet-4 .travel-card {
    flex: 0 0 calc(25% - 30px);
}

/* Responsive classes for mobile */
.travel-cards-container.slides-mobile-1 .travel-card {
    flex: 0 0 100%;
}

.travel-cards-container.slides-mobile-2 .travel-card {
    flex: 0 0 calc(50% - 20px);
}

.travel-cards-container.slides-mobile-3 .travel-card {
    flex: 0 0 calc(33.333% - 26.67px);
}

.travel-cards-container.slides-mobile-4 .travel-card {
    flex: 0 0 calc(25% - 30px);
}

.travel-card:hover {
    transform: translateY(-10px);
}

.travel-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
    z-index: 1;
}

.travel-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
    border-radius: 12px;
    pointer-events: none;
}

.travel-card:hover .travel-card-image img {
    transform: scale(1.1);
}

.travel-card-content {
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    background: white;
    color: #333;
    padding: 0;
    transform: translateY(100%);
    transition: all 0.3s ease;
    height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 0 0 12px 12px;
    z-index: 10;
    box-shadow: none;
    border: none;
}

.travel-card:hover .travel-card-content {
    transform: translateY(0);
    height: auto;
    min-height: 80px;
    padding: 20px;
    overflow: visible;
}

.travel-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    transition: color 0.3s ease;
}

.travel-card-description {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #666;
    margin: 0;
    transition: color 0.3s ease;
}

.travel-card-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    text-decoration: none;
}

/* Navigation Arrows */
.travel-cards-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #333;
    transition: all 0.3s ease;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.travel-cards-nav:hover {
    background: white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.1);
}

.travel-cards-prev {
    left: -20px;
}

.travel-cards-next {
    right: -20px;
}

/* Responsive Design - Force mobile to 1 column */
@media (max-width: 1024px) {
    .travel-card {
        flex: 0 0 calc(50% - 15px);
    }
    
    .travel-cards-nav {
        display: none;
    }
}

@media (max-width: 768px) {
    .farways-travel-cards-widget {
        padding: 40px 15px;
    }
    
    .travel-cards-title {
        font-size: 2rem;
    }
    
    .travel-cards-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .travel-cards-container {
        gap: 30px;
    }
    
    /* Force mobile to show 1 column regardless of settings */
    .travel-card {
        flex: 0 0 100% !important;
        height: 350px;
    }
    
    .travel-card-content {
        padding: 15px;
        height: auto;
        min-height: 70px;
        overflow: visible;
        transform: translateY(0);
        transition: all 0.3s ease;
    }
    
    .travel-card:hover .travel-card-content {
        height: auto;
        min-height: 70px;
        padding: 15px;
        overflow: visible;
    }
    
    .travel-card-title {
        font-size: 1.3rem;
        color: #333;
        transition: color 0.3s ease;
    }
    
    .travel-card-description {
        font-size: 0.9rem;
        color: #666;
        transition: color 0.3s ease;
    }
}

@media (max-width: 480px) {
    .travel-cards-title {
        font-size: 1.8rem;
    }
    
    .travel-card {
        height: 300px;
        flex: 0 0 100% !important;
    }
    
    .travel-card-content {
        padding: 15px;
        height: auto;
        min-height: 60px;
        overflow: visible;
        transform: translateY(0);
        transition: all 0.3s ease;
    }
    
    .travel-card:hover .travel-card-content {
        height: auto;
        min-height: 60px;
        padding: 15px;
        overflow: visible;
    }
}

/* Carousel Animation */
.travel-cards-carousel {
    position: relative;
}

.travel-cards-carousel .travel-card {
    flex: 0 0 auto;
    margin-right: 40px;
}

.travel-cards-carousel .travel-card:last-child {
    margin-right: 0;
}

/* Ensure carousel cards don't wrap */
.travel-cards-carousel {
    flex-wrap: nowrap !important;
}

/* Force mobile carousel to wrap and show 1 column */
@media (max-width: 768px) {
    .travel-cards-carousel {
        flex-wrap: wrap !important;
    }
    
    .travel-cards-carousel .travel-card {
        flex: 0 0 100% !important;
        margin-right: 0 !important;
        margin-bottom: 20px;
    }
}

/* Override the data attribute widths for carousel mode - Desktop */
.travel-cards-carousel[data-slides-to-show="1"] .travel-card {
    flex: 0 0 100%;
}

.travel-cards-carousel[data-slides-to-show="2"] .travel-card {
    flex: 0 0 calc(50% - 20px);
}

.travel-cards-carousel[data-slides-to-show="3"] .travel-card {
    flex: 0 0 calc(33.333% - 26.67px);
}

.travel-cards-carousel[data-slides-to-show="4"] .travel-card {
    flex: 0 0 calc(25% - 30px);
}

/* Carousel responsive classes for tablet */
.travel-cards-carousel.slides-tablet-1 .travel-card {
    flex: 0 0 100%;
}

.travel-cards-carousel.slides-tablet-2 .travel-card {
    flex: 0 0 calc(50% - 20px);
}

.travel-cards-carousel.slides-tablet-3 .travel-card {
    flex: 0 0 calc(33.333% - 26.67px);
}

.travel-cards-carousel.slides-tablet-4 .travel-card {
    flex: 0 0 calc(25% - 30px);
}

/* Carousel responsive classes for mobile */
.travel-cards-carousel.slides-mobile-1 .travel-card {
    flex: 0 0 100%;
}

.travel-cards-carousel.slides-mobile-2 .travel-card {
    flex: 0 0 calc(50% - 20px);
}

.travel-cards-carousel.slides-mobile-3 .travel-card {
    flex: 0 0 calc(33.333% - 26.67px);
}

.travel-cards-carousel.slides-mobile-4 .travel-card {
    flex: 0 0 calc(25% - 30px);
}

/* Loading State */
.travel-cards-container.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Accessibility */
.travel-cards-nav:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.travel-card:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Animation for content reveal */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.travel-card:hover .travel-card-content {
    animation: slideUp 0.3s ease forwards;
}
