/*
 * Efeito de movimento inspirado no exemplo.php
 * Uso sugerido:
 * <div class="mw-motion-grid">
 *   <article class="mw-motion-card">
 *     <div class="mw-motion-card__icon mw-motion-card__icon--blue">...</div>
 *     <h3>...</h3>
 *     <p>...</p>
 *   </article>
 * </div>
 *
 * Opcional:
 * Se houver JS definindo --mx e --my no card, o brilho acompanha o mouse.
 * Sem JS, o efeito continua funcionando com brilho central no hover.
 */

.mw-motion-grid {
    display: grid;
    gap: 22px;
}

.mw-motion-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mw-motion-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mw-motion-card {
    --mx: 50%;
    --my: 50%;
    position: relative;
    overflow: hidden;
    min-height: 260px;
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 60px rgba(44, 63, 124, 0.14);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    isolation: isolate;
}

.mw-motion-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(240px circle at var(--mx) var(--my), rgba(37, 99, 235, 0.18), transparent 40%),
        radial-gradient(220px circle at calc(var(--mx) + 8%) calc(var(--my) - 8%), rgba(124, 58, 237, 0.14), transparent 34%);
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
}

.mw-motion-card::after {
    content: "";
    position: absolute;
    inset: auto 18px -18px;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.22), rgba(124, 58, 237, 0.2));
    filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s ease;
    transform: translateY(10px) scale(0.9);
}

.mw-motion-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 28px 68px rgba(44, 63, 124, 0.2);
    border-color: rgba(37, 99, 235, 0.14);
}

.mw-motion-card:hover::before,
.mw-motion-card:hover::after {
    opacity: 1;
}

.mw-motion-card:hover::after {
    transform: translateY(0) scale(1);
}

.mw-motion-card > * {
    position: relative;
    z-index: 1;
}

.mw-motion-card h3 {
    margin: 0 0 12px;
}

.mw-motion-card p {
    margin: 0;
}

.mw-motion-card__icon {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 16px 32px rgba(77, 99, 241, 0.25);
}

.mw-motion-card__icon svg {
    width: 24px;
    height: 24px;
}

.mw-motion-card__icon--blue {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.mw-motion-card__icon--lilac {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

.mw-motion-card__icon--green {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

.mw-motion-card__icon--purple {
    background: linear-gradient(135deg, #7c3aed, #9333ea);
}

.mw-motion-card__icon--pink {
    background: linear-gradient(135deg, #ec4899, #f472b6);
}

.mw-motion-card__icon--accent {
    background: linear-gradient(135deg, #14b8a6, #8b5cf6);
}

@media (max-width: 980px) {
    .mw-motion-grid--3,
    .mw-motion-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .mw-motion-grid--3,
    .mw-motion-grid--4 {
        grid-template-columns: 1fr;
    }
}
