/* ============================================
   CASE PAGE - HERO SECTION
   ============================================ */

.case-hero {
    padding: 140px 0 80px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.back-link {
    display: inline-block;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 30px;
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--accent-cyan);
}

.case-hero-content {
    max-width: 800px;
}


.case-badge {
    display: inline-block;           /* Было: block или flex */
    width: fit-content;              /* По ширине содержимого */
    width: -moz-fit-content;         /* Для Firefox */
    padding: 6px 16px;
    background: rgba(0, 217, 255, 0.15);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 20px;                       /* Убираем внешние отступы */
}

.case-hero-title {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.case-hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.case-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tech-item {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============================================
   CASE SECTIONS
   ============================================ */

.case-section {
    padding: 80px 0;
}

.case-section.alt-bg {
    background: var(--bg-secondary);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-grid {
    max-width: 1000px;
    margin: 0 auto;
}

/* ============================================
   INFO CARDS
   ============================================ */

.info-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.info-card {
    background: var(--bg-tertiary);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-medium);
}

.info-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
}

.info-icon {
    font-size: 40px;
    margin-bottom: 20px;
}

.info-card h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    margin-bottom: 12px;
}

.info-card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

/* ============================================
   WORKFLOW STEPS
   ============================================ */

.workflow-steps {
    max-width: 900px;
    margin: 0 auto;
}

.workflow-step {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.workflow-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    margin-bottom: 10px;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
}

/* ============================================
   WORKFLOW DIAGRAM
   ============================================ */

.workflow-diagram {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 60px;
    padding: 40px;
    background: var(--bg-tertiary);
    border-radius: 16px;
    overflow-x: auto;
}

.workflow-node {
    background: var(--bg-secondary);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    min-width: 140px;
    text-align: center;
    transition: all var(--transition-medium);
}

.workflow-node:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-5px);
}

