/**
 * Mizoram Build Expo — Modern Interactive Animations & Smooth UI Enhancements
 * High-performance, GPU-accelerated micro-interactions, scroll reveal, click ripple, and hover dynamics.
 */

/* ==========================================================================
   1. Global Smooth Scroll & Transitions
   ========================================================================== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

/* ==========================================================================
   2. Scroll Reveal Animations (GPU Accelerated)
   ========================================================================== */
.reveal-init {
    opacity: 0;
    will-change: transform, opacity;
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up {
    transform: translateY(32px);
}

.reveal-left {
    transform: translateX(-32px);
}

.reveal-right {
    transform: translateX(32px);
}

.reveal-scale {
    transform: scale(0.94);
}

.reveal-init.revealed {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* Automatic Stagger for Grids */
.cards-grid .feature-card:nth-child(1),
.stats-grid .stat-item:nth-child(1),
.exhibitors-showcase-grid .exhibitor-showcase-card:nth-child(1) { transition-delay: 0.05s; }

.cards-grid .feature-card:nth-child(2),
.stats-grid .stat-item:nth-child(2),
.exhibitors-showcase-grid .exhibitor-showcase-card:nth-child(2) { transition-delay: 0.12s; }

.cards-grid .feature-card:nth-child(3),
.stats-grid .stat-item:nth-child(3),
.exhibitors-showcase-grid .exhibitor-showcase-card:nth-child(3) { transition-delay: 0.19s; }

.cards-grid .feature-card:nth-child(4),
.stats-grid .stat-item:nth-child(4),
.exhibitors-showcase-grid .exhibitor-showcase-card:nth-child(4) { transition-delay: 0.26s; }

.cards-grid .feature-card:nth-child(5),
.exhibitors-showcase-grid .exhibitor-showcase-card:nth-child(5) { transition-delay: 0.33s; }

.cards-grid .feature-card:nth-child(6),
.exhibitors-showcase-grid .exhibitor-showcase-card:nth-child(6) { transition-delay: 0.40s; }

/* ==========================================================================
   3. Interactive Click Ripple Effect
   ========================================================================== */
.btn, .dropdown-link, .nav-link, .faq-question, .sponsor-card, .gallery-item {
    position: relative;
    overflow: hidden;
}

.ripple-wave {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.45) 0%, rgba(245, 158, 11, 0.15) 50%, transparent 70%);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out forwards;
    pointer-events: none;
    z-index: 10;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Button Tactile Click Feedback */
.btn:active, .adm-btn:active, .crop-ratio-btn:active {
    transform: scale(0.965) !important;
    transition: transform 0.1s ease !important;
}

/* ==========================================================================
   4. High-End Card Spotlight & Elevation Effects
   ========================================================================== */
.feature-card,
.stat-item,
.exhibitor-showcase-card,
.sponsor-card,
.countdown-card {
    position: relative;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

/* Dynamic Cursor-following Spotlight Glow */
.feature-card::before,
.stat-item::before,
.exhibitor-showcase-card::before,
.sponsor-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(
        320px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(245, 158, 11, 0.12),
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: inherit;
}

.feature-card:hover::before,
.stat-item:hover::before,
.exhibitor-showcase-card:hover::before,
.sponsor-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.75), 0 0 20px rgba(245, 158, 11, 0.12);
}

.stat-item:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), 0 0 18px rgba(245, 158, 11, 0.18);
}

.exhibitor-showcase-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.65), 0 0 22px rgba(245, 158, 11, 0.15);
}

.sponsor-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(245, 158, 11, 0.15);
}

/* ==========================================================================
   5. Button Shimmer Sweep Effect
   ========================================================================== */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    transition: all 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.btn-primary:hover::after {
    left: 130%;
}

/* ==========================================================================
   6. Navigation Link Underline Glow Interaction
   ========================================================================== */
.nav-link {
    position: relative;
    transition: color 0.25s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: 2px;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::after {
    width: 80%;
    left: 10%;
}

/* Scrolled Site Header Glassmorphism */
.site-header {
    transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease, border-bottom 0.3s ease;
}

.site-header.scrolled {
    background: rgba(11, 15, 25, 0.92) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8) !important;
    border-bottom: 1px solid rgba(245, 158, 11, 0.2) !important;
}

/* ==========================================================================
   7. Back to Top Floating Button with Circular Scroll Progress
   ========================================================================== */
