/* WRAPPER */
.hack2-wrapper {
    display: flex;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
}

/* BASE CARD */
.hack2-card {
    flex: 1;
    background: #ffffff;
    color: #000;
    cursor: pointer;
    transition:
        flex 0.5s ease,
        background 0.4s ease,
        color 0.4s ease;
    border-right: 1px solid #eee;
    display: flex;
}

.hack2-card:last-child {
    border-right: none;
}

/* INNER */
.card-inner {
    padding: 35px 25px;
    width: 100%;
}

/* ICON */
.card-icon {
    width: 60px;
    height: 60px;
    background: #f1f3f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
    transition: all 0.4s ease;
}

/* TITLE */
.card-title {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 10px;
}

/* DESCRIPTION ALWAYS VISIBLE */
.card-desc {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 0;
}

/* DEFAULT ACTIVE */
.hack2-card.active {
    flex: 3;
    color: #fff;
}

/* HOVER EXPAND */
.hack2-wrapper:hover .hack2-card {
    flex: 0.9;
}

.hack2-wrapper .hack2-card:hover {
    flex: 3;
}

/* ICON COLOR CHANGE WHEN ACTIVE */
.hack2-card.active .card-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* COLORS ONLY WHEN ACTIVE */
.hack2-card.red.active {
    background: #e76f51;
}
.hack2-card.orange.active {
    background: #f4a261;
}
.hack2-card.yellow.active {
    background: #e9c46a;
    color: #000;
}
.hack2-card.green.active {
    background: #2a9d8f;
}
.hack2-card.blue.active {
    background: #457b9d;
}
.hack2-card.indigo.active {
    background: #3a0ca3;
}
.hack2-card.violet.active {
    background: #7209b7;
}

/* ============================= */
/* MOBILE VERSION - VIBGYOR MODE */
/* ============================= */

@media (max-width: 992px) {
    .hack2-wrapper {
        flex-direction: column;
        height: auto;
    }

    .hack2-card {
        flex: unset !important;
        border-right: none;
        border-bottom: none;
        color: #fff !important;
    }

    /* Show description always */
    .card-desc {
        opacity: 1 !important;
        transform: none !important;
    }

    /* Apply VIBGYOR background permanently */
    .hack2-card.red {
        background: #e76f51;
    }
    .hack2-card.orange {
        background: #f4a261;
    }
    .hack2-card.yellow {
        background: #e9c46a;
        color: #000 !important;
    }
    .hack2-card.green {
        background: #2a9d8f;
    }
    .hack2-card.blue {
        background: #457b9d;
    }
    .hack2-card.indigo {
        background: #3a0ca3;
    }
    .hack2-card.violet {
        background: #7209b7;
    }

    /* Icon styling */
    .card-icon {
        background: rgba(255, 255, 255, 0.2);
        color: #fff;
    }
}
