:root {
    --primary-color: #2a5c8a;
    --primary-dark: #1e4568;
    --primary-light: #3a7bbf;
    --accent-color: #ff6b35;
    --contacts-color: #2a5c8a;
    --contacts-dark: #1e4568;
    --clients-color: #3a7bbf;
    --clients-dark: #2a5c8a;
}

/* Глобальный reset для box-sizing */
*,
*::before,
*::after {
    box-sizing: border-box !important;
}

/* Контейнеры верхнего уровня */
.wp-block-group.alignfull {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Контейнеры с padding 10% */
.wp-block-group[style*="padding-right:10%"] {
    padding-right: 10% !important;
    padding-left: 10% !important;
    width: 100% !important;
}

/* Стили для блоков преимуществ */
.advantages-blocks {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    justify-content: space-between;
}

.advantage-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(42, 92, 138, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid #e1e8f0;
    position: relative;
    overflow: hidden;
    width: 100%;
    transform: none !important;
    flex-grow: 1;
}

.advantage-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(42, 92, 138, 0.1), transparent);
    transition: left 0.6s;
}

.advantage-item:hover::before {
    left: 100%;
}

.advantage-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(42, 92, 138, 0.2);
    border-color: var(--primary-color);
}

.advantage-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    transition: all 0.3s ease;
}

.advantage-item:hover .advantage-icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, var(--primary-dark), #153552);
}

.advantage-content h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.advantage-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #6c757d;
}

/* Основной контейнер колонок */
.wp-block-columns.reports-columns-container {
    align-items: stretch !important;
    min-height: 600px; /* Минимальная высота для баланса */
}

