html {
    scroll-behavior: smooth;
    scroll-padding: 1rem;
}
body { color: #000; }

div#page-container {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Imposta altezza minima a 100% della viewport */
}

div#content-wrap,
div#content-wrap2,
div#content-wrap-guest {
    padding-bottom: 4rem;
    flex-grow: 1;
    width: 1520px;
    margin: 0 auto;
    max-width: 100%;    
}

.red_text {
    color: #db4436;
}

.menu-bar,
.menu-mobile {
    margin-bottom: 20px;
}

li#adminmenu {
    display: none;
}

#donate {
    display: inline-block;
    margin: 4px 0 0 5px;
}

a.footer-link {
    color: #fff
}

a.button {
    padding: 14px;
    border: 2px solid #fff;
    border-radius: 10px;
    margin-top: 0;
    display: inline-block;
    text-decoration: unset;
    text-transform: uppercase;
    color: #fff;
    background: #152053;
    cursor: pointer;
}

a.button:hover {
    background: #db4437;
    color: #fff;
}

a.nolink {
    text-decoration: none;
    color: currentcolor;
}

input[type="image"] {
    height: 16px;
}

.footer-copy {
    display: inline-block;
    vertical-align: top;
    margin: 0;
    padding: 0;
}

input.name {
    padding: 20px;
    font-size: 22px;
    margin: 0px 0px 5px;
    width: 100%;
    text-transform: uppercase;
}

form.formazioni {
    margin: 0 auto;
    text-align: center;
}

li div {
    font-size: 25px;
}

.menu-top ul li {
    padding: 4px 10px;
    max-width: 100%;
    width: 124px;
}

input[type="submit"] {
    padding: 20px;
    text-transform: uppercase;
    min-width: 50%;
    margin: 0 0 30px;
    text-align: center;
    font-size: 30px;
    cursor: pointer;
}

div.response-message {
    display: inline-table;
    text-align: center;
    font-size: 0.9em;
}

button#button1 {
    text-align: center;
    font-size: 16px;
    display: block;
    padding: 10px;
    margin: 20px auto;
}

.box-info {
    margin: 40px auto;
    font-size: 22px;
    width: 350px;
}

.formazione {
    text-align: center;
    border: 1px solid #eaeaea;
    padding: 20px;
}

.botao-wpp {
    text-align: center;
    font-size: 16px;
    display: block;
    padding: 10px;
    margin: 20px auto;
    border: 1px solid #505050;
    width: 178px;
    text-decoration: none;
    color: #000;
    background: #E5E5E5;
    font-family: Arial;
    border-radius: 2px;
}

h2 {
    margin: 20px 40px 0 40px;
    font-size: 29px;
    text-align: center;
    color: #000;
    font-family: 'Roboto', sans-serif;
}

h1 {
    margin: 20px 40px 0 40px;
    font-size: 50px;
    text-align: center;
    color: #db4437;
    font-family: 'Roboto', sans-serif;
}

input#md,
input#ma,
input#squadra2,
input#squadra1 {
    padding: 20px;
    font-size: 25px;
    text-align: center;
    text-transform: uppercase;
    max-width: 100%;
}

option {
    color: #999999;
    text-align: center;
}

select:invalid,
select option[value=""] {
    color: #999999;
}

span.nome {
    font-size: 25px;
    font-weight: bold;
    color: #db4437;
}

.formA,
.formB {
    display: inline-block;
    width: 49%;
    text-align: center;
    margin: 40px auto;
}

.formC {
    display: inline-block;
    width: 100%;
    text-align: center;
    margin: 40px auto;
}

table.table {
    width: 912px;
    max-width: 90%;
}

table.tableformA-cal {
    margin: 40px auto;
    border: 1px solid;
    padding: 20px;
    font-size: 25px;
    width: auto;
    text-align: center;
}

table.tableformA-cal.completo {
    display: inline-table;
    padding: 4px !important;
    width: 150px;
    max-width: 100%;
    margin: 10px auto;
}

table.tableformA-cal.attuale.completo {
    background: #152053;
}

table.tableformA-cal.completo thead td {
    background: #db4437;
    color: #fff;
}

td.head {
    background: #000;
    color: #fff;
}

table.tableformA-cal td:not(.head) {
    font-size: 30px;
    background-color: #ebeb25;
    font-weight: bold;
    padding: 10px;
}

table.tableformA-cal tr:nth-child(2n) td {
    background: #fff;
}

table.tableformA-cal.class:not(.albo,.squadra) tbody tr td:nth-child(2) {
    text-align: left;
    font-family: 'Roboto', sans-serif;
}

