/* =========================================
   MODERN CATEGORY CARDS (Next Level Design)
   ========================================= */
.wl-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

@media (max-width: 768px) {
    .wl-category-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

.wl-category-card {
    position: relative;
    height: 450px;
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: block;
    cursor: pointer;
    background: #000;
    /* Fallback */
    isolation: isolate;
}

.wl-category-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.wl-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.wl-category-card:hover .wl-card-bg {
    transform: scale(1.15);
}

/* Gradient Overlay - Cinematic Look */
.wl-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.1) 0%,
            rgba(0, 0, 0, 0.2) 30%,
            rgba(0, 0, 0, 0.6) 70%,
            rgba(0, 0, 0, 0.9) 100%);
    z-index: 1;
    transition: opacity 0.3s ease;
}

.wl-category-card:hover .wl-card-overlay {
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.1) 0%,
            rgba(220, 20, 60, 0.2) 50%,
            /* A subtle red tint on hover */
            rgba(0, 0, 0, 0.95) 100%);
}

.wl-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 35px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transform: translateY(10px);
    transition: transform 0.5s ease;
}

.wl-category-card:hover .wl-card-content {
    transform: translateY(0);
}

.wl-card-top-tag {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 30px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.wl-category-card:hover .wl-card-top-tag {
    background: var(--wl-primary-red);
    border-color: var(--wl-primary-red);
}

.wl-card-icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
}

.wl-category-card:hover .wl-card-icon-wrapper {
    background: var(--wl-primary-red);
    transform: scale(1.1);
    box-shadow: 0 10px 20px rgba(220, 20, 60, 0.3);
}

.wl-card-icon-wrapper i {
    font-size: 1.8rem;
    color: white;
}

.wl-card-title {
    font-family: var(--wl-font-heading);
    color: white;
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.1;
    transform-origin: left;
    transition: transform 0.4s ease;
}

.wl-card-title span {
    font-weight: 400;
    font-style: italic;
    display: block;
    font-size: 1.4rem;
    color: var(--wl-light-red);
    margin-bottom: 5px;
}

.wl-card-desc {
    font-family: var(--wl-font-body);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-top: 15px;
    line-height: 1.6;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.5s ease;
    padding-right: 40px;
    /* Space for arrow */
}

.wl-category-card:hover .wl-card-desc {
    max-height: 100px;
    /* Reveal text */
    opacity: 1;
    margin-top: 15px;
}

.wl-card-arrow-action {
    position: absolute;
    bottom: 35px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: all 0.4s ease;
    z-index: 3;
}

.wl-category-card:hover .wl-card-arrow-action {
    background: white;
    color: var(--wl-primary-red);
    border-color: white;
    transform: rotate(-45deg);
}

/* Base fade-in animation for grid items */
@keyframes fadeInUpCard {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wl-category-card {
    animation: fadeInUpCard 0.6s ease forwards;
    opacity: 0;
}

/* Stagger delays */
.wl-category-card:nth-child(1) {
    animation-delay: 0.1s;
}

.wl-category-card:nth-child(2) {
    animation-delay: 0.2s;
}

.wl-category-card:nth-child(3) {
    animation-delay: 0.3s;
}

.wl-category-card:nth-child(4) {
    animation-delay: 0.4s;
}

.wl-category-card:nth-child(5) {
    animation-delay: 0.5s;
}

.wl-category-card:nth-child(6) {
    animation-delay: 0.6s;
}

.wl-category-card:nth-child(7) {
    animation-delay: 0.7s;
}