.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding: 1rem;
    background: #FFF;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.entry-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.entry-content {
    padding: 1rem;
}

.pozycja-sekcja {
    margin-bottom: 2rem;
}

.pozycja-sekcja h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
    text-transform: uppercase;
    border-bottom: 2px solid #e40001;
    padding-bottom: 0.5rem;
}

.zawodnicy-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.zawodnik-card {
    text-align: center;
    transition: transform 0.3s ease;
}

.zawodnik-card:hover {
    transform: translateY(-5px);
}

.zawodnik-card img {
    width: 100%;
    max-width: 150px;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
    margin-bottom: 0.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.zawodnik-card h4 {
    font-size: 1.1rem;
    color: #333;
    margin: 0;
}

.zawodnik-card a {
    text-decoration: none;
    color: inherit;
}

p.funkcja {
    line-height: 1;
    font-size: 0.75rem;
}

/* Styl dla tabeli statystyk w page-druzyna.php */
.tabela-wrapper {
    width: 100%;
    margin: 1rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tabela {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.tabela th,
.tabela td {
    padding: 0.5rem;
    border: 1px solid #ddd;
    text-align: center;
}

.tabela th {
    background-color: #f5f5f5;
    font-weight: bold;
    font-size: 0.75em;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    padding: 1rem 0.25rem;
}

.tabela td {
    background-color: #fff;
}

.tabela th:first-child,
.tabela td:first-child {
    text-align: left;
}

.tabela thead th:first-child {
    border-right: 1px solid #ddd;
}

.tabela td a {
    text-decoration: none;
    color: #e40001;
}

.tabela td a:hover {
    text-decoration: underline;
}

.tabela .pozycja-naglowek th {
    background-color: #e9ecef;
    text-align: center;
    padding: 0.5rem;
    writing-mode: horizontal-tb;
    transform: none;
}

.tabela .pozycja-naglowek h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
    text-transform: uppercase;
}

/* Styl dla strony pojedynczego zawodnika */
.zawodnik-profil {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.zawodnik-zdjecie {
    flex: none;
    max-width: 300px;
    width: 100%;
}

.zawodnik-zdjecie img {
    width: 100%;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.zawodnik-zdjecie a {
    display: block;
    text-decoration: none;
}

.zawodnik-dane {
    flex: 1;
    max-width: 50%;
}

.zawodnik-dane-item {
    display: flex;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: #333;
}

.zawodnik-dane-item .dane-label {
    font-weight: bold;
    color: #000;
    flex: 0 0 150px;
}

.zawodnik-dane-item .dane-value {
    flex: 1;
}

.statystyki-grid h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #333;
    text-transform: uppercase;
    border-bottom: 2px solid #e40001;
    padding-bottom: 0.5rem;
}

.statystyki-grid-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
}

.statystyka-item {
    background-color: #f5f5f5;
    padding: 0.5rem;
    text-align: center;
    aspect-ratio: 1/1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.statystyka-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    height: 2rem;
}

.statystyka-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: #333;
    height: 2rem;
}

/* Styl dla lightboxa */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1102;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.lightbox.active {
    display: flex;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    cursor: pointer;
}

.lightbox-close {
    position: absolute;
    top: 1rem; 
    right: 1rem; 
    font-size: 3rem; 
    color: #fff; 
    cursor: pointer;
    background: none; 
    width: auto;  
    height: auto; 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: none; 
}

/* Responsywność */
@media (max-width: 1024px) {
    .zawodnicy-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .statystyki-grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .zawodnicy-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .zawodnik-profil {
        flex-direction: column;
    }
    .zawodnik-zdjecie {
        max-width: 100%;
    }
    .zawodnik-dane {
        max-width: 100%;
    }
    .statystyki-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
    .entry-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .lightbox-close {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 2.5rem; /* Mniejszy X na mobilce */
    }
}

@media (max-width: 360px) {
    .zawodnicy-grid {
        grid-template-columns: 1fr;
    }
    .zawodnik-dane-item {
        flex-direction: column;
    }
    .zawodnik-dane-item .dane-label {
        flex: none;
        margin-bottom: 0.25rem;
    }
}
@media (max-width: 480px) {
    .statystyki-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}