table.tableformA-cal.class.squadra tbody tr td:first-child {
    text-align: left;
    font-family: 'Roboto', sans-serif;
}

table.tableformA-cal.albo tbody tr td:first-child {
    text-align: center;
    font-family: 'Roboto', sans-serif;
}

tr.heading {
    padding-top: 20px;
    display: block;
    height: 0;
}

table.tableformA-tit,
table.tableformA-panch,
table.tableformB-tit,
table.tableformB-panch {
    margin: 20px auto 20px;
    border: 1px solid;
    padding: 20px;
    width: 86%;
    font-size: 25px;
}

table td {
    padding: 0 10px 5px;
}

tr.heading .head {
    display: none;
}

select#formazione,
select#formazione2,
#giornata_camp,
#anno_camp,
#giornata_cop,
#giornata_cop2,
select#girone {
    padding: 20px;
    font-size: 28px;
    font-weight: bold;
    max-width: 100%;
    -webkit-appearance: none;
    appearance: none;
    text-align: center;
    -moz-appearance: auto;
}

.red {
    color: #db4437;
}

.green {
    color: green;
}

.gol-fatti,
.topmedia {
    background-color: yellow;
}

.autogol-fatti,
.lowmedia,
.redcard {
    background-color: #db4437;
    color: #fff;
}

.red {
    background-color: #db4437;
    color: #fff;
    display: inline-block;
    padding: 8px;
}

.topmediac {
    background-color: orange;
}

div#registra_partita {
    text-align: center;
}

.right-box,
.left-box {
    width: 43%;
    display: inline-block;
}

.risultato-box {
    width: 100%;
    display: inline-block;
}

input#squadra_casa,
input#squadra_ospite {
    width: 100px;
    /* height: 100px; */
    font-size: 30px;
    text-align: center;
    padding: 20px;
}

.checkbox-group.required {
    padding: 0 0 20px;
    font-size: 20px;
    font-weight: bold;
    color: #000;
}

select#girone {
    margin-top: 10px;
    width: 92%;
}

footer {
    background: #152053;
    width: 100%;
    margin-top: 40px;
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3rem;
}

.footer-content {
    color: #fff;
    font-weight: bold;
    font-style: italic;
    font-size: 13px;
    padding: 10px 10px 0;
    text-align: center;
    display: flex;
    align-items: center;
    flex-flow: column;
}

/*Classifica*/
div.box-class {
    overflow-x: scroll;
}

table.tableformA-cal.class {
    max-width: 100%;
    width: 950px;
    margin-top: 15px;
    border: none!important;
}

table.tableformA-cal.class thead {
    font-size: 15px;
}

table.tableformA-cal.class:not(.fanta) tr:first-child td,
table.tableformA-cal.class.coppa tr:nth-child(2) td {
    background: #db4437;
    color: #fff;
}

table.tableformA-cal.class.coppa2:not(.fanta) tr:first-child td,
table.tableformA-cal.class.coppa2 tr:nth-child(2) td,
table.tableformA-cal.class.coppa2 tr:nth-child(3) td,
table.tableformA-cal.class.coppa2 tr:nth-child(4) td {
    background: orange;
    color: #fff;
}

table.tableformA-cal.class,
table.tableformA-cal.class td {
    border: 1px solid #e7e7e7;
    font-size: 18px;
}

table.tableformA-cal.class.coppa:not(.fanta) tr:nth-child(1) td,
table.tableformA-cal.class:not(.fanta) tr:nth-child(2) td,
table.tableformA-cal.class:not(.fanta) tr:nth-child(3) td {
    background: orange;
    color: #fff;
}

table.tableformA-cal.class:not(.fanta, .coppa2) tr:last-child td,
table.tableformA-cal.class:not(.fanta, .coppa2) tr:nth-child(15) td {
    background: black !important;
    color: #fff !important;
}

table.tableformA-cal.class:not(.fanta) tr:nth-child(4)~tr td {
    background: #fff;
    color: #000;
}

.box-gironi table.tableformA-cal.class tr td:nth-child(2) {
    font-size: 15px;
}

table.tableformA-cal.class:not(.squadra) tbody tr td:nth-child(3)~td {
    font-weight: 100;
}

table.tableformA-cal.class.squadra tbody tr td:nth-child(2)~td, table.tableformA-cal.class.albo tbody tr td:nth-child(2)~td {
    font-weight: 100;
}

table.tableformA-cal.class.coppa tr:nth-child(2)~tr td {
    background: #fff !important;
    color: #000 !important;
}

