/* ==========================================================================
   SEZIONE SQUADRE (squadre.html)
   ========================================================================== */

/* Hero Squadre */
.eroe-squadre {
    min-height: 520px;
    padding: 130px max(24px, calc((100% - 1132px) / 2)) 90px;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(90deg, rgba(15, 34, 23, .94), rgba(15, 34, 23, .55)), url("foto6.jpg") center/cover;
    color: white;
}

.contenuto-eroe-squadre {
    max-width: 760px;
}

.eroe-squadre .etichetta {
    display: inline-block;
    margin-bottom: 18px;
}

.eroe-squadre h1 {
    margin: 0;
    font: 800 clamp(58px, 8vw, 105px)/.9 'Manrope', sans-serif;
    letter-spacing: -.06em;
}

.eroe-squadre h1 span {
    color: #b96f4a;
}

.eroe-squadre p {
    max-width: 600px;
    margin: 30px 0 0;
    color: #e4ebe5;
    font-size: 19px;
    line-height: 1.7;
}

/* Introduzione e Statistiche Squadre */
.introduzione-squadre {
    display: grid;
    grid-template-columns: 1.4fr .8fr;
    gap: 80px;
    align-items: center;
    padding-top: 100px;
    padding-bottom: 100px;
}

.testo-introduzione-squadre {
    max-width: 700px;
}

.testo-introduzione-squadre h2 {
    margin: 15px 0 25px;
    font: 800 clamp(38px, 5vw, 62px)/.98 'Manrope', sans-serif;
    letter-spacing: -.05em;
    color: #122018;
}

.testo-introduzione-squadre h2 span {
    color: #668961;
}

.testo-introduzione-squadre p {
    max-width: 650px;
    margin: 0;
    color: #536157;
    font-size: 18px;
    line-height: 1.75;
}

.numeri-squadre {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #d9e2d8;
    border-radius: 22px;
    overflow: hidden;
}

.numeri-squadre div {
    min-height: 150px;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #f2f5f0;
}

.numeri-squadre strong {
    display: block;
    margin-bottom: 8px;
    color: #173523;
    font: 800 34px 'Manrope', sans-serif;
}

.numeri-squadre span {
    color: #637066;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* Elenco e Griglia Squadre */
.elenco-squadre {
    padding-top: 90px;
    padding-bottom: 120px;
}

.intestazione-squadre {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 50px;
}

.intestazione-squadre h2 {
    margin: 15px 0 0;
    color: #122018;
    font: 800 clamp(40px, 5vw, 64px)/1 'Manrope', sans-serif;
    letter-spacing: -.05em;
}

.intestazione-squadre p {
    max-width: 330px;
    margin: 0;
    color: #657067;
    line-height: 1.6;
}

.griglia-squadre {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.scheda-squadra {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(17, 35, 22, .07);
    transition: transform .3s ease, box-shadow .3s ease;
}

.scheda-squadra:hover {
    transform: translateY(-7px);
    box-shadow: 0 20px 45px rgba(17, 35, 22, .13);
}

.immagine-squadra {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: #dfe8dc;
}

.immagine-squadra img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .6s ease;
}

.scheda-squadra:hover .immagine-squadra img {
    transform: scale(1.05);
}

.immagine-squadra span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 8px 12px;
    border-radius: 20px;
    background: #668961;
    color: white;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
}

