/*
|--------------------------------------------------------------------------
| VABCORE Global Card Polish
|--------------------------------------------------------------------------
|
| This file enhances existing cards without replacing their individual
| layouts, colours, content structures or component-specific styling.
|
*/

/*
|--------------------------------------------------------------------------
| Shared Card Families
|--------------------------------------------------------------------------
*/

.service-card,
.feature-card,
.stat-card,
.process-step,
.product-card,
.industry-card,
.project-card,
.client-card,
.blog-card,
.testimonial-card,
.faq-item {
    position: relative;
    isolation: isolate;
    backface-visibility: hidden;
    transform: translateZ(0);
    transition:
        border-color var(--transition-base),
        background-color var(--transition-base),
        box-shadow var(--transition-base),
        transform var(--transition-smooth);
}

/*
|--------------------------------------------------------------------------
| Standard Light Cards
|--------------------------------------------------------------------------
*/

.service-card,
.stat-card,
.process-step,
.industry-card,
.project-card,
.blog-card,
.faq-item {
    border-radius: var(--card-radius);
}

.service-card:hover,
.stat-card:hover,
.process-step:hover,
.industry-card:hover,
.project-card:hover,
.blog-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: var(--lift-md);
}

/*
|--------------------------------------------------------------------------
| Dark and Glass Cards
|--------------------------------------------------------------------------
*/

.feature-card,
.product-card,
.client-card,
.testimonial-card {
    transform: translateZ(0);
}

.feature-card:hover,
.product-card:hover,
.client-card:hover {
    box-shadow:
        var(--shadow-lg),
        var(--shadow-inset);
    transform: var(--lift-md);
}

/*
|--------------------------------------------------------------------------
| Accent Line
|--------------------------------------------------------------------------
*/

.service-card::after,
.process-step::after,
.industry-card::after,
.project-card::after,
.client-card::after,
.blog-card::after {
    position: absolute;
    right: 18%;
    bottom: 0;
    left: 18%;
    z-index: 4;
    height: 3px;
    border-radius: var(--radius-pill) var(--radius-pill) 0 0;
    background:
        linear-gradient(
            90deg,
            transparent,
            var(--color-primary-light),
            var(--color-accent),
            transparent
        );
    content: "";
    opacity: 0;
    pointer-events: none;
    transform: scaleX(0.35);
    transition:
        opacity var(--transition-base),
        transform var(--transition-smooth);
}

.service-card:hover::after,
.process-step:hover::after,
.industry-card:hover::after,
.project-card:hover::after,
.client-card:hover::after,
.blog-card:hover::after {
    opacity: 0.95;
    transform: scaleX(1);
}

/*
|--------------------------------------------------------------------------
| Highlight Sweep
|--------------------------------------------------------------------------
*/

.service-card::before,
.stat-card::before,
.process-step::before,
.blog-card::before {
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background:
        linear-gradient(
            120deg,
            transparent 18%,
            rgba(255, 255, 255, 0.5) 48%,
            transparent 78%
        );
    content: "";
    opacity: 0;
    pointer-events: none;
    transform: translateX(-85%);
    transition:
        opacity var(--transition-fast),
        transform 800ms ease;
}

.service-card:hover::before,
.stat-card:hover::before,
.process-step:hover::before,
.blog-card:hover::before {
    opacity: 0.32;
    transform: translateX(85%);
}

/*
|--------------------------------------------------------------------------
| Keep Card Content Above Decorative Layers
|--------------------------------------------------------------------------
*/

.service-card > *,
.stat-card > *,
.process-step > *,
.industry-card > *,
.project-card > *,
.client-card > *,
.blog-card > * {
    position: relative;
    z-index: 2;
}

/*
|--------------------------------------------------------------------------
| Icon Polish
|--------------------------------------------------------------------------
*/

.service-card-icon,
.feature-card-icon,
.stat-card-icon,
.process-step-icon,
.product-card-icon,
.industry-card-icon,
.portfolio-preview-bottom-icon,
.clients-callout-icon,
.blog-card-author-icon,
.testimonial-metric-icon,
.faq-contact-icon {
    transition:
        background-color var(--transition-base),
        border-color var(--transition-base),
        box-shadow var(--transition-base),
        color var(--transition-base),
        transform var(--transition-bounce);
}

.service-card:hover .service-card-icon,
.feature-card:hover .feature-card-icon,
.stat-card:hover .stat-card-icon,
.process-step:hover .process-step-icon,
.product-card:hover .product-card-icon,
.industry-card:hover .industry-card-icon,
.blog-card:hover .blog-card-author-icon {
    box-shadow: var(--glow-primary-soft);
    transform: translateY(-4px) rotate(-3deg) scale(1.04);
}

/*
|--------------------------------------------------------------------------
| Arrow and Link Motion
|--------------------------------------------------------------------------
*/

.service-card a i,
.process-step a i,
.product-card a i,
.industry-card a i,
.project-card a i,
.client-card a i,
.blog-card a i,
.faq-contact-card a i {
    transition:
        color var(--transition-base),
        transform var(--transition-bounce);
}

.service-card a:hover i,
.process-step a:hover i,
.product-card a:hover i,
.industry-card a:hover i,
.project-card a:hover i,
.client-card a:hover i,
.blog-card a:hover i,
.faq-contact-card a:hover i {
    transform: translateX(6px);
}