.box-gironi {
    width: 50%;
    display: inline-block;
}

.ui-autocomplete {
    max-width: 100%;
}

.ui-autocomplete li {
    max-width: 100%;
}

/* pwa notifications */
.pn-wrapper {
    box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.302), 0 4px 8px 3px rgba(60, 64, 67, 0.149);
    font-size: 14px;
    align-items: center;
    background-color: #222;
    border: none;
    border-radius: 4px;
    box-sizing: border-box;
    color: #fff;
    display: none;
    flex-wrap: wrap;
    font-weight: 400;
    padding: 16px 22px;
    z-index: 99999;
    text-align: left;
    position: fixed;
    margin: 20px;
    margin-top: 40px;
    right: auto;
    top: 0;
    font-family: Helvetica;
}

.pn-wrapper .pn-txt-wrap {
    display: flex;
    flex-wrap: wrap;
    position: relative;
    height: auto;
    line-height: 1;
}

.pn-wrapper .btn.act {
    color: #8ab4f8;
}

.pn-wrapper .btn {
    align-items: center;
    border: none;
    display: inline-flex;
    outline: none;
    position: relative;
    font-size: 14px;
    background: none;
    border-radius: 4px;
    box-sizing: border-box;
    color: #5f6368;
    cursor: pointer;
    font-weight: 500;
    outline: none;
    margin-left: 8px;
    min-width: auto;
    padding: 0 8px;
    text-decoration: none;
}

.pn-txt-wrap.pn-select-box {
    display: block;
    padding: 5px 15px;
}

#loading {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    /* Colore di sfondo semitrasparente */
    z-index: 9999;
    /* Assicura che il loader sia sopra tutti gli altri elementi */
    display: none;
    justify-content: center;
    align-items: center;
}

#loading img {
    width: 80px;
    /* Dimensione dell'immagine di caricamento */
    height: 80px;
}

