/**
 * JobSure Offer Card Animations
 * Professional animations specifically for offer cards in the public panel
 */

/* Card Container Animations */
.offer-card {
    position: relative;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    backface-visibility: hidden;
}

.offer-card::after {
    content: '';
    position: absolute;
    z-index: -1;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.offer-card:hover {
    transform: translateY(-10px) scale(1.02);
}

.offer-card:hover::after {
    opacity: 1;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Image Animations */
.offer-card .card-img-top {
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: center;
}

.offer-card:hover .card-img-top {
    transform: scale(1.1);
}

/* Category Badge Animations */
.category-badge {
    transition: all 0.3s ease;
    transform-origin: center;
}

.offer-card:hover .category-badge {
    transform: scale(1.1) rotate(3deg);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Card Content Animations */
.offer-card .card-title {
    transition: color 0.3s ease, transform 0.3s ease;
}

.offer-card:hover .card-title {
    color: var(--primary-color);
    transform: translateX(5px);
}

.offer-card .card-text {
    transition: opacity 0.3s ease;
}

.offer-card:hover .card-text {
    opacity: 0.9;
}

/* Button Animations */
.offer-card .btn {
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    z-index: 1;
}

.offer-card .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
    z-index: -1;
}

.offer-card:hover .btn::before {
    left: 100%;
}

.offer-card .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.4);
}

/* Price Tag Animations */
.offer-card .price-tag {
    transition: all 0.3s ease;
}

.offer-card:hover .price-tag {
    transform: scale(1.1) rotate(-3deg);
}

/* Special Effects */
.offer-card .card-highlight {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
}

.offer-card:hover .card-highlight {
    transform: scale(1);
}

/* Card Border Animation */
.offer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.offer-card:hover::before {
    border-color: var(--primary-color);
}

/* Card Footer Animations */
.offer-card .card-footer {
    transition: background-color 0.3s ease;
}

.offer-card:hover .card-footer {
    background-color: rgba(var(--primary-rgb), 0.05);
}

/* Featured Card Animation */
.offer-card.featured {
    overflow: hidden;
}

.offer-card.featured::after {
    content: 'Featured';
    position: absolute;
    top: 20px;
    right: -30px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 30px;
    transform: rotate(45deg);
    z-index: 10;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* Staggered Animation for Card Lists */
.offer-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards;
}

.offer-card:nth-child(1) { animation-delay: 0.1s; }
.offer-card:nth-child(2) { animation-delay: 0.2s; }
.offer-card:nth-child(3) { animation-delay: 0.3s; }
.offer-card:nth-child(4) { animation-delay: 0.4s; }
.offer-card:nth-child(5) { animation-delay: 0.5s; }
.offer-card:nth-child(6) { animation-delay: 0.6s; }
.offer-card:nth-child(7) { animation-delay: 0.7s; }
.offer-card:nth-child(8) { animation-delay: 0.8s; }
.offer-card:nth-child(9) { animation-delay: 0.9s; }

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

/* Shimmer Loading Effect */
.offer-card.loading {
    position: relative;
    overflow: hidden;
}

.offer-card.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.6) 50%, 
        rgba(255, 255, 255, 0) 100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}
