:root {
  
    --feature-card-height: 150px;
}

.features-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.card {
    /* Responsive Width Logic: */
    flex: 1 1 300px;
    max-width: 400px;
    
    height: var(--feature-card-height);
    display: flex;
    flex-direction: row;
    gap: 15px;
    padding: 20px;
    background: var(--color1);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    overflow: hidden;
    border-bottom: 4px solid var(--color1);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.card:hover {
    transform: translateY(-8px);
    background: var(--background);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.card-icon-container {
    display: flex;
    height: 100%;
    aspect-ratio: 1;
    border-radius: 20px;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: var(--color5);
    transition: all 0.5s ease;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.card-icon {
    position: absolute;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Icon 1: Visible by default */
.card-icon:nth-child(1) {
    transform: translateY(0);
    color: var(--color1);
}

/* Icon 2: Hidden below by default */
.card-icon:nth-child(2) {
    transform: translateY(var(--feature-card-height));
    color: var(--background);
}

/* Hover States for Icons */
.card:hover .card-icon:nth-child(1) {
    transform: translateY(calc(-1 * var(--feature-card-height)));
}

.card:hover .card-icon:nth-child(2) {
    transform: translateY(0);
}

.card:hover .card-icon-container {
    background: var(--color1);
}

.card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.card-title {
    font-size: 1.4rem;
    color: var(--color5);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 5px;
}

.card-description {
    color: var(--color5);
    font-size: 0.95rem;
    font-weight:450;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card:hover .card-title,
.card:hover .card-description {
    color: var(--color4);
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --feature-card-height: 150px;
    }
}

@media (max-width: 380px) {
    .card {
        flex-direction: column;
        height: auto;
        text-align: center;
    }

    .card-icon-container {
        width: 80px;
        height: 80px;
        margin: 0 auto;
    }
}
