/* USV Smartphone-Ergaenzungen – ausschliesslich kleine Viewports. Desktop bleibt unveraendert. */
@media (max-width:700px){
  html,body{max-width:100%;overflow-x:hidden}
  img,video,svg{max-width:100%}
  iframe{max-width:100%;width:100%}
  main,section,article,.inner,.wrap{min-width:0}
  input,select,textarea,button{max-width:100%}
  h1,h2,h3,p,a{overflow-wrap:break-word}

  /* Header: Logo bleibt im mobilen Header und kann den Hero nicht ueberdecken. */
  .usv-site-header{height:76px!important;padding:0 14px!important;grid-template-columns:1fr auto!important}
  .usv-header-logo{height:76px!important;max-width:94px!important}
  .usv-header-logo img,.usv-site-header.is-scrolled .usv-header-logo img{width:auto!important;height:64px!important;max-width:90px!important;max-height:64px!important;object-fit:contain!important}
  .usv-menu-toggle{width:44px;height:44px}
  .usv-mobile-top img{height:68px!important;max-width:100px!important}

  /* Startseiten-Hero: im Hochformat das komplette Mannschaftsfoto zeigen statt Cover-Zuschnitt. */
  .hero{min-height:0!important;height:auto!important;padding:110px 7% 48px!important;align-items:flex-start!important;background-size:100% auto!important;background-position:center top!important;background-color:#075c35!important}
  .hero-content{max-width:100%!important;padding-top:min(54vw,220px)}
  .hero h1{font-size:clamp(38px,12.5vw,52px)!important;line-height:.96!important}
  .hero p{font-size:17px!important;line-height:1.55!important}
  .hero .button{display:block;width:max-content;max-width:100%;margin:0 0 10px!important;padding:13px 20px!important}

  /* Allgemeine Medien/Fotos: nie ueber den Viewport hinaus. */
  [class*="gallery"] img,[class*="image"] img,[class*="photo"] img,[class*="bild"] img{max-width:100%;height:auto}
  .history-real-image{width:100%!important;height:auto!important;min-height:0!important;object-fit:contain!important}

  /* Setkarten: Karte bleibt 2-spaltig, Foto und alle Overlays skalieren mit der Karte. */
  .squad-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
  .squad-grid .player-card{min-width:0!important;min-height:0!important;aspect-ratio:4/5!important}
  .squad-grid .player-placeholder img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center top!important}
  .squad-grid .club-badge{width:clamp(30px,10vw,42px)!important;height:clamp(30px,10vw,42px)!important;top:5px!important;left:5px!important}
  .squad-grid .captain-badge{width:clamp(27px,9vw,38px)!important;height:auto!important;top:4px!important;right:4px!important}
  .squad-grid .player-info{left:7px!important;right:7px!important;bottom:8px!important}
  .squad-grid .player-firstname{font-size:clamp(10px,3vw,13px)!important}
  .squad-grid .player-lastname{font-size:clamp(13px,4vw,18px)!important;overflow-wrap:anywhere}
  .squad-grid .player-position{font-size:clamp(9px,2.7vw,11px)!important}
  .squad-grid .player-number{right:5px!important;bottom:6px!important;font-size:clamp(34px,13vw,52px)!important}
  .squad-grid .trainer-code{font-size:clamp(20px,7vw,32px)!important}
  .squad-grid .player-since{left:7px!important;right:7px!important;bottom:8px!important}
  .squad-grid .player-card:hover{transform:none!important}

  /* Spiele: echte Smartphone-Tickets statt einer 380px/Desktopkarte im schmalen Viewport. */
  .games,.games-ticker{padding-left:0!important;padding-right:0!important;overflow:hidden!important}
  .games .section-title,.games-ticker .section-title{padding-left:6%!important;padding-right:6%!important}
  .games-track{gap:12px!important}
  .game-card{width:calc(100vw - 24px)!important;max-width:calc(100vw - 24px)!important;min-height:0!important;flex-direction:column!important;border-width:2px!important;border-radius:10px!important}
  .game-card .ticket-left{width:100%!important;padding:13px 10px 11px!important}
  .game-card .game-team-label{font-size:9px!important;letter-spacing:1.2px!important}
  .game-card .game-versus-row{grid-template-columns:minmax(0,1fr) 44px minmax(0,1fr)!important;gap:5px!important;align-items:start!important}
  .game-card .game-club{grid-template-rows:40px auto!important;min-width:0!important}
  .game-card .game-logo,.game-card .club-logo-score,.game-card .club-logo-score .game-logo{width:40px!important;height:40px!important}
  .game-card .game-team-name{height:auto!important;min-height:28px!important;font-size:10px!important;line-height:1.15!important;overflow:visible!important}
  .game-card .game-result-box{height:40px!important;min-width:44px!important;padding:0 3px!important;font-size:18px!important}
  .game-card .game-result-box .vs-text{height:40px!important;font-size:15px!important}
  .game-card .game-result-box.vs-box{height:36px!important;margin-top:2px!important}
  .game-card .game-result-box.vs-box .vs-text{height:36px!important}
  .game-card .team-score{font-size:21px!important}
  .game-card .game-club:first-child .team-score{left:calc(100% + 5px)!important}
  .game-card .game-club:last-child .team-score{right:calc(100% + 5px)!important}
  .game-card .game-result-box.score-separator .halftime-score{top:35px!important;font-size:9px!important;line-height:1.2!important}
  .game-card .game-info{font-size:10px!important;gap:6px!important;margin-top:4px!important;padding-top:5px!important}
  .game-card .ticket-right{width:100%!important;min-height:54px!important;flex-direction:row!important;justify-content:center!important;gap:12px!important;padding:8px 10px!important;border-left:0!important;border-top:2px dashed rgba(255,255,255,.3)!important}
  .game-card .ticket-right::before{display:none!important}
  .game-card .ticket-right .date-day{font-size:24px!important}
  .game-card .ticket-right .date-month{font-size:12px!important;margin:0!important}
  .game-card .ticket-right .date-year{font-size:11px!important;margin:0!important}
  .game-card .ticket-right .time{font-size:17px!important;margin:0!important;padding:0!important;border:0!important}
  .game-card .ticket-right .label{font-size:8px!important;margin:0!important}
  .game-card.game-past .ticket-right{transform:none!important}
  .game-card .cancelled-stamp{left:10px!important;right:10px!important;top:42%!important;font-size:clamp(26px,9vw,36px)!important;border-width:4px!important;border-radius:10px!important;padding:7px 4px!important}

  /* Tabellen/Formulare/Karten auf schmalen Displays. */
  table{max-width:100%}
  .table-button,[class*="button"],[class*="btn"]{max-width:100%}
  .usv-site-footer,footer{padding-left:6%!important;padding-right:6%!important}
  .usv-site-footer .footer-left,.usv-site-footer .footer-links{max-width:100%}
  .usv-site-footer .footer-links{overflow-wrap:anywhere}
}

