/* ============================================
   TILTED CARD — CSS
   ============================================ */

/* ---------- Card Container ---------- */
.tilted-card-figure {
    position: relative;
    perspective: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0;
    z-index: 1;
    transition: z-index 0s 0.3s;
}

.tilted-card-figure:hover {
    z-index: 50;
    transition: z-index 0s 0s;
}

/* ---------- Inner Card (receives 3D transform) ---------- */
.tilted-card-inner {
    position: relative;
    transform-style: preserve-3d;
    will-change: transform;
    border-radius: 15px;
    overflow: visible;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    transition: box-shadow 0.3s ease;
}

.tilted-card-figure:hover .tilted-card-inner {
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* ---------- Image ---------- */
.tilted-card-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    will-change: transform;
    transform: translateZ(0);
    pointer-events: none;
}

/* ---------- Floating Cursor Tooltip ---------- */
.tilted-card-caption {
    pointer-events: none;
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 6px 14px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #1a1a1a;
    opacity: 0;
    z-index: 10;
    white-space: nowrap;
    letter-spacing: 0.03em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translate(0, 0);
}

/* ---------- Section Layout ---------- */
.tilted-cards-section {
    padding: 6rem 0 4rem;
}

.tilted-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.tilted-card-figure {
    height: 380px;
    width: 100%;
}

.tilted-card-inner {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    overflow: hidden;
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
    .tilted-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem 2rem;
    }
    .tilted-card-figure {
        height: 320px;
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
    .tilted-cards-section {
        padding: 4rem 0 2rem;
    }
    .tilted-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem 0.75rem;
        padding: 0.5rem;
    }
    .tilted-card-figure {
        height: 220px;
    }
    .tilted-card-inner {
        border-radius: 10px;
    }
    .tilted-card-img {
        border-radius: 10px;
    }
    .tilted-card-caption {
        display: none;
    }
}
