.gironi-select {
    display: none;
    margin-bottom: 1.25rem;
}

.gironi-select label {
    font-size: 0.9rem;
    color: var(--neutral-700);
    margin-bottom: 0.35rem;
    display: block;
}

.gironi-select select {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(29, 100, 124, 0.25);
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    color: var(--primary-dark);
    background-color: var(--white-color);
}

.gironi-select select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(29, 100, 124, 0.18);
}

@media (max-width: 768px) {
    /* Nascondi il selettore base su mobile (usiamo quello migliorato) */
    .gironi-select:not(.gironi-select-mobile) {
        display: none !important;
    }
    
    /* Mostra il selettore mobile migliorato */
    .gironi-select-mobile {
        display: block !important;
    }

    #gironiTabs {
        display: none;
    }
}
/* indexStyle.css - Stili per la pagina pubblica del torneo */

/* Le variabili CSS sono definite dinamicamente nell'index.php */
:root {
    --primary-color: #de551f;
    --primary-dark: #0a0a0a;
    --secondary-color: #e86a32;
    --secondary-dark: #a33a12;
    --accent-color: #de551f;
    --success-color: #3d9b6a;
    --light-color: #161616;
    --neutral-700: #c8c8c8;
    --neutral-400: #8a8a8a;
    --neutral-200: #2a2a2a;
    --neutral-100: #0a0a0a;
    --neutral-900: #f5f5f5;
    --white-color: #ffffff;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--neutral-100);
    color: var(--neutral-900);
    -webkit-font-smoothing: antialiased;
}

.header-banner {
    background: linear-gradient(125deg, var(--primary-dark), var(--primary-color));
    color: var(--white-color);
    padding: 2.5rem 0;
    text-align: center;
    box-shadow: 0 18px 40px -24px rgba(19, 67, 81, 0.45);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo-container img {
    max-height: 84px;
    width: auto;
}

.nav-tabs .nav-link {
    color: var(--primary-color);
    border: 1px solid transparent;
    border-radius: 999px;
    margin: 0 6px;
    padding: 10px 22px;
    font-weight: 500;
    transition: all 0.25s ease;
    background-color: rgba(29, 100, 124, 0.08);
}

.nav-tabs .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
    box-shadow: 0 10px 22px -12px rgba(29, 100, 124, 0.6);
}

.nav-tabs .nav-link:hover {
    background-color: var(--secondary-color);
    color: var(--primary-dark);
}

.card {
    border: none;
    box-shadow: 0 20px 40px -32px rgba(19, 67, 81, 0.55);
    border-radius: 18px;
    margin-bottom: 2rem;
    background-color: var(--white-color);
}

.card-header {
    background: linear-gradient(145deg, var(--primary-dark), var(--primary-color));
    color: var(--white-color);
    border-radius: 18px 18px 0 0 !important;
    padding: 1.1rem 1.75rem;
}


.table th {
    background-color: var(--primary-dark);
    color: var(--white-color);
    border: none;
    font-weight: 600;
}


.table tbody tr:hover {
    background-color: rgba(29, 100, 124, 0.08);
}

.badge-disciplina {
    background-color: var(--success-color);
}

.badge-cannonieri {
    background-color: var(--accent-color);
    color: var(--neutral-900);
}

.footer {
    background: linear-gradient(120deg, var(--primary-dark), var(--primary-color));
    color: var(--white-color);
    padding: 3rem 0 1.25rem 0;
    margin-top: 4rem;
}

.sponsor-logo {
    max-height: 120px;
    max-width: 200px;
    width: auto;
    height: auto;
    margin: 10px auto;
    display: block;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.sponsor-logo:hover {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* Stili per le schede gironi */
#gironiTabs .nav-link {
    color: var(--primary-color);
    border: none;
    border-radius: 0;
    padding: 1rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    background: transparent;
}

#gironiTabs .nav-link:hover {
    background-color: rgba(29, 100, 124, 0.08);
    color: var(--primary-color);
    border-bottom-color: var(--secondary-color);
}

#gironiTabs .nav-link.active {
    background-color: transparent;
    color: var(--primary-dark);
    border-bottom-color: var(--secondary-color);
    font-weight: 600;
}

.stat-item {
    padding: 1.2rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(29, 100, 124, 0.09), rgba(169, 204, 100, 0.18));
    border: 1px solid rgba(29, 100, 124, 0.08);
    margin-bottom: 1.2rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px -20px rgba(29, 100, 124, 0.65);
}

