/* Campaign Highlight */
.campaign-highlight {
    background: linear-gradient(135deg, #E63946 0%, #FF6B6B 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.3);
    position: relative;
    overflow: hidden;
}

.campaign-highlight::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-100px) translateY(-100px); }
}

.campaign-content {
    position: relative;
    z-index: 2;
}

.campaign-highlight h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.campaign-icon {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 50%;
    font-size: 1.5rem;
}

/* Ungap Highlight */
.ungap-highlight {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
}

.ungap-highlight h4 {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ungap-icon {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 50%;
    font-size: 1.2rem;
}

/* Enhanced maze gate photo styling */
.mazegate-photo {
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Enhanced Map Styling */
#cycling-map {
    height: 600px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 3px solid #f8f9fa;
}

.map-legend {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 5px 0;
    transition: all 0.2s ease;
}

.legend-item:hover {
    transform: translateX(5px);
}

.legend-color {
    width: 24px;
    height: 6px;
    margin-right: 12px;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.legend-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Route Cards Enhancement */
.route-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    grid-gap: 25px;
    margin-top: 25px;
}

.route-card {
    border: none;
    border-radius: 15px;
    padding: 25px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.route-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #2AA787, #4CAF50);
}

.route-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.route-card h5 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1D3557;
    font-weight: 600;
    font-size: 1.3rem;
}

.route-detail {
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
}

.route-detail-label {
    font-weight: 600;
    color: #2AA787;
    min-width: 80px;
    margin-right: 10px;
}

.route-detail-value {
    flex: 1;
    color: #555;
}

/* Enhanced Loading Animation */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: 12px;
}

.loading-spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #2AA787;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: #666;
    font-weight: 500;
}

/* Blog post highlight */
.blog-highlight {
    background: linear-gradient(135deg, #2AA787 0%, #4CAF50 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
    text-align: center;
}

.blog-highlight h4 {
    margin-bottom: 1rem;
}

/* Button improvements */
#gap-focus-btn {
    transition: all 0.3s ease;
}

#gap-focus-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* REMOVED: Conflicting transition that causes map jumping */
/* .leaflet-zoom-animated {
    transition: transform 0.5s ease;
} */

/* Keep marker opacity transitions but be more specific */
.leaflet-marker-icon {
    transition: opacity 0.3s ease;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .campaign-highlight h3 {
        font-size: 1.5rem;
        flex-direction: column;
        text-align: center;
    }
    
    .route-info-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Stack legend and ungap controls on mobile */
    .map-legend, .ungap-highlight {
        margin-bottom: 1rem;
    }
}