/* ===== SWIPER-BASED SLIDER COMPONENT ===== */
.related-fairs-swiper {
    position: relative;
    padding: 0 60px 40px 60px;
    margin: 0 auto;
    max-width: 1200px;
}

.related-fairs-swiper .swiper-wrapper {
    align-items: stretch;
    padding: 30px 0;
}

.related-fairs-swiper .swiper-slide {
    height: auto;
    display: flex;
}

/* Card Styles - Exact match with index.php */
.upcoming-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
    position: relative;
    width: 100%;
}

.upcoming-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: #e0e0e0;
}

.upcoming-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.upcoming-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.upcoming-card:hover .upcoming-card-image img {
    transform: scale(1.05);
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.fair-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    background: white;
    color: #333;
    text-transform: uppercase;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Different colors for different cards - using CSS nth-child */
.swiper-slide:nth-child(4n+1) .no-image-placeholder { 
    background: #8BC34A; 
}
.swiper-slide:nth-child(4n+1) .fair-icon { 
    background: white;
    color: #8BC34A;
}

.swiper-slide:nth-child(4n+2) .no-image-placeholder { 
    background: #E3F2FD; 
}
.swiper-slide:nth-child(4n+2) .fair-icon { 
    background: white; 
    color: #1976D2; 
}

.swiper-slide:nth-child(4n+3) .no-image-placeholder { 
    background: #7B1FA2; 
}
.swiper-slide:nth-child(4n+3) .fair-icon { 
    background: white;
    color: #7B1FA2; 
}

.swiper-slide:nth-child(4n) .no-image-placeholder { 
    background: #E8F5E8; 
}
.swiper-slide:nth-child(4n) .fair-icon { 
    background: white; 
    color: #2E7D32; 
}

.date-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    padding: 8px 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.date-badge .day {
    display: block;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    color: #333;
}

.date-badge .month {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    margin-top: 2px;
}

.upcoming-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.upcoming-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}



.upcoming-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.upcoming-title a:hover {
    color: #667eea;
}

.upcoming-meta {
    margin-top: auto;
}

.upcoming-meta div {
    margin: 8px 0;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upcoming-meta i {
    width: 14px;
    color: #667eea;
    flex-shrink: 0;
}

/* Navigation Buttons - Same style as gallery */
.swiper-button-prev,
.swiper-button-next {
    width: 40px !important;
    height: 40px !important;
    background: #fff !important;
    border: none !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 16px rgba(0,0,0,0.1) !important;
    color: #333 !important;
    font-weight: bold !important;
    margin-top: -20px !important;
}

.swiper-button-prev::after,
.swiper-button-next::after {
    font-size: 16px !important;
    font-weight: 900 !important;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: #667eea !important;
    color: white !important;
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3) !important;
}

.swiper-button-prev {
    left: 10px !important;
    top: var(--swiper-navigation-top-offset,60%) !important;
}

.swiper-button-next {
    right: 10px !important;
    top: var(--swiper-navigation-top-offset,60%) !important;
}

.swiper-button-disabled {
    opacity: 0.3 !important;
}

/* Pagination */
.swiper-pagination {
    bottom: 0 !important;
    position: relative !important;
    margin-top: 24px !important;
}

.swiper-pagination-bullet {
    width: 8px !important;
    height: 8px !important;
    background: #d1d5db !important;
    opacity: 1 !important;
    margin: 0 4px !important;
}

.swiper-pagination-bullet-active {
    background: #667eea !important;
    transform: scale(1.25);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .related-fairs-swiper {
        padding: 0 50px 40px 50px;
    }
}

@media (max-width: 768px) {
    .related-fairs-swiper {
        padding: 0 40px 40px 40px;
    }
    
    .upcoming-card-image {
        height: 180px;
    }
    
    .swiper-button-prev,
    .swiper-button-next {
        width: 36px !important;
        height: 36px !important;
    }
    
    .swiper-button-prev::after,
    .swiper-button-next::after {
        font-size: 14px !important;
    }
    
    .swiper-button-prev {
        left: 5px !important;
    }
    
    .swiper-button-next {
        right: 5px !important;
    }
}

@media (max-width: 480px) {
    .related-fairs-swiper {
        padding: 0 35px 40px 35px;
    }
    
    .upcoming-card-image {
        height: 160px;
    }
    
    .upcoming-card-content {
        padding: 16px;
    }
    
    .upcoming-title {
        font-size: 16px;
    }
    
    .upcoming-meta div {
        font-size: 13px;
    }
}