.stat-item h3 {
    font-size: 2.25rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.stat-item p {
    font-size: 0.92rem;
    margin-bottom: 0;
    color: var(--neutral-700);
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--white-color);
    padding: 1.5rem;
    z-index: 2000;
    display: none;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
}

.cookie-banner .btn {
    margin: 0.25rem;
}

.cookie-preferences-modal .modal-content {
    border: none;
    border-radius: 15px;
}

.cookie-preferences-modal .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.privacy-policy-content {
    max-height: 60vh;
    overflow-y: auto;
}

.privacy-policy-content h5 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.cookie-type {
    background-color: var(--light-color);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.cookie-type h6 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.giornata-selector {
    background-color: var(--white-color);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 14px 25px -24px rgba(19, 67, 81, 0.45);
    border: 1px solid rgba(29, 100, 124, 0.08);
}

.fase-selector {
    background: linear-gradient(135deg, var(--primary-color), rgba(169, 204, 100, 0.85));
    color: var(--white-color);
    padding: 1.1rem 1.25rem;
    border-radius: 14px;
    margin-bottom: 2rem;
    box-shadow: 0 20px 40px -32px rgba(29, 100, 124, 0.55);
}

.fase-selector .btn-group .btn {
    border-radius: 999px;
    padding: 0.6rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--white-color);
    backdrop-filter: blur(4px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fase-selector .btn-group .btn:hover,
.fase-selector .btn-group .btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -20px rgba(12, 36, 46, 0.6);
}

/* Hover specifico per pulsanti non selezionati (outline) */
.fase-selector .btn-group .btn-outline-light:hover {
    background-color: var(--primary-dark) !important;
    color: var(--white-color) !important;
    border-color: var(--primary-dark) !important;
}

.fase-selector .btn-group .btn-light {
    color: var(--primary-dark);
    background-color: var(--white-color);
    border-color: transparent;
}

    /* Ottimizzazioni Mobile */
@media (max-width: 768px) {
    /* Garantisce che il contenuto della selezione girone sia sempre ben visibile */
    .gironi-select {
        margin-left: 0;
        margin-right: 0;
        z-index: 10;
        position: relative;
    }
    
    .gironi-select select {
        width: calc(100% - 30px) !important;
        margin: 0 auto;
        display: block;
    }
    .header-banner {
        padding: 1.5rem 0;
    }
    
    .logo-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .logo-container img {
        max-height: 64px;
    }
    
    .logo-container h1 {
        font-size: 1.5rem;
    }
    
    .fase-selector, .giornata-selector {
        padding: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .fase-selector .btn-group .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.85rem;
    }
    
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .nav-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .nav-tabs .nav-link {
        white-space: nowrap;
        font-size: 0.9rem;
        padding: 8px 16px;
        margin: 0 2px;
    }
    
    /* Ottimizzazioni mobile per schede gironi */
    #gironiTabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    #gironiTabs::-webkit-scrollbar {
        display: none;
    }
    
    #gironiTabs .nav-link {
        white-space: nowrap;
        font-size: 0.85rem;
        padding: 0.75rem 1rem;
        min-width: fit-content;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
    
    .stat-item {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .card {
        margin-bottom: 1rem;
        border-radius: 10px;
    }
    
    /* Migliora il layout del card contenente la selezione girone */
    .tab-content #classifiche .card {
        margin-bottom: 1.5rem;
    }
    
    .tab-content #classifiche .card .card-body {
        padding: 1rem !important;
    }
    
    .card-header {
        padding: 0.9rem 1.2rem;
        font-size: 0.95rem;
    }
    
    .table-responsive {
        font-size: 0.85rem;
        border-radius: 12px;
    }
    
    .table th, .table td {
        padding: 0.55rem 0.45rem;
        vertical-align: middle;
    }
    
    .badge {
        font-size: 0.72rem;
        padding: 0.28rem 0.45rem;
    }

    .cookie-banner {
        padding: 1rem;
    }
    
    .cookie-banner .btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
    
    .footer {
        padding: 2rem 0 1rem 0;
        text-align: center;
    }
    
    .footer .row > div {
        margin-bottom: 1rem;
    }
    
    /* Miglioramenti per schermi molto piccoli */
    @media (max-width: 480px) {
        .container {
            padding: 0 10px;
        }
        
        .fase-selector .btn-group {
            flex-wrap: wrap;
            width: 100%;
        }
        
        .fase-selector .btn-group .btn {
            flex: 1;
            min-width: calc(50% - 4px);
        }
        
        .table-responsive {
            font-size: 0.75rem;
        }
        
        .modal-dialog {
            margin: 0.5rem;
            max-width: calc(100% - 1rem);
        }
        
        .nav-tabs .nav-link {
            font-size: 0.82rem;
            padding: 6px 12px;
        }
        
        /* Schede gironi su schermi molto piccoli */
        #gironiTabs .nav-link {
            font-size: 0.75rem;
            padding: 0.5rem 0.75rem;
        }
        
        .stat-item h3 {
            font-size: 1.75rem;
        }
        
        .stat-item {
            padding: 0.5rem;
        }
    }
}

