/* Explain: Styles for navigation dropdowns, video visuals, and demo chat. */
/* ---------- Nav dropdown ---------- */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.nav-dropdown-toggle .fa-chevron-down {
    font-size: 0.6rem;
    transition: transform 0.2s ease;
}
.nav-dropdown.open .nav-dropdown-toggle .fa-chevron-down { transform: rotate(180deg); }

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    inset-inline-start: 0;
    min-width: 12rem;
    padding: 0.4rem;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: rgba(9, 14, 24, 0.98);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--shadow-deep);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 70;
}
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -0.6rem;
    inset-inline: 0;
    height: 0.6rem;
}
.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-dropdown-menu .nav-link {
    display: block;
    white-space: nowrap;
}

/* ---------- Video engine visual ---------- */
.video-visual {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-deep), var(--shadow-glow);
}
.video-visual img {
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
}
.video-visual-badge {
    position: absolute;
    bottom: 1rem;
    inset-inline-start: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--text-color);
    background: rgba(6, 10, 18, 0.82);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.video-visual-badge i { color: var(--primary-color); }

/* ---------- Roadmap timeline ---------- */
.timeline {
    position: relative;
    margin-top: 3rem;
    display: grid;
    gap: 1.5rem;
}
.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
    align-items: start;
}
.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 62px;
    bottom: -1.5rem;
    inset-inline-start: 26px;
    width: 2px;
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.5), rgba(34, 211, 238, 0.04));
}
.timeline-marker {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
    background: var(--primary-soft);
    border: 1px solid rgba(34, 211, 238, 0.35);
    box-shadow: 0 0 34px -10px rgba(34, 211, 238, 0.7);
}
.timeline-body { height: auto; }

@media (max-width: 640px) {
    .timeline-item { grid-template-columns: 1fr; gap: 0.9rem; }
    .timeline-item:not(:last-child)::before { display: none; }
    .timeline-marker { width: 46px; height: 46px; }
}

/* ---------- Demo chat ---------- */
.demo-chat {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 420px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(20, 30, 46, 0.9), rgba(9, 14, 24, 0.92));
    box-shadow: var(--shadow-deep), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.demo-chat-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.1rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(9, 14, 24, 0.7);
}
.demo-chat-feed {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 360px;
    padding: 1.1rem;
    overflow-y: auto;
}
.chat-bubble {
    max-width: 88%;
    padding: 0.7rem 1rem;
    border-radius: 14px;
    font-size: 0.92rem;
    line-height: 1.6;
}
.chat-bubble.is-bot {
    align-self: flex-start;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--border-color);
    border-start-start-radius: 4px;
}
.chat-bubble.is-user {
    align-self: flex-end;
    color: #06121a;
    background: linear-gradient(180deg, var(--primary-color), var(--primary-hover));
    border-start-end-radius: 4px;
    font-weight: 600;
}
.chat-bubble.is-typing {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding-block: 0.85rem;
}
.typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typing-bounce 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.18s; }
.typing-dot:nth-child(3) { animation-delay: 0.36s; }
@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-5px); opacity: 1; }
}
.demo-chat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    padding: 1.1rem;
    border-top: 1px solid var(--border-color);
}
.demo-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 100%;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-color);
    font-size: 0.82rem;
    font-weight: 500;
    text-align: start;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.demo-chip i { color: var(--primary-color); flex: none; }
.demo-chip:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    background: rgba(34, 211, 238, 0.09);
}
.demo-chip:disabled { opacity: 0.45; cursor: not-allowed; }

@media (prefers-reduced-motion: reduce) {
    .typing-dot { animation: none; }
}