/* ==========================================================
   FFG GROUP - ferrari.css COMPLETO CORRETTO
   Versione anti-stretch
   ========================================================== */

:root{
  --bg:#FFF3E0;
  --surface:#ffffff;
  --text:#1e1c1c;
  --muted:#5f5f5f;

  --primary:#be1823;
  --primary-dark:#98131c;
  --primary-deep:#720e15;
  --primary-soft:rgba(190,24,35,.10);
  --primary-border:rgba(190,24,35,.18);
  --primary-shadow:rgba(190,24,35,.22);

  --black:#1e1c1c;
  --container:1120px;
}

*{box-sizing:border-box;}

html,body{
  margin:0;
  min-height:100%;
}

body{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  background:var(--bg);
  color:var(--text);
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}

a{color:inherit;}
img{max-width:100%;display:block;}

.container{
  width:min(var(--container), calc(100% - 40px));
  margin:0 auto;
}

main{
  flex:1;
}

/* ==========================================================
   HEADER PULITO
   ========================================================== */

.site-header{
  width:100%;
  display:block;
  background:var(--primary);
  color:#fff;
  box-shadow:0 8px 22px rgba(0,0,0,.18);
  position:relative;
  z-index:50;
}

.brandbar,
.brandbar.container{
  width:min(var(--container), calc(100% - 40px));
  min-height:82px;
  margin:0 auto;
  padding:10px 0;

  display:flex;
  align-items:center;
  justify-content:center;
  gap:28px;

  background:transparent;
  border:none;
}

/* Logo */
.brandbar::before{
  content:"";
  width:120px;
  height:66px;
  flex:0 0 120px;

  background-image:url("logo_ffg.png");
  background-repeat:no-repeat;
  background-position:center;
  background-size:contain;
}

/* Nessun pseudo elemento strano */
.brandbar::after{
  content:none;
  display:none;
}

/* Titolo meno stretchato */
.brandbar h1{
  display:block;
  position:static;
  visibility:visible;
  opacity:1;

  margin:0;
  padding:0;

  color:#1e1c1c;
  font-family:"Arial Black", Arial, Helvetica, sans-serif;
  font-size:clamp(34px, 4.6vw, 62px);
  font-weight:900;
  font-style:italic;
  letter-spacing:2px;
  line-height:.92;
  text-transform:uppercase;
  text-align:center;

  transform:skew(-8deg);
  transform-origin:center;
}

/* Navbar integrata */
.navbar{
  width:100%;
  display:block;
  background:linear-gradient(180deg, #98131c 0%, #720e15 100%);
  border-top:1px solid rgba(255,255,255,.12);
  border-bottom:1px solid rgba(0,0,0,.18);
}

.navbar .container{
  width:min(var(--container), calc(100% - 40px));
  margin:0 auto;
  padding:10px 0;

  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:16px;
}

.navbar a{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  color:#fff;
  text-decoration:none;
  font-size:14px;
  font-weight:900;
  line-height:1;

  padding:9px 16px;
  border-radius:999px;
  white-space:nowrap;

  transition:background-color .2s ease, color .2s ease, transform .2s ease;
}

.navbar a:hover{
  background:rgba(255,255,255,.14);
  transform:translateY(-1px);
}

.navbar a.active{
  background:#fff;
  color:var(--primary);
  box-shadow:0 8px 18px rgba(0,0,0,.16);
}

/* ==========================================================
   HERO / CAROUSEL HOME - NON STRETCHATO
   ========================================================== */

.hero-slider,
.slider,
.carousel,
.hero-carousel{
  position:relative;
  width:100%;
  height:clamp(360px, 38vw, 520px);
  min-height:360px;
  overflow:hidden;
  background:#1e1c1c;
}

/* Supporto sia img dirette sia background dentro slide */
.hero-slide,
.slide,
.carousel-slide{
  position:relative;
  width:100%;
  height:100%;
}

/* Immagini: cover sì, stretch no */
.hero-slider img,
.slider img,
.carousel img,
.hero-carousel img,
.hero-slide img,
.slide img,
.carousel-slide img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}

/* Se nel tuo codice le immagini sono come background */
.hero-slide,
.slide,
.carousel-slide{
  background-size:cover !important;
  background-position:center center !important;
  background-repeat:no-repeat !important;
}

/* Overlay leggero, non troppo pesante */
.hero-slider::after,
.slider::after,
.carousel::after,
.hero-carousel::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, rgba(0,0,0,.58), rgba(0,0,0,.10), rgba(0,0,0,.55));
  pointer-events:none;
  z-index:1;
}

/* Contenuto slider */
.hero-content,
.slide-content{
  position:absolute;
  inset:auto auto 56px 42px;
  z-index:3;
  max-width:520px;
  color:#fff;
}

.hero-content h2,
.slide-content h2{
  margin:0 0 12px;
  font-size:clamp(30px, 4.5vw, 56px);
  line-height:.95;
  text-transform:uppercase;
}

.hero-content p,
.slide-content p{
  margin:0 0 20px;
  color:rgba(255,255,255,.82);
  line-height:1.6;
}

/* Pulsanti slider */
.hero-content .btn,
.slide-content .btn{
  border:1px solid rgba(255,255,255,.22);
  background:rgba(0,0,0,.28);
  color:#fff;
}

/* Pallini slider */
.slider-dots,
.carousel-dots,
.dots{
  position:absolute;
  z-index:5;
  right:38px;
  bottom:26px;
  display:flex;
  align-items:center;
  gap:12px;
}

.slider-dots span,
.carousel-dots span,
.dots span,
.dot{
  width:9px;
  height:9px;
  border-radius:50%;
  background:rgba(255,255,255,.75);
  border:2px solid transparent;
}

.slider-dots .active,
.carousel-dots .active,
.dots .active,
.dot.active{
  background:transparent;
  border-color:var(--primary);
  transform:scale(1.25);
}

/* ==========================================================
   HOME CONTENT
   ========================================================== */

.home-intro,
.intro{
  padding:48px 20px 26px;
  text-align:center;
}

.home-intro h2,
.intro h2{
  margin:0 auto 16px;
  max-width:980px;
  color:var(--primary);
  font-size:clamp(30px, 3.8vw, 44px);
  line-height:1.08;
  font-weight:900;
  text-align:center;
}

.home-intro p,
.intro p{
  max-width:820px;
  margin:0 auto;
  color:var(--text);
  font-size:18px;
  line-height:1.75;
  text-align:center;
}

.story-box,
.box,
.content-box{
  width:min(900px, calc(100% - 40px));
  margin:36px auto 60px;
  padding:30px 34px;

  background:#fff;
  border-radius:18px;
  box-shadow:0 14px 35px rgba(0,0,0,.08);
  border:1px solid rgba(190,24,35,.08);

  color:var(--text);
  font-size:16px;
  line-height:1.8;
}

.story-box p,
.box p,
.content-box p{
  margin:0 0 18px;
}

.story-box p:last-child,
.box p:last-child,
.content-box p:last-child{
  margin-bottom:0;
}

/* ==========================================================
   TITOLI PAGINA
   ========================================================== */

.page-wrap,
.admin-wrap,
.profile-wrap{
  width:min(1100px, calc(100% - 40px));
  margin:40px auto 60px;
}

.page-head,
.profile-head{
  text-align:center;
  margin-bottom:26px;
}

.page-head h2,
.profile-head h2,
.page-title{
  margin:0 0 8px;
  color:var(--primary);
  font-size:clamp(34px, 4vw, 46px);
  line-height:1.05;
  font-weight:900;
  text-align:center;
}

.page-head p,
.profile-head p,
.page-subtitle{
  margin:0;
  color:var(--muted);
  font-size:18px;
  line-height:1.6;
  text-align:center;
}

/* ==========================================================
   BOTTONI
   ========================================================== */