/* Ottimizzazioni Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
}

/* Animazioni e transizioni fluide */
.card, .btn, .nav-link, .badge {
    transition: all 0.3s ease;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

/* Miglioramenti accessibilità */
.btn:focus, .nav-link:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Match Cards Styles */
.match-card {
    border: 1px solid rgba(29, 100, 124, 0.12);
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 16px 32px -30px rgba(19, 67, 81, 0.75);
    background-color: var(--white-color);
}

.match-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 38px -26px rgba(19, 67, 81, 0.85);
    border-color: rgba(29, 100, 124, 0.35);
}

.match-card .card-header {
    background: linear-gradient(135deg, rgba(29, 100, 124, 0.08), rgba(169, 204, 100, 0.18));
    border-bottom: 1px solid rgba(29, 100, 124, 0.12);
    border-radius: 16px 16px 0 0 !important;
}

.match-card .card-body {
    min-height: 200px;
}

/* Fix allineamento squadre nelle match card */
.match-card .row {
    align-items: flex-start !important;
}

.match-card .row > div {
    vertical-align: top;
}

.match-card .row .col-5,
.match-card .row .col-2 {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

/* Allinea risultato/VS in alto */
.match-card .col-2 {
    padding-top: 3.5rem;
    align-self: flex-start;
}

.match-result,
.match-vs {
    margin-top: 0;
    margin-bottom: auto;
}

/* Assicura che le colonne mantengano l'allineamento in alto */
.match-card .col-5 {
    align-self: flex-start;
}

.match-card .team-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 120px;
    justify-content: flex-start;
}

.match-card .team-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60px;
    max-height: 60px;
    height: 60px;
    margin-bottom: 0.5rem;
}

.match-card .team-logo img,
.match-card .team-logo .team-jersey {
    max-height: 50px !important;
    max-width: 50px !important;
    width: auto;
    height: auto;
    object-fit: contain;
}

