/**
 * Smart Recommendations Widget
 * Personalized tour recommendations based on user behavior
 */

.smart-recommendation-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    animation: slideInUp 0.6s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.recommendation-header {
    text-align: center;
    color: white;
    margin-bottom: 25px;
}

.recommendation-header i {
    font-size: 32px;
    margin-bottom: 10px;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.recommendation-header h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 10px 0 5px;
    color: white;
}

.recommendation-header p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

.recommendation-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.loading-recommendations {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: white;
    font-size: 16px;
}

.loading-recommendations i {
    font-size: 24px;
    margin-right: 10px;
}

.recommendation-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.recommendation-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.rec-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

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

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

.rec-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.rec-content {
    padding: 16px;
}

.rec-content h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rec-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #6b7280;
}

.rec-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.rec-meta i {
    color: #667eea;
}

.rec-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.rec-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .smart-recommendation-widget {
        padding: 20px;
        margin: 30px -15px;
        border-radius: 0;
    }
    
    .recommendation-header h3 {
        font-size: 20px;
    }
    
    .recommendation-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .rec-image {
        height: 160px;
    }
}

/* Attention-grabbing pulse animation */
.smart-recommendation-widget.attention {
    animation: attention-pulse 2s ease-in-out 3;
}

@keyframes attention-pulse {
    0%, 100% {
        box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 10px 60px rgba(102, 126, 234, 0.6);
        transform: scale(1.02);
    }
}

/* Sticky recommendation bar (for scroll-triggered recommendations) */
.sticky-recommendation-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    z-index: 9998;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.sticky-recommendation-bar.show {
    transform: translateY(0);
}

.sticky-rec-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.sticky-rec-icon {
    font-size: 24px;
    animation: bounce-icon 1s ease-in-out infinite;
}

@keyframes bounce-icon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.sticky-rec-text h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.sticky-rec-text p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

.sticky-rec-btn {
    background: white;
    color: #667eea;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.sticky-rec-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.sticky-rec-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.sticky-rec-close:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .sticky-recommendation-bar {
        flex-direction: column;
        gap: 10px;
        padding: 12px 15px;
    }
    
    .sticky-rec-content {
        width: 100%;
    }
    
    .sticky-rec-btn {
        width: 100%;
        text-align: center;
    }
}