.btn,
button,
input[type="submit"]{
  border:none;
  cursor:pointer;
  text-decoration:none;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  min-height:44px;
  padding:11px 20px;
  border-radius:999px;

  font-weight:900;
  font-size:14px;
  line-height:1;

  transition:transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.btn:hover,
button:hover,
input[type="submit"]:hover{
  transform:translateY(-1px);
}

.btn-primary,
button,
input[type="submit"]{
  background:var(--primary);
  color:#fff;
  box-shadow:0 10px 22px var(--primary-shadow);
}

.btn-primary:hover,
button:hover,
input[type="submit"]:hover{
  background:#a3141f;
}

.btn-ghost{
  background:#fff3e0;
  color:#8e1119;
  border:1px solid rgba(190,24,35,.18);
  box-shadow:none;
}

.btn-ghost:hover{
  background:#ffe6c4;
}

.btn-dark{
  background:#1e1c1c;
  color:#fff;
}

/* ==========================================================
   FORM
   ========================================================== */

.form{
  display:grid;
  gap:14px;
}

.field{
  display:grid;
  gap:6px;
}

label{
  color:var(--primary-dark);
  font-weight:900;
  font-size:13px;
}

input,
select,
textarea{
  width:100%;
  padding:11px 13px;
  border:1px solid rgba(190,24,35,.22);
  border-radius:12px;
  background:#fff;
  color:var(--text);
  font-size:14px;
  font-family:inherit;
}

textarea{
  min-height:110px;
  resize:vertical;
}

input:focus,
select:focus,
textarea:focus{
  outline:none;
  border-color:var(--primary);
  box-shadow:0 0 0 4px rgba(190,24,35,.18);
}

/* ==========================================================
   CARD / DASHBOARD
   ========================================================== */

.card,
.filter-card,
.results-card,
.profile-card,
.perf-card,
.admin-card{
  background:#fff;
  border-radius:24px;
  padding:26px;
  box-shadow:0 14px 35px rgba(0,0,0,.10);
  border:1px solid rgba(190,24,35,.10);
}

.dashboard-shell{
  width:min(1140px, calc(100% - 40px));
  margin:40px auto 60px;
}

.dashboard-hero{
  background:linear-gradient(135deg, rgba(190,24,35,.96), rgba(114,14,21,.96));
  color:#fff;
  border-radius:26px;
  padding:36px 34px;
  box-shadow:0 18px 45px rgba(0,0,0,.18);
  margin-bottom:30px;
  text-align:center;
}

.dashboard-hero h2{
  margin:0 0 12px;
  font-size:clamp(30px,4vw,44px);
  color:#fff;
}

.dashboard-hero p{
  margin:0;
  font-size:18px;
  line-height:1.7;
  color:rgba(255,255,255,.94);
}

.dashboard-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:24px;
  align-items:stretch;
}

.dashboard-card{
  background:#fff;
  border-radius:22px;
  padding:24px 24px 26px;
  box-shadow:0 14px 35px rgba(0,0,0,.10);
  border:1px solid rgba(190,24,35,.10);
  text-align:center;
  display:flex;
  flex-direction:column;
  min-height:420px;
}

.dashboard-card h3{
  margin:0 0 14px;
  color:var(--primary);
  font-size:22px;
}

.dashboard-card p{
  margin:0 auto 24px;
  color:var(--muted);
  line-height:1.75;
  max-width:30ch;
  min-height:115px;
}

.dashboard-actions{
  margin-top:auto;
  width:100%;
  display:grid;
  justify-content:center;
  gap:12px;
}

.dashboard-actions a,
.dashboard-actions span{
  width:220px;
  min-height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  font-weight:900;
  font-size:14px;
  text-decoration:none;
  text-align:center;
  box-sizing:border-box;
}

.dashboard-actions a{
  background:var(--primary);
  color:#fff;
  box-shadow:0 8px 18px rgba(190,24,35,.18);
  transition:.2s ease;
}

.dashboard-actions a:hover{
  background:#a3141f;
  transform:translateY(-2px);
}

.dashboard-actions a.secondary{
  background:#fff3e0;
  color:#8e1119;
  border:1px solid rgba(190,24,35,.18);
  box-shadow:none;
}

.dashboard-actions .placeholder{
  visibility:hidden;
  pointer-events:none;
}

.logout-box{
  margin-top:30px;
  text-align:center;
}

.logout-box a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:13px 26px;
  border-radius:999px;
  text-decoration:none;
  font-weight:900;
  background:#1e1c1c;
  color:#fff;
  transition:.2s ease;
}

/* ==========================================================
   PROFILE
   ========================================================== */

.profile-top{
  display:grid;
  grid-template-columns:180px 1fr;
  gap:26px;
  align-items:center;
  margin-bottom:24px;
}

.profile-photo,
.profile-initials{
  width:160px;
  height:160px;
  border-radius:22px;
  box-shadow:0 14px 30px rgba(0,0,0,.16);
}

.profile-photo{
  object-fit:cover;
}

.profile-initials{
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg, var(--primary), #720e15);
  color:#fff;
  font-weight:900;
  font-size:46px;
}

.profile-name h3{
  margin:0 0 8px;
  color:var(--primary);
  font-size:30px;
  line-height:1.1;
}

.profile-name p{
  margin:0;
  color:var(--muted);
  line-height:1.6;
}

.profile-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  margin:22px 0;
}

.info-box{
  background:#fff3e0;
  border:1px solid rgba(190,24,35,.12);
  border-radius:18px;
  padding:16px;
}

.info-box span{
  display:block;
  color:#8e1119;
  font-weight:900;
  font-size:13px;
  text-transform:uppercase;
  margin-bottom:6px;
}

.info-box strong{
  color:#1e1c1c;
  font-size:16px;
  word-break:break-word;
}

.section-label{
  margin:28px 0 14px;
  color:var(--primary);
  text-align:center;
  font-size:24px;
}

/* ==========================================================
   TABELLE
   ========================================================== */

.table{
  width:100%;
  border-collapse:collapse;
  margin-top:10px;
  font-size:14px;
}

.table th,
.table td{
  padding:12px 10px;
  border-bottom:1px solid rgba(190,24,35,.10);
  text-align:left;
}

.table th{
  color:var(--primary-dark);
  font-weight:900;
}

/* ==========================================================
   NOTICE
   ========================================================== */

.notice{
  width:min(520px, 100%);
  margin:0 auto 14px;
  padding:11px 14px;
  border-radius:14px;
  font-weight:900;
  text-align:center;
}

.notice.ok{
  background:rgba(34,197,94,.12);
  border:1px solid rgba(34,197,94,.25);
  color:#166534;
}

.notice.err{
  background:rgba(190,24,35,.12);
  border:1px solid rgba(190,24,35,.25);
  color:#8e1119;
}

/* ==========================================================
   FOOTER
   ========================================================== */

.site-footer{
  margin-top:auto;
  background:linear-gradient(180deg, var(--primary-dark), var(--primary-deep));
  border-top:1px solid rgba(255,255,255,.10);
  padding:18px 0;
}

.footer-inner{
  width:min(var(--container), calc(100% - 40px));
  margin:0 auto;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  color:rgba(255,255,255,.92);
  font-size:14px;
  font-weight:900;
}

.footer-inner a{
  color:#fff;
  text-decoration:none;
  font-weight:900;
}