.match-card h6 {
    font-size: 0.95rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    text-align: center;
    height: 3.9em;
    max-height: 3.9em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-result h4 {
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.match-vs h5 {
    font-weight: 600;
    opacity: 0.7;
}

.match-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: rgba(29, 100, 124, 0.08);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    color: var(--primary-dark);
}

.match-stats {
    margin-top: 0.75rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

/* Desktop: centra le match stats */
@media (min-width: 769px) {
    .match-stats {
        align-items: center;
        padding: 0 5px;
    }
}

.match-stats .badge {
    font-size: 0.75rem;
    font-weight: 500;
}

.match-stats .badge.bg-success {
    background-color: var(--success-color) !important;
}

.match-stats .badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.match-stats .badge.bg-danger {
    background-color: #dc3545 !important;
}

/* Separatore dopo il nome squadra */
.team-name-separator {
    width: 60%;
    height: 1px;
    background-color: #dee2e6;
    margin: 0.5rem auto;
    opacity: 0.6;
}

/* Marcatori Styles */
.marcatori {
    min-height: 1rem;
    width: 100%;
    overflow: hidden;
    text-align: left;
    padding: 0 5px;
}

/* Desktop: centra meglio i marcatori */
@media (min-width: 769px) {
    .marcatori {
        text-align: center;
        padding: 0 10px;
    }
    
    .marcatori small {
        text-align: center;
    }
}

.marcatori small {
    line-height: 1.2;
    font-weight: 500;
    margin-bottom: 2px;
    display: block;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    text-align: left;
}

.marcatori .text-dark {
    color: #f5f5f5 !important;
    font-size: 0.75rem;
}

.marcatori .text-muted {
    color: #3a3a3a !important;
    font-size: 0.75rem;
}

/* Cartellini Styles */
.cartellini {
    min-height: 1rem;
    width: 100%;
    overflow: hidden;
    text-align: left;
    padding: 0 5px;
}

/* Desktop: centra meglio i cartellini */
@media (min-width: 769px) {
    .cartellini {
        text-align: center;
        padding: 0 10px;
    }
    
    .cartellini small {
        text-align: center;
    }
}

.cartellini small {
    line-height: 1.2;
    font-weight: 500;
    margin-bottom: 2px;
    display: block;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    text-align: left;
}

/* Match Card Responsive */
@media (max-width: 768px) {
    .match-card .card-body {
        padding: 0.75rem !important;
        min-height: 180px;
    }
    
    .match-card .team-section {
        min-height: 100px;
        justify-content: flex-start;
    }
    
    .marcatori,
    .cartellini {
        text-align: left;
        padding: 0 3px;
    }
    
    .match-stats {
        align-items: flex-start;
    }
    
    .match-card .col-2 {
        padding-top: 3rem;
    }
    
    .match-card .team-logo {
        min-height: 50px;
        max-height: 50px;
        height: 50px;
        margin-bottom: 0.35rem;
    }
    
    .match-card .team-logo img,
    .match-card .team-logo .team-jersey {
        max-height: 40px !important;
        max-width: 40px !important;
    }
    
    .match-card h6 {
        font-size: 0.85rem;
        line-height: 1.2;
        height: 3.6em;
        max-height: 3.6em;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        padding: 0 3px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .match-result h4 {
        font-size: 1.1rem;
    }
    
    .match-vs h5 {
        font-size: 1rem;
    }
    
    .match-card .card-header {
        padding: 0.5rem;
    }
    
    .match-card .card-header small {
        font-size: 0.7rem;
        display: block;
        line-height: 1.3;
    }
    
    .marcatori .text-dark,
    .marcatori .text-muted {
        font-size: 0.7rem;
    }
    
    .cartellini small {
        font-size: 0.7rem;
    }
    
    .match-stats {
        margin-top: 0.35rem;
    }
}

@media (max-width: 576px) {
    .match-card .card-body {
        padding: 0.5rem !important;
        min-height: 160px;
    }
    
    .match-card .team-section {
        justify-content: flex-start;
    }
    
    .match-card .team-logo {
        min-height: 45px;
        max-height: 45px;
        height: 45px;
    }
    
    .marcatori,
    .cartellini {
        text-align: left;
        padding: 0 2px;
    }
    
    .match-stats {
        align-items: flex-start;
    }
    
    .match-card .col-2 {
        padding-top: 2.75rem;
    }
    
    .match-card .team-logo img,
    .match-card .team-logo .team-jersey {
        max-height: 35px !important;
        max-width: 35px !important;
    }
    
    .match-card h6 {
        font-size: 0.8rem;
        line-height: 1.15;
        height: 3.45em;
        max-height: 3.45em;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        padding: 0 2px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .match-result h4 {
        font-size: 1rem;
    }
    
    .match-vs h5 {
        font-size: 0.9rem;
    }
    
    .marcatori .text-dark,
    .marcatori .text-muted,
    .cartellini small {
        font-size: 0.65rem;
    }
}

/* Stili per la visualizzazione dei colori delle squadre */
.team-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.team-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
}

.team-name-colored {
    transition: all 0.2s ease;
    border: 1px solid rgba(0,0,0,0.1);
    text-align: center;
    color: #f5f5f5;
}

.team-name-colored:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.team-colors-visual {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 6px;
}

.team-colors-visual .color-swatch {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.2);
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.team-colors-visual.team-colors-lg {
    gap: 10px;
    margin-top: 8px;
}

.team-colors-visual.team-colors-lg .color-swatch,
.team-colors-visual .color-swatch-lg {
    width: 22px;
    height: 22px;
}

.team-colors-visual.team-colors-xs {
    gap: 4px;
    margin-top: 4px;
}

.team-colors-visual.team-colors-xs .color-swatch,
.team-colors-visual .color-swatch-xs {
    width: 12px;
    height: 12px;
}

/* Stili per le magliette SVG */
.team-jersey {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: transform 0.2s ease;
}

.team-jersey:hover {
    transform: scale(1.05);
}

/* Assicura che le magliette SVG si adattino bene */
.team-logo .team-jersey {
    object-fit: contain;
}

/* Stili per la stampa */
@media print {
    body {
        background: #ffffff;
        color: #000000;
    }
    .calendario-header {
        justify-content: center !important;
    }
    .calendario-header .btn {
        display: none !important;
    }

    .header-banner,
    .fase-selector,
    .giornata-selector,
    .nav,
    .footer,
    .cookie-banner,
    .print-hide,
    .toast,
    .alert {
        display: none !important;
    }

    .calendar-print .card,
    .calendar-print .card-body {
        border: none;
        box-shadow: none;
    }

    .calendar-print .table {
        font-size: 0.9rem;
        table-layout: fixed;
    }

    .calendar-print .table thead th {
        background-color: #f8f9fa !important;
        color: #000 !important;
    }

    .calendar-print .table th,
    .calendar-print .table td {
        padding: 6px;
        vertical-align: middle;
    }

    .calendar-print .giornata-section {
        page-break-inside: avoid;
        margin-bottom: 16px;
    }

    .calendar-print .giornata-section.print-hide-temporary {
        display: none !important;
    }

    .calendar-print .giornata-section.print-focus {
        page-break-inside: avoid;
    }

    body.printing-single-giornata .calendar-print {
        display: none !important;
    }

    body.printing-single-giornata .print-only-wrapper {
        display: block !important;
    }

    body.printing-single-giornata .print-only-wrapper .table {
        font-size: 0.8rem;
        table-layout: fixed;
    }

    body.printing-single-giornata .print-only-wrapper .table th,
    body.printing-single-giornata .print-only-wrapper .table td {
        padding: 4px 6px;
    }

    body.printing-single-giornata .print-only-wrapper .giornata-section {
        margin-bottom: 8px;
        page-break-inside: avoid;
    }

    body.printing-single-giornata .print-only-wrapper h6 {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    @page {
        margin: 15mm;
    }
}

.calendario-header .btn {
    min-width: 180px;
}

.print-only-wrapper {
    display: none;
}

/* Fix per problemi mobile - responsive e tab navigation */
@media (max-width: 768px) {
    /* Responsive: su mobile riduci padding */
    .team-name-colored {
        padding: 3px 8px !important;
        font-size: 0.9rem;
        min-width: 60px !important;
    }
    
    .team-logo {
        min-height: 40px;
    }
    
    .team-logo img {
        max-height: 40px !important;
        max-width: 50px !important;
    }

    /* Nascondi solo la label del dropdown (seleziona fase + icona) */
    .fase-selector .gironi-select label {
        display: none !important;
    }
    
    /* Fix per navigazione tab principale con scroll orizzontale */
    #mainTabs {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start !important;
        padding-bottom: 10px;
        margin-bottom: 1rem !important;
        width: 100%;
        display: flex !important;
    }
    
    #mainTabs .nav-item {
        flex-shrink: 0;
        display: block !important;
        min-width: auto;
    }
    
    #mainTabs .nav-link {
        white-space: nowrap;
        margin-right: 8px;
        padding: 10px 16px;
        font-size: 14px;
        display: block !important;
        min-width: 100px;
        text-align: center;
    }
    
    /* Applica esattamente gli stili desktop ai tab mobile */
    .nav-tabs .nav-link {
        color: var(--primary-color) !important;
        background-color: rgba(29, 100, 124, 0.08) !important;
        border: 1px solid transparent !important;
        border-radius: 999px !important;
        font-weight: 500 !important;
        transition: all 0.25s ease !important;
    }
    
    .nav-tabs .nav-link:hover,
    .nav-tabs .nav-link:focus,
    .nav-tabs .nav-link:active {
        background-color: var(--secondary-color) !important;
        color: var(--primary-dark) !important;
        border-color: transparent !important;
    }
    
    .nav-tabs .nav-link.active {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
        color: var(--white-color) !important;
        box-shadow: 0 10px 22px -12px rgba(29, 100, 124, 0.6) !important;
        border-color: transparent !important;
    }
    
    .nav-tabs .nav-link.active:hover,
    .nav-tabs .nav-link.active:focus {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
        color: var(--white-color) !important;
        box-shadow: 0 10px 22px -12px rgba(29, 100, 124, 0.6) !important;
    }
    
    /* Fix per i tab dei gironi */
    .nav-pills .nav-link {
        color: var(--primary-color) !important;
        background-color: transparent !important;
    }
    
    .nav-pills .nav-link:hover,
    .nav-pills .nav-link:focus,
    .nav-pills .nav-link:active {
        color: var(--white-color) !important;
        background-color: var(--primary-color) !important;
    }
    
    .nav-pills .nav-link.active {
        background-color: var(--primary-color) !important;
        color: var(--white-color) !important;
    }
    
    .nav-pills .nav-link.active:hover,
    .nav-pills .nav-link.active:focus {
        background-color: var(--primary-dark) !important;
        color: var(--white-color) !important;
    }
    
    /* Fix per allineamento sezione classifiche */
    .tab-content {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-pane {
        min-width: 100%;
        padding: 0 10px;
    }
    
    /* Assicura che le tabelle siano scrollabili orizzontalmente */
    .table-responsive {
        margin-left: 0;
        margin-right: 0;
    }
    
    /* Fix per la navigazione dei gironi su mobile */
    .nav-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
    }
    
    .nav-pills .nav-item {
        flex-shrink: 0;
    }
    
    .nav-pills .nav-link {
        white-space: nowrap;
        min-width: auto;
        padding: 8px 12px;
        margin-right: 5px;
    }
    
    /* Migliora la visibilità del dropdown gironi su mobile */
    .gironi-select {
        margin-bottom: 1rem;
        padding: 0 10px;
    }
    
    .gironi-select select {
        width: 100%;
        padding: 10px;
        font-size: 16px; /* Previene zoom su iOS */
    }
    
    /* Stile personalizzato per scroll orizzontale sui tab */
    #mainTabs::-webkit-scrollbar {
        height: 4px;
    }
    
    #mainTabs::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
    }
    
    #mainTabs::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
    }
    
    #mainTabs::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.5);
    }
}

