/* Magic Bento Hover Effect */
.magic-hover {
    position: relative;
    /* Ensure existing border styles are preserved but we add the glow on top */
    --glow-x: 50%;
    --glow-y: 50%;
    --glow-opacity: 0;
    --glow-radius: 400px;
    --border-width: 2px;
    /* Adjustable border width */
    --glow-color: var(--primary);
    /* Defaults to primary brand color */

    /* Ensure content stays above the glow if it's an overlay */
    z-index: 1;
}

.magic-hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    /* Matches parent border radius */

    /* The Magic Trick: Masking to show only the border area */
    padding: var(--border-width);
    background: radial-gradient(circle at var(--glow-x) var(--glow-y),
            var(--glow-color) 0%,
            transparent 50%);

    /* 
       mask-composite: exclude; -> This removes the inner content from the mask,
       leaving only the padding area (the border) visible.
    */
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;

    opacity: var(--glow-opacity);
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
    /* Above card background, below content if handled correctly */
}

/* Optional: Slight lift on hover to match the 'Magic Bento' feel */
.magic-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}