/* Tortus Rugby - correzioni responsive mobile 2026/27
   Solo <= 700px: nessuna modifica al layout desktop. */
@media (max-width:700px){
  html,body{max-width:100%;overflow-x:hidden}
  *,*::before,*::after{box-sizing:border-box}
  img,video,iframe{max-width:100%;height:auto}

  .topbar-inner{padding-left:12px!important;padding-right:12px!important;gap:8px!important;align-items:center!important}
  .brand{min-width:0!important;flex:0 0 auto!important}
  .brand img{max-width:44px!important;height:auto!important}
  .brand strong{font-size:15px!important}
  .nav{min-width:0!important;gap:6px!important;justify-content:flex-end!important}
  .nav .pill{padding:8px 10px!important;font-size:11px!important;white-space:nowrap}

  .section,.wrap,.container,.cup-head,.cup-wrap,.seo-content,.footer-inner{max-width:100%!important}
  .section,.wrap,.container,.seo-content{padding-left:14px!important;padding-right:14px!important}
  .card,.seo-card,.cup-card{border-radius:18px!important}

  .cta-box{align-items:stretch!important}
  .cta-links{width:100%!important}
  .cta-link{flex:1 1 145px!important;text-align:center!important}

  /* Classifiche: restano complete ma scorrono dentro il proprio riquadro. */
  .table-wrap,.cup-table-wrap{width:100%!important;max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
  .table-wrap table,.cup-table-wrap table{margin:0!important}

  /* Coppa 2026/27 */
  .tortus-cup-managed{padding:20px 12px 34px!important}
  .tortus-cup-managed .cup-head,.tortus-cup-managed .cup-wrap{width:100%!important;max-width:100%!important}
  .tortus-cup-managed .cup-head{margin-bottom:14px!important}
  .tortus-cup-managed .cup-head h1{font-size:clamp(27px,9vw,38px)!important;line-height:1.08!important;overflow-wrap:anywhere}
  .tortus-cup-managed .cup-head p{font-size:14px!important;line-height:1.45!important}
  .tortus-cup-managed .cup-card{padding:14px!important;border-radius:18px!important;min-width:0!important}
  .tortus-cup-managed .cup-table{min-width:720px!important;font-size:12px!important}
  .tortus-cup-managed .cup-table th,.tortus-cup-managed .cup-table td{padding:8px 7px!important}
  .tortus-cup-managed .cup-team-logo{width:38px!important;height:38px!important}
  .tortus-cup-managed .match{min-height:0!important;border-radius:18px!important;margin:12px 0 16px!important}
  .tortus-cup-managed .match-inner{grid-template-columns:minmax(0,1fr)!important;gap:12px!important;padding:12px!important}
  .tortus-cup-managed .result-box{min-height:0!important;padding:10px!important;border-radius:14px!important}
  .tortus-cup-managed .result-banner{min-height:0!important;border-radius:11px!important}
  .tortus-cup-managed .outcome{margin-top:8px!important;padding:7px 10px!important;font-size:12px!important}
  .tortus-cup-managed .meta{gap:8px!important;margin-bottom:10px!important}
  .tortus-cup-managed .meta>span,.tortus-cup-managed .meta>span:nth-child(2){flex:1 1 100%!important;width:100%!important;min-width:0!important;padding:9px 10px!important;border-radius:11px!important}
  .tortus-cup-managed .meta-venue{min-width:0!important}
  .tortus-cup-managed .meta-venue>span:first-child{overflow-wrap:anywhere}
  .tortus-cup-managed .desc{min-height:0!important;padding:13px!important;border-radius:14px!important;font-size:14px!important;line-height:1.5!important}
  .tortus-photo-toggle{width:calc(100% - 24px)!important;margin:0 12px 12px!important;padding:10px 12px!important}
  .tortus-match-gallery{margin:0 12px 12px!important;padding-top:12px!important}
  .tortus-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}

  /* Campionato 2026/27: stessa leggibilita' delle schede partita. */
  body .match-inner{grid-template-columns:minmax(0,1fr)!important;gap:12px!important;padding:12px!important}
  body .match{min-height:0!important;border-radius:18px!important}
  body .result-box{min-height:0!important;padding:10px!important}
  body .meta{gap:8px!important}
  body .meta>span{max-width:100%!important;overflow-wrap:anywhere}
  body .desc{min-height:0!important;padding:13px!important}

  .site-footer{overflow:hidden}
  .footer-inner{padding-left:14px!important;padding-right:14px!important}
}

@media (max-width:420px){
  .topbar-inner{flex-wrap:wrap!important}
  .nav{width:100%!important;justify-content:flex-start!important;overflow-x:auto!important;padding-bottom:2px!important;-webkit-overflow-scrolling:touch}
  .nav::-webkit-scrollbar{display:none}
  .tortus-cup-managed{padding-left:10px!important;padding-right:10px!important}
  .tortus-cup-managed .cup-card{padding:11px!important}
}

/* =========================================================
   Revisione layout globale 2026/27
   Desktop: sfrutta meglio i monitor moderni senza andare full-width.
   Tablet/mobile: margini fluidi e nessun overflow orizzontale.
   ========================================================= */
@media (min-width:901px){
  :root{--siteW:1480px!important}
  body .container,
  body .wrap,
  body .section,
  body .topbar-inner,
  body .footer-inner,
  body .cup-head,
  body .cup-wrap,
  body .seo-content{
    width:min(94vw,1480px)!important;
    max-width:1480px!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  /* I blocchi di testo restano leggibili anche dentro una pagina piu' larga. */
  body .section-desc{max-width:980px!important}
}

@media (min-width:701px) and (max-width:900px){
  html,body{max-width:100%;overflow-x:hidden}
  *,*::before,*::after{box-sizing:border-box}
  body .container,
  body .wrap,
  body .section,
  body .topbar-inner,
  body .footer-inner,
  body .cup-head,
  body .cup-wrap,
  body .seo-content{
    width:100%!important;
    max-width:100%!important;
    padding-left:22px!important;
    padding-right:22px!important;
  }
  img,video,iframe{max-width:100%;height:auto}
  .table-wrap,.cup-table-wrap{max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}
}
