/* css/features.css */

.features-section {
    /* Ensure white background */
    background-color: #fff !important;
}

/* --- Base Feature Card --- */
.feature-card {
    position: relative;
    min-height: 450px; /* Tall height like screenshot */
    background-color: #f8f9fa; /* Light gray default bg on white */
    border: 1px solid #eee;
    overflow: hidden;
    transition: all 0.4s ease;
    z-index: 1;
}

/* Content wrapper to ensure text sits above hover overlays */
.feature-card-content {
    position: relative;
    z-index: 3;
    color: var(--dark-gray); /* Default dark text */
}

/* The dark overlay pseudo-element (hidden by default) */
.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(17, 19, 21, 0.8); /* Dark overlay color */
    opacity: 0;
    z-index: 2;
    transition: all 0.4s ease;
}

/* Icon Box styling */
.icon-box {
    width: 70px;
    height: 70px;
    background-color: #e9ecef; /* Light gray default */
    color: var(--dark-gray);
}

.card-text-desc {
    transition: opacity 0.3s;
}

/* --- Hoverable Cards (Left & Right) States --- */
.feature-card-hoverable:hover {
    border-color: transparent;
    background-image: var(--feature-hover-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Reveal overlay on hover */
.feature-card-hoverable:hover::before {
    opacity: 1;
}

/* Change text to white on hover */
.feature-card-hoverable:hover .feature-card-content {
    color: #fff;
}

/* Change icon box to Red on hover */
.feature-card-hoverable:hover .icon-box {
    background-color: var(--primary-red);
    color: #fff;
}

.feature-card-hoverable:hover .card-text-desc {
    opacity: 1 !important;
}

/* --- Active Middle Card (Permanent Highlight State) --- */
.feature-card-active {
    /* Car grill image from screenshot */
    background-image: url('../../assets/images/imageee/13.webp');
    background-size: cover;
    background-position: center;
    border: none;
}

/* Always show overlay on active card */
.feature-card-active::before {
    opacity: 1;
}

/* ===========================
   MOBILE RESPONSIVE STYLES
   =========================== */

@media (max-width: 991px) {
    .features-section {
        padding: 40px 0 !important;
    }
    
    .feature-card {
        min-height: 350px;
    }
    
    .icon-box {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 576px) {
    .features-section {
        padding: 30px 0 !important;
    }
    
    .feature-card {
        min-height: 300px;
    }
    
    .icon-box {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .feature-card-content h4 {
        font-size: 1.1rem !important;
    }
    
    .feature-card-content p {
        font-size: 13px;
    }
}