.workflow-node.trigger { border-color: #FF6B6B; }
.workflow-node.parse { border-color: #4ECDC4; }
.workflow-node.process { border-color: #45B7D1; }
.workflow-node.ai { border-color: #96CEB4; }
.workflow-node.output { border-color: #FFEAA7; }

.node-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.node-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.node-desc {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.workflow-arrow {
    font-size: 24px;
    color: var(--text-tertiary);
}

/* ============================================
   MODULES LIST
   ============================================ */

.modules-list {
    max-width: 1000px;
    margin: 0 auto;
}

.modules-list h3 {
    font-family: var(--font-heading);
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.module-card {
    background: var(--bg-tertiary);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-medium);
}

.module-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-3px);
}

.module-card h4 {
    font-family: var(--font-heading);
    font-size: 18px;
    margin-bottom: 10px;
}

.module-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* ============================================
   CHAT CONTAINER
   ============================================ */

.chat-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.chat-window {
    background: var(--bg-tertiary);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 600px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message {
    display: flex;
    gap: 15px;
    max-width: 85%;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
}

.message-content {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 16px;
    border-top-left-radius: 4px;
}

.user-message .message-content {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border-top-left-radius: 16px;
    border-top-right-radius: 4px;
}

.message-content p {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-hint {
    font-size: 13px !important;
    color: var(--text-secondary) !important;
    font-style: italic;
}

.chat-input-area {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#chat-input {
    flex: 1;
    background: var(--bg-tertiary);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    resize: none;
    transition: border-color var(--transition-fast);
}

#chat-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

.send-btn {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border: none;
    border-radius: 12px;
    padding: 15px 25px;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 217, 255, 0.4);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Chat Info Sidebar */
.chat-info {
    background: var(--bg-tertiary);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: fit-content;
}

.chat-info h4 {
    font-family: var(--font-heading);
    font-size: 20px;
    margin-bottom: 20px;
}

.chat-info ol {
    padding-left: 20px;
    margin-bottom: 30px;
}

.chat-info li {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 8px;
}

.chat-limitations {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
}

.chat-limitations p {
    color: var(--text-secondary);
    font-size: 13px;
    font-family: var(--font-mono);
    margin-bottom: 8px;
}

.chat-limitations p:last-child {
    margin-bottom: 0;
}

/* Loading State */
.chat-messages.loading #chat-input {
    pointer-events: none;
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 15px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

/* ============================================
   BENEFITS GRID
   ============================================ */

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.benefit-card {
    background: var(--bg-tertiary);
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-medium);
}

.benefit-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-5px);
}

.benefit-number {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.benefit-text {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

/* ============================================
   CTA SECTION
   ============================================ */

.case-cta {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    text-align: center;
}

.case-cta h2 {
    font-family: var(--font-heading);
    font-size: 36px;
    margin-bottom: 15px;
}

.case-cta p {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* ============================================
   CASE NEURAL ICON (for card)
   ============================================ */

.case-neural-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
}

.case-neural-icon .neural-node {
    fill: var(--accent-cyan);
}

.case-neural-icon .neural-line {
    stroke: var(--accent-cyan);
    stroke-width: 1.5;
    opacity: 0.6;
}

.case-neural-icon .neural-pulse {
    fill: var(--accent-cyan);
    animation: neuralPulse 2s infinite;
}

.placeholder-label {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

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

@media (max-width: 1024px) {
    .chat-container {
        grid-template-columns: 1fr;
    }
    
    .chat-info {
        order: -1;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
    }
    
    .modules-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .case-hero-title {
        font-size: 36px;
    }
    
    .workflow-diagram {
        flex-direction: column;
    }
    
    .workflow-arrow {
        transform: rotate(90deg);
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
    }
    
    .chat-window {
        height: 500px;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .case-hero-title {
        font-size: 28px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .chat-input-area {
        flex-direction: column;
    }
    
    .send-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   SCROLLBAR STYLES
   ============================================ */

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

/* ============================================
   THINKING INDICATOR STYLES
   ============================================ */

.thinking-message {
    animation: fadeIn 0.3s ease;
}

.thinking-content {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 16px;
    padding: 20px;
    max-width: 90%;
}

.thinking-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.5;
}

.thinking-text strong {
    color: var(--accent-cyan);
}

/* Прогресс-шаги */
.thinking-steps {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.step {
    padding: 6px 12px;
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    transition: all 0.3s ease;
}

.step.active {
    background: rgba(0, 217, 255, 0.2);
    color: var(--accent-cyan);
    border: 1px solid var(--accent-cyan);
}

/* Анимация точек */
.thinking-animation {
    display: flex;
    gap: 5px;
    justify-content: center;
    padding: 10px 0;
}

.thinking-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: thinkingBounce 1.4s infinite ease-in-out both;
}

.thinking-dot:nth-child(1) { animation-delay: 0s; }
.thinking-dot:nth-child(2) { animation-delay: 0.2s; }
.thinking-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes thinkingBounce {
    0%, 80%, 100% { 
        transform: scale(0.8); 
        opacity: 0.5;
    }
    40% { 
        transform: scale(1.2); 
        opacity: 1;
    }
}

/* Плавное появление/исчезновение */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Состояние ошибки в сообщении */
.message-content .error-text {
    color: #ff6b6b;
    font-weight: 500;
}

/* Адаптив */
@media (max-width: 768px) {
    .thinking-steps {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .step {
        width: 100%;
        text-align: center;
    }
}
/* ============================================
   SOURCE LINK STYLES
   ============================================ */

.message-source {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
}

.source-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.source-link {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
    display: inline-block;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.source-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.source-meta {
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 12px;
    margin-left: auto;
}

/* Адаптив для мобильных */
@media (max-width: 480px) {
    .message-source {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .source-link {
        max-width: 100%;
        word-break: break-all;
    }
    
    .source-meta {
        margin-left: 0;
        width: 100%;
        text-align: right;
    }
}

/* Тёмная тема — подсветка ссылки */
.message-source:hover .source-link {
    color: var(--accent-purple);
}

/* ============================================
   MESSAGE CONTENT STYLES
   ============================================ */

.message-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
}

.message-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.message-text em {
    color: var(--text-secondary);
    font-style: italic;
}

.message-text code {
    background: rgba(0, 217, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--accent-cyan);
}

/* Ошибка в сообщении */
.error-text {
    color: #ff6b6b;
    font-weight: 500;
    line-height: 1.6;
}

/* Информационное сообщение (нет результатов) */
.message-info {
    background: rgba(123, 47, 255, 0.1);
    border: 1px solid var(--accent-purple);
    border-radius: 12px;
    padding: 20px;
    margin: 5px 0;
}

.message-info p {
    margin: 0 0 15px 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Кнопка повтора */
.retry-btn {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--accent-cyan);
    border-radius: 8px;
    color: var(--accent-cyan);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.retry-btn:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

.retry-btn:active {
    transform: translateY(0);
}

/* Изображение в сообщении */
.message-image {
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-secondary);
    display: inline-block;
    max-width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.message-image img {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

.message-image .image-error {
    padding: 25px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    line-height: 1.6;
}

.message-image .image-error small {
    display: block;
    margin-top: 8px;
    font-family: var(--font-mono);
    word-break: break-all;
}

/* Источник новости */
.message-source {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

.source-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.source-link {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
    display: inline-block;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.source-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.source-meta {
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 13px;
    margin-left: auto;
    flex-shrink: 0;
}

/* Мета-информация сообщения */
.message-meta {
    display: block;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 12px;
}

/* Адаптив для мобильных */
@media (max-width: 480px) {
    .message-source {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .source-link {
        max-width: 100%;
        word-break: break-all;
        white-space: normal;
    }
    
    .source-meta {
        margin-left: 0;
        width: 100%;
        text-align: right;
        order: 3;
    }
    
    .message-image img {
        max-height: 300px;
    }
    
    .retry-btn {
        width: 100%;
        justify-content: center;
    }
    
    .message-info {
        padding: 15px;
    }
}

/* Тёмная тема — ховер-эффекты */
.message:hover .source-link {
    color: var(--accent-purple);
}

.message-image:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.15);
}

/* ============================================
   NEWS DIVIDER
   ============================================ */

.news-divider {
    margin: 30px 0;
}

.news-divider hr {
    border: none;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    margin: 0;
}

/* Адаптив для мобильных */
@media (max-width: 480px) {
    .news-divider {
        margin: 20px 0;
    }
}

/* ============================================
   HELPER FUNCTION
   ============================================ */

   .news-divider { margin: 25px 0; }
.news-divider hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.message-info {
    background: rgba(123, 47, 255, 0.1);
    border: 1px solid var(--accent-purple);
    border-radius: 12px;
    padding: 20px;
    margin: 10px 0;
}
.message-info p { margin: 0 0 15px 0; color: var(--text-secondary); }
.retry-btn {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--accent-cyan);
    border-radius: 8px;
    color: var(--accent-cyan);
    cursor: pointer;
    transition: all 0.2s;
}
.retry-btn:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
}

/* ============================================
   WORKFLOW SCREENSHOT
   ============================================ */

.workflow-screenshot {
    background: var(--bg-tertiary);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.workflow-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.workflow-caption {
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 14px;
    font-style: italic;
}

/* Адаптив */
@media (max-width: 768px) {
    .workflow-screenshot {
        padding: 20px;
        overflow-x: auto;
    }
    
    .workflow-image {
        max-width: 100%;
    }
}

/* ============================================
   NEURAL INFO ICONS
   ============================================ */

.info-icon.neural-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-svg {
    width: 100%;
    height: 100%;
}

/* Узлы и линии */
.icon-node {
    fill: var(--accent-cyan);
    transition: all var(--transition-medium);
}

.icon-line {
    stroke: var(--accent-cyan);
    stroke-width: 1.5;
    opacity: 0.6;
}

.icon-line-text {
    stroke: var(--text-secondary);
    stroke-width: 2;
    stroke-linecap: round;
}

/* Документ */
.icon-doc {
    fill: none;
    stroke: var(--accent-cyan);
    stroke-width: 2;
}

/* Искра ИИ */
.icon-spark {
    fill: var(--accent-purple);
    filter: drop-shadow(0 0 4px var(--accent-purple));
}

/* Изображение */
.icon-frame {
    fill: none;
    stroke: var(--accent-cyan);
    stroke-width: 2;
}

.icon-mountain {
    fill: var(--accent-cyan);
    opacity: 0.3;
}

.icon-sun {
    fill: var(--accent-purple);
    filter: drop-shadow(0 0 6px var(--accent-purple));
}

.icon-ray {
    stroke: var(--accent-purple);
    stroke-width: 2;
    stroke-linecap: round;
    opacity: 0.8;
}

/* Пульсация */
.icon-pulse {
    fill: var(--accent-cyan);
    animation: iconPulse 2s infinite;
    opacity: 0.5;
}

.icon-pulse-small {
    fill: var(--accent-purple);
    animation: iconPulse 1.5s infinite;
    opacity: 0.6;
}

@keyframes iconPulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.5; 
    }
    50% { 
        transform: scale(1.3); 
        opacity: 0.9; 
    }
}

/* Ховер-эффект */
.info-card:hover .icon-node {
    fill: var(--accent-purple);
}

.info-card:hover .icon-line {
    stroke: var(--accent-purple);
    opacity: 0.9;
}

.info-card:hover .icon-spark,
.info-card:hover .icon-sun {
    filter: drop-shadow(0 0 8px var(--accent-cyan));
}

/* Адаптив */
@media (max-width: 768px) {
    .info-icon.neural-icon {
        width: 50px;
        height: 50px;
    }
}

/* ============================================
   MODULE CARDS WITH NEURAL ICONS
   ============================================ */

.module-icon.neural-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Webhook - стрелка вниз + коробка */
.icon-arrow-down {
    fill: none;
    stroke: var(--accent-cyan);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-box {
    fill: none;
    stroke: var(--accent-cyan);
    stroke-width: 2;
}

/* AI Agent - мозг + узлы */
.icon-brain {
    fill: var(--accent-purple);
    opacity: 0.3;
    stroke: var(--accent-purple);
    stroke-width: 2;
}

/* Code - фон кода */
.icon-code-bg {
    fill: var(--bg-secondary);
    stroke: var(--accent-cyan);
    stroke-width: 2;
}

.icon-bracket {
    fill: none;
    stroke: var(--accent-cyan);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* HTTP Request - глобус */
.icon-globe {
    fill: none;
    stroke: var(--accent-cyan);
    stroke-width: 2;
}

.icon-globe-line {
    fill: none;
    stroke: var(--accent-cyan);
    stroke-width: 1.5;
    opacity: 0.6;
}

.icon-send {
    fill: none;
    stroke: var(--accent-purple);
    stroke-width: 2;
    stroke-linecap: round;
}

/* Document */
.icon-doc {
    fill: none;
    stroke: var(--accent-cyan);
    stroke-width: 2;
}

/* If - фильтр/воронка */
.icon-filter {
    fill: none;
    stroke: var(--accent-cyan);
    stroke-width: 2;
    stroke-linejoin: round;
}

.icon-true, .icon-false {
    fill: none;
    stroke: var(--accent-cyan);
    stroke-width: 2;
    stroke-linecap: round;
}

/* Chat/AI */
.icon-chat {
    fill: none;
    stroke: var(--accent-cyan);
    stroke-width: 2;
}

.icon-ai-spark {
    fill: var(--accent-purple);
    filter: drop-shadow(0 0 4px var(--accent-purple));
}

/* Filter circle */
.icon-filter-circle {
    fill: none;
    stroke: var(--accent-purple);
    stroke-width: 2;
}

/* Image generation */
.icon-image-frame {
    fill: none;
    stroke: var(--accent-cyan);
    stroke-width: 2;
}

.icon-mountains {
    fill: var(--accent-cyan);
    opacity: 0.3;
}

.icon-sun {
    fill: var(--accent-purple);
    filter: drop-shadow(0 0 6px var(--accent-purple));
}

/* Merge/Assembly */
.icon-merge {
    fill: none;
    stroke: var(--accent-cyan);
    stroke-width: 2;
}

.icon-input {
    fill: var(--accent-cyan);
    opacity: 0.6;
}

.icon-output {
    fill: var(--accent-purple);
    opacity: 0.8;
}

/* Callback */
.icon-callback {
    fill: none;
    stroke: var(--accent-cyan);
    stroke-width: 2;
}

.icon-return {
    fill: none;
    stroke: var(--accent-purple);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Hover effects */
.module-card:hover .icon-node,
.module-card:hover .icon-input,
.module-card:hover .icon-output {
    fill: var(--accent-purple);
}

.module-card:hover .icon-brain,
.module-card:hover .icon-ai-spark,
.module-card:hover .icon-sun {
    filter: drop-shadow(0 0 8px var(--accent-cyan));
}

.module-card:hover .icon-pulse {
    animation-duration: 1s;
}

/* ============================================
   ASTRO AI SPECIFIC STYLES
   ============================================ */

/* Expert evaluation */
.expert-evaluation {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}

.evaluation-score {
    flex-shrink: 0;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.3);
}

.score-value {
    font-size: 42px;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.score-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 5px;
}

.evaluation-criteria {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.criterion {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.criterion-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.criterion-content h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.criterion-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Адаптив */
@media (max-width: 768px) {
    .expert-evaluation {
        flex-direction: column;
        text-align: center;
    }
    
    .score-circle {
        margin: 0 auto;
    }
    
    .criterion {
        text-align: left;
    }
}

/* ============================================
   ADVANTAGES HERO (синхронизировано с workflow)
   ============================================ */

.advantages-hero {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 50px;
    border-radius: 16px;
    overflow: hidden;
    border: 30px solid var(--bg-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    /* Такая же высота как workflow-image */
    aspect-ratio: 16 / 9;
}

.advantages-hero .hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.advantages-hero:hover .hero-image {
    transform: scale(1.02);
}

.advantages-hero .hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
    display: flex;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.advantages-hero:hover .hero-overlay {
    opacity: 1;
}

.advantages-hero .hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.4);
}

.advantages-hero .hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 217, 255, 0.6);
}

.advantages-hero .hero-btn svg {
    transition: transform 0.3s ease;
}

.advantages-hero .hero-btn:hover svg {
    transform: translateX(6px);
}

/* Убираем лишние отступы у контейнера */
.advantages-slider-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

/* ============================================
   АДАПТИВ (синхронизирован)
   ============================================ */

@media (max-width: 1024px) {
    .workflow-image,
    .advantages-hero {
        aspect-ratio: 16 / 9;
    }
    
    .advantages-hero .hero-overlay {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .workflow-screenshot,
    .advantages-hero {
        border-radius: 12px;
        margin-bottom: 30px;
    }
    
    .workflow-image,
    .advantages-hero {
        aspect-ratio: 4 / 3;
    }
    
    .advantages-hero .hero-overlay {
        padding: 20px;
    }
    
    .advantages-hero .hero-btn {
        padding: 14px 24px;
        font-size: 14px;
    }
}

/* ============================================
   SLIDER STYLES (остальные стили слайдера)
   ============================================ */

.advantages-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 217, 255, 0.1);
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    color: var(--accent-cyan);
}

.slider-arrow:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    transform: translateY(-50%) scale(1.1);
}

.slider-arrow-left {
    left: -30px;
}

.slider-arrow-right {
    right: -30px;
}

.slider-arrow svg {
    width: 28px;
    height: 28px;
}

.advantages-slider {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.advantages-track {
    display: flex;
    gap: 30px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.advantage-slide {
    flex: 0 0 calc(33.333% - 20px);
    min-width: 0;
}

.advantage-card {
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    cursor: pointer;
}

.advantage-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 217, 255, 0.3);
    box-shadow: 0 12px 40px rgba(0, 217, 255, 0.15);
}

.advantage-card-icon {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1;
}

.advantage-card h4 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.3;
}

.advantage-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
    flex: 1;
}

/* Hide scrollbar */
.advantages-slider::-webkit-scrollbar {
    display: none;
}

.advantages-slider {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

@media (max-width: 1024px) {
    .advantage-slide {
        flex: 0 0 calc(50% - 15px);
    }
    
    .slider-arrow {
        width: 50px;
        height: 50px;
    }
    
    .slider-arrow svg {
        width: 24px;
        height: 24px;
    }
    
    .slider-arrow-left {
        left: -10px;
    }
    
    .slider-arrow-right {
        right: -10px;
    }
}

@media (max-width: 768px) {
    .advantage-slide {
        flex: 0 0 100%;
    }
    
    .advantage-card {
        aspect-ratio: auto;
        min-height: 280px;
    }
    
    .slider-arrow {
        display: none;
    }
    
    .advantages-slider-wrapper {
        gap: 0;
    }
}

/* ============================================
   TECH DETAILS SECTION - ИСПРАВЛЕННАЯ ВЕРСИЯ
   ============================================ */

.tech-details {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; /* Строго 3 колонки */
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: stretch;  /* Все блоки одинаковой высоты */
}

.tech-block {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-medium);
    display: flex;
    flex-direction: column;
  
    min-width: 0; 
}

.tech-block:hover {
    border-color: rgba(0, 217, 255, 0.3);
    box-shadow: 0 8px 30px rgba(0, 217, 255, 0.1);
    transform: translateY(-4px);
}

.tech-block h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

/* Code block растягивается на всю доступную высоту */
.code-block {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(0, 217, 255, 0.1);
    flex: 1;  /* Занимает всё доступное пространство */
    overflow-x: hidden;
    min-height: 200px;  /* Минимальная высота для компактных блоков */
}

.code-block pre {
    margin: 0;
    font-family: var(--font-mono, 'Fira Code', 'Courier New', monospace);
    font-size: 13px;
    line-height: 1;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: none;
}

.code-line {
    display: block;
    margin-bottom: 4px;
    white-space: normal;
    word-break: normal;
}

/* Адаптив */
@media (max-width: 900px) {
    .tech-details {
        grid-template-columns: repeat(2, 1fr);  /* 2 колонки на планшете */
        gap: 20px;
    }
    
    .tech-block {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .tech-details {
        grid-template-columns: 1fr;  /* 1 колонка на мобильном */
        gap: 16px;
    }
}

/* ============================================
   MELANOSCOPE SPECIFIC STYLES
   ============================================ */

/* Fund support section */
.fund-support {
    margin: 30px 0;
    text-align: center;
}

.fund-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 500;
}

.fund-logo {
    display: inline-block;
    max-width: 300px;
}

.fund-logo img {
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.certificate-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-align: center;
}

.certificate-container {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.certificate-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.certificate-caption {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Metrics grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.metric-card {
    text-align: center;
    padding: 40px 30px;
    background: var(--bg-primary);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-medium);
}

.metric-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 217, 255, 0.3);
    box-shadow: 0 12px 40px rgba(0, 217, 255, 0.15);
}

.metric-value {
    font-size: 56px;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 16px;
    line-height: 1;
}

.metric-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.metric-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* Advantages 4 columns */
.advantages-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 50px;
}

.advantage-card-4 {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 30px 24px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-medium);
}

.advantage-card-4:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 217, 255, 0.3);
    box-shadow: 0 8px 30px rgba(0, 217, 255, 0.1);
}

.advantage-icon-4 {
    font-size: 40px;
    margin-bottom: 16px;
}

.advantage-card-4 h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.advantage-card-4 p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Modules 2x2 grid */
.modules-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.module-box {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-medium);
}

.module-box:hover {
    border-color: rgba(0, 217, 255, 0.3);
    box-shadow: 0 8px 30px rgba(0, 217, 255, 0.1);
}

.module-box-icon {
    font-size: 36px;
    margin-bottom: 16px;
}

.module-box h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.module-box p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* Process diagram */
.process-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-top: 50px;
    padding: 50px;
    background: var(--bg-secondary);
    border-radius: 16px;
}