.contenuto-scheda-squadra {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.contenuto-scheda-squadra small {
    display: block;
    margin-bottom: 8px;
    color: #668961;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.contenuto-scheda-squadra h3 {
    margin: 0 0 12px;
    color: #122018;
    font: 800 24px/1.15 'Manrope', sans-serif;
    letter-spacing: -.02em;
}

.contenuto-scheda-squadra p {
    margin: 0 0 24px;
    color: #536157;
    font-size: 15px;
    line-height: 1.6;
    flex-grow: 1;
}

.scopri-squadra {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
    color: #173523;
    transition: color .25s ease;
}

.scopri-squadra i {
    transition: transform .25s ease;
}

.scopri-squadra:hover {
    color: #668961;
}

.scopri-squadra:hover i {
    transform: translateX(5px);
}

/* Card in evidenza (es. la D3 Principale) */
@media (min-width: 1051px) {
    .scheda-squadra.principale {
        grid-column: span 2;
        display: grid;
        grid-template-columns: 1.1fr 1fr;
    }
    .scheda-squadra.principale .immagine-squadra {
        height: 100%;
        min-height: 320px;
    }
}


/* ==========================================================================
   PAGINE DETTAGLIO SQUADRA (d3-maschile.html, ecc.)
   ========================================================================== */

.eroe-dettaglio-squadra {
    min-height: 520px;
    padding: 130px max(24px, calc((100% - 1132px) / 2)) 90px;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(90deg, rgba(16, 33, 23, .94), rgba(16, 33, 23, .52)), url("foto4.jpg") center/cover;
    color: white;
}

.testo-eroe-dettaglio {
    max-width: 760px;
}

.torna-squadre {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    color: #dbe5dd;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.torna-squadre:hover {
    color: #b96f4a;
}

.testo-eroe-dettaglio .etichetta {
    display: inline-block;
    margin-bottom: 18px;
}

.testo-eroe-dettaglio h1 {
    margin: 0;
    font: 800 clamp(58px, 8vw, 105px)/.9 'Manrope', sans-serif;
    letter-spacing: -.06em;
}

.testo-eroe-dettaglio p {
    max-width: 600px;
    margin: 30px 0 0;
    color: #e4ebe5;
    font-size: 19px;
    line-height: 1.7;
}

.contenuto-dettaglio {
    padding-top: 100px;
    padding-bottom: 120px;
}

.testata-team {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 50px;
}

.testata-team h2 {
    margin: 15px 0 0;
    color: #122018;
    font: 800 clamp(40px, 5vw, 64px)/1 'Manrope', sans-serif;
    letter-spacing: -.05em;
}

.badge-team {
    padding: 10px 14px;
    border-radius: 20px;
    background: #668961;
    color: white;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
}

.griglia-team-info {
    display: grid;
    grid-template-columns: .7fr 1.3fr;
    gap: 24px;
}

.card-capitano,
.card-rosa {
    padding: 30px;
    background: white;
    border-radius: 22px;
    box-shadow: 0 12px 35px rgba(17, 35, 22, .07);
}

.card-capitano small,
.card-rosa small,
.titolo-risultati-team small {
    display: block;
    margin-bottom: 12px;
    color: #668961;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
}

.card-capitano strong {
    display: block;
    color: #122018;
    font: 800 28px/1.1 'Manrope', sans-serif;
}

.card-capitano p {
    margin: 10px 0 0;
    color: #657067;
    line-height: 1.6;
}

.rosa-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.rosa-grid div {
    padding: 15px 17px;
    border: 1px solid #e6ebe4;
    border-radius: 11px;
    color: #1b3524;
    background: #f4f6f2;
    font-weight: 700;
}

.sezione-risultati-team {
    margin-top: 60px;
    padding: 55px;
    border-radius: 22px;
    background: #173523;
    color: white;
}

.titolo-risultati-team {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
}

.titolo-risultati-team small {
    color: #c7d9c4;
}

.titolo-risultati-team h3 {
    margin: 10px 0 0;
    font: 800 clamp(32px, 4vw, 48px)/1 'Manrope', sans-serif;
    letter-spacing: -.04em;
}

.titolo-risultati-team > span {
    color: #9eafa2;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
}

.risultato-team-vuoto {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    color: #aebbb2;
    background: rgba(255, 255, 255, .04);
}


/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */

@media (max-width: 1050px) {
    .griglia-squadre {
        grid-template-columns: repeat(2, 1fr);
    }
    .introduzione-squadre {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    .griglia-team-info {
        grid-template-columns: 1fr;
    }
    .eroe-dettaglio-squadra {
        min-height: 500px;
    }
}

@media (max-width: 700px) {
    .eroe-squadre,
    .eroe-dettaglio-squadra {
        min-height: 500px;
        padding-top: 120px;
    }
    .eroe-squadre h1,
    .testo-eroe-dettaglio h1 {
        font-size: clamp(52px, 16vw, 78px);
    }
    .eroe-squadre p,
    .testo-eroe-dettaglio p {
        font-size: 16px;
    }
    .introduzione-squadre {
        padding-top: 70px;
        padding-bottom: 70px;
        gap: 40px;
    }
    .numeri-squadre {
        grid-template-columns: 1fr;
    }
    .numeri-squadre div {
        min-height: 90px;
        padding: 20px 16px;
    }
    .numeri-squadre strong {
        font-size: 28px;
    }
    .intestazione-squadre {
        display: block;
    }
    .intestazione-squadre p {
        margin-top: 18px;
    }
    .griglia-squadre {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .contenuto-dettaglio {
        padding-top: 70px;
        padding-bottom: 80px;
    }
    .testata-team {
        display: block;
    }
    .badge-team {
        display: inline-block;
        margin-top: 20px;
    }
    .rosa-grid {
        grid-template-columns: 1fr;
    }
    .sezione-risultati-team {
        padding: 30px;
    }
    .titolo-risultati-team {
        display: block;
    }
    .titolo-risultati-team > span {
        display: block;
        margin-top: 18px;
    }
}


/* ==========================================
   STILI PER LE PAGINE DI DETTAGLIO SQUADRA
   ========================================== */

/* --- HERO / TESTATA INIZIALE --- */
.eroe-dettaglio-squadra {
  position: relative;
  background: linear-gradient(90deg, rgba(16, 33, 23, 0.94), rgba(16, 33, 23, 0.65)), 
              url("../foto4.jpg") center/cover no-repeat;
  padding: 60px 20px 70px 20px;
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.testo-eroe-dettaglio {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

/* Pulsante "Torna alle squadre" */
.torna-squadre {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a3e635; /* Verde brillante */
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 20px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.torna-squadre:hover {
  color: #ffffff;
  transform: translateX(-4px);
}

.torna-squadre i {
  font-size: 0.85rem;
}

/* Titoli dell'Hero */
.testo-eroe-dettaglio h1 {
  font-family: 'Manrope', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  margin: 12px 0 10px 0;
  line-height: 1.15;
  color: #ffffff;
}

.testo-eroe-dettaglio p {
  font-size: 1.15rem;
  color: #d1d5db;
  max-width: 650px;
  margin: 0;
  line-height: 1.5;
}

/* --- ETICHETTE / BADGE GENERICI --- */
.etichetta {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.etichetta.verde {
  background-color: rgba(163, 230, 53, 0.15);
  color: #84cc16;
  border: 1px solid rgba(163, 230, 53, 0.3);
}

/* --- SEZIONE CONTENUTO --- */
.contenuto-dettaglio {
  max-width: 1100px;
  margin: 0 auto;
  padding: 50px 20px 80px 20px;
}

/* Intestazione della sezione squadra */
.testata-team {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 20px;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 35px;
}

.testata-team h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: #102117;
  margin: 6px 0 0 0;
}

.badge-team {
  background-color: #102117;
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(16, 33, 23, 0.08);
}

/* --- GRIGLIA INFORMAZIONI TEAM (Capitano & Rosa) --- */
.griglia-team-info {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
  margin-bottom: 50px;
}

/* Card Capitano */
.card-capitano {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.card-capitano small,
.card-rosa small {
  font-size: 0.75rem;
  font-weight: 800;
  color: #6b7280;
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: block;
}

.card-capitano strong {
  font-size: 1.4rem;
  font-weight: 700;
  color: #102117;
  margin-bottom: 6px;
}

.card-capitano p {
  color: #6b7280;
  font-size: 0.95rem;
  margin: 0;
}

/* Card Rosa Giocatori */
.card-rosa {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.rosa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.rosa-grid div {
  background-color: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 600;
  color: #1f2937;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  transition: background-color 0.2s ease;
}

.rosa-grid div:hover {
  background-color: #e5e7eb;
}

/* --- SEZIONE RISULTATI E PARTITE --- */
.sezione-risultati-team {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 32px;
}

.titolo-risultati-team {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f3f4f6;
}

.titolo-risultati-team small {
  font-size: 0.75rem;
  font-weight: 800;
  color: #6b7280;
  letter-spacing: 1px;
}

.titolo-risultati-team h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #102117;
  margin: 4px 0 0 0;
}

.titolo-risultati-team span {
  font-size: 0.85rem;
  font-weight: 700;
  color: #9ca3af;
}

/* Stato vuoto per i risultati */
.risultato-team-vuoto {
  background-color: #f9fafb;
  border: 2px dashed #e5e7eb;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  color: #6b7280;
  font-size: 1rem;
  font-weight: 500;
}
.lista-risultati-team {
    display: grid;
    gap: 14px;
}

.card-risultato {
    padding: 22px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: white;
}

.info-risultato {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

.stato-risultato {
    padding: 6px 12px;
    border-radius: 20px;
}

.vittoria {
    background: #dcfce7;
    color: #166534;
}

.sconfitta {
    background: #fee2e2;
    color: #991b1b;
}

.squadre-risultato {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 15px;
}

.squadre-risultato strong:last-child {
    text-align: right;
}

.punteggio {
    font-size: 26px;
    font-weight: 800;
    color: #102117;
    white-space: nowrap;
}
.dettaglio-incontri {
    margin-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.singolo-incontro {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid #e5e7eb;
}

.singolo-incontro:last-child {
    border-bottom: none;
}

.tipo-incontro {
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.5px;
}

.giocatori-incontro {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.giocatori-incontro strong {
    font-size: 14px;
    color: #102117;
}

.giocatori-incontro span {
    font-size: 13px;
    color: #64748b;
}

.risultato-set {
    font-size: 15px;
    font-weight: 800;
    color: #102117;
    white-space: nowrap;
}
.esito-incontro {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.stato-incontro {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.stato-incontro.vittoria {
    background: #dcfce7;
    color: #166534;
}

.stato-incontro.sconfitta {
    background: #fee2e2;
    color: #991b1b;
}
.storia-ait {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 45px;
    margin-top: 70px;
    padding-top: 45px;
    border-top: 1px solid #e5e7eb;
}

.foto-storia-ait img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 18px;
}

.testo-storia-ait h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 30px;
    margin: 12px 0;
}

.testo-storia-ait p {
    color: #64748b;
    line-height: 1.8;
}
.squadre-risultato strong {
    color: #102117;
    display: block;
}
@media (max-width: 700px) {
    .storia-ait {
        grid-template-columns: 1fr;
        gap: 22px;
    }
}

@media (max-width: 600px) {
    .singolo-incontro {
        grid-template-columns: 1fr auto;
        gap: 10px;
    }

    .tipo-incontro {
        grid-column: 1 / -1;
    }

    .giocatori-incontro strong {
        font-size: 12px;
    }
}

/* --- RESPONSIVE (Dispositivi Mobili e Tablet) --- */
@media (max-width: 768px) {
  .testo-eroe-dettaglio h1 {
    font-size: 2rem;
  }

  .testata-team {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .griglia-team-info {
    grid-template-columns: 1fr;
  }

  .rosa-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .titolo-risultati-team {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}