:root {
    --brand-color: #1a2432;
    --overlay-glow: rgba(26, 36, 50, 0.6);
}

/* Card container */
.case-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

/* Card image */
.case-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.case-card:hover .case-img {
    transform: scale(1.1);
}

/* Initial visible title overlay */
.case-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 15px;
    /* more top & bottom padding */
    background: rgba(26, 36, 50, 0.85);
    color: #fff;
    z-index: 2;
}

.case-title-overlay h4 {
    margin: 0 0 5px 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.case-title-overlay .case-client {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.industry-badge {
    background-color: var(--brand-color);
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 15px;
    color: #fff;
    display: inline-block;
}

/* Glass overlay on hover with gradient glow */
.case-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 36, 50, 0.6), rgba(26, 36, 50, 0.2));
    backdrop-filter: blur(12px);
    color: #fff;
    padding: 30px;
    /* more breathing space */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.5s ease, box-shadow 0.5s ease;
    z-index: 3;
    box-shadow: 0 0 0px rgba(26, 36, 50, 0);
    /* initial */
    border-radius: 12px;
}

.case-card:hover .case-overlay {
    opacity: 1;
    box-shadow: 0 0 20px 8px rgba(26, 36, 50, 0.3);
    /* subtle glow */
}

/* Badges inside overlay */
.case-badges {
    margin-bottom: 18px;
    /* more space after badges */
}

.case-badges .badge {
    font-size: 13px;
    padding: 7px 14px;
    /* taller badges */
    margin-right: 6px;
    border-radius: 20px;
    opacity: 0.95;
}

.bg-brand {
    background-color: var(--brand-color) !important;
}

/* Teaser text */
.case-teaser {
    font-size: 0.95rem;
    margin-bottom: 20px;
    /* more space before button */
    line-height: 1.5;
}

/* Button */
.btn-brand {
    background: rgba(26, 36, 50, 0.95);
    /* semi-solid to stand out on hover overlay */
    color: #fff;
    border: 1px solid var(--brand-color);
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 6px;
    z-index: 5;
    /* above overlay */
    display: inline-block;
}

/* Button hover effect */
.btn-brand:hover {
    background: var(--brand-color);
    /* brand color solid */
    color: #fff;
    transform: translateY(-2px);
}


/* Mobile adjustments */
@media (max-width: 767px) {
    .case-img {
        height: 220px;
    }

    .case-title-overlay h4 {
        font-size: 1rem;
    }

    .case-title-overlay .case-client {
        font-size: 0.8rem;
    }

    .industry-badge {
        font-size: 11px;
        padding: 4px 10px;
    }

    .case-overlay {
        padding: 20px;
    }

    .case-teaser {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }

    .btn-brand {
        font-size: 0.85rem;
        padding: 6px 14px;
    }
}