.back-to-top-btn {
    position: fixed;
    bottom: 5.5rem;
    right: 1.75rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #0f172a;
    border: 1px solid #334155;
    color: #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top-btn:hover {
    background: #f59e0b;
    color: #000;
    border-color: #f59e0b;
    transform: translateY(-4px) scale(1.06);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.35);
}

.back-to-top-btn svg {
    position: absolute;
    top: 0; left: 0;
    width: 46px;
    height: 46px;
    transform: rotate(-90deg);
    pointer-events: none;
}

.back-to-top-btn circle {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
}

.back-to-top-btn .progress-bg {
    stroke: rgba(255, 255, 255, 0.1);
}

.back-to-top-btn .progress-bar {
    stroke: #f59e0b;
    stroke-dasharray: 126;
    stroke-dashoffset: 126;
    transition: stroke-dashoffset 0.15s ease;
}

/* ==========================================================================
   8. Professional Popup Modal System (Public & Admin)
   ========================================================================== */
.mbe-modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(3, 7, 18, 0.84);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
}

.mbe-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.mbe-modal-dialog {
    background: #0f172a;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 22px;
    width: 100%;
    max-width: 480px;
    padding: 2.25rem;
    text-align: center;
    box-shadow: 0 25px 65px -10px rgba(0, 0, 0, 0.9), 0 0 35px rgba(245, 158, 11, 0.15);
    transform: scale(0.9) translateY(24px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
    position: relative;
    overflow: hidden;
}

.mbe-modal-backdrop.active .mbe-modal-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.mbe-modal-close-x {
    position: absolute;
    top: 1.1rem;
    right: 1.2rem;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.mbe-modal-close-x:hover {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    transform: rotate(90deg);
}

.mbe-modal-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.mbe-modal-icon.success {
    background: rgba(16, 185, 129, 0.15);
    border: 2px solid rgba(16, 185, 129, 0.4);
    color: #10b981;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.25);
    animation: pulse-success 2s infinite ease-in-out;
}

.mbe-modal-icon.error {
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.25);
    animation: pulse-error 2s infinite ease-in-out;
}

.mbe-modal-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 0.6rem;
    letter-spacing: -0.3px;
}

.mbe-modal-desc {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 1.75rem;
}

.mbe-modal-btn {
    width: 100%;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #000;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.9rem 1.5rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.mbe-modal-btn:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.45);
    color: #000;
}

@keyframes pulse-success {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(16, 185, 129, 0.25); }
    50% { transform: scale(1.05); box-shadow: 0 0 35px rgba(16, 185, 129, 0.45); }
}

@keyframes pulse-error {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(239, 68, 68, 0.25); }
    50% { transform: scale(1.05); box-shadow: 0 0 35px rgba(239, 68, 68, 0.45); }
}

/* ==========================================================================
   9. Top-Right Toast Notification System (Admin & Global)
   ========================================================================== */
.admin-toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 420px;
    width: calc(100% - 3rem);
    pointer-events: none;
}

.admin-toast {
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid #334155;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    box-shadow: 0 16px 36px -5px rgba(0, 0, 0, 0.8), 0 0 25px rgba(245, 158, 11, 0.12);
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    position: relative;
    overflow: hidden;
    transform: translateX(125%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.admin-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.admin-toast.hide {
    transform: translateX(125%);
    opacity: 0;
}

.admin-toast-icon {
    font-size: 1.35rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.admin-toast-content {
    flex: 1;
}

.admin-toast-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: #f8fafc;
    margin-bottom: 0.2rem;
}

.admin-toast-msg {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.4;
    margin: 0;
}

.admin-toast-close {
    background: none;
    border: none;
    color: #64748b;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.admin-toast-close:hover {
    color: #f8fafc;
}

.admin-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform-origin: left;
    animation: toast-countdown 4.5s linear forwards;
}

.admin-toast.success {
    border-left: 4px solid #10b981;
}
.admin-toast.success .admin-toast-progress {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.admin-toast.error {
    border-left: 4px solid #ef4444;
}
.admin-toast.error .admin-toast-progress {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.admin-toast.info {
    border-left: 4px solid #f59e0b;
}
.admin-toast.info .admin-toast-progress {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

@keyframes toast-countdown {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* ==========================================================================
   10. Reduced Motion Accessibility
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal-init {
        opacity: 1 !important;
        transform: none !important;
    }
}
