/* assets/css/components/_cards.css */

/* Efeito Tilt e Spotlight nos Cards */
.tilt-card {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s linear;
}

.tilt-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 1rem;
    /* 16px */
    background: radial-gradient(400px circle at var(--mouse-x) var(--mouse-y), rgba(203, 153, 255, 0.25), transparent 80%);
    opacity: 0;
    transition: opacity 0.3s ease-out;
    z-index: 1;
}

.tilt-card:hover::before {
    opacity: 1;
}

.tilt-card-content {
    position: relative;
    z-index: 2;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    height: 100%;
    overflow: hidden;
}

.tilt-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* AJUSTE: Opacidade de fundo do card mais sutil */
    opacity: 0.05;
    filter: grayscale(100%);
    z-index: 0;
    transition: opacity 0.3s ease-out;
}

.tilt-card:hover .tilt-card-bg {
    opacity: 0.1;
}

/* Animação de Borda "Ideal Para" */
@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.animated-border-card {
    position: relative;
    background-color: #040308;
    border-radius: 1rem;
}

.animated-border-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 1rem;
    background: conic-gradient(from var(--angle), transparent 40%, #A367FF, #CB99FF, transparent 60%);
    animation: border-spin 4s linear infinite paused;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.animated-border-card:hover::before {
    opacity: 1;
    animation-play-state: running;
}

.animated-border-card .card-content {
    position: relative;
    background-color: #1a1625;
    /* Um pouco mais claro que o fundo */
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    height: 100%;
    z-index: 1;
}

@keyframes border-spin {
    to {
        --angle: 360deg;
    }
}