.profile-card {
    display: flex;
    align-items: center;
    font-family: Arial, sans-serif;
    border: 1px solid #ddd;
    padding: 20px;
    max-width: 100%;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.gag {
    width: 100%;
    text-align: center;
    margin-top: 10px;
}

.gag img {
    width: 250px !important;
    height: 250px !important;
    margin: 0 !important;
}

.profile-card img {
    border-radius: 50%;
    width: 100px;
    height: 100px;
    object-fit: cover;
    margin-right: 20px;
    margin-bottom: 10px;
}

.profile-card .info {
    display: flex;
    flex-direction: column;
}

.profile-card .info h1 {
    margin: 0;
    font-size: 24px;
    color: #333;
    text-align: left;
}

.profile-card .info p {
    margin: 5px 0 0;
    color: #666;
    font-size: 16px;
}

.user-info a {
    text-decoration: none;
    color: #fff;
}

.user-info a:hover {
    text-decoration: none;
    color: #db4436;
}

tr.redRow td {
    background-color: #db4437 !important;
    color: #fff !important;
}

tr.redRow td a {
    color: #fff !important;
}

tr.yellowRow td,
table.tableformA-cal.class.coppa tr:nth-child(2)~tr.yellowRow td {
    background-color: #ebeb25 !important;
    color: #000 !important;
}

.tableformA-cal.class.fanta a {
    color: #000;
    text-decoration: none;
}

.tableformA-cal.class.fanta a:hover {
    color: #333;
    text-decoration: underline;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gallery-item {
    flex: 1 1 calc(25% - 10px);
    box-sizing: border-box;
    text-align: center;
}

.gallery img {
    width: 100%;
    height: auto;
    max-width: 400px;
}

.caption {
    margin-top: 5px;
    font-size: 16px;
    color: #555;
    text-align: center;
    font-weight: bold;
}

.lightbox img.lb-image {
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto;
}

.lb-outerContainer {
    width: 90% !important;
    height: auto !important;
}

.submenu>li:hover {
    background: #db4436;
    color: #fff;
}

.submenu>li:hover a {
    color: #fff;
}

ul.submenu li {
    width: -webkit-fill-available;
    margin: 0;
    padding: 5px;
    text-align: left;
    width: 180px;
}

.submenu>li>a:hover {
    color: #fff;
}

.topmenu {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.topmenu>.menu-item {
    position: relative;
    display: inline-flex;
    justify-content: space-evenly;
}

.topmenu>.menu-item>a {
    text-decoration: none;
    padding: 10px 20px;
    display: block;
    color: #fff;
}

.submenu {
    display: none;
    position: absolute;
    list-style-type: none;
    padding: 0;
    margin: 0;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    top: 45px;
}

.submenu>li>a {
    text-decoration: none;
    padding: 10px 20px;
    display: block;
    color: #000;
}

.menu-item:hover .submenu {
    display: block;
}

#content-wrap {
    display: none;
}
.container-box-calendar {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;    
}

/*.logout-div {
    margin: 0 auto;
    width: 950px;
    justify-content: right;
    display: flex;
  }
  .login-buttons {
    margin: 0 auto;
    max-width: 100%;
    width: 950px;
  }*/
.login-buttons {
    padding-top: 11px;
    flex: auto;
}

.button-container {
    display: flex;
    gap: 20px;
    padding-bottom: 10px;
    justify-content: end;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    font-family: "FontAwesome";
    letter-spacing: 2px;
    align-items: center;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    background-color: #db4437;
}

.btn i {
    margin-right: 8px;
}

.google {
    background-color: #db4437;
}

.facebook {
    background-color: #4267b2;
}

.google:hover {
    background: linear-gradient(90deg, #eb4e41 34%, #ff1400 0%);
}

.facebook:hover {
    background: linear-gradient(90deg, #2d68de 30%, #1b66ff 70%);
}

.user-info {
    text-align: right;
    padding: 0 10px;
    font-weight: 800;
    font-size: 20px;
    margin: 10px;
    color: #fff;
    /*width: 950px;
    margin: 0 auto;*/
    max-width: 100%;
    align-content: center;
    flex: auto;
}

button.logout-button {
    margin: 10px;
}

div#errorDiv {
    display: block;
    margin: 20px auto;
    text-align: center;
    font-size: 1.3em;
    font-weight: bold;
    color: #db4436;
}

div#garbage {
    margin: 10px 0;
    font-size: 18px;
    font-weight: bold;
}

div.box-calendari {
    display: inline-block;
    max-width: 380px;
    vertical-align: top;
    margin: 0 auto;
}
.profile-box2, .profile-box { max-width:100%; }
.profile-box2 {
    width: 60%;
}

h3.title {font-family: 'Roboto', sans-serif; margin: 0 0 10px;}    
    .forma-recente .icone span {
      font-size: 1.5rem;
      margin: 0 3px;
      padding: 0px 13px;
      border-radius: 13px;
      color: white;
      font-weight: bold;
    }
    .win { background-color: green; }
    .draw { background-color: orange; }
    .lose { background-color: red; }
    .flex {
      display: flex;
      justify-content: space-between;
      gap: 50px;
    }
    .posizione {
      font-size: 30px;
      line-height: 10px;
      font-weight: bold;
      color: #db4436;
      text-align: right;
    }
    .trofei {
      margin-top: 10px;
      width: 100%;
      text-align:center;
    }    
    .trofei img {
      border-radius: 0;
      width: 60px;
      height: auto;
      object-fit: cover;           
      margin-right: 5px!important;
    }
    .switch {
      position: relative;
      display: block;
      width: 50px;
      height: 26px;
    }

    .switch input {
      opacity: 0;
      width: 0;
      height: 0;
    }

    .switch label {
      position: absolute;
      cursor: pointer;
      background-color: #ccc;
      border-radius: 34px;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      transition: 0.4s;
    }

    .switch label::before {
      content: "";
      position: absolute;
      height: 22px;
      width: 22px;
      left: 2px;
      bottom: 2px;
      background-color: white;
      border-radius: 50%;
      transition: 0.4s;
    }

    .switch input:checked + label {
      background-color: #4CAF50;
    }

    .switch input:checked + label::before {
      transform: translateX(24px);
    }
    .config-form {
      display:flex;
      gap: 12px;
      flex-flow: column;
      flex-basis: 84%;
    }
    .config-form input[type="submit"] {
      padding: 10px;
      background: #db4436;
      color: #fff;
      font-weight: bold;
      font-size: 20px;
      text-transform: uppercase;
      border: 0;
      border-radius: 10px;
      margin-top: 30px;    
    }

/* === Stili Menu Hamburger === */
.mobile-header {
  display: none; /* Visibile solo su mobile */
  align-items: center;
  padding: 10px;
  background-color: #152053; /* O il colore che preferisci per l'header mobile */
  color: white;
  position: fixed; /* Per mantenerlo in alto */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1001; /* Sopra il .menu-bar fisso e il contenuto */
  box-sizing: border-box;
}

.hamburger-icon {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 5px 10px;
  margin-right: auto;
}

.mobile-logo {
  margin-left: 15px;
  position: absolute;
  z-index: 999999;
}

.mobile-logo img {
  height: 40px; /* Adatta l'altezza del logo come preferisci */
  width: auto;
}

.mobile-menu-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px; /* Larghezza del pannello */
  max-width: 80%;
  height: 100%;
  height: -webkit-fill-available;
  background-color: #f8f9fa; /* Colore di sfondo del pannello */
  box-shadow: 2px 0 5px rgba(0,0,0,0.2);
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
  z-index: 1002; /* Sopra l'header mobile */
  overflow-y: auto;
  padding-top: 50px; /* Spazio per il pulsante di chiusura */
  color: #333;
}

.mobile-menu-panel.open {
  transform: translateX(0);
}

.mobile-menu-panel .close-icon {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  color: #333;
  cursor: pointer;
}

.mobile-menu-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: scroll;
}

