/* ==========================================================================
   AI Expand Buttons — Creative reveal triggers for collapsed sections
   ========================================================================== */

/* --- Base expand button --- */
.ai-expand-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 36px auto 0;
    padding: 20px 36px;
    border: 1px dashed var(--border-light);
    border-radius: 14px;
    background: var(--bg-elevated);
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}
.ai-expand-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0,212,255,0.04), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.ai-expand-btn:hover::before { opacity: 1; }
.ai-expand-btn:hover {
    border-color: var(--accent-primary);
    border-style: solid;
    transform: scale(1.02);
}
.ai-expand-btn__icon {
    font-size: 24px;
    position: relative;
}
.ai-expand-btn__text {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-bright);
    position: relative;
}
.ai-expand-btn__sub {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
    position: relative;
    animation: ai-sub-pulse 2s ease-in-out infinite;
}
@keyframes ai-sub-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* --- Hidden state (after expand) --- */
.ai-expand-btn.expanded {
    display: none;
}

/* --- Variant: Classified (Missions) --- */
.ai-expand-btn--classified {
    border-color: rgba(251,191,36,0.3);
    background: rgba(251,191,36,0.03);
}
.ai-expand-btn--classified:hover {
    border-color: var(--accent-warm);
    background: rgba(251,191,36,0.06);
    box-shadow: 0 0 30px rgba(251,191,36,0.08);
}
.ai-expand-btn--classified .ai-expand-btn__text { color: var(--accent-warm); }

/* --- Variant: Vault (Downloads) --- */
.ai-expand-btn--vault {
    border-color: rgba(0,212,255,0.2);
}
.ai-expand-btn--vault .ai-expand-btn__icon {
    color: var(--accent-primary);
    transition: transform 0.4s ease;
}
.ai-expand-btn--vault:hover .ai-expand-btn__icon {
    transform: translateY(-2px);
}
.ai-expand-btn--vault:hover {
    box-shadow: 0 0 30px rgba(0,212,255,0.1);
}

/* --- Variant: Radar (Pillars) --- */
.ai-expand-btn--radar .ai-expand-btn__icon {
    width: 40px; height: 40px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ai-radar-ring {
    position: absolute;
    width: 30px; height: 30px;
    border: 1px solid rgba(0,212,255,0.2);
    border-radius: 50%;
    animation: ai-radar-expand 2s ease-out infinite;
}
.ai-radar-ring--2 { animation-delay: 1s; }
.ai-radar-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
    position: relative;
    box-shadow: 0 0 8px rgba(0,212,255,0.6);
}
@keyframes ai-radar-expand {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}
.ai-expand-btn--radar:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 30px rgba(0,212,255,0.08);
}

/* --- Smooth reveal animation for items --- */
.ai-collapsed-item.revealing {
    display: block !important;
    animation: ai-item-reveal 0.5s ease forwards;
}
/* Media items are flex, not block — preserve their layout */
a.ai-media-item.ai-collapsed-item.revealing {
    display: flex !important;
}
@keyframes ai-item-reveal {
    0% { opacity: 0; transform: translateY(20px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Stagger delays for sequential reveal */
.ai-collapsed-item.revealing:nth-child(3) { animation-delay: 0s; }
.ai-collapsed-item.revealing:nth-child(4) { animation-delay: 0.15s; }
.ai-collapsed-item.revealing:nth-child(5) { animation-delay: 0.3s; }
.ai-collapsed-item.revealing:nth-child(6) { animation-delay: 0.45s; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .ai-expand-btn { padding: 16px 24px; }
}
