/* Product Category Card Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
}

@keyframes slideInFromBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Material Popup Styles */
.material-popup {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1479CE;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    text-align: center;
    border-radius: 8px;
    will-change: opacity, visibility;
    backface-visibility: hidden;
}

.material-popup h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.material-popup p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

/* Product Category Hover Effects */
.product-category {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateZ(0); /* Force hardware acceleration */
}

.product-category:hover {
    transform: translateY(-5px) translateZ(0);
}

.category-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transform: translateZ(0); /* Force hardware acceleration */
}

.category-image:hover .material-popup {
    opacity: 1;
    visibility: visible;
    animation: fadeIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Category Title Animation */
.category-title {
    position: relative;
    overflow: hidden;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #13709a;
    transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateZ(0); /* Force hardware acceleration */
}

.product-category:hover .category-title::after {
    width: 100%;
}

/* Separate pulse animation to avoid conflicts */
@media (prefers-reduced-motion: no-preference) {
    .product-category::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        opacity: 0;
        z-index: -1;
        animation: none;
        transition: opacity 0.3s ease;
    }
    
    .product-category:hover::before {
        opacity: 1;
        animation: pulse 2s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
}

/* FAQ Animations */
@keyframes faqSlideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
}

@keyframes faqSlideUp {
    from {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
}

@keyframes rotateFaqIcon {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(180deg);
    }
}

/* FAQ Animation Styles */
.faq-item {
    transition: box-shadow 0.9s ease, transform 0.9s ease;
    transform: translateZ(0); /* Force hardware acceleration */
}

.faq-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px) translateZ(0);
}

.faq-item summary::after {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.faq-item[open] summary::after {
    animation: rotateFaqIcon 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.faq-item .faq-content {
    animation: faqSlideDown 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.faq-item:not([open]) .faq-content {
    animation: faqSlideUp 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Add a subtle highlight effect when FAQ item is opened */
.faq-item[open] {
    background-color: #f9f9f9;
    border-left: 3px solid #0A5A7A;
}

/* Add a subtle transition for the summary hover state */
.faq-item summary {
    transition: color 0.9s ease, background-color 0.9s ease;
}

.faq-item summary:hover {
    color: #1479CE;
    background-color: #f5f5f5;
}