/* === /integrations — каталог === */

body.int-catalog .int-landing__container {
    gap: 80px;
    padding-bottom: 60px;
}

/* === HERO === */
.int-cat-hero {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.int-cat-hero__title {
    font-size: 56px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
}

.int-cat-hero__subtitle {
    font-size: 18px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.78);
    margin: 0 0 32px;
}

.int-cat-hero__metric {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    padding: 14px 24px;
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 999px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 18px;
}
.int-cat-hero__metric-num {
    font-size: 22px;
    font-weight: 600;
    background: linear-gradient(90deg, #4F46E5 0%, #2894EC 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.int-cat-hero__metric-num--soft {
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    color: rgba(255, 255, 255, 0.7);
}
.int-cat-hero__metric-sep {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 4px;
}
.int-cat-hero__metric-label {
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.int-cat-hero__secondary {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
}
.int-cat-hero__secondary a {
    color: #2894EC;
    text-decoration: none;
    margin-left: 6px;
}
.int-cat-hero__secondary a:hover {
    text-decoration: underline;
}

/* === TABBED BLOCK: табы + грид в общем фрейме === */
.int-cat-tabbed {
    width: 100%;
}

.int-cat-tabs {
    display: flex;
    gap: 4px;
    width: 100%;
    margin-bottom: -1px;
    position: relative;
    z-index: 2;
}

/* Контейнер с карточками — общий фон, к которому «прикреплены» табы */
.int-cat-grid-wrap {
    background: rgba(17, 20, 31, 0.6);
    border: 1px solid rgba(225, 241, 255, 0.08);
    border-radius: 0 16px 16px 16px;
    padding: 28px;
    backdrop-filter: blur(8px);
}

/* === TAB === */
.int-cat-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 1 0;
    min-width: 0;
    padding: 14px 10px;
    background: rgba(13, 16, 25, 0.4);
    border: 1px solid rgba(225, 241, 255, 0.08);
    border-bottom: none;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(225, 241, 255, 0.4);
    cursor: pointer;
    text-align: center;
    transition: color 0.2s, background 0.2s, border-color 0.2s, flex 0.25s ease;
}

.int-cat-tab:hover {
    color: rgba(225, 241, 255, 0.7);
    background: rgba(17, 20, 31, 0.5);
}

/* Активный таб «слит» с контейнером карточек */
.int-cat-tab.is-active {
    flex: 0 0 auto;
    background: rgba(17, 20, 31, 0.6);
    border-color: rgba(124, 106, 255, 0.4);
    border-bottom-color: rgba(17, 20, 31, 0.6);
    color: #fff;
    z-index: 3;
    padding: 14px 22px;
    font-size: 11px;
    letter-spacing: 0.1em;
}

.int-cat-tab.is-active::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 16px;
    right: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #4F46E5, transparent);
    box-shadow: 0 0 8px rgba(79, 70, 229, 0.3);
}

/* Полоска снизу активного таба, прикрывающая верхнюю границу контейнера */
.int-cat-tab.is-active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: rgba(17, 20, 31, 0.6);
}

.int-cat-tab__name {
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.int-cat-tab.is-active .int-cat-tab__name {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
}

.int-cat-tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    padding: 0 6px;
    height: 18px;
    border-radius: 9px;
    background: rgba(225, 241, 255, 0.08);
    font-size: 10px;
    letter-spacing: 0;
    color: rgba(225, 241, 255, 0.6);
    flex-shrink: 0;
}

.int-cat-tab.is-active .int-cat-tab__count {
    background: rgba(124, 106, 255, 0.25);
    color: #fff;
}

/* === GRID === */
.int-cat-grid-section {
    width: 100%;
}
.int-cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* фильтрация по active category */
.int-cat-grid[data-active="all"] .int-cat-card { display: flex; }
.int-cat-grid:not([data-active="all"]) .int-cat-card { display: none; }
.int-cat-grid[data-active="channels"] .int-cat-card[data-cat="channels"],
.int-cat-grid[data-active="crm"] .int-cat-card[data-cat="crm"],
.int-cat-grid[data-active="ai"] .int-cat-card[data-cat="ai"],
.int-cat-grid[data-active="data"] .int-cat-card[data-cat="data"],
.int-cat-grid[data-active="marketplaces"] .int-cat-card[data-cat="marketplaces"],
.int-cat-grid[data-active="documents"] .int-cat-card[data-cat="documents"],
.int-cat-grid[data-active="tasks-bi"] .int-cat-card[data-cat="tasks-bi"],
.int-cat-grid[data-active="other"] .int-cat-card[data-cat="other"] {
    display: flex;
}

/* === CARD === */
.int-cat-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.int-cat-card[href]:hover {
    transform: translateY(-2px);
    border-color: rgba(79, 70, 229, 0.4);
    box-shadow: 0 0 32px rgba(79, 70, 229, 0.12);
}
.int-cat-card--in-progress {
    opacity: 0.7;
}
.int-cat-card--in-progress:hover {
    opacity: 1;
}

.int-cat-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.int-cat-card__logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.int-cat-card__logo img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.int-cat-card__name {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.01em;
}
.int-cat-card__desc {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    flex-grow: 1;
}

.int-cat-card__cta {
    align-self: flex-start;
    padding: 8px 14px;
    font-size: 13px;
    margin-top: 4px;
    text-align: center;
    flex: 0 0 auto;
}

.int-cat-card__open {
    margin-top: auto;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(124, 106, 255, 0.85);
}

/* === STATUS PILLS (status badges) === */
.pill--cat-status {
    padding: 4px 10px;
    font-size: 10px;
    letter-spacing: 0.12em;
}
.pill--cat-status-ready {
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.35);
    color: rgba(190, 242, 200, 0.95);
}
.pill--cat-status-progress {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.65);
}
.pill--cat-status::before,
.pill--cat-status::after {
    display: none;
}

/* === RESPONSIVE === */

@media (max-width: 1210px) {
    .int-cat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 960px) {
    .int-cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .int-cat-hero__title {
        font-size: 44px;
    }
}

@media (max-width: 768px) {
    .int-cat-hero__title {
        font-size: 36px;
    }
    .int-cat-hero__subtitle {
        font-size: 15px;
    }

    /* На мобиле — табы превращаются в набор тегов с переносом */
    .int-cat-tabs {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        margin-bottom: 16px;
    }
    .int-cat-tab {
        flex: 0 0 auto;
        padding: 8px 14px;
        background: rgba(13, 16, 25, 0.6);
        border: 1px solid rgba(225, 241, 255, 0.08);
        border-radius: 999px;
        font-size: 11px;
        letter-spacing: 0.06em;
    }
    .int-cat-tab:hover {
        background: rgba(17, 20, 31, 0.85);
    }
    .int-cat-tab.is-active {
        flex: 0 0 auto;
        padding: 8px 14px;
        background: linear-gradient(135deg, rgba(79, 70, 229, 0.25) 0%, rgba(40, 148, 236, 0.18) 100%);
        border-color: rgba(124, 106, 255, 0.5);
        border-radius: 999px;
        font-size: 11px;
        letter-spacing: 0.06em;
    }
    /* Скрыть «вкладочные» декорации на мобиле */
    .int-cat-tab.is-active::before,
    .int-cat-tab.is-active::after {
        display: none;
    }

    /* Контейнер карточек на мобиле — без верхнего «прикрепления», обычный фрейм */
    .int-cat-grid-wrap {
        border-radius: 16px;
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .int-cat-grid {
        grid-template-columns: 1fr;
    }
}
