.tilt-3d-card-wrap {
    perspective: var(--tilt-perspective, 1000px);
    display: inline-block;
    max-width: 100%;
    vertical-align: middle;
}

/* Aspect Ratio presets */
.tilt-aspect-1-1 .tilt-3d-card { aspect-ratio: 1 / 1; }
.tilt-aspect-4-3 .tilt-3d-card { aspect-ratio: 4 / 3; }
.tilt-aspect-16-9 .tilt-3d-card { aspect-ratio: 16 / 9; }
.tilt-aspect-3-4 .tilt-3d-card { aspect-ratio: 3 / 4; }

.tilt-3d-card {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 350px;
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
    will-change: transform;
    overflow: hidden;
    text-decoration: none !important;
}

.tilt-3d-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: translateZ(0px);
}

.tilt-3d-content-wrap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 30px;
    box-sizing: border-box;
    z-index: 2;
    transform: translateZ(0px);
}

.tilt-3d-content {
    width: 100%;
    transform: translateZ(40px); /* Creates the floating pop-out effect */
    transition: transform 0.15s ease-out;
}

.tilt-3d-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.tilt-3d-desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.tilt-3d-glare {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease-out;
}