.process-step {
    text-align: center;
}

.step-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.step-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.step-icons {
    font-size: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.process-arrow {
    font-size: 32px;
    color: var(--accent-cyan);
    font-weight: bold;
}

.system-response {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: 12px;
}

.response-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.response-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 14px;
}

.result-label {
    color: var(--text-secondary);
}

.result-value {
    font-weight: 600;
    font-family: var(--font-mono);
}

.result-value.high {
    color: #4ADE80;
}

.result-value.low {
    color: var(--text-secondary);
}

/* Screenshots grid */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.screenshot-item {
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-medium);
}

.screenshot-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.screenshot-image {
    width: 100%;
    height: auto;
    display: block;
}

.screenshot-caption {
    padding: 16px;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin: 0;
}

/* Адаптив */
@media (max-width: 1024px) {
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .advantages-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modules-grid-2x2 {
        grid-template-columns: 1fr;
    }
    
    .screenshots-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .fund-logo {
        max-width: 200px;
    }
    
    .certificate-section {
        padding: 24px;
    }
    
    .metric-value {
        font-size: 42px;
    }
    
    .advantages-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .advantage-card-4 {
        padding: 24px 20px;
    }
    
    .process-diagram {
        padding: 30px 20px;
    }
    
    .system-response {
        flex-direction: column;
    }
    
    .response-image {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .metric-value {
        font-size: 36px;
    }
    
    .step-icons {
        font-size: 24px;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ============================================
   MELANOSCOPE ADVANTAGES - NEURAL STYLE
   ============================================ */

.melano-advantages {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 50px;
}

.melano-advantage {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 32px 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-medium);
    text-align: center;
}

.melano-advantage:hover {
    border-color: rgba(0, 217, 255, 0.3);
    box-shadow: 0 8px 30px rgba(0, 217, 255, 0.1);
    transform: translateY(-6px);
}

.melano-icon.neural-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.neural-svg {
    width: 100%;
    height: 100%;
}

.neural-node {
    fill: var(--accent-cyan);
    transition: all var(--transition-medium);
}

.neural-line {
    stroke: var(--accent-cyan);
    stroke-width: 1.5;
    opacity: 0.6;
    transition: all var(--transition-medium);
}

.neural-pulse {
    fill: var(--accent-cyan);
    animation: neuralPulse 2s ease-in-out infinite;
    opacity: 0.4;
}

@keyframes neuralPulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.4; 
    }
    50% { 
        transform: scale(1.6); 
        opacity: 0.9; 
    }
}