.footer-inner a:hover{
  text-decoration:underline;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media(max-width:1180px){
  .dashboard-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:900px){
  .brandbar,
  .brandbar.container{
    width:calc(100% - 24px);
    min-height:74px;
    gap:14px;
  }

  .brandbar::before{
    width:76px;
    height:48px;
    flex-basis:76px;
  }

  .brandbar h1{
    font-size:clamp(28px, 7vw, 42px);
    letter-spacing:1px;
  }

  .navbar .container{
    width:calc(100% - 20px);
    gap:8px;
  }

  .navbar a{
    font-size:13px;
    padding:8px 12px;
  }

  .hero-slider,
  .slider,
  .carousel,
  .hero-carousel{
    min-height:330px;
    height:380px;
  }

  .story-box,
  .box,
  .content-box{
    padding:24px 22px;
  }

  .profile-top{
    grid-template-columns:1fr;
    text-align:center;
  }

  .profile-photo,
  .profile-initials{
    margin:0 auto;
  }

  .profile-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:760px){
  .dashboard-grid{
    grid-template-columns:1fr;
  }

  .dashboard-card{
    min-height:auto;
  }

  .dashboard-card p{
    min-height:auto;
  }

  .dashboard-actions .placeholder{
    display:none;
  }

  .dashboard-actions a,
  .dashboard-actions span{
    width:100%;
  }

  .hero-content,
  .slide-content{
    left:22px;
    right:22px;
    bottom:54px;
  }

  .slider-dots,
  .carousel-dots,
  .dots{
    right:22px;
    bottom:22px;
  }

  .home-intro h2,
  .intro h2{
    font-size:32px;
  }
}

@media(max-width:520px){
  .brandbar,
  .brandbar.container{
    min-height:64px;
    gap:10px;
  }

  .brandbar::before{
    width:62px;
    height:42px;
    flex-basis:62px;
  }

  .brandbar h1{
    font-size:24px;
    letter-spacing:1px;
  }

  .navbar a{
    font-size:12px;
    padding:7px 10px;
  }

  .hero-slider,
  .slider,
  .carousel,
  .hero-carousel{
    min-height:300px;
    height:330px;
  }

  .footer-inner{
    flex-wrap:wrap;
    text-align:center;
  }
}


/* ==========================================================
   FIX DEFINITIVO PALLINI CAROSELLO
   Il problema era che i button prendevano lo stile globale dei bottoni.
   ========================================================== */

.ferrari-dots{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:11px !important;
}

.ferrari-dot,
button.ferrari-dot{
  appearance:none !important;
  -webkit-appearance:none !important;

  width:9px !important;
  min-width:9px !important;
  max-width:9px !important;

  height:9px !important;
  min-height:9px !important;
  max-height:9px !important;

  padding:0 !important;
  margin:0 !important;

  display:block !important;
  flex:0 0 9px !important;

  border-radius:50% !important;
  border:0 !important;

  background:rgba(255,255,255,.76) !important;
  box-shadow:none !important;
  cursor:pointer !important;
  line-height:0 !important;

  transform:none !important;
}

.ferrari-dot:hover,
button.ferrari-dot:hover{
  transform:scale(1.15) !important;
  background:#fff !important;
}

.ferrari-dot.active,
button.ferrari-dot.active{
  width:16px !important;
  min-width:16px !important;
  max-width:16px !important;

  height:16px !important;
  min-height:16px !important;
  max-height:16px !important;

  flex:0 0 16px !important;

  background:transparent !important;
  border:2px solid #be1823 !important;
  box-shadow:0 0 0 2px rgba(255,255,255,.22) inset !important;
  transform:none !important;
}

/* ==========================================================
   FOOTER FFG MIGLIORATO
   ========================================================== */

.site-footer{
  margin-top:auto !important;
  background:linear-gradient(180deg, #be1823 0%, #98131c 56%, #720e15 100%) !important;
  border-top:1px solid rgba(255,255,255,.12) !important;
  padding:0 !important;
  color:#fff !important;
}

.footer-inner{
  width:min(var(--container), calc(100% - 40px)) !important;
  margin:0 auto !important;
  padding:30px 0 24px !important;

  display:grid !important;
  grid-template-columns:1.2fr 1fr 1fr !important;
  gap:26px !important;
  align-items:center !important;

  color:#fff !important;
  font-size:14px !important;
  font-weight:800 !important;
}

.footer-brand{
  display:flex;
  align-items:center;
  gap:16px;
}

.footer-logo{
  width:86px;
  height:62px;
  object-fit:contain;
  flex-shrink:0;
}

.footer-brand-text strong{
  display:block;
  color:#1e1c1c;
  font-family:"Arial Black", Arial, Helvetica, sans-serif;
  font-style:italic;
  font-size:28px;
  line-height:1;
  letter-spacing:1px;
}

.footer-brand-text span{
  display:block;
  margin-top:7px;
  color:rgba(255,255,255,.86);
  font-size:13px;
  line-height:1.4;
}

.footer-col{
  display:grid;
  gap:12px;
}

.footer-item{
  display:flex;
  align-items:center;
  gap:10px;
  color:#fff;
  text-decoration:none;
  line-height:1.35;
}

.footer-icon{
  width:34px;
  height:34px;
  min-width:34px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.16);
  font-size:16px;
}

.footer-item strong{
  color:#fff;
  font-size:14px;
}

.footer-item span{
  color:rgba(255,255,255,.84);
  font-size:13px;
  font-weight:700;
}

.footer-bottom{
  border-top:1px solid rgba(255,255,255,.12);
  padding:12px 20px;
  text-align:center;
  color:rgba(255,255,255,.82);
  font-size:13px;
  font-weight:800;
}

.footer-bottom a{
  color:#fff;
  text-decoration:none;
}

.footer-bottom a:hover{
  text-decoration:underline;
}

@media(max-width:900px){
  .footer-inner{
    grid-template-columns:1fr !important;
    text-align:center !important;
    gap:22px !important;
    padding:28px 0 22px !important;
  }

  .footer-brand{
    justify-content:center !important;
  }

  .footer-col{
    justify-items:center !important;
  }

  .footer-item{
    justify-content:center !important;
  }
}

@media(max-width:520px){
  .footer-brand{
    flex-direction:column !important;
    gap:10px !important;
  }

  .footer-logo{
    width:74px !important;
    height:54px !important;
  }

  .footer-brand-text strong{
    font-size:24px !important;
  }
}


/* ==========================================================
   FIX FOOTER UNITO - rimuove la lineetta divisoria
   ========================================================== */

.site-footer{
  border-top:none !important;
  overflow:hidden !important;
  background:linear-gradient(180deg, #be1823 0%, #98131c 62%, #720e15 100%) !important;
}

.footer-inner{
  padding-bottom:18px !important;
}

/* Questa era la linea che separava troppo il footer */
.footer-bottom{
  border-top:0 !important;
  margin-top:0 !important;
  padding-top:0 !important;
  padding-bottom:18px !important;
  background:transparent !important;
  box-shadow:none !important;
}

/* Evita micro-linee causate da bordi/antialiasing */
.footer-bottom::before,
.footer-bottom::after,
.site-footer::before,
.site-footer::after{
  content:none !important;
  display:none !important;
}


/* ==========================================================
   FIX HOME DOPO FOOTER
   Rimette centrata e ordinata la parte sotto al carosello
   ========================================================== */

.home-after-slider{
  width:min(var(--container), calc(100% - 40px)) !important;
  margin:0 auto !important;
  padding-top:56px !important;
  padding-bottom:90px !important;
}

/* Intro centrale */
.home-after-slider .hero{
  width:100% !important;
  max-width:980px !important;
  margin:0 auto 42px !important;

  display:grid !important;
  place-items:center !important;
  text-align:center !important;
}

.home-after-slider .hero h2{
  margin:0 auto 18px !important;
  max-width:980px !important;

  color:#be1823 !important;
  font-size:clamp(36px, 4vw, 52px) !important;
  line-height:1.08 !important;
  font-weight:900 !important;
  text-align:center !important;
}

.home-after-slider .hero p{
  margin:0 auto !important;
  max-width:820px !important;

  color:#1e1c1c !important;
  font-size:18px !important;
  line-height:1.75 !important;
  text-align:center !important;
}

/* Box storia */
.home-after-slider .story-box{
  width:min(900px, 100%) !important;
  max-width:900px !important;
  margin:0 auto 52px !important;
  padding:30px 34px !important;

  background:#fff !important;
  border-radius:18px !important;
  box-shadow:0 14px 35px rgba(0,0,0,.08) !important;
  border:1px solid rgba(190,24,35,.08) !important;

  color:#1e1c1c !important;
  font-size:16px !important;
  line-height:1.8 !important;
  text-align:left !important;
}

/* Sezione inaugurazione */
.home-after-slider .evento{
  width:100% !important;
  margin:0 auto !important;
  padding:0 0 82px !important;
}

.home-after-slider .evento-box{
  width:min(900px, 100%) !important;
  max-width:900px !important;
  margin:0 auto !important;
  padding:38px 32px !important;

  background:#fff !important;
  border-radius:24px !important;
  text-align:center !important;
  box-shadow:0 14px 35px rgba(0,0,0,.10) !important;
  border:1px solid rgba(190,24,35,.10) !important;
}

.home-after-slider .evento-box h2{
  margin:0 0 14px !important;
  color:#be1823 !important;
  font-size:clamp(32px, 4vw, 44px) !important;
  line-height:1.05 !important;
  text-align:center !important;
}

.home-after-slider .evento-desc{
  max-width:700px !important;
  margin:0 auto 28px !important;
  color:#5f5f5f !important;
  font-size:18px !important;
  line-height:1.7 !important;
  text-align:center !important;
}

.home-after-slider .evento-dettagli{
  display:grid !important;
  grid-template-columns:repeat(3, 1fr) !important;
  gap:14px !important;
  margin:28px 0 !important;
}

.home-after-slider .evento-detail{
  background:#fff3e0 !important;
  border:1px solid rgba(190,24,35,.12) !important;
  border-radius:18px !important;
  padding:18px 14px !important;
  text-align:center !important;
}

.home-after-slider .evento-detail span{
  display:block !important;
  color:#8e1119 !important;
  font-size:13px !important;
  font-weight:900 !important;
  text-transform:uppercase !important;
  margin-bottom:8px !important;
}

.home-after-slider .evento-detail strong{
  display:block !important;
  color:#1e1c1c !important;
  font-size:17px !important;
  line-height:1.35 !important;
}

.home-after-slider .btn-evento{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:230px !important;
  min-height:48px !important;
  padding:13px 22px !important;
  border-radius:999px !important;
  background:#be1823 !important;
  color:#fff !important;
  text-decoration:none !important;
  font-weight:900 !important;
  box-shadow:0 10px 24px rgba(190,24,35,.22) !important;
  transition:transform .2s ease, background-color .2s ease !important;
}

.home-after-slider .btn-evento:hover{
  background:#a3141f !important;
  transform:translateY(-2px) !important;
}

/* Footer più staccato dalla sezione, ma senza linea */
.site-footer{
  margin-top:0 !important;
}

@media(max-width:760px){
  .home-after-slider{
    width:calc(100% - 28px) !important;
    padding-top:38px !important;
    padding-bottom:60px !important;
  }

  .home-after-slider .hero h2{
    font-size:32px !important;
  }

  .home-after-slider .story-box{
    padding:24px 22px !important;
    margin-bottom:38px !important;
  }

  .home-after-slider .evento{
    padding-bottom:58px !important;
  }

  .home-after-slider .evento-box{
    padding:28px 22px !important;
  }

  .home-after-slider .evento-dettagli{
    grid-template-columns:1fr !important;
  }
}


/* ==========================================================
   CONTACT PAGE FIX
   ========================================================== */

.contact-page{
  width:min(var(--container), calc(100% - 40px));
  margin:0 auto;
  padding:56px 0 86px;
}

.contact-hero{
  text-align:center;
  margin:0 auto 34px;
  max-width:850px;
}

.contact-hero h2{
  margin:0 0 12px;
  color:#be1823;
  font-size:clamp(38px, 5vw, 58px);
  line-height:1;
  font-weight:900;
}

.contact-hero p{
  margin:0 auto;
  max-width:720px;
  color:#5f5f5f;
  font-size:18px;
  line-height:1.7;
}

.contact-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:24px;
  align-items:stretch;
  margin:34px 0 34px;
}

.contact-card{
  background:#fff;
  border:1px solid rgba(190,24,35,.10);
  border-radius:24px;
  overflow:hidden;
  box-shadow:0 14px 35px rgba(0,0,0,.10);
  display:flex;
  flex-direction:column;
}

.contact-photo-wrap{
  width:100%;
  height:260px;
  background:#1e1c1c;
  overflow:hidden;
}

.contact-photo-wrap img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  transition:transform .25s ease;
}

