@charset "utf-8";
@media screen and (max-width: 768px) {
  #desktop-menu {
    display: none; /* Hide regular menu */
  }
  #mobile-menu {
    display:block; /* Show phone menu */
	position:absolute;
	margin-right:20px;
    width: 100%;
  }
  #mobile-lista {
    display: none; /* Hide regular menu */
  }
   /* Nasconde l'header originale della tabella */
  .responsive-table thead {
    display: none;
  }

}

@media screen and (min-width: 769px) {
  #desktop-menu {
    display: block; /* Hide regular menu */
  }
  #mobile-menu {
    display:none; /* Show phone menu */
	position:absolute;
    width: 100%;}
  #mobile-lista {
    display: none; /* Hide regular menu */
  }
}
/// bottone top
	
#myBtn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 30px;
  z-index: 5000;
  font-size: 18px;
  border: none;
  outline: none;
  background-color: #581f1f;
  color: white;
  cursor: pointer;
  padding: 15px;
  border-radius: 4px;
}

#myBtn:hover {
  background-color: #555;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Arial, Helvetica, sans-serif;
}

body{
    background:#f4f4f4;
    color:#581f1f;
}

header{
    background:#581f1f;
    color:white;
    padding:20px;
}

nav{
    display:flex;
    justify-content:space-between;
    align-items:center;
    max-width:1500px;
    margin:auto;
}

nav h1{
    font-size:30px;
}

nav ul{
    list-style:none;
    display:flex;
    gap:25px;
}

nav a:link{
    color:white;
    text-decoration:none;
    font-weight:bold;
}

/* visited link */
nav a:visited {
  color: white;
}

/* mouse over link */
nav a:hover {
  color: hotpink;
  text-decoration:underline	
}
.hero{
    height:80vh;
    background:linear-gradient(rgba(88,31,31,.55),rgba(255,255,255,.55)),
    url("images/main_photo_pulito.png?auto=format&fit=crop&w=1600&q=80");
    background-size:cover;
    background-position:center;
    display:flex;
    justify-content:center;
    align-items:center;
    text-align:center;
    color:white;
}

.hero h2{
    font-size:55px;
}

.hero p{
    margin-top:15px;
    font-size:20px;
}

.btn{
    display:inline-block;
    margin-top:25px;
    background:#581f1f;
    color:#FFF;
    padding:15px 30px;
    border-radius:30px;
    text-decoration:none;
    font-weight:bold;
}

/* mouse over link */
.btn hover {
  color: hotpink;
  text-decoration:underline	
}

section{
    padding:70px 15%;
}

h2{
    color:#581f1f;
    margin-bottom:25px;
    font-size:36px;
}

h3{
    color:#581f1f;
    margin-bottom:25px;
    font-size:32px;
}

.cards{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(200px,7fr));
    gap:25px;
}

.card{
    background:white;
    border-radius:12px;
    overflow:hidden;
    box-shadow:0 5px 15px rgba(0,0,0,.1);
}

.card a:link {
  color: #581f1f;
  text-decoration:none;
}

/* visited link */
.card a:visited {
  color: #581f1f;
}

/* mouse over link */
.card a:hover {
  color: hotpink;
  text-decoration:none;
}

.card img{
    width:100%;
    height:400px;
    object-fit:cover;
	-webkit-transition: .25s;
       -moz-transition: .25s;
        -ms-transition: .25s;
         -o-transition: .25s;
            transition: .25s;
}

.card img:hover {
    height: 500px;
    width: 100%;
}
.card h4{
    padding:15px;
}

.card p{
    padding:0 15px 20px;
}

.sponsors{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(250px,1fr));
    gap:25px;
}

.sponsor{
    background:white;
    border-radius:12px;
    overflow:hidden;
    box-shadow:0 5px 15px rgba(0,0,0,.1);
}

.sponsors-premium{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(400px,1fr));
	height:400px;
    gap:25px;
}

.sponsor-premium{
    background:white;
    border-radius:12px;
    overflow:hidden;
    box-shadow:0 5px 15px rgba(0,0,0,.1);
}

.sponsor img{
    width:100%;
    height:220px;
    object-fit:cover;
}

.sponsor h4{
    padding:15px;
}

.sponsor p{
    padding:0 15px 20px;
}

