/* ===============================
   INTERACTIVE CARDS STYLES (Updated)
================================= */
.interactive-cards {
    text-align: center;
    padding: 80px 5%; /* Increase padding for smoother transition */
    position: relative;
    z-index: 2; /* Ensures content is above the background */
}

/* Optional: Add a subtle overlay for readability */
.interactive-cards::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0));
    z-index: -1;
}

/* Feature Cards Grid */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

/* Individual Card Styles */
.card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.card img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

/* Bottom Overlay (Dimming Only Bottom Half) */
.card .overlay {
    position: absolute;
    bottom: 0;
    height: 30%; /* Covers bottom half of the image */
    background: rgba(0, 0, 0, 0.5); /* Dark overlay */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #fff;
    padding: 20px;
    transition: height 0.3s ease, background 0.3s ease;
}

/* Title (H3) Always Visible */
.card h3 {
    font-size: 1.5rem;
    margin: 10px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Description (Hidden Initially) */
.card .hidden-desc {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

/* Hover Effect */
.card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px 5px rgba(255, 215, 0, 0.6);
}

/* Hover Effect - Reveal Description */
.card:hover .overlay {
    height: 60%; /* Expand overlay slightly */
    background: rgba(0, 0, 0, 0.7); /* Darken on hover */
}

.card:hover .hidden-desc {
    opacity: 1;
    max-height: 100px; /* Reveal text */
}