.melano-advantage h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.melano-advantage p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* Hover effects */
.melano-advantage:hover .neural-node {
    fill: var(--accent-purple);
}

.melano-advantage:hover .neural-line {
    stroke: var(--accent-purple);
    opacity: 0.9;
}

/* Адаптив */
@media (max-width: 1024px) {
    .melano-advantages {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .melano-advantages {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .melano-icon.neural-icon {
        width: 80px;
        height: 80px;
    }
    
    .melano-advantage h3 {
        font-size: 16px;
    }
    
    .melano-advantage p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .melano-advantage {
        padding: 28px 20px;
    }
    
    .melano-icon.neural-icon {
        width: 70px;
        height: 70px;
    }
}

/* ============================================
   INTERFACES LAYOUT - 2 COLUMNS
   ============================================ */

.interfaces-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;  /* Пропорции: левая 0.8, правая 1.2 */
    gap: 40px;
    margin-top: 50px;
    align-items: start;
}

.interface-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Mobile column */
.mobile-column {
    align-items: center;
}

.mobile-screenshot {
    max-width: 320px;
    margin: 0 auto;
}

/* Web column */
.web-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.web-screenshot {
    width: 100%;
}

/* Screenshot styling */
.screenshot-item {
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-medium);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.screenshot-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 217, 255, 0.15);
    border-color: rgba(0, 217, 255, 0.3);
}