table{
    width:100%;
    border-collapse:collapse;
    background:white;
	border-radius:20pt;
  box-shadow: 0px 0px 8px 10px #DDD;
}

table th{
    background:#581f1f;
    color:white;
}

table th, table td{
    padding:8px;
    border:1px solid #ddd;
    text-align:center;
}

.news h2{
    padding:15px;
	color:#581f1f;
	font-size:30px;
}
.news h3{
    padding:15px;
	color:#581f1f;
	font-size:20px;
}
.news h4{
    padding:15px;
	color:#581f1f;
	font-size:17px;
}
.news p{
    padding:0 15px 20px;
	color:#581f1f;
	font-size:14px;
}

.contacts{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(200px,3fr));
    gap:0px;
	border-radius:0px;
    box-shadow:0 5px 15px rgba(0,0,0,.1);
}

.contact{
    background:white;
    height:300px;
    overflow:hidden;
	text-align:center;
}
#table_contatti {
  border: 0px solid;
  padding: 10px;
  border-radius:20pt;
  box-shadow: 0px 0px 8px 10px #DDD;
}

.contact a:link {
  color: #581f1f;
  text-decoration:none;
}

/* visited link */
.contact a:visited {
  color: #581f1f;
}

/* mouse over link */
.contact a:hover {
  color: hotpink;
  text-decoration:underline	
}

footer{
    background:#581f1f;
    color:white;
    text-align:center;
    padding:25px;
}


//// 

* {box-sizing: border-box;}
body {font-family: Verdana, sans-serif;}
.mySlides {display: none;}
img {vertical-align: middle;}

/* Slideshow container */
.slideshow-container {
  position: relative;
  margin: auto;
  height:580px;
}

/* Caption text */
.text {
  color: #581f1f;
  text-shadow: 2px 2px #DDD;
  font-size: 31pt;
  padding: 8px 12px;
  position: absolute;
  bottom: 8px;
  width: 100%;
  text-align: center;
}

/* Number text (1/3 etc) */
.numbertext {
  color: #f2f2f2;
  font-size: 12px;
  padding: 8px 12px;
  position: absolute;
  top: 0;
}

/* The dots/bullets/indicators */
.dot {
  height: 0px;
  width: 0px;
  margin: 0 2px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}

.active {
  background-color: #717171;
}

/* Fading animation */
.fade {
  animation-name: fade;
  animation-duration: 3.5s;
}

@keyframes fade {
  from {opacity: .4} 
  to {opacity: 1}
}

