/* General table styles */
.table-container {
    overflow-x: auto;
    margin: 0 auto;
    position: relative; /* Ensure the container can hold absolutely positioned elements */
    width: 80%;
    margin-top: 20px;
}

.widget-container {
    display: flex;
    gap: 20px; /* Отступ между виджетом и рекламой */
    margin: 20px;
}

.widget-content {
    flex: 1; /* Занимает основное пространство */
    width: 100%; /* Адаптивность */
}

.custom-table {
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 14px;
    text-align: center;
    border: 1px solid #ddd;
    margin: 0 auto;
    width: 100%;
}

.custom-table th,
.custom-table td {
    border: 1px solid #ddd;
    padding: 5px;
}

.custom-table th {
    background-color: #f4f4f4;
    color: #333;
    font-weight: bold;
}

.custom-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.custom-table tr:hover {
    background-color: #f1f1f1;
}

/* Table header styles */
.table-header {
    background-color: #05831a;
    color: #fff;
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 8px;
    padding: 10px 0;
    margin: 0 auto;
}

/* Стили для логотипа команды */
.team-logo {
    display: inline-block; /* Делаем блок строчным */
    vertical-align: middle; /* Выравниваем по центру относительно текста */
    margin-right: 8px; /* Отступ справа от логотипа */
}

/* Стили для названия команды */
.team-name {
    display: inline-block; /* Делаем блок строчным */
    vertical-align: middle; /* Выравниваем по центру относительно логотипа */
    font-weight: bold; /* Опционально: делаем название команды жирным */
}

/* Shortened table styles */
.custom-table.shortened tr:nth-child(n+7) {
    display: none; /* Hide rows beyond the first six */
}

/* Overlay for the 6th row */
.custom-table.shortened tr:nth-child(6):after {
    content: '';
    position: absolute;
    top: 80%;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, 0.2) 100%);
    z-index: 1; /* Ensure the overlay is above the row content */
    margin: 0 auto;
}

/* Read More link on the 6th row */
.custom-table.shortened tr:nth-child(6) .read-more {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    color: black;
    font-weight: bold;
    text-decoration: none;
    z-index: 2; /* Ensure the link is above the overlay */
}

.centered-date {
    text-align: center;
    width: 100%; /* Занимает всю доступную ширину */
    margin: 0 auto; /* Дополнительное центрирование (если нужно) */
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .widget-content {
        width: 100%; /* Адаптивность */
    }

    .table-container {
        margin: 20px 0;
        overflow-x: auto;
        margin: 0 auto;
        position: relative; /* Ensure the container can hold absolutely positioned elements */
        width: 100%;
    }

    .custom-table.shortened {
        font-size: 12px;
        width: 100%; /* Занимает всю доступную ширину */
    }

    .custom-table.shortened th,
    .custom-table.shortened td {
        padding: 4px; /* Уменьшаем отступы */
    }

    /* Скрываем столбцы после четвертого на мобильных устройствах */
    .custom-table.shortened th:nth-child(n+5),
    .custom-table.shortened td:nth-child(n+5) {
        display: none;
    }

    .custom-table th:nth-child(n+6),
    .custom-table td:nth-child(n+6) {
        display: none;
    }
}

@media (max-width: 1200px) {
    /* Уменьшаем размер шрифта и ячеек для маленьких экранов */
    .custom-table.shortened {
        font-size: 12px;
        width: 100%; /* Занимает всю доступную ширину */
    }

    .custom-table th,
    .custom-table td {
        padding: 4px; /* Уменьшаем отступы */
    }

    /* Скрываем столбцы после четвертого на мобильных устройствах */
    .custom-table.shortened th:nth-child(n+6),
    .custom-table.shortened td:nth-child(n+6) {
        display: none;
    }
}