/* Kalendarz */
.calendar-section {
    margin: 0 10px;
}
.calendar-section h2 {
    font-size: 28px;
    font-weight: bold;
    color: #256240ff;
    margin-bottom: 16px;
    border-left: 6px solid #256240ff;
    padding-left: 12px;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 16px 0 24px;
    font-size: 14px;
    font-weight: 500;
}
.legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 600;
    color: #111;
    border-radius: 16px;
    text-align: center;
    white-space: nowrap;
}
.badge-gps {
    background-color: #007b00;
    color: #fff;
}
.badge-gpa {
    background-color: #ffeb3b;
    color: #000;
}
.badge-gppp {
    background-color: #3f51b5;
    color: #fff;
}
.badge-gppt {
    background-color: #9fa8da;
    color: #000;
}
.badge-inny {
    background-color: #e0e0e0;
    color: #000;
}
.badge-junior {
    background-color: #ffa726;
    color: #000;
}
.badge-pająk {
    background-color: #00b0ff;
    color: #fff;
}
.badge-iii.liga {
    background-color: #d500f9;
    color: #fff;
}
.badge-zlot {
    background-color: #ffeb3b;
    color: #000;
}
.badge-apkl {
    background-color: #e53935;
    color: #fff;
}
.badge-mistrz {
    background-color: #4caf50;
    color: #fff;
    position: relative;
    padding-left: 26px;
}
.badge-mistrz::before {
    content: '🏆';
    position: absolute;
    left: 8px;
    top: 2px;
}
.badge-mityng {
    background-color: #212121;
    color: #fff;
}
.badge-utw {
    background-color: #6d4c41;
    color: #fff;
}
.badge-nauka {
    background-color: #f57c00;
    color: #fff;
}
.badge-mikst {
    background-color: #f500f5;
    color: #fff;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
}
.calendar-table th {
    background-color: #d3e6d388;
    color: #256240ff;
    text-align: left;
    padding: 14px;
    font-size: 15px;
}
.calendar-table th svg {
    width: 14px;
    height: 14px;
    margin-left: 5px;
    vertical-align: middle;
}
.calendar-table td {
    padding: 10px 14px;
    font-size: 15px;
    border-bottom: 1px solid #d7e9d7;
}
.calendar-table tr:nth-child(even) {
    background-color: #25624011;
}
a.tournament-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    padding-right: 0;
}
a.tournament-link svg.link-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    fill: #256240;
}
a.tournament-link:hover {
    text-decoration: underline;
}
p.tournament-link {
    margin-bottom: 0;
}
.filter-btn {
    cursor: pointer;
    user-select: none;
}
.filter-btn.active, .legend-toggle {
    outline: 2px solid #256240;
    outline-offset: 2px;
    border-radius: 6px;
}
.clear-filters {
    display: none;
    padding: 6px 12px;
    background: #256240;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
}
.calendar-table th {
    align-items: center;
    gap: 6px;
}
.calendar-table .day {
    width: 70px;
}
.calendar-table #sort-place, .calendar-table #sort-type, .calendar-table #sort-date {
    cursor: pointer;
    user-select: none;
}
.calendar-table #sort-date {
    width: 130px;
}
.calendar-table #sort-place {
    width: 180px;
}
.calendar-table #sort-type {
    width: 240px;
}
td[data-label="Typ"] {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}
.legend-toggle {
    display: none;
}