.screenshot-image {
    width: 100%;
    height: auto;
    display: block;
}

.screenshot-caption {
    padding: 16px;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin: 0;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Адаптив */
@media (max-width: 1024px) {
    .interfaces-layout {
        grid-template-columns: 1fr;  /* 1 колонка на планшете */
        gap: 30px;
    }
    
    .mobile-column {
        align-items: center;
    }
    
    .mobile-screenshot {
        max-width: 280px;
    }
}

@media (max-width: 768px) {
    .interfaces-layout {
        gap: 24px;
        margin-top: 40px;
    }
    
    .mobile-screenshot {
        max-width: 260px;
    }
    
    .screenshot-caption {
        font-size: 13px;
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .mobile-screenshot {
        max-width: 100%;
    }
    
    .screenshot-item {
        border-radius: 12px;
    }
    
    .screenshot-caption {
        font-size: 12px;
        padding: 12px;
    }
}

/* ============================================
   MELANOSCOPE CASE HERO - UNIQUE STYLES
   ============================================ */

.melano-hero-layout {
    display: grid;
    grid-template-columns: 0.7fr 0.3fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 30px;
}

.melano-hero-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.melano-hero-right {
    align-items: center;
    justify-content: flex-end;
}

.melano-hero-title {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin: 0;
}

.melano-hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    max-width: 600px;
}

.melano-fund-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 500;
    line-height: 1.4;
}