.mobile-menu-panel ul li a {
  display: block;
  padding: 12px 20px;
  text-decoration: none;
  color: #152053;
  font-weight: bold;
  border-bottom: 1px solid #eee;
}
.mobile-menu-panel ul li a:hover {
  background-color: #e9ecef;
}
.mobile-menu-panel ul li button.btn {
  width: calc(100% - 40px);
  margin: 10px 20px;
  text-align: left;
}


.mobile-menu-panel .mobile-login-buttons {
  padding: 20px;
  border-top: 1px solid #eee;
}
.mobile-menu-panel .mobile-login-buttons p {
  margin-bottom:10px;
  font-weight: bold;
}
.mobile-menu-panel .mobile-login-buttons .btn {
  display: block;
  width: 100%;
  margin-bottom: 10px;
}
/* === Fine Stili Menu Hamburger === */

/* === Stili Menu Footer Mobile === */
.mobile-footer-menu {
  display: none; /* Nascosto di default, mostrato via media query */
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #152053; /* Stesso colore dell'header mobile per coerenza */
  color: white;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.2);
  z-index: 1000; /* Sotto l'header mobile ma sopra il contenuto */
  padding: 0;
}

.mobile-footer-menu .footer-menu-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: white;
  padding: 10px 0; /* Padding interno per ogni item */
  font-size: 10px; /* Dimensione del testo sotto l'icona */
  text-align: center;
  transition: background-color 0.2s ease-in-out;
}

.mobile-footer-menu .footer-menu-item i {
  font-size: 20px; /* Dimensione dell'icona */
  margin-bottom: 4px;
}

.mobile-footer-menu .footer-menu-item:hover,
.mobile-footer-menu .footer-menu-item.active { /* Classe .active da aggiungere via JS se si vuole evidenziare la pagina corrente */
  background-color: #db4437; /* Colore per hover/active */
}

/* Aggiustamento per il contenuto in modo che non sia coperto dal footer mobile */
/* Questo padding va aggiunto al body o al contenitore principale del contenuto */
/* quando il footer mobile è visibile */
/* === Fine Stili Menu Footer Mobile === */


