/* ── Global Mobile Sidebar Styles ── */

#mobile-menu {
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    background: #0d1535;
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 90vw;
    max-width: 520px;
    transform: translateX(100%);
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
    z-index: 60;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 100px 60px 80px 90px;
}

body.material-ocm-open #mobile-menu {
    transform: translateX(0);
}

/* Backdrop overlay */
#menu-backdrop {
    background: rgba(10, 15, 44, 0) !important;
    backdrop-filter: blur(0px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s cubic-bezier(0.2, 1, 0.3, 1),
                backdrop-filter 0.8s ease;
}

body.material-ocm-open #menu-backdrop {
    background: rgba(10, 15, 44, 0.6) !important;
    backdrop-filter: blur(4px);
    opacity: 1;
    pointer-events: all;
}

#page-wrap {
    position: relative;
    z-index: 10;
}

body.material-ocm-open #page-wrap {
    pointer-events: none;
}

@media (max-width: 767px) {
    #mobile-menu {
        padding: 100px 36px 80px 64px;
    }
}

/* Close button: positioned at left edge of sidebar */
.slide-out-close {
    position: absolute;
    left: -35px;
    top: 50%;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    background: transparent;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1),
                background 0.4s ease,
                box-shadow 0.4s ease;
    transform: translateY(-50%) translateX(-30px);
    opacity: 0;
    pointer-events: none;
    text-decoration: none;
}

body.material-ocm-open .slide-out-close {
    background: #4f46e5;
    box-shadow: 0 12px 40px rgba(79, 70, 229, 0.5);
    transform: translateY(-50%) translateX(0);
    opacity: 1;
    pointer-events: all;
}

.slide-out-close:hover {
    background: #4338ca;
}

.close-line {
    position: absolute;
    width: 2px;
    height: 20px;
    background: #fff;
    border-radius: 5px;
    left: 50%;
    top: 50%;
    margin-left: -1px;
    margin-top: -10px;
}

.close-line1 {
    transform: rotate(45deg);
}

.close-line2 {
    transform: rotate(-45deg);
}

/* Animated hamburger -> X toggle icon */
.hamburger {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 14px;
}

.hamburger-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease,
                top 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger .line1 { top: 0; }
.hamburger .line2 { top: 6px; }
.hamburger .line3 { top: 12px; }

body.material-ocm-open .hamburger .line1 {
    top: 6px;
    transform: rotate(45deg);
}

body.material-ocm-open .hamburger .line2 {
    opacity: 0;
    transform: scaleX(0);
}

body.material-ocm-open .hamburger .line3 {
    top: 6px;
    transform: rotate(-45deg);
}

/* Sidebar nav links */
.sidebar-link {
    position: relative;
    font-size: 22px;
    font-weight: 700;
    line-height: 32px;
}

.sidebar-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffffff;
    transition: width 0.3s ease;
}

.sidebar-link:hover::after {
    width: 100%;
}

.sidebar-link-active::after {
    width: 100%;
}

@media (max-width: 767px) {
    .sidebar-link {
        font-size: 18px;
        line-height: 26px;
    }
}

/* Nav item stagger fade-in */
.mobile-nav-item {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.2s ease;
}

body.material-ocm-open .mobile-nav-item {
    opacity: 1;
    transform: translateX(0);
}

body.material-ocm-open #mobile-menu .mobile-nav-item:nth-child(1) { transition-delay: 0.10s; }
body.material-ocm-open #mobile-menu .mobile-nav-item:nth-child(2) { transition-delay: 0.15s; }
body.material-ocm-open #mobile-menu .mobile-nav-item:nth-child(3) { transition-delay: 0.20s; }
body.material-ocm-open #mobile-menu .mobile-nav-item:nth-child(4) { transition-delay: 0.25s; }
body.material-ocm-open #mobile-menu .mobile-nav-item:nth-child(5) { transition-delay: 0.30s; }
body.material-ocm-open #mobile-menu .mobile-nav-item:nth-child(6) { transition-delay: 0.35s; }
body.material-ocm-open #mobile-menu .mobile-nav-item:nth-child(7) { transition-delay: 0.40s; }
body.material-ocm-open #mobile-menu .mobile-nav-item:nth-child(8) { transition-delay: 0.45s; }
body.material-ocm-open #mobile-menu .mobile-nav-item:nth-child(9) { transition-delay: 0.50s; }

/* ── Glow Hover Cards & Timeline styles ── */
.glow-card {
    position: relative;
    overflow: hidden;
    /* Fix Safari rounded corners overflow bug with backdrop-filter/blur */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.glow-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        350px circle at var(--mouse-x, 0) var(--mouse-y, 0),
        rgba(34, 211, 238, 0.06),
        transparent 80%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.glow-card:hover::before {
    opacity: 1;
}

/* Timeline progress overlay */
.timeline-progress-bar {
    position: absolute;
    left: 48px;
    top: 16px;
    bottom: 16px;
    width: 2px;
    background: linear-gradient(180deg, #22d3ee, #6366f1);
    transform-origin: top;
    transform: translateX(-50%) scaleY(0);
    z-index: 2;
    pointer-events: none;
}

@media (min-width: 768px) {
    .timeline-progress-bar {
        left: 50%;
        transform: translateX(-50%) scaleY(0);
    }
}
/* Fix for timeline circles centering on mobile/desktop */
.timeline-circle {
    transform: translate(-50%, var(--tw-translate-y, 0)) scale(var(--tw-scale-x, 1)) !important;
}