.melano-fund-logo {
    max-width: 200px;
}

.melano-fund-logo img {
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    transition: opacity var(--transition-fast);
}

.melano-fund-logo img:hover {
    opacity: 1;
}

/* Адаптив для заголовка */
@media (max-width: 1024px) {
    .melano-hero-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .melano-hero-right {
        justify-content: flex-start;
    }
    
    .melano-fund-support {
        text-align: left;
    }
    
    .melano-fund-logo {
        max-width: 180px;
    }
}

@media (max-width: 768px) {
    .melano-hero-layout {
        gap: 24px;
        margin-bottom: 24px;
    }
    
    .melano-hero-title {
        font-size: 36px;
    }
    
    .melano-hero-subtitle {
        font-size: 16px;
    }
    
    .melano-fund-label {
        font-size: 12px;
    }
    
    .melano-fund-logo {
        max-width: 160px;
    }
}

@media (max-width: 480px) {
    .melano-hero-title {
        font-size: 28px;
    }
    
    .melano-hero-subtitle {
        font-size: 14px;
    }
    
    .melano-fund-logo {
        max-width: 140px;
    }
}

/* ============================================
   MELANOSCOPE ABOUT SECTION - 2 COLUMNS
   ============================================ */

.melano-about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: start;
    margin-top: 50px;
}