/* Modifiche per mostrare l'header mobile e aggiustare il contenuto quando il menu desktop è nascosto */
@media screen and (max-width:1023px) {
    table.tableformA-cal.class {margin-top:0}
    h2 {
        background: #13256e;
        color: #fff;
        padding: 10px 10px;
        text-shadow: 2px 3px 1px black;
        border-radius: 8px;
        width: 93%;
        margin: 20px 0 0;
    }
    input[type="submit"] {
        background-color: #152053;
        color: #fff;
        border: none;
        border-radius: 12px;
        padding: 14px 20px;
        font-size: 16px!important;
        font-weight: 600;
        width: 100%;
        max-width: 300px;
        margin: 10px auto;
        display: block;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
        transition: background-color 0.3s ease, transform 0.2s ease;
        }

    input[type="submit"]:hover {
        background-color: #db4436;
        cursor: pointer;
    }

    input[type="submit"]:active {
        transform: scale(0.98);
    }

    input[type="submit"]:disabled {
        background-color: #E9ECEF;
        color: #999;
        cursor: not-allowed;
    }

    .menu-bar {
        display: none; /* Il menu bar desktop viene nascosto */
    }

    .mobile-header {
        display: flex; /* Mostra l'header mobile personalizzato */
        justify-content: center;
        z-index:9999999;
    }

    /* Aggiusta il padding-top del contenuto principale per fare spazio all'header mobile fisso */
    /* Dovrai applicare questo a #content-wrap, #content-wrap2, #content-wrap-guest */
    /* o a un contenitore genitore se esiste */
    body div#content-wrap, body div#content-wrap2:not(.home), body div#content-wrap-guest {
        margin-top: 30px; /* Altezza dell'header mobile */
        padding-bottom: 60px; /* Altezza approssimativa del footer mobile per evitare sovrapposizioni */
        /* Considera che l'altezza effettiva del footer mobile dipende dal padding, font-size, ecc. */
        /* Potrebbe essere necessario un valore più preciso o calcolato dinamicamente se l'altezza varia molto. */
        /* Per ora, 60px è una stima. */
    }
    
    .menu-mobile {
        display: none; /* Nascondiamo il vecchio .menu-mobile ora che abbiamo .mobile-header */
    }

    .mobile-footer-menu {
        display: flex; /* Mostra il menu footer su mobile e applica flex per gli item */
    }

    /* NUOVA REGOLA per nascondere il menu footer mobile nella home page */
    /* Se .mobile-footer-menu è un fratello successivo di un elemento con classe .home */
    .home ~ .mobile-footer-menu {
        display: none !important; /* Usiamo !important per garantire la sovrascrittura, 
                                     anche se con una buona specificità potrebbe non essere necessario.
                                     Valuteremo se rimuoverlo dopo il test. */
    }

    .desktop-only-footer-link {
        display: none !important; /* Nascosti su mobile, !important per sovrascrivere eventuali stili inline o più specifici se necessario */
    }

    /* Stili originali per .menu-mobile che potrebbero non essere più necessari o da adattare */
    .user-info a { /* Questi stili potrebbero essere applicati agli elementi nel nuovo pannello */
        text-decoration: none;
        color: #db4436; 
    }

    .user-info a:hover {
        text-decoration: none;
        color: #575757;
    }

    .button-container { /* Potrebbe essere usato per i bottoni nel pannello */
        justify-content: center;
        padding-top: 10px; /* Riduci se necessario nel pannello */
    }

    .user-info { /* Da adattare per il pannello o rimuovere se non serve più qui */
        text-align: center;
        padding: 0;
        font-weight: 800;
        font-size: 20px;
        margin: 10px 0;
        color: #000; /* Cambiato rispetto all'originale .menu-mobile */
        width: 100%;
    }

    button.logout-button { /* Stile per il bottone logout nel pannello */
        margin: 0 auto; /* Centra se è l'unico elemento o adatta */
    }
}

/* Stili per la sezione Admin nel menu mobile */
.mobile-menu-panel ul li#mobile-admin-section .admin-accordion-toggle {
  display: flex; /* Per allineare testo e icona */
  justify-content: space-between; /* Spazio tra testo e icona */
  align-items: center; /* Allinea verticalmente */
  /* background-color: #f0f0f0; /* Leggero sfondo per distinguerlo, se si vuole */
  /* border-top: 1px solid #ddd; */
}

.mobile-menu-panel ul li#mobile-admin-section .admin-accordion-toggle .accordion-icon {
  transition: transform 0.3s ease; /* Animazione per l'icona */
  font-size: 0.8em; /* Rendi l'icona un po' più piccola se necessario */
}

/* Stili per il sottomenu admin */
.mobile-admin-submenu {
  list-style: none;
  padding-left: 0px !important; /* Sovrascrive eventuali stili inline, aggiunge indentazione */
  background-color: #e9ecef; /* Sfondo leggermente diverso per il sottomenu */
  /* margin-left: -20px; /* Se si vuole che il sottomenu non sia indentato rispetto al pannello principale */
  /* margin-right: -20px; */  
}
ul.mobile-admin-submenu li a {
    padding-left: 40px;
}

.mobile-admin-submenu li a {
  padding: 10px 20px 10px 15px; /* Padding leggermente diverso per i link del sottomenu */
  font-size: 0.95em; /* Testo leggermente più piccolo */
  border-bottom: 1px solid #dfdfdf; /* Separatore più leggero */
  color: #333; /* Colore testo per sottomenu */
}

.mobile-admin-submenu li:last-child a {
  border-bottom: none; /* Rimuovi bordo per l'ultimo elemento */
}

.mobile-admin-submenu li a:hover {
  background-color: #dde2e6;
}

/* Stile per l'icona quando l'accordion è aperto (opzionale se gestito da JS con classi fa-chevron-up/down) */
/* .admin-accordion-toggle[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
} */


@media (max-width: 768px) {
    .gallery-item {
        flex: 1 1 calc(50% - 10px);
    }
}

