body[data-results-lang] {
    display: flex;
    min-height: 100vh;
    height: auto;
    flex-direction: column;
}

body[data-results-lang] [data-results-page] {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
}

body[data-results-lang] .results-content {
    flex: 1 0 auto;
}

body[data-results-lang] .footer {
    flex-shrink: 0;
}

.results-hero {
    position: relative;
    padding: 8rem 0 4.5rem;
    background-image: linear-gradient(rgba(33, 37, 41, 0.72), rgba(33, 37, 41, 0.72)), url("../img/kisgeri24_header_01.jpg");
    background-position: center center;
    background-size: cover;
}

.results-hero h1 {
    font-family: Poppins, 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    font-size: 2.5rem;
    line-height: 1.2;
    text-transform: none;
}

.results-hero hr,
.results-controls hr {
    width: 54px;
    max-width: 54px;
    border-width: 3px;
    border-color: #fcb913;
}

.results-hero .lead {
    max-width: 760px;
    margin-right: auto;
    margin-left: auto;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 700;
}

.results-controls {
    padding: 3.5rem 0 2.75rem;
}

.results-controls h2 {
    margin: 0;
    color: #333;
    font-family: Poppins, 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    font-size: 2rem;
    font-weight: 400;
}

.year-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.year-button {
    min-width: 88px;
    margin: 0.35rem;
    padding: 0.75rem 1.45rem;
    cursor: pointer;
    color: #212529;
    border: 2px solid #fcb913;
    border-radius: 300px;
    background: #fff;
    font-family: Poppins, 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.2s;
}

.year-button:hover,
.year-button:focus {
    color: #fff;
    border-color: #fcb913;
    background: #fcb913;
    outline: none;
}

.year-button.active {
    color: #fff;
    border-color: #fcb913;
    background: #fcb913;
}

.year-select-wrap {
    display: none;
}

.results-summary {
    padding: 3rem 0;
}

.summary-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.summary-item {
    min-width: 0;
    padding-top: 1rem;
    border-top: 2px solid rgba(255, 255, 255, 0.45);
}

.summary-category {
    display: block;
    margin-bottom: 0.35rem;
    color: rgba(255, 255, 255, 0.72);
    font-family: Poppins, 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.summary-team {
    display: block;
    overflow: hidden;
    color: #fff;
    font-family: Poppins, 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-score {
    display: block;
    margin-top: 0.2rem;
    color: rgba(255, 255, 255, 0.82);
}

.results-content {
    padding: 1.5rem 0 6rem;
}

.results-choose-year {
    margin: 0;
    color: #868e96;
    font-family: Poppins, 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
}

.result-category {
    margin-bottom: 4rem;
}

.result-category-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #f05f40;
}

.result-category-header h3 {
    margin: 0;
}

.results-table {
    margin-bottom: 0;
}

.results-table thead th {
    color: #fff;
    border: 0;
    background: #212529;
    font-family: Poppins, 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.results-table td {
    vertical-align: middle;
}

/* Gold, silver, bronze row highlighting */
.results-table tbody tr.rank-1 {
    background: rgba(212, 175, 55, 0.15);
}

.results-table tbody tr.rank-2 {
    background: rgba(192, 192, 192, 0.25);
}

.results-table tbody tr.rank-3 {
    background: rgba(205, 127, 50, 0.15);
}

.result-rank {
    width: 90px;
    font-family: Poppins, 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    white-space: nowrap;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.4rem;
    color: #fff;
    border-radius: 300px;
}

.rank-badge-1 {
    background: #d4af37;
}

.rank-badge-2 {
    background: #a8a8a8;
}

.rank-badge-3 {
    background: #cd7f32;
}

.rank-badge-default {
    background: transparent;
    color: #212529;
}

.result-team {
    font-weight: 700;
}

.result-score {
    font-family: Poppins, 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    white-space: nowrap;
}

.results-empty {
    margin: 0;
    padding: 1.25rem 0;
    color: #868e96;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

/* Team result breakdowns */

.team-row.expandable {
    cursor: pointer;
    transition: background-color 0.2s;
}

.team-row.expandable:hover,
.team-row.expandable:focus {
    background-color: rgba(252, 185, 19, 0.08);
    outline: none;
}

.team-row.expandable.rank-1:hover,
.team-row.expandable.rank-1:focus {
    background: rgba(212, 175, 55, 0.25);
}

.team-row.expandable.rank-2:hover,
.team-row.expandable.rank-2:focus {
    background: rgba(192, 192, 192, 0.35);
}

.team-row.expandable.rank-3:hover,
.team-row.expandable.rank-3:focus {
    background: rgba(205, 127, 50, 0.25);
}

.team-row.expanded {
    background-color: rgba(252, 185, 19, 0.12) !important;
}

.expand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 8px;
    color: #868e96;
    font-size: 0.7rem;
    transition: transform 0.25s ease, color 0.2s;
    vertical-align: middle;
}

.team-row.expandable:hover .expand-icon,
.team-row.expandable:focus .expand-icon,
.team-row.expanded .expand-icon {
    color: #fcb913;
}

.team-row.expanded .expand-icon {
    transform: rotate(180deg);
}

.team-detail-row > td {
    padding: 0 !important;
    border-top: 0 !important;
    background: #fff;
}

.team-detail-content {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    padding: 0 1rem;
    border-bottom: 0 solid transparent;
    background: #f8f9fa;
    transform: translateY(-6px);
    transition: max-height 0.35s ease, opacity 0.2s ease, padding 0.35s ease, transform 0.35s ease, border-color 0.35s ease;
}

.team-detail-row.open .team-detail-content {
    max-height: 1400px;
    opacity: 1;
    padding: 1rem;
    border-bottom: 2px solid #e9ecef;
    transform: translateY(0);
}

.team-result-block {
    display: grid;
    gap: 0.9rem;
}

.member-score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.85rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #d8dee4;
}

.team-score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.85rem;
    padding-top: 0.15rem;
}

