.expertise {
    background-color: #0d0f12;
    padding: 80px 0 40px;
    position: relative;
}

.expertise__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 60px;
}

.expertise__description {
    max-width: 600px;
    font-size: 16px;
    line-height: 1.6;
    color: #999;
    margin-top: 20px;
}

/* Stat card base — legacy class used in old templates */
.stat-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 50px 32px;
    text-align: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-radius: var(--radius-card);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18), 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: transform 0.45s var(--ease-card),
                box-shadow 0.45s var(--ease-card),
                border-color 0.3s ease;
}

.stat-card:hover {
    border-color: rgba(242, 101, 34, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 28px 56px rgba(0, 0, 0, 0.28), 0 10px 24px rgba(242, 101, 34, 0.08);
}

.stat-card__number {
    font-size: 64px;
    font-weight: 300;
    color: #FFFFFF;
    line-height: 1;
    margin-bottom: 12px;
}

/* Dark section overrides */
.section--dark .expertise__description {
    color: var(--color-white) !important;
}

.section--dark .stat-card__number {
    color: var(--color-white) !important;
}

.expertise .section-description {
    margin-bottom: 40px;
    max-width: 900px;
}

.expertise__stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.expertise__stats-grid .stat-card {
    flex: 1 1 220px;
    min-width: 0;
}

/* Останній елемент — завжди на всю ширину */
.expertise__stats-grid .stat-card:last-child,
.expertise__stats-grid .stat-card--wide {
    flex: 1 1 100%;
}

/* Stat cards — dark variant used in this block */
.stat-card--classic {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-card);
    padding: 40px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18), 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: transform 0.45s var(--ease-card),
                box-shadow 0.45s var(--ease-card),
                border-color 0.3s ease;
}

.stat-card--classic:hover {
    border-color: rgba(242, 101, 34, 0.4);
    transform: translateY(-6px);
    box-shadow: 0 28px 56px rgba(0, 0, 0, 0.28), 0 10px 24px rgba(242, 101, 34, 0.08);
}

.stat-card__num {
    font-size: 54px;
    font-weight: 300;
    color: #fff;
    line-height: 1;
    margin-bottom: 8px;
    font-family: var(--font-heading);
}

.stat-card__num span {
    color: var(--color-primary);
}

.stat-card__label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.stat-card--wide {
    padding: 36px 40px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-card);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18), 0 4px 16px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    box-sizing: border-box;
}

.expertise__logos-title {
    font-size: 13px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 3px;
    white-space: nowrap;
    margin-bottom: 0;
}

/* Logo Marquee — expertise variant.
   Базові стилі .logo-marquee — у blocks/segmentation/style.css */
.logo-marquee--expertise-card {
    width: 100%;
    margin-left: -40px;
    margin-right: -40px;
    overflow: hidden;
    padding: 25px 0;
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-marquee--expertise-card .logo-marquee__track {
    display: flex;
    width: max-content;
    animation: exp-marquee-scroll 50s linear infinite;
    align-items: center;
}

.logo-marquee--expertise-card .logo-marquee__img {
    height: 55px;
    margin: 0 40px;
    filter: brightness(0) invert(0.6);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.logo-marquee--expertise-card .logo-marquee__img:hover {
    opacity: 1;
    filter: none;
    transform: scale(1.1);
}

@keyframes exp-marquee-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Responsive */
@media (max-width: 1024px) {
    .expertise__header {
        flex-direction: column;
    }
}

@media (max-width: 1200px) {
    .expertise__stats-grid {
        gap: 20px;
    }

    .stat-card__num {
        font-size: 40px;
    }
}

@media (max-width: 992px) {
    /* 2 картки в ряд */
    .expertise__stats-grid .stat-card {
        flex-basis: calc(50% - 10px);
    }

    .expertise__stats-grid .stat-card:last-child,
    .expertise__stats-grid .stat-card--wide {
        flex-basis: 100%;
    }
}

@media (max-width: 768px) {
    .expertise {
        padding: 60px 0 30px;
    }

    .expertise__stats-grid {
        gap: 16px;
    }

    .expertise__stats-grid .stat-card {
        flex-basis: calc(50% - 8px);
    }

    .expertise__stats-grid .stat-card:last-child,
    .expertise__stats-grid .stat-card--wide {
        flex-basis: 100%;
    }

    .stat-card--classic {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .stat-card--wide {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .expertise__logos-title {
        font-size: 14px;
        white-space: normal;
        text-align: center;
    }
}

@media (max-width: 576px) {
    /* одна картка в ряд */
    .expertise__stats-grid .stat-card {
        flex-basis: 100%;
    }

    .stat-card--wide {
        padding: 24px 16px;
    }
}