.melano-about-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.melano-lead {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0;
}

.melano-certificate-section {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 16px;
    border: 2px solid rgba(0, 217, 255, 0.2);
    position: sticky;
}


.melano-certificate-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

.melano-certificate-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.melano-certificate-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.melano-certificate-caption {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
    margin: 0;
}

/* Адаптив для меланоскопа */
@media (max-width: 1024px) {
    .melano-about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .melano-certificate-section {
        position: static;
    }
}

@media (max-width: 768px) {
    .melano-about-grid {
        gap: 30px;
        margin-top: 40px;
    }
    
    .melano-certificate-section {
        padding: 24px;
    }
    
    .melano-certificate-title {
        font-size: 16px;
    }
}

/* ============================================
   MELANOSCOPE MODULES GRID - NO ANIMATION
   ============================================ */

.melano-modules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.melano-module-box {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 32px 28px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-medium);
    text-align: center;
}

.melano-module-box:hover {
    border-color: rgba(0, 217, 255, 0.3);
    box-shadow: 0 8px 30px rgba(0, 217, 255, 0.1);
    transform: translateY(-6px);
}

.melano-module-icon.neural-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.neural-svg {
    width: 100%;
    height: 100%;
}

.neural-node {
    fill: var(--accent-cyan);
    transition: all var(--transition-medium);
}

