/* Animation styles for cards */
.expertise-card, .portfolio-item, .contact-card {
    opacity: 1; /* Start visible to ensure hover works properly */
    transform: translateY(0); /* Start at normal position */
    /* Separate transitions for different properties */
    transition: 
        opacity 0.6s ease, 
        transform 0.2s ease, /* Fast transform for hover */
        box-shadow 0.2s ease; /* Fast shadow for hover */
}

/* Only apply these initial states when JavaScript is available */
.js-animation-ready .expertise-card,
.js-animation-ready .portfolio-item,
.js-animation-ready .contact-card {
    opacity: 0;
    transform: translateY(20px);
    /* Slower transition only for initial appear animation */
    transition: 
        opacity 0.6s ease, 
        transform 0.6s ease;
}

.expertise-card.visible, .portfolio-item.visible, .contact-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hover effects should always work regardless of visibility class */
.expertise-card:hover,
.portfolio-item:hover,
.contact-card:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important; /* Force fast transition on hover */
}

/* Add slight delay to each card to create a staggered effect */
/* Only for initial scroll appearance, not for hover */
.js-animation-ready .expertise-card:nth-child(1),
.js-animation-ready .portfolio-item:nth-child(1),
.js-animation-ready .contact-card:nth-child(1) {
    transition-delay: 0.1s;
}

.js-animation-ready .expertise-card:nth-child(2),
.js-animation-ready .portfolio-item:nth-child(2),
.js-animation-ready .contact-card:nth-child(2) {
    transition-delay: 0.2s;
}

.js-animation-ready .expertise-card:nth-child(3),
.js-animation-ready .portfolio-item:nth-child(3),
.js-animation-ready .contact-card:nth-child(3) {
    transition-delay: 0.3s;
}

.js-animation-ready .expertise-card:nth-child(4),
.js-animation-ready .portfolio-item:nth-child(4),
.js-animation-ready .contact-card:nth-child(4) {
    transition-delay: 0.4s;
}

.js-animation-ready .expertise-card:nth-child(5),
.js-animation-ready .portfolio-item:nth-child(5),
.js-animation-ready .contact-card:nth-child(5) {
    transition-delay: 0.5s;
}

.js-animation-ready .expertise-card:nth-child(6),
.js-animation-ready .portfolio-item:nth-child(6),
.js-animation-ready .contact-card:nth-child(6) {
    transition-delay: 0.6s;
}

.js-animation-ready .expertise-card:nth-child(7),
.js-animation-ready .portfolio-item:nth-child(7),
.js-animation-ready .contact-card:nth-child(7) {
    transition-delay: 0.7s;
}