@media (max-width: 768px) {
    .calendar-table, .calendar-table thead, .calendar-table tbody, .calendar-table th, .calendar-table td, .calendar-table tr {
        display: block;
        width: 100%;
    }
    .calendar-table thead {
        display: none;
    }
    .calendar-table tr {
        margin-bottom: 16px;
        border-radius: 12px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
        background-color: #ffffff;
        padding: 10px;
    }
    .calendar-table td {
        padding: 10px;
        border: none;
        border-bottom: 1px solid #e0f0e0;
        position: relative;
    }
    td[data-label="Typ"] {
        display: flex;
        gap: 5px;
        flex-wrap: wrap;
        align-items: center;
    }
    .calendar-table td::before {
        content: attr(data-label);
        font-weight: bold;
        display: block;
        margin-bottom: 6px;
        color: #256240ff;
    }
    .calendar-table tr:nth-child(odd) {
        background-color: #25624011;
    }
    .calendar-table .day::before {
        content: attr(data-full);
    }
    .calendar-table .day {
        display: inline-block;
        visibility: hidden;
        height: 0;
    }
    .calendar-table .day::before {
        visibility: visible;
        height: auto;
        display: inline;
    }
    .calendar-table tr {
        display: grid;
        grid-template-areas: "day date" "tournament tournament" "place type";
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .calendar-table td[data-label="Dzień"] {
        grid-area: day;
    }
    .calendar-table td[data-label="Data"] {
        grid-area: date;
    }
    .calendar-table td[data-label="Turniej"] {
        grid-area: tournament;
    }
    .calendar-table td[data-label="Miejscowość"] {
        grid-area: place;
    }
    .calendar-table td[data-label="Typ"] {
        grid-area: type;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding-top: 6px;
    }
    td[data-label="Typ"] {
        display: flex;
        align-items: flex-start;
    }
    td[data-label="Typ"]::before {
        width: 100%;
    }
    .legend {
        flex-wrap: wrap;
        gap: 8px;
    }
    .legend span {
        font-size: 0;
    }
    .legend span .badge {
        font-size: 13px;
    }
    .legend.show-descriptions span {
        font-size: 14px;
    }
    .legend-toggle {
        display: inline-block;
        margin-bottom: 10px;
        cursor: pointer;
        color: #256240;
        font-weight: bold;
        border: none;
        background: none;
        padding: 4px;
    }
    .legend-toggle::after {
        content: "Pokaż opisy tagów";
        display: block;
        font-size: 14px;
    }
    .legend-toggle.active::after {
        content: "Ukryj opisy tagów";
    }
}

/* Wyniki */
.results-section {
    padding-top: 40px;
    margin: 0 auto;
}
.results-section h2 {
    font-size: 32px;
    font-weight: bold;
    color: #256240ff;
    border-left: 6px solid #256240ff;
    padding-left: 12px;
    margin-bottom: 20px;
}

.results-table {
    table-layout: fixed;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
}
.results-table th {
    background-color: #d3e6d388;
    color: #256240ff;
    text-align: left;
    padding: 14px;
    font-size: 15px;
    cursor: pointer;
    user-select: none;
}
.results-table th:nth-child(1), .results-table td:nth-child(1) {
    width: 150px;
}
.results-table th:nth-child(2), .results-table td:nth-child(2) {
    width: 120px;
}
.results-table th:nth-child(3), .results-table td:nth-child(3) {
    width: 120px;
}
.results-table th:nth-child(4), .results-table td:nth-child(4) {
    width: 580px;
}
.results-table th:nth-child(5), .results-table td:nth-child(5) {
    width: 140px;
}
.results-table th:nth-child(6), .results-table td:nth-child(6) {
    width: 120px;
}
.results-table th:nth-child(7), .results-table td:nth-child(7) {
    width: 120px;
}
.results-table th:nth-child(8), .results-table td:nth-child(8) {
    width: 80px;
}
.results-table th:nth-child(9), .results-table td:nth-child(9) {
    width: 80px;
}
.results-table th:nth-child(10), .results-table td:nth-child(10) {
    width: 50px;
}
.results-table td {
    padding: 4px 14px;
    font-size: 15px;
    border-bottom: 1px solid #d7e9d7;
}
.results-table tr:nth-child(even) {
    background-color: #25624011;
}
.results, th.results {
    text-align: center;
}
.result-button {
    display: inline-block;
    margin: 6px 0;
    padding: 6px 14px;
    background-color: #256240ff;
    color: #fff;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
}
.result-button:hover {
    background-color: #25624088;
}
.results-table th::after {
    content: "▲";
    visibility: hidden;
    margin-left: 4px;
}
.results-table th.asc::after {
    content: "▲";
    visibility: visible;
}
.results-table th.desc::after {
    content: "▼";
    visibility: visible;
}
.filters {
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
    padding: 16px;
    background-color: #d3e6d388;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
.filters label {
    display: flex;
    flex-direction: column;
    font-weight: 500;
    color: #256240ff;
}
.filters input, .filters select {
    padding: 6px 10px;
    font-size: 15px;
    border: 1px solid #cceccc;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s ease;
}
.filters input:focus, .filters select:focus {
    border-color: #256240ff;
}
.filters button {
    padding: 8px 16px;
    background-color: #256240ff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.filters button:hover {
    background-color: #256240cc;
}

@media (max-width: 768px) {
    .results-table, .results-table thead, .results-table tbody, .results-table th, .results-table td, .results-table tr {
        display: block;
        width: 100%;
    }
    .results-table thead {
        display: none;
    }
    .results-table tr {
        margin-bottom: 16px;
        border-radius: 12px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
        background-color: #ffffff;
        padding: 10px;
    }
    .results-table td {
        padding: 10px;
        border: none;
        border-bottom: 1px solid #e0f0e0;
        position: relative;
    }
    .results-table td::before {
        content: attr(data-label);
        font-weight: bold;
        display: block;
        margin-bottom: 6px;
        color: #256240ff;
    }
    .results-table .results {
        text-align: left;
    }
    .results-table tr:nth-child(odd) {
        background-color: #25624011;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 12px;
    }

    .filters label {
        width: 100%;
    }

    .filters input,
    .filters select,
    .filters button {
        width: 100%;
    }

    .results-table th:nth-child(4), .results-table td:nth-child(4) {
        width: auto;
    }
}

/* Gdzie gramy */
.where-section {
    margin: 40px auto;
}
.day-group {
    margin-bottom: 40px;
}
.day-group h3 {
    font-size: 20px;
    font-weight: bold;
    color: #256240;
    margin-bottom: 16px;
}
.venue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.venue {
    position: relative;
    background: #d3e6d388;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    font-size: 15px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.venue-time {
    font-weight: bold;
    color: #256240;
}
.venue-place {
    font-weight: bold;
}
.venue-address {
    color: #333;
}
.venue-info {
    font-style: italic;
    color: #555;
}
.venue a {
    color: #256240;
    text-decoration: none;
}
.venue a:hover {
    text-decoration: underline;
}
a.venue-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 20px;
    background-color: #256240ff;
    color: white;
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
    transition: background-color 0.3s ease;
    white-space: nowrap;
    z-index: 1;
}
a.venue-btn:hover {
    background-color: #25624088;
    text-decoration: none;
}

@media (max-width: 600px) {
    a.venue-btn {
        position: static;
        margin-top: 12px;
        width: 100%;
        text-align: center;
        font-size: 14px;
        border-radius: 8px;
    }
}

/* Zarząd */

.profiles-section h2 {
    font-size: 28px;
    font-weight: bold;
    color: #256240;
    margin-bottom: 16px;
    border-left: 6px solid #256240;
    padding-left: 12px;
}
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.profile-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.profile-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #d7e9d7;
    display: inline-block;
    margin: 0 auto 8px;
    background-size: cover;
    background-position: center;
}
.profile-name {
    font-size: 16px;
    font-weight: 600;
    color: #256240;
}
.profile-role {
    font-size: 14px;
    color: #444;
}
.profile-phone {
    font-size: 14px;
    color: #666;
}

/* Kontakt  */

.contact-section {
    background: #d3e6d388;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    color: #111;
    padding: 24px;
    margin-top: 40px;
}
.contact-section h2 {
    font-size: 28px;
    font-weight: bold;
    color: #256240;
    margin-bottom: 20px;
    border-left: 6px solid #256240;
    padding-left: 12px;
}
.contact-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 15px;
    line-height: 1.6;
}
.contact-content a {
    color: #256240;
    text-decoration: none;
    .results-table
}
.contact-content a:hover {
    text-decoration: underline;
}
.contact-label {
    font-weight: bold;
    color: #256240;
}

/* Ligi */

.leagues-wrapper {
    margin: 0 auto;
    padding-top: 40px;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

.leagues-wrapper h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    border-left: 5px solid #256240ff;
    padding-left: 12px;
}

.league-box {
    background: #d3e6d388;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.league-box:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.league-box h4 {
    margin: 0 0 10px !important;
    font-size: 20px;
    color: #256240ff;
}

.league-box a {
    display: inline-block;
    margin: 6px 6px 0 0;
    padding: 6px 14px;
    background-color: #256240ff;
    color: #fff;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
}

.league-box a:hover {
    background-color: #25624088;
}