/* ========== ОБЩИЕ СТИЛИ ДЛЯ СТРАНИЦ РЕШЕНИЙ ========== */

/* Hero секция страницы решения */
.solution-hero {
    padding: 20px 0 30px;
}

.solution-hero h1 {
    font-size: clamp(24px, 5vw, 36px);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.solution-hero .lead {
    font-size: clamp(15px, 3vw, 18px);
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 800px;
    margin-bottom: 24px;
}

/* Блок боли-решение */
.pain-solution-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.pain-box {
    padding: 20px;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--card-radius);
    border-left: 4px solid var(--danger);
}

.solution-box {
    padding: 20px;
    background: rgba(34, 211, 238, 0.05);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: var(--card-radius);
    border-left: 4px solid var(--accent);
}

.pain-box h3, .solution-box h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.pain-box h3 {
    color: var(--danger);
}

.solution-box h3 {
    color: var(--accent);
}

.pain-list, .solution-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pain-list li, .solution-list li {
    padding: 8px 0;
    font-size: 13px;
    line-height: 1.5;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    position: relative;
    padding-left: 20px;
}

.pain-list li:last-child, .solution-list li:last-child {
    border-bottom: none;
}

.pain-list li::before {
    content: "✗";
    position: absolute;
    left: 0;
    color: var(--danger);
}

.solution-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Галерея фотографий */
.solution-gallery {
    margin: 40px 0;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.gallery-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.gallery-counter {
    font-size: 13px;
    color: var(--text-muted);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 16/10;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-soft);
    border: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--accent);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.95), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.gallery-item-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Лайтбокс */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.98);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-caption {
    margin-top: 16px;
    text-align: center;
    color: var(--text-main);
    font-size: 14px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--text-main);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.lightbox-close:hover {
    background: var(--danger);
    color: white;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--text-main);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.lightbox-nav:hover {
    background: var(--accent);
    color: #0b1120;
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

/* Карточки решений */
.solution-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.solution-card-featured {
    padding: 24px;
    background: var(--bg-soft);
    border: 1px solid var(--border-subtle);
    border-radius: var(--card-radius);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.solution-card-featured::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-alt));
}

.solution-card-featured:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.8);
}

.solution-card-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.solution-card-featured h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-main);
}

.solution-card-featured p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.solution-card-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--accent);
}

/* Внешняя ссылка */
.external-link-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(168, 85, 247, 0.1));
    border: 1px solid var(--accent-border);
    border-radius: var(--card-radius);
    margin: 30px 0;
    transition: all 0.3s ease;
}

.external-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 60px rgba(34, 211, 238, 0.2);
}

.external-link-icon {
    font-size: 48px;
    flex-shrink: 0;
}

.external-link-content {
    flex: 1;
}

.external-link-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.external-link-content p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.external-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--accent);
    color: #0b1120;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
}

.external-link-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.5);
}

/* Процесс внедрения */
.implementation-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 30px 0;
}

.step-card {
    padding: 20px;
    background: var(--bg-soft);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.step-card:not(:last-child)::after {
    content: "→";
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--accent);
}

.step-number-large {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    margin: 0 auto 12px;
}

.step-card h4 {
    font-size: 14px;
    margin-bottom: 8px;
}

.step-card p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* CTA блок */
.solution-cta {
    padding: 32px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(168, 85, 247, 0.1));
    border: 1px solid var(--accent-border);
    border-radius: var(--card-radius);
    text-align: center;
    margin: 40px 0;
}

.solution-cta h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.solution-cta p {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Хлебные крошки */
.breadcrumbs {
    margin-bottom: 20px;
    font-size: 12px;
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--accent);
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: var(--text-main);
}

.breadcrumbs span {
    margin: 0 8px;
    color: var(--text-muted);
}

/* Демо-бот интерфейс */
.bot-demo-interface {
    background: var(--bg-soft);
    border: 1px solid var(--border-subtle);
    border-radius: var(--card-radius);
    overflow: hidden;
    margin: 30px 0;
}

.bot-demo-header {
    padding: 16px;
    background: rgba(34, 211, 238, 0.1);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-demo-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.bot-demo-info h4 {
    font-size: 14px;
    margin-bottom: 2px;
}

.bot-demo-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.bot-demo-chat {
    padding: 20px;
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
}

.bot-message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.bot-message.user {
    flex-direction: row-reverse;
}

.bot-message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 13px;
    line-height: 1.5;
}

.bot-message.bot .bot-message-bubble {
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-bottom-left-radius: 4px;
}

.bot-message.user .bot-message-bubble {
    background: var(--accent);
    color: #0b1120;
    border-bottom-right-radius: 4px;
}

/* Табы для демо */
.demo-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.demo-tab {
    padding: 10px 16px;
    background: var(--bg-soft);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
}

.demo-tab.active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.demo-tab:hover:not(.active) {
    border-color: var(--accent);
    color: var(--text-main);
}

