/* ══════════════════════════════════════════════════════
   EduExpert — News Popup Modal
   Glass white theme, blue-indigo accents.
   Class prefix: np-* (namespace isolated)
   ══════════════════════════════════════════════════════ */

/* === Glassmorphism (light) === */
.np-glass {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
}

/* === Entrance animations === */
@keyframes np-backdrop-in {
    from { opacity: 0; backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(0px); }
    to   { opacity: 1; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
}
.np-backdrop-in { animation: np-backdrop-in 0.35s ease-out both; }

/* Modal is centered on all sizes — use scale + fade in (works for both mobile & desktop) */
@keyframes np-modal-in {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.92) translateY(20px); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1) translateY(0); }
}
.np-anim { animation: np-modal-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both; }

/* === Carousel === */
.np-carousel-track {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}
.np-slide {
    flex: 0 0 100%;
    min-width: 0;
}
.np-slide-content { opacity: 0; transition: opacity 0.4s ease 0.1s; }
.np-slide.active .np-slide-content { opacity: 1; }

/* === Progress bar === */
@keyframes np-progress-fill {
    from { width: 0%; }
    to   { width: 100%; }
}
.np-progress {
    position: relative;
    height: 3px;
    background: rgba(15, 23, 42, 0.08);
    border-radius: 2px;
    overflow: hidden;
}
.np-progress.active::after {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    background: linear-gradient(90deg, #3b82f6, #6366f1);
    animation: np-progress-fill 5s linear forwards;
}

/* === Dots === */
.np-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 0;
    padding: 0;
}
.np-dot.active {
    width: 20px;
    border-radius: 4px;
    background: linear-gradient(90deg, #3b82f6, #6366f1);
}

/* === Cover effects === */
@keyframes np-gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}
.np-gradient-drift {
    background-size: 200% 200%;
    animation: np-gradient-shift 8s ease infinite;
}
.np-cover-shine { position: relative; overflow: hidden; }
.np-cover-shine::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.9s ease;
}
@media (hover: hover) and (pointer: fine) {
    a:hover .np-cover-shine::after { transform: translateX(100%); }
}

/* === Custom scrollbar inside slides === */
.np-scroll::-webkit-scrollbar { width: 6px; }
.np-scroll::-webkit-scrollbar-track { background: transparent; }
.np-scroll::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.15); border-radius: 3px; }
.np-scroll::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 42, 0.3); }

/* === Touch feedback (only on touch devices) === */
@media (hover: none) {
    a:active { transform: scale(0.99); }
}

/* === Pulse dot on launcher (subtle, blue) === */
@keyframes np-launcher-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.4); opacity: 0.6; }
}
.np-launcher-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #ec4899; /* pink-500 */
    border-radius: 50%;
    border: 2px solid white;
    animation: np-launcher-pulse 2s ease-in-out infinite;
}
.dark .np-launcher-dot { border-color: #0f172a; }