.score-tile {
    min-width: 0;
    padding: 0.85rem;
    border: 1px solid #d8dee4;
    border-left: 4px solid #fcb913;
    border-radius: 4px;
    background: #fff;
}

.score-tile-title {
    margin: 0;
    color: #212529;
    font-family: Poppins, 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.score-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.8rem;
}

.score-metric {
    display: grid;
    grid-template-rows: 2.4em auto;
    align-items: start;
    min-width: 0;
}

.score-metric-label,
.score-tile-label {
    display: block;
    color: #6c757d;
    font-family: Poppins, 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.25;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.score-metric-value,
.score-tile-value {
    display: block;
    color: #212529;
    font-family: Poppins, 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.score-metric-championship .score-metric-value,
.score-metric-championship .score-metric-label {
    font-style: italic;
}

.team-score-tile {
    display: flex;
    min-height: 86px;
    flex-direction: column;
    justify-content: center;
    background: #fffdf7;
}

.overall-score-tile {
    border-left-color: #f05f40;
    background: #fff;
}

@media (max-width: 767.98px) {
    .results-hero {
        padding: 7rem 0 4rem;
    }

    .results-hero h1 {
        font-size: 2rem;
    }

    .summary-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .result-category-header {
        display: block;
    }

    .score-metric-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .year-buttons {
        display: none;
    }

    .year-select-wrap {
        display: block;
    }

    .year-select-wrap select.form-control {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        border-radius: 12px;
        border: 2px solid #fcb913;
        background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23212529' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center;
        padding-right: 36px;
    }

    .year-select-wrap select.form-control:focus {
        border-color: #fcb913;
        box-shadow: 0 0 0 0.2rem rgba(252, 185, 19, 0.25);
    }

    .member-score-grid,
    .team-score-grid {
        grid-template-columns: 1fr;
    }

    .score-tile {
        padding: 0.75rem;
    }

    .score-metric-value,
    .score-tile-value {
        font-size: 1rem;
    }

    .team-detail-row.open .team-detail-content {
        padding: 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .expand-icon,
    .team-detail-content {
        transition: none;
    }
}