.neural-line {
    stroke: var(--accent-cyan);
    stroke-width: 1.5;
    opacity: 0.6;
    transition: all var(--transition-medium);
}

/* Убрано: animation и opacity для neural-pulse */
.neural-pulse {
    fill: var(--accent-cyan);
}

.melano-module-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.melano-module-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* Hover effects - смена цвета */
.melano-module-box:hover .neural-node {
    fill: var(--accent-purple);
}

.melano-module-box:hover .neural-line {
    stroke: var(--accent-purple);
    opacity: 0.9;
}

/* Адаптив */
@media (max-width: 1024px) {
    .melano-modules-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .melano-module-icon.neural-icon {
        width: 90px;
        height: 90px;
    }
}

@media (max-width: 768px) {
    .melano-modules-grid {
        gap: 20px;
        margin-top: 40px;
    }
    
    .melano-module-box {
        padding: 28px 24px;
    }
    
    .melano-module-icon.neural-icon {
        width: 80px;
        height: 80px;
    }
    
    .melano-module-title {
        font-size: 17px;
    }
    
    .melano-module-text {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .melano-module-box {
        padding: 24px 20px;
    }
    
    .melano-module-icon.neural-icon {
        width: 70px;
        height: 70px;
    }
    
    .neural-node {
        r: 2;
    }
    
    .neural-line {
        stroke-width: 1.2;
    }
}

/* Кнопка копирования */
.rec-btn.copy {
    background: var(--accent-green);
    color: var(--bg-primary);
}

.rec-btn.copy:hover:not(:disabled) {
    background: var(--accent-green-hover);
    transform: translateY(-2px);
}

.rec-btn.copy:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.rec-btn.copy.copied {
    background: var(--accent-cyan);
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ============================================
RAG SYSTEM PAGE - SPECIFIC STYLES
============================================ */

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.feature-item {
    background: var(--bg-secondary);
    padding: 35px 30px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-medium);
}

.feature-item:hover {
    border-color: rgba(0, 217, 255, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.1);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.feature-item h4 {
    font-family: var(--font-heading);
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-item p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Examples Grid */
.examples-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.example-card {
    background: var(--bg-secondary);
    padding: 35px;
    border-radius: 16px;
    border-left: 4px solid var(--accent-cyan);
}

.example-card h4 {
    font-family: var(--font-heading);
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.example-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 10px;
}

.example-card strong {
    color: var(--accent-cyan);
    font-weight: 600;
}

/* ============================================
RESULTS SECTION - FIXED
============================================ */
.results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.result-item {
    text-align: center;
    padding: 40px 25px;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(123, 47, 255, 0.1));
    border-radius: 16px;
    border: 1px solid rgba(0, 217, 255, 0.2);
    transition: all var(--transition-medium);
}

.result-item:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 217, 255, 0.4);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.2);
}

.result-number {
    font-family: var(--font-heading);
    font-size: 36px;  /* Уменьшено с 48px */
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    line-height: 1.2;
}

.result-label {
    font-size: 14px;  /* Уменьшено с 16px */
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================
VIDEO SHOWCASE SECTION - RUTUBE EMBED
============================================ */
.video-showcase {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 50px;
}

.video-showcase-item {
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-medium);
}

.video-showcase-item:hover {
    border-color: rgba(0, 217, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 217, 255, 0.1);
}

/* Контейнер для видео с соотношением 16:9 */
.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ============================================
RESPONSIVE - VIDEO
============================================ */
@media (max-width: 1024px) {
    .video-showcase {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .video-showcase {
        gap: 25px;
    }
}



/* ============================================
RESPONSIVE - RESULTS 
============================================ */
@media (max-width: 1024px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .result-number {
        font-size: 32px;
    }
    
}

@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .result-item {
        padding: 30px 20px;
    }
    
    .result-number {
        font-size: 28px;
    }
    
    .result-label {
        font-size: 13px;
    }
   
}

@media (max-width: 480px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .result-number {
        font-size: 32px;
    }
    
}

/* Responsive */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
    }
    

}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    

}