@media (max-width: 480px) {
    .gallery-item {
        flex: 1 1 calc(100% - 10px);
    }
    table.tableformA-tit, table.tableformA-panch, table.tableformB-tit, table.tableformB-panch {
        padding: 10px!important;
    }
    .formA, .formB, .formC {margin: 10px auto !important;}
    body {margin:0!important;}
    div#content-wrap, div#content-wrap2, div#content-wrap-guest { max-width: 94%;} 
    .forma-recente .icone span {
        padding: 0px 11px;
        border-radius: 11px;
        font-size: 1.3em;
    }
}

@media screen and (max-width:767px) {

    .formA,
    .formB,
    .formC {
        display: inline-block;
        width: 100%;
        text-align: center;
        margin: 20px auto;
    }

    table.tableformA-cal {
        margin: 20px auto;
    }

    input.name {
        padding: 15px;
        margin: 0px 0px 5px;
        width: 100%;
        text-transform: uppercase;
        font-size: 14px;
    }

    input[type="submit"],
    h2 {
        max-width: 100%;
        font-size: 23px;
    }

    select#formazione,
    select#formazione2,
    #giornata_camp,
    #anno_camp,
    #giornata_cop,
    #giornata_cop2,
    select#girone {
        font-size: 20px;
        max-width: 100%;
    }

    input#md,
    input#ma,
    input#squadra_casa,
    input#squadra_ospite,
    input#squadra2,
    input#squadra1 {
        padding: 10px;
        font-size: 18px;
        text-align: center;
        max-width: 77px;
    }

    li div {
        font-size: 18px;
        padding: 10px !important;
    }

    .risultato-box h2 {
        margin: 20px 0px 0 0px;
    }

    table.tableformA-tit,
    table.tableformA-panch,
    table.tableformB-tit,
    table.tableformB-panch {
        margin: 20px auto 10px;
        border: 1px solid;
        padding: 20px;
        width: 100%;
        font-size: 18px;
    }

    table.tableformA-cal td:not(.head),
    table.tableformA-cal.class {
        font-size: 18px;
    }

    table td {
        padding: 0;
    }

    .formazione {
        max-width: 89%;
    }

    table.tableformA-cal.class:not(.albo,.squadra) tbody tr td:nth-child(2) {
        min-width: 220px;
        font-size: 15px;
        text-align: left;
    }

    table.tableformA-cal.completo td {
        font-size: 15px;
        padding: 3px;
    }

    .container-box-calendar {
        padding: 0 10px;
    }
    .profile-box2 {
        width: 100%;
    }
}

@media screen and (max-width:1280px) {
    .box-gironi {
        width: 100%;
        display: block;
    }

    .menu-top ul li {
        width: auto;
    }

    .logo {
        margin-right: 40px;
    }
}

@media screen and (max-width:1024px) {

    .formA, .formB {
        width: 100%;
    }

    input#md,
    input#ma {
        padding: 10px;
        font-size: 18px;
    }

    li div {
        padding: 10px !important;
    }
}

@media screen and (max-width:1023px) {
    .menu-bar {
        display: none
    }

    .menu-mobile {
        display: block;
    }

    .user-info a {
        text-decoration: none;
        color: #db4436;
    }

    .user-info a:hover {
        text-decoration: none;
        color: #575757;
    }

    .button-container {
        justify-content: center;
        padding-top: 30px;
    }

    .user-info {
        text-align: center;
        padding: 0;
        font-weight: 800;
        font-size: 20px;
        margin: 10px 0;
        color: #000;
        width: 100%;
    }

    button.logout-button {
        margin: 0 auto;
    }
    footer {display: none;}
}