@media (max-width:390px){
  .hero{padding-left:6%!important;padding-right:6%!important}
  .hero-content{padding-top:min(57vw,215px)}
  .squad-grid{gap:5px!important}
  .game-card{width:calc(100vw - 18px)!important;max-width:calc(100vw - 18px)!important}
}

/* Querformat: vorhandene breite Darstellung beibehalten; nur Viewport-Ueberlauf verhindern. */
@media (max-width:900px) and (orientation:landscape){
  .hero{background-size:cover!important;background-position:center center!important;min-height:520px!important;padding:110px 8% 55px!important}
  .hero-content{padding-top:0!important}
}

/* Mobile Seitenstart: einheitlicher Abstand unter dem 76px-Header. */
@media (max-width:700px){
  main > .team-hero:first-child,
  main > .sen-hero:first-child,
  main > .page-hero:first-child,
  main > .kontakt-hero:first-child{padding-top:110px!important}
  main.wrap{padding-top:110px!important}

  /* Teams mobil: direkte Ziele, optische Trennung Erwachsene / Senioren / Nachwuchs. */
  .usv-mobile-teams-sub{padding-left:18px!important}
  .usv-mobile-teams-sub .usv-mobile-team-gap{display:block;height:13px;flex:0 0 13px;padding:0;margin:0}
}

/* V9: Sportanlage + Geschichte – mobiler Hero-Inhalt direkt unter dem Header. */
@media (max-width:700px){
  body.usv-page-sportanlage main > .page-hero:first-child,
  body.usv-page-geschichte main > .page-hero:first-child{padding-top:42px!important}
}

/* V10: Sportanlage + Geschichte – deren eigene Hero-Minimalhoehe erzeugte den grossen Leerraum. */
@media (max-width:700px){
  body.usv-page-sportanlage main > .page-hero:first-child,
  body.usv-page-geschichte main > .page-hero:first-child{
    min-height:0!important;
    height:auto!important;
    align-items:flex-start!important;
    padding:42px 6% 54px!important;
  }
}

/* V13: Sportanlage + Geschichte – NUR SMARTPHONE. */
@media (max-width:700px){
  body.usv-page-sportanlage main > .page-hero:first-child,
  body.usv-page-geschichte main > .page-hero:first-child{
    padding-top:0!important;
    transform:translateY(-100px); /* <<< HIER HOEHE EINSTELLEN: negativer = weiter hinauf */
  }
}
