/* Стили для организаторов (оригинальные) */
.organizers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 20px 0;
    list-style: none;
    justify-content: center; /* Центрируем всю сетку */
    grid-auto-flow: row; /* Гарантирует, что строки будут создаваться по мере необходимости */
}

.organizer-item {
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    padding: 10px;
    max-width: max-content; /* Ограничиваем ширину карточки */
    box-sizing: border-box;
}

.organizer-image {
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 150px;
    width: 150px;
    margin: 0 auto;
}

.organizer-image img {
    max-width: 150px;
    max-height: 150px;
    object-fit: contain;
    border-radius: 8px;
}

.no-image {
    display: block;
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
    color: #999;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.organizer-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    word-wrap: break-word;
    max-width: max-content;
    margin: 0 auto;
    text-align: center;
}

.organizers-grid-empty {
    text-align: center;
    color: #777;
    font-style: italic;
    padding: 20px;
}

/* Адаптивность для организаторов */
@media (max-width: 1024px) {
    .organizers-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .organizers-grid {
        grid-template-columns: repeat(2, 1fr);
        justify-content: center; /* Убедимся, что и на мобильных центрировано */
    }
    .organizer-image {
       width: 100%;
        height: 100%;
    }
    .organizer-image img {
        max-width: 120px;
        max-height: 120px;
    }
}

@media (max-width: 480px) {
    .organizers-grid {
        grid-template-columns: repeat(2, 1fr);
        justify-content: center;
    }
    .organizer-image {
        width: 100%;
        height: 100%;
    }
    .organizer-image img {
        max-width: 100px;
        max-height: 100px;
    }
}

/* Стили для партнеров (аналогичные организаторам, но без заголовка) */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin: 20px 0;
    list-style: none;
    justify-content: center; /* Центрируем всю сетку */
    grid-auto-flow: row; /* Гарантирует, что строки будут создаваться по мере необходимости */
}

.partner-item {
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    padding: 10px;
    max-width: max-content; /* Ограничиваем ширину карточки */
    box-sizing: border-box;
}

.partner-image {
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 150px;
    width: 150px;
    margin: 0 auto;
}

.partner-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.partners-grid-empty {
    text-align: center;
    color: #777;
    font-style: italic;
    padding: 20px;
}

/* Адаптивность для партнеров */
@media (max-width: 1024px) {
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        justify-content: center; /* Убедимся, что и на мобильных центрировано */
    }
    .partner-image {
       width: 100%;
        height: 100%;
    }
    .partner-image img {
        max-width: 100%;
        max-height: 100%;
    }
}

@media (max-width: 480px) {
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        justify-content: center;
    }
    .partner-image {
        width: 100%;
        height: 100%;
    }
    .partner-image img {
        max-width: 100%;
        max-height: 100%;
    }
}
