/* ==========================================================================
   PAGE AI-ASSISTANTS V3
   Referens-based redesign — prefix: ast-
   Глобальні класи реюзуються з global.css
   ========================================================================== */

/* --- AI BADGE (floating on browser mockup) --- */

.pbadge-icon--ai {
    background: linear-gradient(135deg, var(--primary), #e55500);
    position: relative;
}

.ai-active-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #00ff87;
    border-radius: 50%;
    border: 2px solid var(--bg-main);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* --- TAG PILLS (hero department badges) --- */

.ast-tag-pills {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.ast-tag-pill {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: inline-block;
    white-space: nowrap;
}

.ast-tag-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(252, 96, 17, 0.3);
    transform: translateY(-2px);
}

/* --- CHAT MOCKUP (browser screen content) --- */

.ast-chat-dashboard {
    display: grid;
    grid-template-columns: 200px 1fr;
    height: 100%;
    background: #0c111c;
}

.ast-chat-sidebar {
    background: rgba(255, 255, 255, 0.02);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ast-chat-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    opacity: 0.4;
}

.ast-chat-sidebar-item.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.05);
}

.ast-chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.ast-chat-avatar--blue { background: #00f2fe; color: #000; }
.ast-chat-avatar--purple { background: #a18cd1; }

.ast-chat-info-stub { flex-grow: 1; }

.ast-stub-line {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-bottom: 4px;
}

.ast-stub-line--med { width: 60%; }
.ast-stub-line--short { width: 40%; }

.ast-chat-status-dot {
    width: 6px;
    height: 6px;
    background: #00ff87;
    border-radius: 50%;
    flex-shrink: 0;
}

.ast-chat-main {
    display: flex;
    flex-direction: column;
    background: #0c111c;
}

.ast-chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ast-chat-title strong {
    display: block;
    font-size: 14px;
    color: #fff;
}

.ast-chat-status {
    font-size: 11px;
    color: #00ff87;
}

.ast-chat-messages {
    flex-grow: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ast-message {
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 12px;
    color: #fff;
    max-width: 80%;
}

.ast-message--user {
    background: rgba(255, 255, 255, 0.05);
    align-self: flex-end;
}

.ast-message--ai {
    background: rgba(252, 96, 17, 0.1);
    border: 1px solid rgba(252, 96, 17, 0.2);
    align-self: flex-start;
}

.ast-chat-input {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ast-chat-input-stub {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 100px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}

/* --- PROBLEM SUMMARY --- */

.ast-problem-summary {
    margin-top: 40px;
    padding: 24px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- DEPARTMENT TABS --- */
/* JS targets: .dept-tab[data-dept], .dept-content — keep these classes */

.dept-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
}

.dept-tabs::-webkit-scrollbar { display: none; }

.dept-tab {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.dept-tab:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.dept-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.dept-content {
    display: none;
    grid-template-columns: 1fr 1fr 300px;
    gap: 40px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 32px;
    backdrop-filter: blur(20px);
}

.dept-content.active { display: grid; }

.ast-dept-col-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
    display: block;
}

.ast-dept-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ast-dept-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.ast-dept-list li::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.ast-int-tag {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.ast-int-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ast-dept-result {
    background: rgba(252, 96, 17, 0.05);
    border: 1px solid rgba(252, 96, 17, 0.1);
    border-radius: 24px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.ast-result-huge {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-heading);
}

.ast-result-label {
    font-size: 14px;
    color: #fff;
    line-height: 1.4;
}

/* --- ARCHITECTURE STEPS --- */

.ast-arch-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 60px;
}

.ast-arch-step { position: relative; z-index: 1; }

.ast-arch-num {
    width: 48px;
    height: 48px;
    background: #111;
    border: 1px solid var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 24px;
    font-family: var(--font-heading);
}

.ast-arch-step h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: #fff;
}

.ast-arch-step p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.ast-security-row {
    margin-top: 60px;
    padding: 24px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 15px;
    color: var(--text-muted);
}

/* --- EVOLUTION GRID --- */

.ast-evo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 60px;
}

.ast-evo-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 32px;
    padding: 40px;
    position: relative;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ast-evo-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--primary);
    transform: translateY(-12px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.5);
}

.ast-status-badge {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
    color: var(--primary);
    background: rgba(252, 96, 17, 0.1);
    padding: 6px 12px;
    border-radius: 6px;
    width: fit-content;
    margin-bottom: 24px;
}

.ast-status-badge--blue { color: #00f2fe; background: rgba(0, 242, 254, 0.1); }
.ast-status-badge--green { color: #00ff87; background: rgba(0, 255, 135, 0.1); }

.ast-evo-num-xl {
    position: absolute;
    top: -20px;
    right: -10px;
    font-size: 100px;
    font-weight: 900;
    color: #fff;
    opacity: 0.03;
    pointer-events: none;
    font-family: var(--font-heading);
}

.ast-evo-card h3 {
    font-size: 24px;
    color: #fff;
    margin-bottom: 8px;
    font-family: var(--font-heading);
}

.ast-phase-title {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 24px;
    display: block;
}

.ast-evo-features {
    list-style: none;
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.ast-evo-features li {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ast-evo-features li::before {
    content: "";
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.ast-evo-footer {
    margin-top: auto;
    padding-top: 30px;
}

.ast-evo-progress-track {
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1px;
    width: 100%;
    position: relative;
}

.ast-evo-progress-fill {
    position: absolute;
    left: 0; top: 0;
    height: 100%;
    background: var(--primary);
    width: 0;
    transition: width 0.8s ease;
}

.ast-evo-progress-fill--blue { background: #00f2fe; }
.ast-evo-progress-fill--green { background: #00ff87; }

.ast-evo-card:hover .ast-evo-progress-fill { width: 100%; }

.ast-evo-card-accent {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 4px;
    opacity: 0.3;
}

.ast-evo-card--1 .ast-evo-card-accent { background: var(--primary); }
.ast-evo-card--2 .ast-evo-card-accent { background: #00f2fe; }
.ast-evo-card--3 .ast-evo-card-accent { background: #00ff87; }

/* --- CASES --- */

.ast-cases-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.ast-case-card {
    display: flex;
    gap: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 30px;
    transition: all 0.3s ease;
}

.ast-case-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(252, 96, 17, 0.3);
    transform: translateY(-5px);
}

.ast-case-content h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #fff;
}

.ast-case-content p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
}

.ast-case-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.ast-case-tag {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 14px;
    background: rgba(252, 96, 17, 0.1);
    color: var(--primary);
    border-radius: 100px;
    font-weight: 800;
}

/* --- SECTION DESC (process subtitle) --- */

.section-desc {
    font-size: 18px;
    color: var(--text-muted);
    margin-top: 16px;
    line-height: 1.6;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
    .dept-content { grid-template-columns: 1fr 1fr; }
    .ast-dept-result { grid-column: span 2; }
    .ast-arch-steps { grid-template-columns: repeat(2, 1fr); }
    .ast-evo-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .dept-content { grid-template-columns: 1fr; }
    .ast-dept-result { grid-column: span 1; }
    .ast-arch-steps { grid-template-columns: 1fr; }
    .ast-cases-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .dept-tabs { gap: 8px; }
    .dept-tab { padding: 10px 18px; font-size: 14px; }
}
