/* mobile.css
   Overrides fuer kleine Screens (Smartphones)
   Ziel: kein horizontales Scrollen, keine fixe 1024px-Breite, bessere Touch-Bedienung
*/

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

  /* --- Grundregeln --- */
  html { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
  body { font-size: 16px; line-height: 1.5; }

  /* Verhindert "Element ragt raus" durch Padding/Border */
  *, *:before, *:after { box-sizing: border-box; }

  /* Bilder und Medien skalieren */
  img, video, canvas, svg { max-width: 100%; height: auto; }

  /* --- Layout: fixe Breiten aufloesen --- */
  .container {
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 12px;
    overflow: visible; /* hidden kann Inhalte abschneiden */
  }

  footer {
    width: auto;
    max-width: 100%;
    background-size: cover; /* Footerbild passt sich an */
    height: auto;
    min-height: 90px;
  }

  /* Logo nicht rechts rausdruecken */
  div.logo {
    float: none;
    margin: 0 0 12px 0;
  }

  /* Headerhoehe flexibel */
  header { height: auto; }

  /* --- Navigation: von float-Leiste zu stapelbar --- */
  nav#nav {
    width: auto;
    height: auto;
    float: none;
  }

  nav#nav ul { margin: 0; }

  nav#nav li {
    float: none;          /* kill float layout */
    display: block;
  }

  nav#nav a {
    float: none;
    display: block;
    padding: 12px 12px;   /* groessere Touch-Zone */
    font-size: 16px;
    border-top: 1px solid rgba(255,255,255,0.2);
  }

  /* --- Typografie --- */
  h1 {
    font-size: 28px;
    margin-top: 16px;
    margin-bottom: 12px;
  }
  h2 { font-size: 20px; }
  p, ul, ol, table { font-size: 16px; }

  /* --- Tabellen: nicht ueberlaufen lassen --- */
  table {
    width: 100%;
  }

  /* Wenn Tabellen breiter sind (zB. Startlisten), horizontal scrollbar statt Zoom */
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-scroll table {
    min-width: 600px; /* optional: sorgt fuer nutzbaren Scroll bei grossen Tabellen */
  }

  /* Bestehende Tabellenabstaende etwas entschlacken */
  .laeufer-table td { padding-right: 10px; }

  /* --- Formulare: von 2 Spalten zu 1 Spalte --- */
  fieldset { padding: 12px; }

  .line label {
    float: none;
    width: auto;
    display: block;
    margin-bottom: 6px;
  }

  /* Die bisherigen 80px margin-left und fixen Breiten entfernen */
  .input input,
  .password input,
  .line textarea,
  .line select {
    width: 100%;
    margin-left: 0;
  }

  /* Inputs allgemein */
  .input input,
  .password input,
  .line textarea,
  .line select,
  td input,
  td select {
    width: 100%;
    max-width: 100%;
    padding: 10px 10px;
  }

  /* Die .input/.select Container nicht nebeneinander */
  .input, .select {
    float: none;
    width: 100%;
  }

  /* Button voll breit, gut klickbar */
  form button {
    float: none;
    width: 100%;
    padding: 12px 12px;
    margin-top: 10px;
  }

  /* Sponsor-Felder in Tabellen: besser untereinander */
  td input { float: none; }

  /* --- Startseite Entry-Buttons: fixe Breiten entfernen --- */
  .entry-page { margin: 20px 0 0 0; padding: 0 12px; }
  .entry-page p { width: auto; padding-left: 0; }

  .entry {
    float: none;
    width: 100%;
    height: auto;
    min-height: 220px;
    margin-top: 16px;
    background-size: cover;
    background-position: center;
  }

  /* Sponsorenlogos: weniger Rand, damit es nicht ueberlaeuft */
  div.sponsoren img { margin: 0 8px 8px 0; padding: 4px; }

}










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

  table.sponsor-table,
  table.sponsor-table tbody,
  table.sponsor-table tr,
  table.sponsor-table td {
    display: block;
    width: 100%;
  }

  table.sponsor-table thead {
    display: none;
  }

  table.sponsor-table tr {
    background: #e5e6e7;
    border: 1px solid #939598;
    padding: 12px;
    margin-bottom: 14px;
  }

  table.sponsor-table td {
    padding: 8px 0;
    border: 0;
  }

  table.sponsor-table td:before {
    content: attr(data-label);
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #231f20;
  }

  table.sponsor-table input,
  table.sponsor-table select,
  table.sponsor-table textarea {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px;
    font-size: 16px; /* verhindert iOS-Zoom */
    box-sizing: border-box;
  }

  /* Abstand zwischen Sponsor-Karten */
  table.sponsor-table tr + tr {
    margin-top: 10px;
  }
}



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

  /* Mobile-Leiste */
  .nav-mobile{
    display: block;
    position: relative;
    width: 100%;
    background: #e02D1e;
    min-height: 48px;         /* genug Platz fuer Icon */
    padding: 0 12px;
  }

  /* Desktop-Menue auf Mobile aus */
  nav#nav{ display: none; }

  /* Klickflaeche oben rechts */
  .nav-mobile > summary{
    display: block;
    position: absolute;
    top: 50%;
    right: 12px;
    width: 36px;
    height: 28px;
    transform: translateY(-50%);
    cursor: pointer;
    list-style: none;
    line-height: 0;           /* verhindert “zusammengedrueckt” */
    background: transparent;
  }

  /* Standard-Marker weg */
  .nav-mobile > summary::-webkit-details-marker{ display: none; }
  .nav-mobile > summary::marker{ content: ""; }

  /* 3 Linien */
  .nav-mobile > summary:before,
  .nav-mobile > summary:after,
  .nav-mobile > summary span{
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
  }

  .nav-mobile > summary:before{ top: 4px; }
  .nav-mobile > summary span{ top: 12px; }
  .nav-mobile > summary:after{ top: 20px; }

  /* X wenn offen */
  .nav-mobile[open] > summary:before{
    top: 12px;
    transform: rotate(45deg);
  }

  .nav-mobile[open] > summary:after{
    top: 12px;
    transform: rotate(-45deg);
  }

  .nav-mobile[open] > summary span{
    opacity: 0;
  }

  /* Menue-Inhalt unter der Leiste */
  .nav-mobile-inner{
    padding: 56px 0 10px 0;   /* Platz unter der Leiste */
  }

  .nav-mobile-inner ul{
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .nav-mobile-inner li{ float: none; }

  .nav-mobile-inner a{
    display: block;
    padding: 10px;
    font-size: 14px;
    text-transform: none;
    color: #fff;
    background: rgba(255,255,255,0.12);
    border-radius: 4px;
  }
}

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

  .nav-mobile{
    position: relative;
  }

  .nav-mobile > summary{
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 36px;
    height: 28px;
    z-index: 1001;   /* wichtig: über dem Menü */
  }
}

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

.nav-mobile-inner{
  position: absolute;
  top: 48px;           /* exakt unter der roten Leiste */
  left: 0;
  right: 0;
  padding: 10px 12px;
  background: #e02D1e;
}

}
