/* projects */
#projects h3 {
    color: var(--text-secondary-color) !important;
}
#projects a { /* This is your general rule for links within projects */
    text-decoration: none;
    color: var(--text-link-color) !important;
}
#projects .badge {
    background-color: var(--background-color) !important;
    color: var(--text-color) !important;
    margin: 0 1%;
}

/* --- Original Card Styles (THESE SHOULD REMAIN LARGELY UNCHANGED) --- */
#projects .card {
    background-color: var(--secondary-color) !important;
    box-shadow: 0px 8px 56px rgb(15 80 100 / 16%);
    min-height: 400px;
    overflow: hidden; /* Keep this, important for containing the stretched link if it tries to overflow */
    border-radius: 1rem;
    border: none !important;
    position: relative; /* CRITICAL: This makes the card a positioning context for the absolute link */
    /* Ensure transitions are on the card itself if they affect its direct properties */
    /* transition: transform 0.3s, box-shadow 0.3s;  If you want the card's shadow to transition on hover */
}

#projects .card:hover {
    box-shadow: 0 0 11px rgb(15 80 100 / 20%);
    /* The transform was on .card:hover, so this should still work */
    transform: translateY(-7px);
    /* transition: transform 0.3s; /* This was on card:hover, keep if specific */
}

#projects .card .card-head {
    -o-object-fit: cover;
    object-fit: cover;
    overflow: hidden;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    border: none !important;
}

#projects .card .card-footer {
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    /* Ensure footer links are "above" the stretched link if necessary */
    position: relative;
    z-index: 2; /* Higher z-index than the stretched link */
}

#projects .card:hover .card-img-top {
    /* This hover effect on a child element should still work perfectly */
    transform: scale(1.2);
    transition: all 0.3s ease-out;
}

#projects .card-img-top {
    transition: transform 0.3s;
}

/* --- End Original Card Styles --- */


/* --- Stretched Link CSS --- */
#projects .card .stretched-card-link {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1; /* Lower than footer links, but covers the card content */
    pointer-events: auto; /* Ensures it's clickable */
    content: "";
    background-color: rgba(0,0,0,0); /* Transparent */
}

/* Ensure inner links (like in footer) are still individually clickable */
#projects .card .card-footer a,
#projects .card .card-footer .btn {
    position: relative; /* Needed to establish a stacking context */
    z-index: 3; /* Must be higher than .stretched-card-link */
}


/* Original button styles in footer */
#projects .float-end .btn {
    transition: none; /* Your original style */
    border-radius: .5rem !important;
    border-color: var(--primary-color) !important;
}

#projects .float-end .btn:focus {
    box-shadow: none !important;
}