body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f4f4;
    margin: 0;
}

.contenitore{
    width:90%;
    max-width:1100px;
    margin:auto;
    background:white;
    padding:30px;
}

h1{
    color:#003366;
}

.sottotitolo{
    color:#666666;
}

footer{
    color:#777777;
    font-size:14px;
}

input[type="text"] {
    width: 100%;
    max-width: 400px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #cccccc;
}

button {
    padding: 10px 18px;
    font-size: 16px;
    cursor: pointer;
}

table {

    width: 100%;

    border-collapse: collapse;

    margin-top: 20px;

}

th,
td {

    padding: 10px;

    border-bottom: 1px solid #dddddd;

    text-align: left;

}

th {

    background: #f2f2f2;

}

.sezione-ricerca {

    margin-top: 30px;
    margin-bottom: 35px;

}

.testo-introduttivo {

    color: #666666;
    margin-bottom: 22px;

}

.modulo-ricerca label {

    display: block;
    margin-bottom: 8px;
    font-weight: bold;

}

.riga-ricerca {

    display: flex;
    gap: 10px;
    align-items: stretch;

}

.riga-ricerca input[type="text"] {

    flex: 1;
    max-width: 500px;
    box-sizing: border-box;

}

.riga-ricerca button {

    background: #003366;
    color: white;
    border: 1px solid #003366;

}

.riga-ricerca button:hover {

    background: #00264d;

}

.sezione-risultati {

    margin-top: 30px;

}

.numero-risultati {

    color: #555555;

}

.nota-risultati {

    font-size: 14px;
    color: #777777;

}

.colonna-exclusive {

    width: 32px;
    padding-left: 4px;
    padding-right: 4px;
    text-align: center;

}

.testo-nascosto {

    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;

}

.messaggio-nessun-risultato {

    padding: 15px;
    background: #f4f4f4;
    border-left: 4px solid #003366;

}

@media (max-width: 600px) {

    .riga-ricerca {

        flex-direction: column;

    }

    .riga-ricerca input[type="text"] {

        max-width: none;

    }

    .riga-ricerca button {

        width: 100%;

    }

}

/* Header */

.header-brand {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-left {
    flex: 0 0 90px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.header-brand img.logo-elbaman {
    display: block;
    width: 90px;
    max-width: 90px;
    height: auto;
}

.language-selector {
    width: 90px;
    margin-top: 6px;
    font-size: 14px;
    text-align: center;
}

.language-selector a {
    color: #005A9C;
    text-decoration: none;
    font-weight: bold;
}

.language-selector a:hover {
    text-decoration: underline;
}

.header-text h1 {
    margin: 0;
}

.header-text p {
    margin: 8px 0 0;
}

@media (max-width: 600px) {

    .header-brand {
        align-items: flex-start;
        gap: 16px;
    }

    .header-left {
        flex-basis: 75px;
    }

    .header-brand img.logo-elbaman,
    .language-selector {
        width: 75px;
        max-width: 75px;
    }

    .header-text h1 {
        font-size: 28px;
    }
}

/* Stile comune delle tabelle dell'archivio */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 24px;
    font-size: 0.95rem;
    background: #ffffff;
}

.data-table th,
.data-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #dddddd;
    vertical-align: middle;
}

.data-table th {
    background: #f3f3f3;
    font-weight: 600;
    text-align: left;
}

.data-table tbody tr:hover {
    background: #fafafa;
}

/* Versione compatta */
.data-table--compact th,
.data-table--compact td {
    padding: 7px 10px;
}

/* Versione stretta per i dati anagrafici */
.data-table--narrow {
    max-width: 480px;
}

.data-table--narrow th {
    width: 180px;
}


.scheda-atleta h2 {
    margin: 0 0 12px;
    font-size: 1.7rem;
    line-height: 1.2;
}

/* Tabella statistiche atleta */
.tabella-statistiche {
    margin-top: 8px;
}

.tabella-statistiche th {
    background: #003b7a;
    color: #ffffff;
    text-align: center;
}

.tabella-statistiche td {
    text-align: center;
    font-size: 1.05rem;
    font-weight: 600;
}

.tabella-statistiche img {
    height: 24px;
    width: auto;
}

/* Storico partecipazioni */

.tabella-storico {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
}

.tabella-storico th {
    background: #003b7a;
    color: #ffffff;
    text-align: center;
    white-space: nowrap;
}

.tabella-storico th,
.tabella-storico td {
    padding: 8px 7px;
    border: 1px solid #d7dce2;
    vertical-align: middle;
}

.tabella-storico td {
    font-size: 0.92rem;
}

/* Anno, gara, posizione e categoria */

.tabella-storico td:nth-child(1),
.tabella-storico td:nth-child(2),
.tabella-storico td:nth-child(3),
.tabella-storico td:nth-child(5),
.tabella-storico td:nth-child(6) {
    text-align: center;
}

/* Team */

.tabella-storico td:nth-child(4) {
    text-align: left;
}

/* Tutti i tempi */

