.tm-case-study-widget {
    display: block;
    width: 100%;
}

.tm-case-study-card {
    position: relative;
    width: 100%;
    border-radius: 16px; /* Can be overridden by Elementor controls */
    overflow: hidden;
    /* Default aspect ratio handled via padding-top in Elementor control */
    padding-top: 120%; 
}

.tm-card-inner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
    text-decoration: none;
}

.tm-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.tm-case-study-card:hover .tm-bg-image {
    transform: scale(1.05);
}

.tm-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 50%);
    z-index: 2;
    transition: background-color 0.4s ease;
}

.tm-case-study-card:hover .tm-bg-overlay {
    background-color: rgba(20, 20, 20, 0.85); /* Darker overlay on hover */
}

.tm-content-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    pointer-events: none; /* Let any clicks go through to card if it becomes a link */
}

.tm-hover-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    text-align: center;
    opacity: 0;
    transition: all 0.4s ease;
    width: 90%;
}

.tm-case-study-card:hover .tm-hover-content {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.tm-brand-name-wrap {
    position: absolute;
        bottom: 15px;
    left: 25px;
    margin: 0;
    
}

.tm-brand-name {
    color: #ffffff;
    font-size: 28px;
    font-weight: 500;
        font-family: 'GT Alpina' !important;
    margin: 0;
}

.tm-stat-wrapper {
    display: inline-flex;
    align-items: flex-start;
    justify-content: center;
}

.tm-stat {
    font-size: 80px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1;
}

.tm-stat-icon {
    margin-left: 8px;
    margin-top: 5px;
}

.tm-stat-icon img {
    height: 18px;
    width: auto;
    object-fit: contain;
}

.tm-stat-subtext {
    font-size: 20px;
    color: #ffffff;
        font-family: 'GT Alpina' !important;
    margin-top: 2px;
    font-weight: 400;
}

/* Splide specific tweaks */
.tm-case-study-widget .splide__slide {
    padding: 10px; /* Optional spacing around cards */
    box-sizing: border-box;
}

.tm-case-study-widget .splide__pagination {
    bottom: -30px;
}
