/*
 * Responsive Ergänzungen für mosel-apollo.de
 * Stand: August 2026
 * Die ursprüngliche style.css bleibt unverändert. Diese Datei enthält nur
 * überschreibende Regeln für Tablets und Smartphones.
 */

/* Flexible Medien und ein robusteres Box-Modell */
img,
video {
  max-width: 100%;
}

video {
  height: auto;
}

.mobile-menu-toggle {
  display: none;
}

/* Tablets und kleinere Desktopfenster */
@media (max-width: 1000px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    font-family: Arial, Helvetica, Verdana, sans-serif;
  }

  div.aussen {
    width: 100%;
    max-width: 984px;
    padding: 0 6px;
    box-sizing: border-box;
  }

  div.head,
  div.hmenue,
  div.fuss {
    width: 100%;
    box-sizing: border-box;
  }

  div.inhalt {
    width: 100%;
    box-sizing: border-box;
  }

  div.textrahmenbreit {
    width: calc(100% - 26px);
    box-sizing: border-box;
  }

  div.ticket,
  div.aktuelles {
    max-width: 100%;
    box-sizing: border-box;
  }

  .routebox {
    max-width: calc(100% - 26px);
  }
}

/* Smartphones und Tablets im Hochformat */
@media (max-width: 1000px) {
  body {
    font-size: 16px;
    line-height: 1.45;
    text-align: center;
  }

  div.aussen {
    padding: 0 8px;
  }

  /* Kopfbereich: das vorhandene Logo wird proportional verkleinert. */
  div.head {
    float: none;
    height: auto;
    aspect-ratio: 980 / 131;
    margin: 5px 0 0;
    background-size: 100% 100%;
    background-repeat: no-repeat;
  }

  /* Mobile Hauptnavigation */
  .mobile-menu-toggle {
    width: 100%;
    min-height: 44px;
    margin: 6px 0 5px;
    padding: 9px 13px;
    border: 2px solid #8d0d0b;
    border-radius: 4px;
    background: #f7e6d3;
    color: #000;
    font: inherit;
    font-weight: bold;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 9px;
  }

  .js .mobile-menu-toggle {
    display: flex;
  }

  .mobile-menu-toggle .menu-icon {
    font-size: 22px;
    line-height: 1;
  }

  div.hmenue {
    float: none;
    height: auto;
    margin: 0 0 7px;
    padding: 4px;
    background-image: url(images/hmenueback.jpg);
    background-repeat: repeat;
    flex-direction: column;
    gap: 2px;
    clear: both;
  }

  /* Ohne JavaScript bleibt das Menü sichtbar. Mit JavaScript startet es zugeklappt. */
  .js div.hmenue:not(.mobile-open) {
    display: none;
  }

  .js div.hmenue.mobile-open {
    display: flex;
  }

  div.hmenue > img.buttonl,
  div.hmenue > img.buttongl,
  div.hmenue > img.buttonr {
    display: none;
  }

  div.hmenueinnen,
  div.hmenueinnen_a,
  div.hmenueend {
    float: none;
    width: 100%;
    height: auto;
    min-height: 42px;
    margin: 0;
    padding: 10px 8px;
    box-sizing: border-box;
    border: 0;
    border-bottom: 1px solid #e8b77f;
    background: #fedcb6;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  div.hmenueinnen_a {
    background: #fff;
  }

  div.hmenueinnen a,
  div.hmenueinnen_a a {
    display: block;
    width: 100%;
    padding: 2px 0;
  }

  /* Das bisherige Hover-Untermenü muss auf Touchgeräten dauerhaft erreichbar sein. */
  #element {
    width: 100%;
  }

  #element2,
  #element:hover #element2 {
    display: block;
    position: static;
    width: 100%;
    margin-top: 8px;
    padding: 5px 0 0;
    box-sizing: border-box;
    border: 0;
    border-top: 1px solid #e8b77f;
    border-radius: 0;
    background: transparent;
    text-align: center;
    line-height: 1.85;
  }

  #element2 a {
    display: inline-block;
    width: auto;
    padding: 1px 5px;
  }

  /* Inhaltsbereich */
  div.inhalt {
    float: none;
    display: flow-root;
    padding: 10px 12px 14px;
  }

  div.textrahmen,
  div.textrahmenbreit {
    float: none;
    width: 100%;
    margin: 0 0 20px;
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.5;
  }

  div.textrahmen img,
  div.textrahmenbreit img,
  div.wohnungstext img {
    height: auto;
  }

  p {
    line-height: 1.5;
  }

  h1 {
    font-size: 1.55rem;
    line-height: 1.2;
  }

  h2 {
    font-size: 1.3rem;
    line-height: 1.25;
  }

  li {
    margin-left: 1.4rem;
    padding-left: 0.15rem;
  }

  /* Die alten transparenten Spacer-GIFs werden für das mobile Layout nicht benötigt. */
  img[src$="spacer.gif"],
  img.minipicspacer {
    display: none !important;
  }

  img.normal,
  img.wohnung,
  img.falter {
    float: none !important;
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto 18px !important;
  }

  img.minipic {
    float: none;
    display: block;
    width: min(304px, 100%);
    height: auto;
    margin: 0 auto 12px;
    box-sizing: border-box;
  }

  div.wohnungstext {
    float: none;
    width: 100%;
    height: auto;
    margin: 0 0 24px;
    box-sizing: border-box;
  }

  div.wohnungstext a {
    margin-left: 0 !important;
  }

  /* Hinweisbalken auf der Startseite */
  div.ticket,
  div.aktuelles {
    float: none;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 7px 0;
    padding: 0;
  }

  div.tickettext {
    margin: 0;
    padding: 8px 10px;
    line-height: 1.45;
  }

  /* Buchungsanfrage */
  /* Die alte Desktop-Regel `div.anfrage` hat eine höhere CSS-Spezifität.
     Deshalb muss sie auf mobilen Geräten gezielt überschrieben werden. */
  div.anfrage.anfrage-modern {
    float: none !important;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 20px;
    padding: 15px;
    box-sizing: border-box;
  }

  div.anfrage.anfrage-modern input[type="text"],
  div.anfrage.anfrage-modern input[type="email"],
  div.anfrage.anfrage-modern input[type="tel"],
  div.anfrage.anfrage-modern input[type="date"],
  div.anfrage.anfrage-modern input[type="number"],
  div.anfrage.anfrage-modern select,
  div.anfrage.anfrage-modern textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .formrow {
    flex-direction: column;
    gap: 0;
  }

  .formrow > div {
    width: 100%;
    min-width: 0;
  }

  .formbuttons {
    flex-direction: column;
  }

  .formbuttons button {
    width: 100%;
    min-height: 44px;
  }

  .agb-box label {
    align-items: flex-start;
  }

  /* Anfahrt */
  .routebox {
    width: 100%;
    max-width: 100%;
    margin: 15px auto 25px;
    padding: 15px;
  }

  .routeplanner-row {
    flex-direction: column;
    align-items: stretch;
  }

  .routeplanner input[type="text"],
  .routeplanner button {
    width: 100%;
    min-height: 44px;
  }

  /* Videos */
  video {
    display: block;
    width: 100% !important;
    height: auto !important;
    margin: 0 auto 8px;
  }

  /* Alte Fade-Slideshows: responsive.js setzt die Höhe passend zur Breite. */
  #fadeshow1,
  #fadeshow2 {
    width: 100% !important;
    max-width: 950px;
    margin-left: auto !important;
    margin-right: auto !important;
    touch-action: pan-y;
  }

  #fadeshow1 .gallerylayer img,
  #fadeshow2 .gallerylayer img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    margin: 0 !important;
  }

  #fadeshow2toggler {
    width: 100% !important;
    margin: 10px auto 16px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  #fadeshow2toggler .status {
    margin: 0 10px !important;
  }

  /* Rechtstexte */
  .rechtstext {
    overflow-wrap: anywhere;
  }

  .rechtstext li {
    margin-left: 1.4rem;
  }

  /* Fußbereich */
  div.fuss {
    float: none;
    height: auto;
    min-height: 32px;
    margin: 7px 0 5px;
    padding: 6px 4px;
  }

  div.fusstext {
    margin-top: 0;
    line-height: 1.4;
  }
}

@media (max-width: 420px) {
  div.aussen {
    padding: 0 5px;
  }

  div.inhalt {
    padding-left: 9px;
    padding-right: 9px;
  }

  .anfrage-modern,
  .routebox {
    padding: 12px;
  }

  .adresse {
    overflow-wrap: anywhere;
  }
}


/* SEO-Textblöcke mobil */
@media (max-width: 800px) {
  .seo-intro { float:none; width:100%; margin:6px 0 18px; box-sizing:border-box; }
  .seo-intro h1 { font-size:1.55rem; }
  .seo-intro h2, .textrahmenbreit h2, .wohnungstext h2 { font-size:1.2rem; }
  .wohnungstext { min-height:0; }
}