/*
|--------------------------------------------------------------------------
| Image Polish
|--------------------------------------------------------------------------
*/

.project-card-media,
.blog-card-media {
    overflow: hidden;
}

.project-card-media img,
.blog-card-media img {
    will-change: transform;
    transition:
        filter var(--transition-slow),
        transform var(--transition-slower);
}

.project-card:hover .project-card-media img,
.blog-card:hover .blog-card-media img {
    filter: saturate(1.06) contrast(1.02);
    transform: scale(1.065);
}

/*
|--------------------------------------------------------------------------
| Titles
|--------------------------------------------------------------------------
*/

.service-card h3,
.feature-card h3,
.process-step h3,
.product-card h3,
.industry-card h3,
.project-card h3,
.client-card h3,
.blog-card h3 {
    transition: color var(--transition-base);
}

.service-card:hover h3,
.process-step:hover h3,
.industry-card:hover h3,
.project-card:hover h3,
.blog-card:hover h3 {
    color: var(--color-primary);
}

/*
|--------------------------------------------------------------------------
| Keyboard Focus
|--------------------------------------------------------------------------
*/

.service-card:focus-within,
.feature-card:focus-within,
.stat-card:focus-within,
.process-step:focus-within,
.product-card:focus-within,
.industry-card:focus-within,
.project-card:focus-within,
.client-card:focus-within,
.blog-card:focus-within,
.faq-item:focus-within {
    border-color: var(--color-primary-light);
    box-shadow:
        var(--card-shadow-hover),
        var(--focus-ring);
}

/*
|--------------------------------------------------------------------------
| FAQ Special Handling
|--------------------------------------------------------------------------
*/

.faq-item:hover {
    transform: translateY(-3px);
}

.faq-item.is-open {
    border-color: rgba(15, 111, 255, 0.3);
    box-shadow: var(--shadow-md);
    transform: none;
}

/*
|--------------------------------------------------------------------------
| Featured Cards
|--------------------------------------------------------------------------
*/

.service-card-featured,
.product-card-featured,
.project-card-featured,
.client-card-featured,
.testimonial-card-featured {
    box-shadow:
        var(--shadow-md),
        var(--shadow-inset);
}

.service-card-featured:hover,
.product-card-featured:hover,
.project-card-featured:hover,
.client-card-featured:hover {
    box-shadow:
        var(--shadow-xl),
        var(--glow-primary-soft),
        var(--shadow-inset);
}

.service-card.service-card-featured,
.service-card.service-card-featured:hover {
    color: var(--color-white);
}

.service-card.service-card-featured .service-card-body h3,
.service-card.service-card-featured:hover .service-card-body h3,
.service-card.service-card-featured .service-card-link,
.service-card.service-card-featured:hover .service-card-link {
    color: var(--color-white);
}

.service-card.service-card-featured .service-card-body > p,
.service-card.service-card-featured .service-card-features li,
.service-card.service-card-featured .service-card-features span {
    color: rgba(255, 255, 255, 0.86);
}

.service-card.service-card-featured .service-card-number {
    color: rgba(255, 255, 255, 0.68);
}

.service-card.service-card-featured .service-card-footer {
    border-color: rgba(255, 255, 255, 0.2);
}

.service-card.service-card-featured .service-card-features i,
.service-card.service-card-featured .service-card-link i {
    color: var(--color-accent);
}

/*
|--------------------------------------------------------------------------
| Touch Devices
|--------------------------------------------------------------------------
*/

@media (hover: none) {
    .service-card:hover,
    .feature-card:hover,
    .stat-card:hover,
    .process-step:hover,
    .product-card:hover,
    .industry-card:hover,
    .project-card:hover,
    .client-card:hover,
    .blog-card:hover,
    .faq-item:hover {
        transform: none;
    }

    .service-card::before,
    .stat-card::before,
    .process-step::before,
    .blog-card::before,
    .service-card::after,
    .process-step::after,
    .industry-card::after,
    .project-card::after,
    .client-card::after,
    .blog-card::after {
        display: none;
    }
}

/*
|--------------------------------------------------------------------------
| Reduced Motion
|--------------------------------------------------------------------------
*/

@media (prefers-reduced-motion: reduce) {
    .service-card,
    .feature-card,
    .stat-card,
    .process-step,
    .product-card,
    .industry-card,
    .project-card,
    .client-card,
    .blog-card,
    .testimonial-card,
    .faq-item,
    .service-card::before,
    .service-card::after,
    .stat-card::before,
    .process-step::before,
    .process-step::after,
    .industry-card::after,
    .project-card::after,
    .client-card::after,
    .blog-card::before,
    .blog-card::after,
    .service-card-icon,
    .feature-card-icon,
    .stat-card-icon,
    .process-step-icon,
    .product-card-icon,
    .industry-card-icon,
    .project-card-media img,
    .blog-card-media img {
        transition: none !important;
    }

    .service-card:hover,
    .feature-card:hover,
    .stat-card:hover,
    .process-step:hover,
    .product-card:hover,
    .industry-card:hover,
    .project-card:hover,
    .client-card:hover,
    .blog-card:hover,
    .faq-item:hover {
        transform: none;
    }
}