/* On smaller screens, decrease text size */
@media only screen and (max-width: 300px) {
  .text {font-size: 11px}
}
  * { box-sizing: border-box; }

  body {
    font-family: system-ui, sans-serif;
    margin: 0;
    background: #f4f4f4;
    color: #222;
  }

  .spacer {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #888;
  }

  .chart-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0px 1rem;
    min-height: 30vh;
  }

  .chart-section h2 {
    margin-bottom: 2rem;
  }

  /* ===== GRAFICO A TORTA CSS ===== */
  .pie-chart {
    --p1: 65;   /* percentuale fetta 1 */
    --p2: 12.5;   /* percentuale fetta 2 */
    --p3: 12.5;   /* percentuale fetta 3 */
    --p4: 10;   /* percentuale fetta 4 (resto) */

    --c1: #581f1f;
    --c2: #E6EF32;
    --c3: #636;
    --c4: #FFFFFF;

    width: 260px;
    height: 260px;
    border-radius: 50%;
    position: relative;

    /* stato iniziale: invisibile e "chiuso" */
    background: conic-gradient(
      var(--c1) 0deg 0deg
    );
    transform: scale(0.6) rotate(-90deg);
    opacity: 0;
    transition:
      opacity 0.8s ease,
      transform 0.8s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  }

  /* quando la classe .visible viene aggiunta via JS allo scroll */
  .pie-chart.visible {
    opacity: 1;
    transform: scale(1) rotate(0deg);

    /* l'animazione del riempimento delle fette usa @property + transition */
    animation: fillPie 1.6s ease forwards;
  }

  /* Registriamo variabili custom animabili */
  @property --a1 { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
  @property --a2 { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
  @property --a3 { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
  @property --a4 { syntax: '<angle>'; inherits: true; initial-value: 0deg; }

  .pie-chart {
    --a1: 0deg;
    --a2: 0deg;
    --a3: 0deg;
    --a4: 0deg;
    background: conic-gradient(
      var(--c1) 0deg var(--a1),
      var(--c2) var(--a1) var(--a2),
      var(--c3) var(--a2) var(--a3),
      var(--c4) var(--a3) var(--a4)
    );
    transition:
      opacity 0.8s ease,
      transform 0.8s ease,
      --a1 1.4s ease,
      --a2 1.4s ease,
      --a3 1.4s ease,
      --a4 1.4s ease;
  }

  .pie-chart.visible {
    --a1: calc(var(--p1) * 3.6deg);
    --a2: calc((var(--p1) + var(--p2)) * 3.6deg);
    --a3: calc((var(--p1) + var(--p2) + var(--p3)) * 3.6deg);
    --a4: calc((var(--p1) + var(--p2) + var(--p3) + var(--p4)) * 3.6deg);
  }

  /* buco centrale per effetto "donut" (opzionale, rimuovi per torta piena) */
  .pie-chart::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 55%;
    height: 55%;
    background: #f4f4f4;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0;
    transition: opacity 0.6s ease 0.8s, transform 0.6s ease 0.8s;
  }

  .pie-chart.visible::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  /* legenda */
  .legend {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease 1s, transform 0.6s ease 1s;
  }

  .legend.visible {
    opacity: 1;
    transform: translateY(0);
  }

  .legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
  }

  .legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
  }

  .legend-item:nth-child(1) .legend-dot { background: #581f1f; }
  .legend-item:nth-child(2) .legend-dot { background: #E6EF32; }
  .legend-item:nth-child(3) .legend-dot { background: #636; }
  .legend-item:nth-child(4) .legend-dot { background: #FFFFFF; }
<!-- !-----cookie---! -->
#banner_cookie {
    text-align: center;
    width: 100%;
    line-height: 250%;
    position: relative;
    z-index: 10001;
    background: #000;
}
#banner_cookie {
    background: #393F4D;
}
foglio di stile dello user agent
div {
    display: block;
    unicode-bidi: isolate;
} 
/* CSS Document */

/* =========================================================
   TORINO WOMEN - OTTIMIZZAZIONE MOBILE
   Inserire DOPO il CSS esistente.
   Non modifica il layout desktop.
   ========================================================= */

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

  /* ---------- RESET / BASE ---------- */

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    font-size: 16px;
    line-height: 1.5;
  }

  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  img,
  video,
  iframe {
    max-width: 100%;
  }

  /* ---------- HEADER ---------- */

  header {
    padding: 12px 15px;
  }

  nav {
    width: 100%;
    min-height: 48px;
  }

  nav h1 {
    font-size: 22px;
    line-height: 1.15;
    margin: 0;
  }
  
  #desktop-menu {
    display: none; /* Hide regular menu */
  }
  #mobile-menu {
    display:block; /* Show phone menu */
	position:absolute;
	margin-right:20px;
    width: 100%;
  }
  #mobile-lista {
    display: none; /* Hide regular menu */
  }
   /* Nasconde l'header originale della tabella */
  .responsive-table thead {
    display: none;
  }