/* ================================================
   STILI ARTICOLI GIORNATE
   ================================================ */

.article-content {
    font-size: 1rem;
    color: var(--neutral-700, #3e4c59);
    line-height: 1.8;
    text-align: justify;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.article-content p {
    margin-bottom: 1rem;
}

/* Header articoli con colori differenziati */
.card-header.bg-primary.text-white {
    background: linear-gradient(135deg, var(--primary-color, #1d647c), var(--primary-dark, #134351)) !important;
    border: none;
    padding: 1.25rem 1.5rem;
}

.card-header.bg-success.text-white {
    background: linear-gradient(135deg, var(--success-color, #198754), #146c43) !important;
    border: none;
    padding: 1.25rem 1.5rem;
}

.card-header h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-header small.text-white-50 {
    opacity: 0.85;
    font-size: 0.875rem;
}

/* Migliora la leggibilità degli articoli */
.article-content {
    padding: 0.5rem 0;
}

/* Responsive per articoli */
@media (max-width: 768px) {
    .article-content {
        font-size: 0.95rem;
        line-height: 1.7;
        text-align: left;
    }
    
    .card-header {
        padding: 1rem 1.25rem;
    }
    
    .card-header h5 {
        font-size: 1.1rem;
    }
    
    .card-header small {
        font-size: 0.8rem;
    }
}

/* Animazione per gli articoli */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Stile emoji e caratteri speciali negli articoli */
.article-content {
    font-feature-settings: "kern" 1, "liga" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================================================
   STILI AGGIUNTIVI DA INDEX.PHP
   ================================================ */

/* Stile per immagine squadra cliccabile */
.team-logo-clickable {
    transition: all 0.3s ease;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 4px;
}

.team-logo-clickable:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.team-logo-clickable:active {
    transform: scale(0.98);
}

/* Stile per modal immagine ingrandita */
#teamImageModal .modal-content {
    background: rgba(0, 0, 0, 0.9) !important;
}

#teamImageModal .modal-body {
    background: rgba(0, 0, 0, 0.95);
    padding: 1rem;
}

#teamImageModal img {
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Stili per articoli formattati (aggiuntivi) */
.article-content {
    text-align: justify;
}

.article-content p {
    margin-bottom: 1rem;
    text-indent: 0;
}

.article-content ul {
    margin-bottom: 1rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    position: relative;
}

.article-content li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: -1rem;
}

.article-content strong {
    color: var(--primary-dark);
    font-weight: 600;
}

.article-content em {
    color: var(--secondary-dark);
    font-style: italic;
}

.article-content u {
    text-decoration: underline;
    text-decoration-color: var(--accent-color);
    text-decoration-thickness: 2px;
}

.article-content del {
    color: var(--neutral-400);
}

.article-content a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-color: var(--primary-color);
    transition: all 0.3s ease;
}

.article-content a:hover {
    color: var(--primary-dark);
    text-decoration-color: var(--primary-dark);
}

/* Stili per la label del selettore girone su mobile */
.girone-select-label {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    display: block;
}

@media (max-width: 768px) {
    .girone-select-label {
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        color: white !important;
        text-shadow: 0 1px 2px rgba(0,0,0,0.3);
        margin-bottom: 0.75rem !important;
        text-align: center;
        background: linear-gradient(135deg, var(--primary-color), rgba(169, 204, 100, 0.85)) !important;
        border-radius: 8px 8px 0 0;
        margin: -1rem -1rem 0.75rem -1rem !important;
        padding: 0.75rem 1rem !important;
        box-shadow: 0 20px 40px -32px rgba(29, 100, 124, 0.55);
    }
}

/* Stili per sezione foto */
.foto-gallery-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--neutral-200);
}

.foto-gallery-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.foto-gallery-title i {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

.foto-thumbnails {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.foto-thumbnail {
    position: relative;
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.foto-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.foto-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.foto-thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0,0,0,0.3), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.foto-thumbnail:hover .foto-thumbnail-overlay {
    opacity: 1;
}

.foto-thumbnail-overlay i {
    color: white;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.foto-more-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.foto-more-link:hover {
    background: var(--primary-dark);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.foto-more-link i {
    margin-right: 0.5rem;
}

/* Modal carousel foto */
.foto-carousel-modal .modal-content {
    background: rgba(0, 0, 0, 0.95);
    border: none;
    border-radius: 12px;
}

.foto-carousel-modal .modal-header {
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.foto-carousel-modal .modal-body {
    padding: 0;
    background: rgba(0, 0, 0, 0.95);
}

.foto-carousel-container {
    position: relative;
    max-height: 80vh;
    overflow: hidden;
}

.foto-carousel-item {
    display: none;
    text-align: center;
    padding: 1rem;
    position: relative;
}

.foto-carousel-item.active {
    display: block;
}

.foto-carousel-item img {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.foto-carousel-autore-overlay {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    opacity: 0.95;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.foto-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 0.75rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 20;
}

.foto-carousel-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.foto-carousel-nav.prev {
    left: 1rem;
}

.foto-carousel-nav.next {
    right: 1rem;
}

.foto-carousel-info {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    margin-top: 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
}

.foto-carousel-counter {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.foto-carousel-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    text-align: center;
    font-size: 0.85rem;
}

.foto-carousel-description {
    font-size: 0.75rem;
    opacity: 0.8;
    text-align: center;
    margin-bottom: 0.5rem;
}

.foto-carousel-partita {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.4rem;
    border-radius: 4px;
    margin-bottom: 0.4rem;
    border-left: 2px solid var(--accent-color);
    display: none; /* Nascosto di default */
}

.foto-carousel-partita-title {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
}

.foto-carousel-partita-title i {
    margin-right: 0.3rem;
    font-size: 0.7rem;
}

.foto-carousel-partita-info {
    font-size: 0.7rem;
    opacity: 0.9;
    line-height: 1.2;
}

.foto-carousel-partita-squadre {
    font-weight: 500;
    color: white;
    margin-bottom: 0.1rem;
}

.foto-carousel-partita-dettagli {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.65rem;
}

.foto-carousel-autore {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.4rem;
    border-radius: 4px;
    border-left: 2px solid var(--primary-color);
    display: none; /* Nascosto di default */
}

.foto-carousel-autore-title {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
}

.foto-carousel-autore-title i {
    margin-right: 0.3rem;
    font-size: 0.7rem;
}

.foto-carousel-autore-info {
    font-size: 0.7rem;
    opacity: 0.9;
}

.foto-carousel-autore-nome {
    font-weight: 500;
    color: white;
}

.foto-carousel-autore-data {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.65rem;
    margin-top: 0.1rem;
}

/* Responsive per foto */
@media (max-width: 768px) {
    .foto-thumbnails {
        justify-content: center;
    }
    
    .foto-thumbnail {
        width: 100px;
        height: 70px;
    }
    
    .foto-carousel-nav {
        padding: 0.5rem;
        font-size: 1.2rem;
    }
    
    .foto-carousel-nav.prev {
        left: 0.5rem;
    }
    
    .foto-carousel-nav.next {
        right: 0.5rem;
    }
}