.demo-content {
    display: none;
}

.demo-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Метрики решения */
.solution-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin: 30px 0;
}

.metric-card {
    padding: 20px;
    background: var(--bg-soft);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.metric-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.metric-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.metric-card-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* Интеграции */
.integration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.integration-item {
    padding: 16px;
    background: var(--bg-soft);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s;
}

.integration-item:hover {
    border-color: var(--accent);
}

.integration-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.integration-name {
    font-size: 12px;
    color: var(--text-muted);
}

/* ========== МОБИЛЬНАЯ АДАПТАЦИЯ ========== */

@media (max-width: 768px) {
    /* Фикс переполнения */
    html, body {
        overflow-x: hidden;
        max-width: 100%;
    }
    
    body {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Hero */
    .solution-hero h1 {
        font-size: 22px;
        line-height: 1.3;
        word-break: break-word;
    }
    
    .solution-hero .lead {
        font-size: 14px;
        line-height: 1.6;
        word-break: break-word;
    }
    
    /* Боль-решение */
    .pain-solution-block {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .pain-box, .solution-box {
        word-break: break-word;
        overflow-wrap: break-word;
        padding: 16px;
    }
    
    .pain-box h3, .solution-box h3 {
        font-size: 13px;
    }
    
    .pain-list li, .solution-list li {
        font-size: 13px;
        line-height: 1.5;
        padding-left: 18px;
    }
    
    /* Карточки */
    .solution-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .solution-card-featured {
        padding: 20px;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .solution-card-featured h3 {
        font-size: 15px;
    }
    
    .solution-card-featured p {
        font-size: 13px;
    }
    
    .solution-card-meta {
        flex-direction: column;
        gap: 4px;
    }
    
    /* Галерея */
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item {
        aspect-ratio: 4/3;
    }
    
    /* Метрики */
    .solution-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .metric-card {
        padding: 16px;
    }
    
    .metric-card-value {
        font-size: 24px;
    }
    
    .metric-card-label {
        font-size: 11px;
    }
    
    /* Шаги */
    .implementation-steps {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .step-card:not(:last-child)::after {
        content: "↓";
        right: 50%;
        top: auto;
        bottom: -16px;
        transform: translateX(50%);
    }
    
    .step-card {
        padding: 16px;
    }
    
    .step-number-large {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    /* Лайтбокс */
    .lightbox-prev {
        left: 10px;
        top: auto;
        bottom: 20px;
        transform: none;
    }
    
    .lightbox-next {
        right: 10px;
        top: auto;
        bottom: 20px;
        transform: none;
    }
    
    .lightbox-content {
        max-width: 95vw;
    }
    
    /* External link */
    .external-link-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .external-link-icon {
        font-size: 40px;
    }
    
    .external-link-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Интеграции */
    .integration-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .integration-item {
        padding: 12px;
    }
    
    .integration-icon {
        font-size: 24px;
    }
    
    .integration-name {
        font-size: 11px;
    }
    
    /* CTA */
    .solution-cta {
        padding: 24px 16px;
    }
    
    .solution-cta h3 {
        font-size: 18px;
    }
    
    .solution-cta p {
        font-size: 14px;
    }
    
    /* Табы */
    .demo-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        gap: 8px;
    }
    
    .demo-tab {
        font-size: 12px;
        padding: 8px 12px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* Breadcrumbs */
    .breadcrumbs {
        font-size: 11px;
        flex-wrap: wrap;
        gap: 4px;
        line-height: 1.5;
    }
    
    /* Bot demo */
    .bot-demo-interface {
        margin: 20px -12px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .bot-demo-header {
        padding: 12px;
    }
    
    .bot-demo-avatar {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .bot-demo-info h4 {
        font-size: 14px;
    }
    
    .bot-demo-info span {
        font-size: 11px;
    }
    
    .bot-demo-chat {
        padding: 16px;
        min-height: 250px;
    }
    
    .bot-message-bubble {
        max-width: 90%;
        font-size: 12px;
        line-height: 1.5;
    }
    
    /* Отключаем анимацию reveal на мобильных */
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    .solution-card-featured,
    .step-card,
    .metric-card,
    .gallery-item {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .solution-hero h1 {
        font-size: 20px;
    }
    
    .section {
        padding: 16px 12px;
    }
    
    .pain-box h3, .solution-box h3 {
        font-size: 12px;
    }
    
    .pain-list li, .solution-list li {
        font-size: 12px;
    }
    
    .solution-card-featured h3 {
        font-size: 14px;
    }
    
    .solution-card-icon {
        font-size: 28px;
    }
    
    .metric-card-value {
        font-size: 22px;
    }
    
    .step-card h4 {
        font-size: 13px;
    }
    
    .step-card p {
        font-size: 11px;
    }
    
    .integration-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
    .solution-hero h1 {
        font-size: 18px;
    }
    
    .metric-card-value {
        font-size: 20px;
    }
}
