/* ==========================================================================
   TUTORIAL / LEARNING CENTER STYLES
   ========================================================================== */

/* Tutorial Navigation Pills (Mobile horizontal, Desktop vertical) */
.tut-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.02);
    min-width: max-content;
}

.tut-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.tut-nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tut-nav-item .tut-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.tut-nav-item.active .tut-icon {
    background: rgba(255, 30, 30, 0.2); /* Red Primary Glow */
    color: #ff1e1e;
    box-shadow: 0 0 10px rgba(255, 30, 30, 0.3);
}

.tut-nav-item.completed .tut-icon {
    background: rgba(34, 197, 94, 0.2); /* Green */
    color: #22c55e;
}

/* Animations */
@keyframes tut-build-panel {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
        border-color: transparent;
    }
    30% {
        opacity: 1;
        transform: translateY(0) scale(1);
        border-color: rgba(255, 30, 30, 0.5);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        border-color: rgba(255, 255, 255, 0.1);
    }
}

.tut-animate-build {
    animation: tut-build-panel 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0; /* hidden before animation starts */
}

/* Delay modifiers for sequential building */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }

/* Timeline drawing animation */
.tut-timeline-line {
    position: absolute;
    left: 1rem;
    top: 2rem;
    bottom: -1rem;
    width: 2px;
    background: linear-gradient(to bottom, rgba(255,30,30,0.5) 0%, rgba(255,255,255,0.1) 100%);
    transform-origin: top;
    transform: scaleY(0);
    animation: timeline-draw 1s ease-out forwards;
    animation-delay: 0.5s;
}

@keyframes timeline-draw {
    to { transform: scaleY(1); }
}

/* Check pop animation */
@keyframes check-pop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.tut-check-anim {
    animation: check-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Typewriter effect */
.tut-typewriter {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid rgba(255, 255, 255, 0.7);
    animation: typing 1.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: rgba(255, 255, 255, 0.7) }
}

/* Locked Admin Card */
.tut-locked-card {
    position: relative;
    overflow: hidden;
}

.tut-locked-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 10;
}

.tut-locked-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    text-align: center;
    width: 100%;
    padding: 2rem;
}

/* FAQ Expandable */
.tut-faq-item {
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tut-faq-header {
    padding: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}

.tut-faq-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.tut-faq-content {
    max-height: 0;
    padding: 0 1rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.tut-faq-item.open {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.tut-faq-item.open .tut-faq-content {
    max-height: 500px; /* arbitrary max height */
    padding: 0 1rem 1rem 1rem;
    opacity: 1;
}

.tut-faq-item.open .tut-faq-icon {
    transform: rotate(180deg);
}

/* Hide scrollbar for nav */
.hidden-scrollbar::-webkit-scrollbar {
    display: none;
}
.hidden-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
