/* ==========================================================================
   DMVH Client Cases Module Styles
   ========================================================================== */

.dmvh-client-cases-module {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.dmvh-cases-watermark {
    position: absolute;
    top: -80px;
    left: max(-80px, calc(50% - 660px));
    width: 560px;
    height: 480px;
    pointer-events: none;
    color: #ffffff;
    opacity: 0.55;
    z-index: 0;
}

    .dmvh-cases-watermark svg {
        width: 100%;
        height: 100%;
    }

.dmvh-cases-container {
    position: relative;
    z-index: 1;
    width: min(var(--dmvh-max, 1200px), calc(100% - 64px));
    margin-inline: auto;
}

/* Offset Heading (Top Right) */
.dmvh-cases-heading {
    margin-left: auto;
    width: fit-content;
    max-width: 580px;
    margin-bottom: 50px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.dmvh-cases-title-primary {
    font-family: "DMVH Funnel", Arial, sans-serif;
    font-size: clamp(34px, 4.2vw, 48px);
    font-weight: 700;
    color: var(--dmvh-ink, #18395b);
    line-height: 1.15;
    margin: 0;
}

.dmvh-cases-title-pillars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dmvh-cases-pillar {
    font-family: "DMVH Funnel", Arial, sans-serif;
    font-size: clamp(28px, 3.6vw, 40px);
    font-weight: 400;
    color: var(--dmvh-blue, #18395b);
    line-height: 1.25;
}

/* 3-Column Card Grid */
.dmvh-cases-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    align-items: start;
}

/* Case Card (Navy container with photo & white client branding) */
.dmvh-case-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: var(--card-min-height, 480px);
    background: #233753;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: #ffffff;
    box-shadow: 0 16px 40px rgba(18, 38, 64, 0.22);
    transform: translateY(var(--card-offset-y, 0px));
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
}

/* Cover Image with Gradient Mask */
.dmvh-case-media {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    flex-shrink: 0;
    background: #19273c;
}

    .dmvh-case-media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        display: block;
        transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }

.dmvh-case-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(35, 55, 83, 0.05) 0%, rgba(35, 55, 83, 0.5) 65%, #233753 100%);
    pointer-events: none;
}

/* Card Body */
.dmvh-case-body {
    padding: 22px 28px 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    z-index: 2;
}

/* Client Logo (Crisp White on dark background) */
.dmvh-case-logo {
    height: 38px;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

    .dmvh-case-logo img {
        max-height: 32px;
        max-width: 150px;
        object-fit: contain;
        object-position: left center;
        filter: brightness(0) invert(1);
    }

.dmvh-case-client-name {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Title & Description */
.dmvh-case-title {
    font-family: "DMVH Funnel", Arial, sans-serif;
    font-size: 21px;
    line-height: 1.35;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px;
}

.dmvh-case-desc {
    font-size: 14.5px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.82);
    margin: 0 0 24px;
}

/* Orange Button */
.dmvh-case-action {
    margin-top: auto;
    padding-top: 4px;
}

.dmvh-case-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    background-color: var(--dmvh-orange, #e85c2c);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    border-radius: 6px;
    line-height: 1.2;
    transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

/* Hover Effects */
.dmvh-client-cases-module.dmvh-cases-hover-lift .dmvh-case-card:hover {
    transform: translateY(calc(var(--card-offset-y, 0px) - 10px));
    box-shadow: 0 24px 50px rgba(18, 38, 64, 0.35);
    border-color: rgba(255, 255, 255, 0.22);
}

    .dmvh-client-cases-module.dmvh-cases-hover-lift .dmvh-case-card:hover .dmvh-case-media img {
        transform: scale(1.04);
    }

    .dmvh-client-cases-module.dmvh-cases-hover-lift .dmvh-case-card:hover .dmvh-case-btn {
        background-color: #f26522;
        box-shadow: 0 6px 18px rgba(232, 92, 44, 0.4);
        transform: translateX(2px);
    }

.dmvh-client-cases-module.dmvh-cases-hover-glow .dmvh-case-card:hover {
    transform: translateY(calc(var(--card-offset-y, 0px) - 6px));
    box-shadow: 0 16px 40px rgba(232, 92, 44, 0.25), 0 0 0 1px rgba(232, 92, 44, 0.4);
}

.dmvh-client-cases-module.dmvh-cases-hover-scale-subtle .dmvh-case-card:hover {
    transform: translateY(var(--card-offset-y, 0px)) scale(1.02);
    box-shadow: 0 22px 45px rgba(18, 38, 64, 0.3);
}

/* Animations */
@keyframes dmvhCaseFadeUp {
    from {
        opacity: 0;
        transform: translateY(calc(var(--card-offset-y, 0px) + 30px));
    }

    to {
        opacity: 1;
        transform: translateY(var(--card-offset-y, 0px));
    }
}

.dmvh-client-cases-module.dmvh-cases-anim-fade-up .dmvh-case-card {
    animation: dmvhCaseFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--card-index, 0) * 120ms);
}

/* Bottom Actions */
.dmvh-client-cases-module .dmvh-center-actions {
    text-align: center;
    margin-top: var(--dmvh-cases-actions-margin-top, 52px);
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Responsive Viewports */
@media (max-width: 960px) {
    .dmvh-cases-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    .dmvh-case-card {
        transform: translateY(0px) !important;
    }

    .dmvh-client-cases-module.dmvh-cases-hover-lift .dmvh-case-card:hover {
        transform: translateY(-8px) !important;
    }
}

@media (max-width: 680px) {
    .dmvh-cases-container {
        width: min(100% - 40px, 650px);
    }

    .dmvh-cases-heading {
        margin-left: 0;
        margin-bottom: 35px;
        max-width: 100%;
    }

    .dmvh-cases-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .dmvh-case-card {
        min-height: 0;
    }

    .dmvh-case-media {
        height: 210px;
    }

    .dmvh-cases-watermark {
        display: none;
    }
}