/*
  #desktop-menu {
    display: none !important;
  }

  #mobile-menu {
    display: block !important;
    position: relative;
    top: auto;
    right: auto;
    margin: 0;
    width: 100%;
    z-index: 5000;
  }

  #mobile-lista {
    display: none;
    width: 100%;
  }*/

  #mobile-lista ul {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0;
    margin: 10px 0 0;
    padding: 0;
  }

  #mobile-lista li {
    width: 100%;
  }

  #mobile-lista a {
    display: block;
    width: 100%;
    padding: 12px 10px;
    font-size: 16px;
  }

  /* ---------- HERO ---------- */

  .hero {
    height: auto;
    min-height: 72vh;
    padding: 70px 20px;
    background-position: center center;
  }

  .hero h2 {
    max-width: 100%;
    font-size: clamp(32px, 10vw, 48px);
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  .hero p {
    margin-top: 12px;
    font-size: 17px;
    line-height: 1.45;
  }

  .btn {
    min-height: 46px;
    margin-top: 20px;
    padding: 12px 22px;
    font-size: 16px;
    line-height: 1.2;
  }

  .btn:hover,
  .btn:focus {
    color: #fff;
    text-decoration: none;
  }

  /* ---------- SEZIONI ---------- */

  section {
    width: 100%;
    padding: 45px 20px;
  }

  h2 {
    margin-bottom: 20px;
    font-size: clamp(27px, 8vw, 34px);
    line-height: 1.15;
  }

  h3 {
    margin-bottom: 18px;
    font-size: clamp(23px, 7vw, 30px);
    line-height: 1.2;
  }

  h4 {
    line-height: 1.25;
  }

  p {
    overflow-wrap: break-word;
  }

  /* ---------- CARDS / ROSA ---------- */

  .cards {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .card {
    width: 100%;
    min-width: 0;
  }

  .card img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: 4 / 5;
    object-fit: cover;
  }

  /* Disattiva l'effetto che aumenta l'immagine al passaggio del mouse */
  .card img:hover {
    width: 100%;
    height: auto;
  }

  .card h4 {
    padding: 14px 15px 8px;
    font-size: 19px;
  }

  .card p {
    padding: 0 15px 18px;
    font-size: 15px;
  }

  /* ---------- SPONSOR ---------- */

  .sponsors,
  .sponsors-premium {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    height: auto;
  }

  .sponsor,
  .sponsor-premium {
    width: 100%;
    min-width: 0;
    height: auto;
  }

  .sponsor img {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    display: block;
  }

  .sponsor h4 {
    padding: 14px 15px 8px;
    font-size: 18px;
  }

  .sponsor p {
    padding: 0 15px 18px;
    font-size: 15px;
  }

  /* ---------- TABELLE ---------- */

  table {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
  }

  table th,
  table td {
    padding: 9px 7px;
    font-size: 13px;
    line-height: 1.3;
  }

  .responsive-table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .responsive-table table {
    min-width: 560px;
  }

  /* ---------- CONTATTI ---------- */

  .contacts {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    box-shadow: none;
  }

  .contact {
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 20px 15px;
    border-radius: 12px;
  }

  #table_contatti {
    width: 100%;
    max-width: 100%;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    overflow-x: auto;
  }

  /* ---------- SLIDESHOW ---------- */

  .slideshow-container {
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: hidden;
  }

  .mySlides {
    width: 100%;
  }

  .mySlides img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
  }

  .text {
    bottom: 8px;
    padding: 6px 10px;
    font-size: clamp(18px, 5vw, 26px);
    line-height: 1.2;
  }

  .numbertext {
    padding: 6px 8px;
    font-size: 11px;
  }

  /* ---------- GRAFICO ---------- */

  .chart-section {
    width: 100%;
    min-height: auto;
    padding: 20px 0;
  }

  .chart-section h2 {
    margin-bottom: 25px;
    text-align: center;
  }

  .pie-chart {
    width: min(260px, 78vw);
    height: min(260px, 78vw);
  }

  .legend {
    width: 100%;
    gap: 10px 18px;
    margin-top: 20px;
    padding: 0 10px;
  }

  .legend-item {
    font-size: 14px;
  }

  /* ---------- COOKIE BANNER ---------- */

  #banner_cookie {
    width: 100%;
    max-width: 100%;
    padding: 10px 15px;
    line-height: 1.4;
    font-size: 13px;
  }

  /* ---------- BACK TO TOP ---------- */

  #myBtn {
    right: 15px;
    bottom: 15px;
    padding: 11px 13px;
    font-size: 16px;
    border-radius: 50%;
  }
}

/* Smartphone molto piccoli */
@media screen and (max-width: 380px) {

  header {
    padding-left: 10px;
    padding-right: 10px;
  }

  section {
    padding-left: 15px;
    padding-right: 15px;
  }

  .hero {
    padding-left: 15px;
    padding-right: 15px;
  }

  .hero h2 {
    font-size: 31px;
  }

  .hero p {
    font-size: 16px;
  }

  .card h4 {
    font-size: 18px;
  }

  .card p,
  .sponsor p {
    font-size: 14px;
  }

  table th,
  table td {
    font-size: 12px;
  }
}

/* Preferenza accessibilità: riduce le animazioni */
@media screen and (max-width: 768px) and (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
