/*
 * Services — Technologies
 * Figma: desktop 819:5921, tablet 851:9917, mobile 851:11142
 */

.services-technologies {
    --st-accent: #00d16e;
    --st-border: rgba(255, 255, 255, 0.15);
    --st-text: #ffffff;
    --st-muted: rgba(255, 255, 255, 0.7);
    --st-nav-width: min(472px, 42vw);
    --st-gap: 32px;
    --st-section-pad-y: 80px;
    --st-section-pad-x: 16px;
    --st-title-size: 32px;
    --st-heading-size: 24px;
    --st-body-size: 18px;
    --st-grid-gap: 24px 16px;
    --st-icon: 40px;

    position: relative;
    overflow: hidden;
    background: #000000;
    color: var(--st-text);
    padding: var(--st-section-pad-y) var(--st-section-pad-x);
}

.services-technologies__glow {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    width: min(520px, 95vw);
    height: min(360px, 60vw);
    bottom: -80px;
    right: -100px;
    background: radial-gradient(
        circle at 60% 60%,
        rgba(0, 209, 110, 0.35) 0%,
        rgba(0, 107, 130, 0.12) 45%,
        transparent 70%
    );
    filter: blur(80px);
    opacity: 0.9;
}

.services-technologies__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--akdev-content-max, 1440px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--st-gap);
}

.services-technologies__title {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: var(--st-title-size);
    line-height: 1.2;
    color: var(--st-text);
    text-align: center;
}

.services-technologies__layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

/* ——— Desktop nav (≥1200px) ——— */
.services-technologies__nav {
    display: none;
    flex-direction: column;
    flex: 0 0 var(--st-nav-width);
    min-width: 0;
}

.services-technologies__nav-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 16px 20px;
    border: none;
    border-bottom: 1px solid var(--st-border);
    background: transparent;
    color: var(--st-text);
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.services-technologies__nav-btn:first-child {
    border-top: 1px solid var(--st-border);
}

.services-technologies__nav-btn:hover,
.services-technologies__nav-btn:focus-visible {
    background: var(--st-accent);
    outline: none;
}

.services-technologies__nav-btn.is-active {
    background: var(--st-accent);
}

/*
 * Неактивная строка при :hover/:focus получает зелёный фон до смены .is-active в JS.
 * Иконка «↗» была того же цвета, что и фон — стрелка пропадала. Показываем «→» в белом, как у .is-active.
 */
.services-technologies__nav-btn:not(.is-active):hover .services-technologies__nav-icon--idle,
.services-technologies__nav-btn:not(.is-active):focus-visible .services-technologies__nav-icon--idle {
    display: none;
}

.services-technologies__nav-btn:not(.is-active):hover .services-technologies__nav-icon--active,
.services-technologies__nav-btn:not(.is-active):focus-visible .services-technologies__nav-icon--active {
    display: flex;
    color: var(--st-text);
}

.services-technologies__nav-label {
    flex: 1;
    min-width: 0;
}

.services-technologies__nav-icon {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    display: none;
    align-items: center;
    justify-content: center;
    color: currentColor;
    pointer-events: none;
}

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

.services-technologies__nav-btn.is-active .services-technologies__nav-icon--idle {
    display: none;
}

.services-technologies__nav-btn.is-active .services-technologies__nav-icon--active {
    display: flex;
}

.services-technologies__nav-btn:not(.is-active) .services-technologies__nav-icon--idle {
    display: flex;
    color: var(--st-accent);
}

.services-technologies__nav-btn:not(.is-active) .services-technologies__nav-icon--active {
    display: none;
}

/* ——— Panels ——— */
.services-technologies__panels {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.services-technologies__panel {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid var(--st-border);
}

.services-technologies__panel:first-of-type {
    border-top: 1px solid var(--st-border);
}

.services-technologies__trigger {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 16px 0;
    border: none;
    background: transparent;
    color: var(--st-text);
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
}

.services-technologies__trigger:focus-visible {
    outline: 2px solid var(--st-accent);
    outline-offset: 2px;
}

.services-technologies__trigger-label {
    flex: 1;
}

.services-technologies__trigger-icon {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

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

.services-technologies__panel:not(.is-open) .services-technologies__trigger-icon--active {
    display: none;
}

.services-technologies__panel:not(.is-open) .services-technologies__trigger-icon--idle {
    display: flex;
    color: var(--st-accent);
}

.services-technologies__panel.is-open .services-technologies__trigger {
    background: var(--st-accent);
    padding: 16px 16px;
    margin: 0 -16px;
    width: calc(100% + 32px);
}

.services-technologies__panel.is-open .services-technologies__trigger-icon--idle {
    display: none;
}

.services-technologies__panel.is-open .services-technologies__trigger-icon--active {
    display: flex;
    color: var(--st-text);
}

.services-technologies__panel-body {
    padding: 24px 0 32px;
}

.services-technologies__panel:not(.is-open) .services-technologies__panel-body {
    display: none;
}

.services-technologies__heading {
    margin: 0 0 12px;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: var(--st-heading-size);
    line-height: 1.2;
    color: var(--st-text);
}

.services-technologies__subtitle {
    margin: 0 0 24px;
    font-family: 'Manrope', sans-serif;
    font-weight: 400;
    font-size: var(--st-body-size);
    line-height: 1.5;
    color: var(--st-muted);
}

.services-technologies__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--st-grid-gap);
    align-items: start;
}

.services-technologies__grid-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.services-technologies__icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--st-icon);
    height: var(--st-icon);
    flex-shrink: 0;
}

.services-technologies__icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.services-technologies__item-name {
    flex: 1 1 auto;
    min-width: 0;
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.3;
    color: var(--st-text);
}

.services-technologies__empty {
    margin: 0;
    color: var(--st-muted);
    font-size: 16px;
}

/* Tablet: title left, slightly wider padding; сетка технологий — 3 колонки */
@media (min-width: 768px) {
    .services-technologies {
        --st-section-pad-x: 40px;
        --st-title-size: 40px;
        --st-heading-size: 28px;
    }

    .services-technologies__title {
        text-align: left;
    }

    .services-technologies__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .services-technologies__panel.is-open .services-technologies__trigger {
        margin: 0 calc(-1 * var(--st-section-pad-x));
        width: calc(100% + 2 * var(--st-section-pad-x));
        padding-left: var(--st-section-pad-x);
        padding-right: var(--st-section-pad-x);
    }
}

/* Desktop: two columns, tabs + single panel */
@media (min-width: 1200px) {
    .services-technologies {
        --st-section-pad-x: 120px;
        --st-gap: 48px;
    }

    .services-technologies__title {
        text-align: left;
    }

    .services-technologies__layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 100px;
    }

    .services-technologies__nav {
        display: flex;
        position: relative;
        z-index: 2;
    }

    .services-technologies__panels {
        position: relative;
        z-index: 1;
    }

    .services-technologies__trigger {
        display: none;
    }

    .services-technologies__panel {
        border: none;
    }

    .services-technologies__panel:first-of-type {
        border: none;
    }

    .services-technologies__panel:not(.is-active) {
        display: none;
    }

    .services-technologies__panel.is-active {
        display: block;
    }

    .services-technologies__panel-body {
        display: block !important;
        padding: 0;
    }

    .services-technologies__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 560px;
    }
}