@media screen and (min-width:1024px) {
    table.tableformA-tit, table.tableformA-panch, table.tableformB-tit, table.tableformB-panch {
        width: 97%;
    }

    .menu-bar {
        display: block;
    }

    .menu-mobile {
        display: none;
    }

    .menu-top {
        background: #152053;
        margin: 0 auto;
        padding: 0;
        color: #fff;
        width: 1520px;
        max-width: 100%;
        text-align: center;
        display: flex;
    }

    body {
        margin: 0;
    }

    .menu-top ul {
        list-style: none;
        /* text-align: right; */
    }

    .menu-top li {
        text-transform: uppercase;
        display: inline-block;
        margin-right: 0;
    }

    .menu-top li a {
        text-decoration: none;
        display: inline-block;
        font-family: "Open Sans", "Roboto", sans-serif;
        font-weight: 700;
        width: 100%;
    }

    .logo {
        display: inline-block;
        text-align: left;
    }

    .logo h1,
    .logo h1 a {
        font-family: "Open Sans", "Roboto", sans-serif;
        margin: 0 10px 0 0;
        text-decoration: none;
        display: inline-block;
        color: #db4437;
        line-height: 60px;
        font-size: 33px;
    }

    .logo h1 a {
        padding-left: 20px
    }

    .menu-top ul:not(.submenu) {
        display: inline-block;
        vertical-align: bottom;
        padding: 0;
        margin: 5px;
    }

    .menu-bar {
        background: #152053;
    }

    table.tableformA-cal.completo {
        display: inline-table;
        padding: 4px !important;
        width: 215px;
        max-width: 100%;
        margin: 10px auto;
    }

    table.tableformA-cal.completo td {
        padding: 8px;
        font-size: 18px;
    }
    
    .container-box-calendar {
        margin-top: 40px;
        justify-content: space-evenly;
        align-items: stretch;
    }

    /*Menu Fixed*/

    .menu-bar {
        background: #152053;
        position: fixed;
        width: 100%;
        z-index: 9999;
    }

    div#content-wrap, div#content-wrap2:not(.home), div#content-wrap-guest {
        margin-top: 80px;
        position: relative;
        z-index: 0;
    }

}
@media screen and (min-width:767px) {
    #content-wrap-guest .login-buttons {
        display: none!important;
    }
}
/* Stili per link attivi */

/* Menu Desktop Principale (.menu-bar) */
.topmenu > .menu-item > a.active,
.topmenu > .menu-item > a.active-parent {
  background-color: #db4436; /* Sfondo rosso per l'elemento attivo/parent */
  color: #fff !important; /* Testo bianco per contrasto */
}

/* Link attivo in un sottomenu desktop */
.submenu > li:has(> a.active) {
  background-color: #db4436; /* Sfondo rosso */
  color: #fff !important; /* Testo bianco */
  font-weight: bold;
}
.submenu > li > a.active, .submenu > li > a.active:hover { color: #fff !important; }
.submenu > li:has(> a.active):hover {
  color: #fff !important; /* Mantiene il testo bianco anche in hover */
  background-color: #db4436; /* Opzionale: leggermente più scuro in hover */
}


/* Menu Mobile - Pannello Laterale (.mobile-menu-panel) */
.mobile-menu-panel ul li a.active {
  background-color: #152053; /* Blu scuro come l'header mobile */
  color: #fff !important; /* Testo bianco */
  font-weight: bold;
}
.mobile-menu-panel ul li a.active:hover {
  background-color: #0f1843; /* Leggermente più scuro all'hover */
  color: #fff !important;
}

/* Stile per il toggle "Admin Menu" quando un suo figlio è attivo */
.mobile-menu-panel ul li#mobile-admin-section a.admin-accordion-toggle.active-parent {
  background-color: #e0e0e0; /* Uno sfondo leggermente diverso per indicare attività nel sottomenu */
  /* color: #152053; */ /* Opzionale: cambia colore testo se necessario */
}
.mobile-menu-panel ul li#mobile-admin-section a.admin-accordion-toggle.active-parent:hover {
  background-color: #d5d5d5;
}

/* Link attivo nel sottomenu admin mobile */
.mobile-admin-submenu li a.active {
  background-color: #152053; /* Blu scuro, come gli altri link attivi nel pannello */
  color: #fff !important;
  font-weight: normal; /* Manteniamo il font-weight normale, ma con sfondo e colore diversi */
}
.mobile-admin-submenu li a.active:hover {
  background-color: #0f1843;
  color: #fff !important;
}


/* Menu Footer Mobile (.mobile-footer-menu) */
/* La classe .active viene aggiunta direttamente all'elemento <a> che è .footer-menu-item */
.mobile-footer-menu .footer-menu-item.active { 
  background-color: #db4436; /* Sfondo rosso, come da stile :hover esistente */
  /* color: #fff; // Il colore del testo è già bianco di default per .footer-menu-item */
}
/* Assicurarsi che l'icona e il testo rimangano bianchi e visibili sull'elemento attivo */
.mobile-footer-menu .footer-menu-item.active i,
.mobile-footer-menu .footer-menu-item.active span {
  color: #fff !important;
}
/* Sovrascrivi l'hover per l'elemento attivo se vuoi che rimanga lo stesso o cambi leggermente */
.mobile-footer-menu .footer-menu-item.active:hover {
  background-color: #c53c2e; /* Opzionale: un rosso leggermente più scuro per l'hover dell'attivo */
}
.tab-content.active h2 {
    color: #fff;
}