/* Tagline Hover Popup */

.tagline-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 99999;
    width: 90%;
    max-width: 640px;
    padding: 32px 40px;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.6;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
    pointer-events: none;
    opacity: 0;

    /* Start collapsed at the hovered news box (offsets set by JS) */
    transform: translate(
            calc(-50% + var(--thp-from-x, 0px)),
            calc(-50% + var(--thp-from-y, 0px))
        )
        scale(0.15);

    /* Closing: quick shrink back toward the box */
    transition: transform 0.35s ease-in, opacity 0.35s ease-in;
    will-change: transform, opacity;
}

.tagline-popup.is-visible {
    /* End: full size, dead center of screen */
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;

    /* Opening: smooth 1s glide from the box to center */
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.5s ease-out;
}

/* Safety net: never show on small screens */
@media (max-width: 767px) {
    .tagline-popup {
        display: none;
    }
}