.tabella-storico td:nth-child(n+7) {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Righe alternate nello storico */

.tabella-storico tbody tr:nth-child(even) {
    background-color: #f4f6f8;
}

/* Evidenziazione al passaggio del mouse */

.tabella-storico tbody tr:hover {
    background-color: #e8f1fa;
}

/* Colonna Team più larga */

.tabella-storico th:nth-child(4),
.tabella-storico td:nth-child(4) {
    min-width: 150px;
}

/* Collegamento alla scheda atleta */

.link-atleta {
    color: #003b7a;
    font-weight: 600;
    text-decoration: none;
}

.link-atleta:hover {
    text-decoration: underline;
}

/* Tabella risultati ricerca */

.tabella-atleti {
    width: auto;
    min-width: 500px;
}

.tabella-atleti th:nth-child(2),
.tabella-atleti td:nth-child(2) {
    width: 240px;
}

.tabella-atleti th:nth-child(3),
.tabella-atleti td:nth-child(3) {
    width: 200px;
}

.icona-exclusive-ricerca {
    display: block;
    height: 24px;
    width: auto;
    margin: 0 auto;
}

/* Link nelle righe della ricerca */

.link-riga {
    display: block;
    color: #003b7a;
    font-weight: 600;
    text-decoration: none;
    width: 100%;
}

.link-riga:hover {
    text-decoration: none;
}

/* Evidenzia tutta la riga */

.tabella-atleti tbody tr:hover {
    background-color: #e8f1fa;
    cursor: pointer;
}

.tabella-gare {
    width: auto;
    min-width: 520px;
}

.tabella-gare th,
.tabella-gare td {
    text-align: center;
}

.tabella-gare th:first-child,
.tabella-gare td:first-child {
    width: 110px;
}

.tabella-gare {
    width: auto;
    min-width: 520px;
    margin: 12px auto 24px;
}

.exclusive-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.exclusive-column table {
    width: 100%;
}

.exclusive-members-table th:first-child,
.exclusive-members-table td:first-child {
    width: 72%;
}

.exclusive-members-table th:nth-child(2),
.exclusive-members-table td:nth-child(2) {
    width: 28%;
}

.exclusive-column {
    flex: 1;
    min-width: 0;
    max-height: calc(100vh - 220px);
    overflow-y: scroll;
}

.exclusive-title-row {
    display: flex;
    align-items: center;
    gap: 30px;
}

.exclusive-title-row h1 {
    margin: 0;
}

.exclusive-title-logo {
    width: auto;
    height: 100px;
    display: block;
}

.exclusive-column h2 {
    margin: 0 0 8px;
    color: #003b7a;
}

.exclusive-description {
    margin: 0 0 18px;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.4;
}

.statistics-index {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 30px;
    margin-bottom: 50px;
}

.statistics-index-group {
    background: #f7f7f7;
    border: 1px solid #dddddd;
    padding: 20px;
}

.statistics-index-group h2 {
    margin-top: 0;
    color: #003366;
}

.statistics-index-group ul {
    margin: 0;
    padding-left: 20px;
}

.statistics-index-group li {
    margin-bottom: 10px;
}

.statistics-index-group a {
    color: #003366;
    text-decoration: none;
}

.statistics-index-group a:hover {
    text-decoration: underline;
}

.statistics-disabled {
    color: #999999;
}

.statistics-disabled span {
    margin-left: 6px;
    font-size: 13px;
    font-style: italic;
}

.statistics-section {
    margin-top: 55px;
    scroll-margin-top: 20px;
}

.statistics-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.statistics-title-row h2 {
    margin: 0;
}

.statistics-top-arrow {
    font-size: 24px;
    text-decoration: none;
    color: #003366;
}

.statistics-placeholder {
    margin-top: 20px;
    padding: 25px;
    background: #f7f7f7;
    border: 1px dashed #bbbbbb;
    color: #777777;
}

.statistics-back-link {
    margin-top: 15px;
}

.statistics-back-link a {
    color: #003366;
    text-decoration: none;
}

.statistics-back-link a:hover {
    text-decoration: underline;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background: #f1f1f1;
}

.statistics-table th:first-child,
.statistics-table td:first-child {
    width: 8%;
    text-align: center;
}

.statistics-table th:nth-child(2),
.statistics-table td:nth-child(2) {
    width: 25%;
}

.statistics-table th:nth-child(3),
.statistics-table td:nth-child(3) {
    width: 10%;
    text-align: center;
}

.statistics-table th:nth-child(4),
.statistics-table td:nth-child(4) {
    width: 12%;
    text-align: center;
    white-space: nowrap;
}

.statistics-table th:last-child,
.statistics-table td:last-child {
    width: 45%;
    text-align: center;
    white-space: nowrap;
}

.titolo-atleta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.medaglie-atleta {
    font-size: 0.82em;
    line-height: 1;
    letter-spacing: 2px;
    white-space: nowrap;
}

.nota-gara-annullata {
    max-width: 850px;
    margin: 18px 0 28px;
    line-height: 1.5;
    font-style: italic;
}

.nations-table {
    margin-left: auto;
    margin-right: auto;
}

.nations-table--summary {
    width: 100%;
    max-width: 550px;
}

.nations-table--summary th:first-child,
.nations-table--summary td:first-child {
    width: 20%;
    text-align: center;
}

.nations-table--summary th:nth-child(2),
.nations-table--summary td:nth-child(2) {
    width: 50%;
}

.nations-table--summary th:last-child,
.nations-table--summary td:last-child {
    width: 30%;
    text-align: center;
}

.nations-table--year {
    width: 100%;
    max-width: 700px;
    margin-top: 25px;
    table-layout: fixed;
}

.nations-table--year .col-year {
    width: 15%;
    text-align: center;
    vertical-align: middle;
    font-weight: 600;
}

.nations-table--year .col-code {
    width: 15%;
    text-align: center;
}

.nations-table--year .col-name {
    width: 45%;
    text-align: left;
}

.nations-table--year .col-count {
    width: 25%;
    text-align: center;
}

.statistics-note {
    margin: 8px 0 20px;
    text-align: left;
    font-size: 0.95rem;
    color: #666;
}

.atleta-info-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
}

.atleta-dati {
    flex: 1;
}

.atleta-foto {
    width: 40%;
    max-width: 520px;
    text-align: center;
}

.atleta-foto img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}