/* Левый блок с преимуществами */
.wp-block-columns.reports-columns-container > .wp-block-column:first-child {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Правый блок с контентом */
.wp-block-columns.reports-columns-container > .wp-block-column:last-child {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

/* Стили для контейнера с кнопками */
.advantages-content-container { /* Используем класс из шорткода */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    position: relative;
    width: 100%;
    padding: 15px 15px; /* Уменьшил вертикальные отступы */
    min-height: auto;
    background: linear-gradient(135deg, rgba(42, 92, 138, 0.03) 0%, rgba(58, 123, 191, 0.05) 100%);
    border-radius: 20px;
    border: 1px solid rgba(42, 92, 138, 0.1);
}

/* Стили для кнопки "О компании" сверху */
.about-company-section {
    margin-bottom: 15px; /* Уменьшил отступ */
    text-align: center;
    z-index: 2;
    width: 100%;
    flex-shrink: 0;
}

/* Контейнер для двух кнопок внизу */
.bottom-buttons-container {
    display: flex;
    flex-direction: row;
    gap: 25px;
    margin-top: 15px; /* Уменьшил отступ */
    width: 100%;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.contacts-section,
.clients-section {
    text-align: center;
    z-index: 2;
}

/* Общие стили для всех кнопок */
.about-company-btn,
.contacts-btn,
.clients-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 15px 30px;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(42, 92, 138, 0.3);
    border: 2px solid transparent;
    min-width: 200px;
    justify-content: center;
}

.about-company-btn:hover,
.contacts-btn:hover,
.clients-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(42, 92, 138, 0.4);
    color: white;
    text-decoration: none;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-icon {
    font-size: 20px;
}

.btn-arrow {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.about-company-btn:hover .btn-arrow,
.contacts-btn:hover .btn-arrow,
.clients-btn:hover .btn-arrow {
    transform: translateX(5px);
}

/* Цвета для кнопок в синей гамме */
.about-company-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.about-company-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.contacts-btn {
    background: linear-gradient(135deg, var(--contacts-color), #3569a1);
}

.contacts-btn:hover {
    background: linear-gradient(135deg, var(--contacts-dark), var(--contacts-color));
}

.clients-btn {
    background: linear-gradient(135deg, var(--clients-color), #4a8fd9);
}

.clients-btn:hover {
    background: linear-gradient(135deg, var(--clients-dark), var(--clients-color));
}

/* Новый блок статистики вместо анимации */
.abstract-animation {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 10px auto; /* Уменьшил отступ */
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.stats-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 15px 0; /* Уменьшил отступы */
}

.stats-title {
    font-size: 22px; /* Немного уменьшил шрифт */
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 20px; /* Уменьшил отступ */
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px; /* Уменьшил отступы между элементами */
    max-width: 280px; /* Немного уменьшил максимальную ширину */
    width: 100%;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px; /* Уменьшил отступы внутри элементов */
    background: white;
    border-radius: 12px; /* Немного уменьшил радиус */
    box-shadow: 0 4px 12px rgba(42, 92, 138, 0.1); /* Уменьшил тень */
    transition: all 0.3s ease;
    border: 1px solid rgba(42, 92, 138, 0.1);
}

.stat-item:hover {
    transform: translateY(-3px); /* Уменьшил эффект подъема */
    box-shadow: 0 6px 18px rgba(42, 92, 138, 0.2);
}

.stat-number {
    font-size: 28px; /* Уменьшил размер цифр */
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 13px; /* Немного уменьшил шрифт */
    color: #6c757d;
    text-align: center;
    font-weight: 500;
}

/* Декоративные элементы */
.decorative-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.decorative-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.05;
    background: var(--primary-color);
}

.circle-1 {
    width: 70px; /* Уменьшил размеры */
    height: 70px;
    top: 15%;
    left: 10%;
}

.circle-2 {
    width: 50px;
    height: 50px;
    top: 70%;
    right: 15%;
}

.circle-3 {
    width: 80px;
    height: 80px;
    bottom: 15%;
    left: 20%;
}

/* --- Стили для решения вашей задачи с шириной и отступами блока преимуществ --- */
.wp-block-group[style*="padding-right:10%"] > .wp-block-columns.reports-columns-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    padding: 30px 40px !important;
    box-sizing: border-box !important;
    gap: 0 !important;
}

.wp-block-columns.alignwide {
    width: 100% !important;
    max-width: 100% !important;
}

.wp-block-columns.reports-columns-container > .wp-block-column {
    padding: 0 !important;
    margin: 0 !important;
    flex-grow: 1 !important;
}

/* Увеличиваем отступы для блока преимуществ */
.wp-block-group.reports-group.advantages-group {
    padding: 0 30px !important;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Адаптивность для блока преимуществ */
@media (max-width: 768px) {
    /* Полностью скрываем весь блок на планшетах и телефонах */
    .wp-block-columns.reports-columns-container {
        display: none !important;
    }
}

@media (max-width: 480px) {
    /* Полностью скрываем весь блок на телефонах */
    .wp-block-columns.reports-columns-container {
        display: none !important;
    }
}

/* Основные стили сетки партнеров */
.partners-grid-section {
    padding: 20px 0;
    background: #ffffff;
    position: relative;

    /* БЕЗОПАСНЫЙ РЕЖИМ */
    width: 100%;
    margin: 0;
    left: auto;
    right: auto;
    /* Скругление только верхних углов */
    border-radius: 20px 20px 0 0;
    /* Обеспечиваем обрезку содержимого по радиусу */
    overflow: hidden;
}

.partners-grid-header {
    text-align: center;
    margin-bottom: 50px;
}

.partners-title {
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
}

.partners-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #2a5c8a, #1a3d5c);
    margin: 0 auto 20px;
    border-radius: 2px;
}

.partners-subtitle {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Сетка партнеров */
.partners-grid-container {
    display: grid;
    /* УВЕЛИЧЕННАЯ МИНИМАЛЬНАЯ ШИРИНА КАРТОЧКИ (220px) */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));

    gap: 20px;

    width: 98%;
    max-width: 1400px;
    margin: 0 auto;

    padding: 0 10px;
}

/* Карточка партнера */
.partner-card {
    perspective: 1000px;
    /* ВОЗВРАЩАЕМ ИСХОДНУЮ ВЫСОТУ */
    height: 260px;
}

.partner-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.partner-card:hover .partner-card-inner {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.partner-image-container {
    position: relative;
    /* 60% высоты для логотипа */
    height: 60%;
    min-height: 0;
    background: #ffffff;
    border-radius: 15px 15px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    overflow: hidden;
}

.partner-logo {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: grayscale(30%);
}

.partner-card:hover .partner-logo {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.partner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(42, 92, 138, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 15px 15px 0 0;
}

.partner-card:hover .partner-overlay {
    opacity: 1;
}

.partner-view {
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

/* Информация о партнере */
.partner-info {
    /* 40% высоты для инфо */
    height: 40%;
    background: #2a5c8a;
    border-radius: 0 0 15px 15px;

    /* ИЗМЕНЕНИЕ 1: МАКСИМАЛЬНО ОБНУЛЯЕМ PADDING */
    /* Добавим небольшой padding, чтобы текст не прилипал к краям */
    padding: 5px;

    /* Вертикальное центрирование текста */
    display: flex;
    flex-direction: column;

    /* ИСПРАВЛЕНИЕ: Центрируем текст по вертикали внутри flex-контейнера */
    justify-content: center;

    /* Центрируем текст по горизонтали */
    align-items: center;
    text-align: center;
}

.partner-name {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;

    /* ИСПРАВЛЕНИЕ: Убираем отрицательный отступ */
    margin: 0;
    line-height: 1.2;
}

/* Адаптивность */
@media (max-width: 800px) {
    .partners-grid-container {
        padding: 0 5px;
    }
}

@media (max-width: 480px) {
    .partners-grid-container {
        padding: 0 3px;
    }
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.partner-card {
    opacity: 0;
    transform: translateY(30px);
}

.partner-card.visible {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* ========================================================================= */
/* === НОВЫЙ БЛОК: СТИЛИ ДЛЯ СЕКЦИИ ПАРТНЕРОВ === */
/* ========================================================================= */
/* Скрываем весь блок партнеров на мобильных и планшетах */
@media (max-width: 768px) {
    .partners-grid-section {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .partners-grid-section {
        display: none !important;
    }
}