.contact-card:hover .contact-photo-wrap img{
  transform:scale(1.04);
}

.contact-info{
  padding:22px;
  display:grid;
  gap:8px;
}

.contact-role{
  display:inline-flex;
  width:max-content;
  padding:7px 12px;
  border-radius:999px;
  background:#fff3e0;
  color:#8e1119;
  border:1px solid rgba(190,24,35,.14);
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
}

.contact-info h3{
  margin:4px 0 0;
  color:#be1823;
  font-size:23px;
  line-height:1.12;
}

.contact-info p{
  margin:0;
  color:#5f5f5f;
  font-weight:700;
}

.contact-info a{
  color:#1e1c1c;
  text-decoration:none;
  font-weight:800;
  word-break:break-word;
}

.contact-info a:hover{
  color:#be1823;
  text-decoration:underline;
}

.contact-box{
  background:linear-gradient(135deg, #be1823, #720e15);
  color:#fff;
  border-radius:24px;
  padding:26px;
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:18px;
  box-shadow:0 14px 35px rgba(0,0,0,.12);
}

.contact-box div{
  text-align:center;
  padding:10px;
}

.contact-box span{
  display:block;
  color:rgba(255,255,255,.78);
  font-size:13px;
  font-weight:900;
  text-transform:uppercase;
  margin-bottom:8px;
}

.contact-box strong{
  display:block;
  font-size:17px;
  line-height:1.35;
}

@media(max-width:900px){
  .contact-grid{
    grid-template-columns:1fr;
  }

  .contact-photo-wrap{
    height:320px;
  }

  .contact-box{
    grid-template-columns:1fr;
  }
}

@media(max-width:520px){
  .contact-page{
    width:calc(100% - 28px);
    padding:38px 0 64px;
  }

  .contact-photo-wrap{
    height:260px;
  }

  .contact-info{
    padding:20px;
  }
}


/* ==========================================================
   CONTACT CARD ALIGN FIX
   Allinea ruolo, nome, data ed email nelle tre card
   ========================================================== */

.contact-grid{
  align-items:stretch !important;
}

.contact-card{
  height:100% !important;
  display:grid !important;
  grid-template-rows:260px 1fr !important;
}

/* Se le immagini non caricano, la card mantiene comunque la stessa altezza */
.contact-photo-wrap{
  height:260px !important;
  min-height:260px !important;
}

/* Blocco testo ordinato con righe uguali */
.contact-info{
  padding:24px 24px 26px !important;
  display:grid !important;
  grid-template-rows:42px 68px 34px 48px !important;
  align-items:start !important;
  gap:8px !important;
}

/* Ruolo sempre sulla stessa linea */
.contact-role{
  align-self:start !important;
  justify-self:start !important;
  height:34px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:0 14px !important;
  margin:0 !important;
}

/* Nome con altezza fissa, così le email partono allineate */
.contact-info h3{
  margin:0 !important;
  min-height:58px !important;
  display:flex !important;
  align-items:center !important;

  color:#be1823 !important;
  font-size:clamp(25px, 2vw, 34px) !important;
  line-height:1.05 !important;
  font-weight:900 !important;
}

/* Data allineata */
.contact-info p{
  margin:0 !important;
  min-height:28px !important;
  display:flex !important;
  align-items:center !important;

  color:#5f5f5f !important;
  font-size:clamp(16px, 1.25vw, 22px) !important;
  line-height:1.2 !important;
  font-weight:800 !important;
}

/* Email più controllata: non gigante e con wrap pulito */
.contact-info a{
  display:block !important;
  margin:0 !important;

  color:#1e1c1c !important;
  text-decoration:none !important;
  font-size:clamp(13px, 1vw, 16px) !important;
  line-height:1.25 !important;
  font-weight:850 !important;

  overflow-wrap:anywhere !important;
  word-break:normal !important;
  hyphens:auto !important;
}

.contact-info a:hover{
  color:#be1823 !important;
  text-decoration:underline !important;
}

/* Le card respirano meglio */
.contact-card{
  border-radius:24px !important;
  overflow:hidden !important;
}

/* Su mobile torno a layout più naturale */
@media(max-width:900px){
  .contact-card{
    grid-template-rows:320px auto !important;
  }

  .contact-photo-wrap{
    height:320px !important;
    min-height:320px !important;
  }

  .contact-info{
    grid-template-rows:auto !important;
    gap:10px !important;
  }

  .contact-info h3,
  .contact-info p{
    min-height:auto !important;
  }

  .contact-info h3{
    font-size:30px !important;
  }

  .contact-info p{
    font-size:19px !important;
  }

  .contact-info a{
    font-size:15px !important;
  }
}


/* ==========================================================
   ABOUT PAGE FIX
   ========================================================== */

.about-page{
  width:min(var(--container), calc(100% - 40px));
  margin:0 auto;
  padding:56px 0 86px;
}

.about-hero{
  max-width:930px;
  margin:0 auto 32px;
  text-align:center;
}

.about-kicker{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 14px;
  margin-bottom:16px;
  border-radius:999px;
  background:#fff3e0;
  color:#8e1119;
  border:1px solid rgba(190,24,35,.16);
  font-size:13px;
  font-weight:900;
  text-transform:uppercase;
}

.about-hero h2{
  margin:0 auto 18px;
  color:#be1823;
  font-size:clamp(38px, 5vw, 58px);
  line-height:1.04;
  font-weight:900;
  max-width:980px;
}

.about-hero p{
  margin:0 auto;
  color:#1e1c1c;
  font-size:18px;
  line-height:1.75;
  max-width:860px;
}

.about-story{
  width:min(900px, 100%);
  margin:34px auto 42px;
  padding:30px 34px;
  background:#fff;
  border-radius:22px;
  box-shadow:0 14px 35px rgba(0,0,0,.08);
  border:1px solid rgba(190,24,35,.08);
  color:#1e1c1c;
  font-size:17px;
  line-height:1.8;
}

.about-story p{
  margin:0 0 18px;
}

.about-story p:last-child{
  margin-bottom:0;
}

.about-goals{
  width:min(1000px, 100%);
  margin:0 auto 46px;
  text-align:center;
}

.about-goals h3{
  margin:0 0 22px;
  color:#be1823;
  font-size:clamp(30px, 4vw, 42px);
  line-height:1.08;
  font-weight:900;
}

.about-goals-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:20px;
}

.about-goal-card{
  background:#fff;
  border-radius:22px;
  padding:26px 22px;
  box-shadow:0 14px 35px rgba(0,0,0,.08);
  border:1px solid rgba(190,24,35,.10);
  text-align:left;
}

.about-goal-card span{
  display:inline-flex;
  width:42px;
  height:42px;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#be1823;
  color:#fff;
  font-weight:900;
  margin-bottom:16px;
}

.about-goal-card h4{
  margin:0 0 10px;
  color:#be1823;
  font-size:24px;
  line-height:1.1;
}

.about-goal-card p{
  margin:0;
  color:#5f5f5f;
  line-height:1.65;
  font-size:16px;
}

.about-claim{
  width:min(900px, 100%);
  margin:0 auto;
  padding:30px 24px;
  border-radius:24px;
  background:linear-gradient(135deg, #be1823, #720e15);
  color:#fff;
  text-align:center;
  font-size:clamp(28px, 4vw, 42px);
  line-height:1.12;
  font-weight:900;
  box-shadow:0 14px 35px rgba(0,0,0,.12);
}

@media(max-width:900px){
  .about-goals-grid{
    grid-template-columns:1fr;
  }

  .about-goal-card{
    text-align:center;
  }
}

@media(max-width:520px){
  .about-page{
    width:calc(100% - 28px);
    padding:38px 0 64px;
  }

  .about-story{
    padding:24px 22px;
  }

  .about-hero h2{
    font-size:34px;
  }
}


/* ==========================================================
   FIX BOTTONI GESTIONALE TUTTI ROSSI
   ========================================================== */

.dashboard-actions a,
.dashboard-actions a.secondary,
.dashboard-actions .secondary,
.dashboard-card a,
.dashboard-card a.secondary{
  background:#be1823 !important;
  color:#ffffff !important;
  border:none !important;
  box-shadow:0 8px 18px rgba(190,24,35,.20) !important;
}

.dashboard-actions a:hover,
.dashboard-actions a.secondary:hover,
.dashboard-actions .secondary:hover,
.dashboard-card a:hover,
.dashboard-card a.secondary:hover{
  background:#a3141f !important;
  color:#ffffff !important;
  transform:translateY(-2px) !important;
}

/* Mantiene invisibili i placeholder usati per allineare le card */
.dashboard-actions .placeholder{
  visibility:hidden !important;
  pointer-events:none !important;
  background:transparent !important;
  box-shadow:none !important;
  border:none !important;
}


/* ==========================================================
   FIX SCROLL OLTRE HEADER / FOOTER
   Evita il bianco quando scrolli troppo su o troppo giù
   ========================================================== */

html{
  background:#be1823 !important;
  overscroll-behavior-y:none !important;
  overscroll-behavior-x:none !important;
}

body{
  background:#FFF3E0 !important;
  overscroll-behavior-y:none !important;
  overscroll-behavior-x:none !important;
  overflow-x:hidden !important;
}

/* Safari / Chrome: tiene il colore anche nel rimbalzo */
body::before{
  content:"";
  position:fixed;
  left:0;
  right:0;
  top:-120vh;
  height:120vh;
  background:#be1823;
  z-index:-1;
  pointer-events:none;
}

body::after{
  content:"";
  position:fixed;
  left:0;
  right:0;
  bottom:-120vh;
  height:120vh;
  background:#720e15;
  z-index:-1;
  pointer-events:none;
}

/* Sicurezza: header e footer coprono sempre tutta la larghezza */
.site-header,
.site-footer{
  width:100% !important;
}


/* ==========================================================
   FIX DEFINITIVO BOTTONI GESTIONALE
   Tutti rossi, solo Logout nero
   ========================================================== */

/* Tutti i bottoni/link dentro le card del gestionale */
.dashboard-card a,
.dashboard-card a.secondary,
.dashboard-card .secondary,
.dashboard-actions a,
.dashboard-actions a.secondary,
.dashboard-actions .secondary,
.dashboard-actions a.btn,
.dashboard-actions a.btn-ghost,
.dashboard-actions a.btn-secondary,
.dashboard-actions a[class*="secondary"],
.dashboard-actions a[class*="ghost"],
.dashboard-actions a[class*="outline"]{
  background:#be1823 !important;
  background-color:#be1823 !important;
  color:#ffffff !important;
  border:0 !important;
  box-shadow:0 8px 18px rgba(190,24,35,.22) !important;
}

/* Hover sempre rosso scuro */
.dashboard-card a:hover,
.dashboard-card a.secondary:hover,
.dashboard-card .secondary:hover,
.dashboard-actions a:hover,
.dashboard-actions a.secondary:hover,
.dashboard-actions .secondary:hover,
.dashboard-actions a.btn:hover,
.dashboard-actions a.btn-ghost:hover,
.dashboard-actions a.btn-secondary:hover,
.dashboard-actions a[class*="secondary"]:hover,
.dashboard-actions a[class*="ghost"]:hover,
.dashboard-actions a[class*="outline"]:hover{
  background:#a3141f !important;
  background-color:#a3141f !important;
  color:#ffffff !important;
  border:0 !important;
  transform:translateY(-2px) !important;
}

/* Se ci sono bottoni beige in generale nel gestionale, diventano rossi */
.dashboard-shell .btn-ghost,
.dashboard-shell .btn-secondary,
.dashboard-shell .secondary,
.dashboard-shell a.secondary,
.dashboard-shell a.btn-ghost,
.dashboard-shell a.btn-secondary{
  background:#be1823 !important;
  background-color:#be1823 !important;
  color:#ffffff !important;
  border:0 !important;
  box-shadow:0 8px 18px rgba(190,24,35,.22) !important;
}

/* Logout deve restare nero */
.logout-box a,
.logout-box .btn,
a[href*="logout"],
a[href*="logout=1"]{
  background:#1e1c1c !important;
  background-color:#1e1c1c !important;
  color:#ffffff !important;
  border:0 !important;
  box-shadow:none !important;
}

.logout-box a:hover,
.logout-box .btn:hover,
a[href*="logout"]:hover,
a[href*="logout=1"]:hover{
  background:#1e1c1c !important;
  background-color:#1e1c1c !important;
  color:#ffffff !important;
  transform:translateY(-2px) !important;
}

/* Placeholder invisibili per allineamento: non devono diventare bottoni visibili */
.dashboard-actions .placeholder,
.dashboard-card .placeholder{
  visibility:hidden !important;
  pointer-events:none !important;
  background:transparent !important;
  background-color:transparent !important;
  box-shadow:none !important;
  border:none !important;
}


/* ==========================================================
   FIX VISUALIZZA GIOCATORI - SPAZI COMPATTI + FOOTER
   ========================================================== */

/* Meno vuoto tra header, titolo, sottotitolo e card */
main.container{
  width:min(1120px, calc(100% - 40px)) !important;
  margin:0 auto !important;
  padding-top:42px !important;
  padding-bottom:62px !important;
}

main.container > .page-title,
.page-title{
  margin:0 auto 8px !important;
  font-size:clamp(38px, 4.6vw, 56px) !important;
  line-height:1 !important;
  color:#be1823 !important;
  text-align:center !important;
  font-weight:900 !important;
  text-transform:uppercase !important;
}

main.container > .page-subtitle,
.page-subtitle{
  margin:0 auto 30px !important;
  font-size:19px !important;
  line-height:1.45 !important;
  color:#5f5f5f !important;
  text-align:center !important;
}

/* Evita il doppio spazio causato da admin-wrap dentro main */
main.container .admin-wrap{
  width:100% !important;
  margin:0 auto !important;
  padding:0 !important;
}

main.container .admin-stack{
  display:grid !important;
  gap:24px !important;
}

/* Card più compatte */
main.container .admin-card,
main.container .filter-card,
main.container .results-card{
  padding:28px 30px !important;
  border-radius:24px !important;
  margin:0 !important;
}

main.container .admin-title{
  margin:0 0 20px !important;
  font-size:25px !important;
  line-height:1.1 !important;
  text-align:left !important;
  color:#1e1c1c !important;
}

/* Form più compatto */
main.container .field{
  margin-bottom:16px !important;
  gap:7px !important;
}

main.container label{
  font-size:14px !important;
}

main.container input,
main.container select{
  min-height:48px !important;
  padding:11px 14px !important;
  border-radius:14px !important;
  font-size:15px !important;
}

/* Bottoni filtri più ordinati */
main.container .btn-row,
main.container .back-row,
main.container .action-row{
  display:flex !important;
  gap:12px !important;
  flex-wrap:wrap !important;
  justify-content:flex-start !important;
  align-items:center !important;
  margin-top:16px !important;
}

main.container .back-row{
  margin-top:10px !important;
}

main.container .btn,
main.container button,
main.container input[type="submit"]{
  min-width:150px !important;
  min-height:44px !important;
  padding:11px 18px !important;
  border-radius:999px !important;
  background:#be1823 !important;
  color:#fff !important;
  border:0 !important;
  box-shadow:0 8px 18px rgba(190,24,35,.20) !important;
}

main.container .btn:hover,
main.container button:hover,
main.container input[type="submit"]:hover{
  background:#a3141f !important;
  color:#fff !important;
}

/* Nota risultati */
.results-note{
  margin:-10px 0 18px !important;
  color:#5f5f5f !important;
  font-size:14px !important;
  line-height:1.45 !important;
}

/* Tabella: massimo 8 righe lato PHP, ma anche più compatta lato CSS */
main.container table,
main.container .table{
  font-size:14px !important;
}

main.container table th,
main.container .table th{
  padding:13px 12px !important;
}

main.container table td,
main.container .table td{
  padding:14px 12px !important;
}

/* Footer più compatto e non invadente */
.site-footer{
  margin-top:0 !important;
  padding:0 !important;
  background:linear-gradient(180deg, #be1823 0%, #98131c 58%, #720e15 100%) !important;
  border-top:none !important;
}

.footer-inner{
  width:min(var(--container), calc(100% - 40px)) !important;
  padding:22px 0 16px !important;
  display:grid !important;
  grid-template-columns:1.15fr 1fr 1fr !important;
  gap:22px !important;
  align-items:center !important;
}

.footer-logo{
  width:72px !important;
  height:52px !important;
}

.footer-brand-text strong{
  font-size:25px !important;
}

.footer-brand-text span,
.footer-item span,
.footer-item strong{
  font-size:13px !important;
}

.footer-icon{
  width:30px !important;
  height:30px !important;
  min-width:30px !important;
}

.footer-bottom{
  border-top:0 !important;
  padding:0 20px 14px !important;
  background:transparent !important;
}

/* Solo logout nero */
.logout-box a,
a[href*="logout"],
a[href*="logout=1"]{
  background:#1e1c1c !important;
  color:#fff !important;
  box-shadow:none !important;
}

/* Mobile */
@media(max-width:900px){
  main.container{
    width:calc(100% - 28px) !important;
    padding-top:34px !important;
    padding-bottom:52px !important;
  }

  main.container > .page-title,
  .page-title{
    font-size:34px !important;
  }

  main.container > .page-subtitle,
  .page-subtitle{
    margin-bottom:24px !important;
    font-size:17px !important;
  }

  main.container .admin-card{
    padding:22px 18px !important;
  }

  main.container .btn-row,
  main.container .back-row,
  main.container .action-row{
    justify-content:center !important;
  }

  main.container .btn,
  main.container button,
  main.container input[type="submit"]{
    width:100% !important;
  }

  .footer-inner{
    grid-template-columns:1fr !important;
    text-align:center !important;
    gap:16px !important;
    padding:22px 0 14px !important;
  }

  .footer-brand,
  .footer-item{
    justify-content:center !important;
  }
}


/* ==========================================================
   FIX VISUALIZZA GIOCATORI - BOTTONI IN LINEA + SOTTOTITOLO
   ========================================================== */

/* Sottotitolo più leggibile */
main.container > .page-subtitle,
.page-subtitle{
  color:#1e1c1c !important;
  font-weight:800 !important;
  font-size:21px !important;
  line-height:1.45 !important;
  margin:0 auto 34px !important;
}

/* Evita che i bottoni del filtro vadano uno sotto l'altro */
main.container .filter-card .btn-row,
main.container .filter-card .back-row,
main.container .filter-card .action-row{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:14px !important;
  flex-wrap:wrap !important;
  margin-top:18px !important;
  margin-right:10px !important;
}

/* Se btn-row e back-row sono due div separati, li faccio comportare come pezzi della stessa riga */
main.container .filter-card .btn-row{
  margin-bottom:0 !important;
}

main.container .filter-card .back-row{
  margin-top:18px !important;
}

/* Bottoni tutti stessa misura e allineati */
main.container .filter-card .btn,
main.container .filter-card button,
main.container .filter-card input[type="submit"]{
  min-width:178px !important;
  width:auto !important;
  min-height:48px !important;
  padding:12px 22px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  vertical-align:middle !important;
  border-radius:999px !important;
  background:#be1823 !important;
  color:#fff !important;
  border:0 !important;
  box-shadow:0 8px 18px rgba(190,24,35,.20) !important;
}

/* Il contenitore del form non deve costringere i bottoni in colonna */
main.container .filter-card form{
  display:block !important;
}

/* Migliore respiro sotto il blocco Squadre gestite */
main.container .filter-card p,
main.container .filter-card .managed-teams,
main.container .filter-card .squadre-gestite{
  margin-bottom:20px !important;
}

/* Mobile: lì invece vanno bene larghi */
@media(max-width:700px){
  main.container .filter-card .btn-row,
  main.container .filter-card .back-row,
  main.container .filter-card .action-row{
    display:flex !important;
    width:100% !important;
    margin-right:0 !important;
  }

  main.container .filter-card .btn,
  main.container .filter-card button,
  main.container .filter-card input[type="submit"]{
    width:100% !important;
    min-width:0 !important;
  }
}


/* ==========================================================
   FIX REALE BOTTONI FILTRI IN UNA SOLA RIGA
   PHP ora usa .filter-actions.
   ========================================================== */

.filter-actions{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:14px !important;
  flex-wrap:nowrap !important;
  margin-top:24px !important;
  width:100% !important;
}

/* Riga bottoni secondari sotto i filtri: ordinata e spaziata */
.filter-actions-extra{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:14px !important;
  margin-top:14px !important;
  width:100% !important;
}
.filter-actions-extra .btn,
.filter-actions-extra a{
  width:auto !important;
  min-width:170px !important;
  min-height:48px !important;
  margin:0 !important;
  border-radius:999px !important;
  white-space:nowrap !important;
}

/* Bottoni dentro filtri */
.filter-actions .btn,
.filter-actions button,
.filter-actions input[type="submit"],
.filter-actions a{
  width:auto !important;
  min-width:170px !important;
  max-width:none !important;
  min-height:48px !important;
  margin:0 !important;

  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;

  background:#be1823 !important;
  color:#ffffff !important;
  border:0 !important;
  border-radius:999px !important;
  box-shadow:0 8px 18px rgba(190,24,35,.20) !important;
  white-space:nowrap !important;
}

/* Reset e Torna indietro rossi uguali */
.filter-actions .btn-ghost,
.filter-actions .secondary,
.filter-actions a.secondary,
.filter-actions a.btn-ghost{
  background:#be1823 !important;
  color:#ffffff !important;
  border:0 !important;
}

/* Se esistono ancora vecchi contenitori, li tengo orizzontali */
main.container .filter-card .btn-row,
main.container .filter-card .back-row,
main.container .filter-card .action-row{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:14px !important;
  flex-wrap:nowrap !important;
  width:auto !important;
  margin:24px 0 0 0 !important;
}

/* Mobile: su schermi piccoli vanno in colonna */
@media(max-width:700px){
  .filter-actions{
    flex-wrap:wrap !important;
  }

  .filter-actions .btn,
  .filter-actions button,
  .filter-actions input[type="submit"],
  .filter-actions a{
    width:100% !important;
    min-width:0 !important;
  }

  main.container .filter-card .btn-row,
  main.container .filter-card .back-row,
  main.container .filter-card .action-row{
    flex-wrap:wrap !important;
    width:100% !important;
  }
}

/* ==========================================================
   FFG ENHANCE — fluidità, micro-interazioni, polish
   (solo palette esistente: rosso #be1823, crema #FFF3E0, nero #1e1c1c)
   Aggiunto in append: non modifica le regole sopra.
   ========================================================== */

html{ scroll-behavior:smooth; }

::selection{ background:rgba(190,24,35,.85); color:#fff; }

/* Scrollbar coerente col brand (browser webkit) */
*{ scrollbar-color:#be1823 #FFF3E0; }
*::-webkit-scrollbar{ width:11px; height:11px; }
*::-webkit-scrollbar-track{ background:#FFF3E0; }
*::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,#be1823,#98131c);
  border-radius:999px;
  border:2px solid #FFF3E0;
}

/* Focus visibile e accessibile su tutta l'interfaccia */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible,
.navbar a:focus-visible{
  outline:3px solid rgba(190,24,35,.45);
  outline-offset:2px;
}

/* ---- Reveal allo scroll (attivato da ffg.js via .js-enabled) ---- */
@keyframes ffg-rise{
  from{ opacity:0; transform:translateY(22px); }
  to{ opacity:1; transform:translateY(0); }
}

.js-enabled .ffg-reveal{
  opacity:0;
  transform:translateY(22px);
  will-change:opacity, transform;
}

.js-enabled .ffg-reveal.ffg-in{
  animation:ffg-rise .7s cubic-bezier(.22,1,.36,1) forwards;
}

/* Stagger leggero per gruppi (card vicine) */
.js-enabled .ffg-reveal.ffg-in.ffg-d1{ animation-delay:.06s; }
.js-enabled .ffg-reveal.ffg-in.ffg-d2{ animation-delay:.12s; }
.js-enabled .ffg-reveal.ffg-in.ffg-d3{ animation-delay:.18s; }
.js-enabled .ffg-reveal.ffg-in.ffg-d4{ animation-delay:.24s; }

/* ---- Hover lift su card e box ---- */
.dashboard-card,
.team-box,
.contact-card,
.about-goal-card,
.note-card,
.kpi,
.perf-stat,
.info-box,
.evento-detail,
.team-stat{
  transition:transform .25s cubic-bezier(.22,1,.36,1),
             box-shadow .25s ease,
             border-color .25s ease;
}

.dashboard-card:hover,
.contact-card:hover,
.about-goal-card:hover,
.note-card:hover{
  transform:translateY(-6px);
  box-shadow:0 22px 45px rgba(30,28,28,.16);
  border-color:rgba(190,24,35,.28);
}

.kpi:hover,
.perf-stat:hover,
.info-box:hover,
.evento-detail:hover,
.team-stat:hover{
  transform:translateY(-3px);
  box-shadow:0 12px 24px rgba(190,24,35,.14);
}

.team-box:hover{
  transform:translateY(-4px);
  box-shadow:0 18px 38px rgba(30,28,28,.14);
}

/* ---- Bottoni: shine + press ---- */
.btn, button, input[type="submit"]{
  position:relative;
  overflow:hidden;
}

.btn::after,
button::after,
input[type="submit"]::after{
  content:"";
  position:absolute;
  top:0;
  left:-120%;
  width:60%;
  height:100%;
  background:linear-gradient(115deg, transparent, rgba(255,255,255,.35), transparent);
  transform:skewX(-18deg);
  transition:left .55s ease;
  pointer-events:none;
}

.btn:hover::after,
button:hover::after,
input[type="submit"]:hover::after{
  left:140%;
}

.btn:active,
button:active,
input[type="submit"]:active{
  transform:translateY(1px) scale(.98);
}

/* La navbar non deve ereditare lo shine dei bottoni */
.navbar a::after{ content:none; }

/* ---- Link navbar: underline animata ---- */
.navbar a{ position:relative; }
.navbar a::before{
  content:"";
  position:absolute;
  left:16px;
  right:16px;
  bottom:4px;
  height:2px;
  background:#fff;
  border-radius:2px;
  transform:scaleX(0);
  transform-origin:center;
  transition:transform .25s ease;
}
.navbar a:hover::before,
.navbar a.active::before{ transform:scaleX(1); }

/* ---- Tabelle: righe interattive + ordinamento ---- */
.table tr{ transition:background-color .18s ease; }
.table tr:hover td{ background:rgba(190,24,35,.05); }

.table th.ffg-sortable{
  cursor:pointer;
  user-select:none;
  white-space:nowrap;
}
.table th.ffg-sortable::after{
  content:"⇅";
  font-size:11px;
  opacity:.45;
  margin-left:6px;
}
.table th.ffg-sortable.ffg-asc::after{ content:"▲"; opacity:.9; }
.table th.ffg-sortable.ffg-desc::after{ content:"▼"; opacity:.9; }

/* ---- Barra di ricerca tabella (creata da ffg.js) ---- */
.ffg-tablebar{
  display:flex;
  align-items:center;
  gap:10px;
  margin:4px 0 14px;
}
.ffg-tablebar input{
  flex:1;
  max-width:380px;
}
.ffg-tablebar .ffg-count{
  font-size:13px;
  font-weight:900;
  color:#8e1119;
  white-space:nowrap;
}
.ffg-norow td{
  text-align:center;
  color:#5f5f5f;
  font-weight:800;
  padding:18px 10px;
}

/* ---- Barre statistiche: riempimento animato ---- */
.js-enabled .bar-fill{
  transition:width 1.1s cubic-bezier(.22,1,.36,1);
}

/* ---- Notice: entrata + pulsante chiudi ---- */
@keyframes ffg-pop{
  from{ opacity:0; transform:translateY(-8px) scale(.98); }
  to{ opacity:1; transform:translateY(0) scale(1); }
}
.notice{
  animation:ffg-pop .35s ease both;
  position:relative;
}
.notice.ffg-hide{
  opacity:0;
  transform:translateY(-8px);
  transition:opacity .4s ease, transform .4s ease;
}
.ffg-notice-close{
  position:absolute;
  top:50%;
  right:10px;
  transform:translateY(-50%);
  width:22px;
  height:22px;
  min-height:0;
  padding:0;
  border-radius:50%;
  background:transparent;
  color:inherit;
  box-shadow:none;
  font-size:15px;
  line-height:1;
  opacity:.6;
}
.ffg-notice-close::after{ content:none; }
.ffg-notice-close:hover{ opacity:1; background:rgba(30,28,28,.08); transform:translateY(-50%); }

/* ---- Mostra/Nascondi password (creato da ffg.js) ---- */
.ffg-pass-wrap{ position:relative; display:block; }
.ffg-pass-wrap input{ padding-right:96px; }
.ffg-pass-toggle{
  position:absolute;
  top:0;
  right:0;
  height:100%;
  min-height:0;
  padding:0 12px;
  background:transparent;
  color:#8e1119;
  box-shadow:none;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.ffg-pass-toggle::after{ content:none; }
.ffg-pass-toggle:hover{ background:transparent; color:#be1823; transform:none; }

/* ---- Immagini: fade-in al caricamento ---- */
.profile-photo,
.contact-photo-wrap img,
.avatar,
.footer-logo{
  transition:opacity .5s ease, transform .5s ease;
}
.js-enabled img.ffg-img-load{ opacity:0; }
.js-enabled img.ffg-img-in{ opacity:1; }

/* ---- Score ring: glow morbido ---- */
.score-ring{ transition:filter .4s ease; }
.perf-panel:hover .score-ring,
.governance-panel:hover .score-ring{
  filter:drop-shadow(0 0 14px rgba(190,24,35,.45));
}

/* ---- Pulsante "torna su" (creato da ffg.js) ---- */
.ffg-top{
  position:fixed;
  right:20px;
  bottom:20px;
  width:48px;
  height:48px;
  min-height:0;
  padding:0;
  border-radius:50%;
  background:linear-gradient(135deg,#be1823,#98131c);
  color:#fff;
  font-size:22px;
  box-shadow:0 12px 26px rgba(190,24,35,.35);
  opacity:0;
  visibility:hidden;
  transform:translateY(16px);
  transition:opacity .3s ease, transform .3s ease, visibility .3s;
  z-index:90;
}
.ffg-top.ffg-show{ opacity:1; visibility:visible; transform:translateY(0); }
.ffg-top::after{ content:none; }

/* ---- Carousel dots: transizione morbida (home) ---- */
.ferrari-dot{ transition:width .3s ease, height .3s ease, background .3s ease, border-color .3s ease; }

/* ==========================================================
   RISPETTO PREFERENZE DI MOVIMENTO RIDOTTO
   ========================================================== */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *,
  *::before,
  *::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
  }
  .js-enabled .ffg-reveal{ opacity:1 !important; transform:none !important; }
  .js-enabled img.ffg-img-load{ opacity:1 !important; }
}

/* ==========================================================
   STAMPA — schede pulite (cliente / giocatore)
   ========================================================== */
@media print{
  .site-header,
  .site-footer,
  .navbar,
  .action-row,
  .ffg-top,
  .ffg-print,
  .ffg-tablebar{
    display:none !important;
  }

  body{ background:#fff; color:#000; }

  .profile-card,
  .perf-card,
  .admin-card,
  .results-card,
  .filter-card,
  .card{
    box-shadow:none !important;
    border:1px solid #ccc !important;
  }

  .perf-panel,
  .governance-panel{
    background:#fff !important;
    color:#1e1c1c !important;
    border:1px solid #ccc !important;
  }

  .perf-summary p,
  .governance-copy p,
  .perf-summary h4,
  .governance-copy h3,
  .score-ring strong,
  .score-ring span{
    color:#1e1c1c !important;
  }

  .js-enabled .ffg-reveal{ opacity:1 !important; transform:none !important; }
}

/* ==========================================================
   FIX FOOTER SEMPLICE (gestionale / area riservata)
   Il footer "grande" (home) usa .footer-brand: quello semplice no.
   Senza questo, il footer semplice ereditava il grid a 3 colonne
   e i testi finivano sparati ai lati.
   ========================================================== */
.site-footer .footer-inner:not(:has(.footer-brand)){
  display:flex !important;
  grid-template-columns:none !important;
  flex-wrap:wrap !important;
  justify-content:center !important;
  align-items:center !important;
  gap:10px !important;
  text-align:center !important;
  padding:18px 0 !important;
}
.site-footer .footer-inner:not(:has(.footer-brand)) .sep{
  opacity:.6;
}

/* ==========================================================
   BOTTONI UNIFORMI: sfondo rosso + testo bianco ovunque
   (eccezione: il pulsante Logout resta nero)
   ========================================================== */
.btn,
.btn-primary,
.btn-ghost,
.btn-ghost:link,
.btn-ghost:visited,
.btn.secondary,
a.secondary,
.dashboard-actions a,
.dashboard-actions a.secondary,
button:not(.ffg-notice-close):not(.ffg-pass-toggle):not(.ffg-top),
input[type="submit"]{
  background:#be1823 !important;
  color:#fff !important;
  border:none !important;
  box-shadow:0 10px 22px rgba(190,24,35,.22) !important;
}

.btn:hover,
.btn-primary:hover,
.btn-ghost:hover,
.btn.secondary:hover,
a.secondary:hover,
.dashboard-actions a:hover,
.dashboard-actions a.secondary:hover,
button:not(.ffg-notice-close):not(.ffg-pass-toggle):not(.ffg-top):hover,
input[type="submit"]:hover{
  background:#a3141f !important;
  color:#fff !important;
}

/* Il Logout resta nero come da identità del progetto */
.logout-box a,
a[href*="logout=1"]{
  background:#1e1c1c !important;
  color:#fff !important;
  box-shadow:none !important;
}
.logout-box a:hover,
a[href*="logout=1"]:hover{
  background:#000 !important;
}

/* ==========================================================
   APPLE POLISH — logo più grande, titolo centrato, rifiniture
   ========================================================== */

/* Logo verticale (302x397): posizionato in ASSOLUTO a sinistra (non si
   sposta), titolo FFG GROUP centrato nella barra. */
.site-header .brandbar{
  position:relative !important;
  min-height:112px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:6px 0 !important;
  gap:20px !important;
}
/* Come il footer: stemma ACCANTO al titolo, raggruppati e centrati insieme.
   Lo stemma è croppato (l'immagine ha vuoto sotto) ma con proporzioni intatte. */
.site-header .brandbar::before{
  position:static !important;
  transform:none !important;
  flex:0 0 auto !important;
  align-self:center !important;
  width:118px !important;
  height:92px !important;
  background-size:118px auto !important;
  background-position:center top !important;
  background-repeat:no-repeat !important;
}
.site-header .brandbar h1{
  flex:0 0 auto !important;
  width:auto !important;
  margin:0 !important;
  text-align:center !important;
}
.site-header .brandbar::after{ content:none !important; display:none !important; }

/* Header e navbar = stesso rosso, SENZA linea di separazione */
.site-header{ background:#be1823 !important; box-shadow:0 8px 22px rgba(0,0,0,.18) !important; }
.navbar{
  background:#be1823 !important;
  border-top:none !important;
  border-bottom:none !important;
}

/* Footer: logo più grande, in proporzione (no distorsione) */
.footer-brand{ align-items:center !important; }
.footer-logo{
  width:auto !important;
  height:80px !important;
}

@media(max-width:640px){
  .site-header .brandbar{ min-height:82px !important; gap:12px !important; }
  .site-header .brandbar::before{ width:78px !important; height:62px !important; background-size:78px auto !important; }
  .footer-logo{ height:64px !important; }
}

/* Easing morbido e uniforme su elementi interattivi (tocco "Apple") */
.btn, button, input, select, textarea,
.dashboard-card, .team-box, .contact-card, .about-goal-card,
.kpi, .perf-stat, .info-box, .top-card, .stat-box{
  transition:transform .28s cubic-bezier(.22,1,.36,1),
             box-shadow .28s ease,
             background-color .25s ease,
             border-color .25s ease,
             color .2s ease !important;
}


/* Il carosello deve scorrere comunque, anche con "riduci movimento" */
@media (prefers-reduced-motion: reduce){
  .ferrari-track{ transition-duration:1s !important; }
}
