/*
  Responsive Ergänzungen für fancy-country.org
  Diese Datei ergänzt die bestehenden CSS-Dateien, sie ersetzt sie nicht.
  Sie greift nur bei Viewports bis 900 px Breite.
*/
@media screen and (max-width: 900px) {
  * {
    box-sizing: border-box;
  }

  html, body {
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  body {
    overflow-x: hidden;
  }

  #main,
  #main-band {
    width: calc(100% - 8px);
    max-width: 100%;
    height: auto;
    min-height: 0;
    margin: 4px auto;
    border-width: 1px;
    background-position: center top;
    background-attachment: scroll;
  }

  #main_top {
    width: 100%;
    height: auto;
    min-height: 0;
    padding-bottom: 18px;
  }

  #nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 100%;
    height: auto;
    margin: 0 auto;
    padding: 12px 6px 0;
    overflow: visible;
  }

  #home,
  #navi,
  #naviback {
    float: none;
    width: auto;
    max-width: 100%;
    font-size: 18px;
  }

  #home ul,
  #navi ul,
  #naviback ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin: 0;
    padding: 0;
  }

  #home li,
  #navi li,
  #naviback li {
    float: none;
    margin: 0;
  }

  #navi a,
  #naviback a {
    width: auto;
    min-width: 84px;
    height: auto;
    min-height: 36px;
    padding: 7px 9px;
    background-size: 100% 100%;
    font-size: 17px;
  }

  #home a {
    width: 36px;
    height: 36px;
    padding: 0;
    background-size: contain;
    background-repeat: no-repeat;
  }

  #main_heading {
    width: 100%;
    height: auto;
    margin: 8px auto 14px;
    padding: 0 6px;
    font-size: clamp(32px, 8.5vw, 64px);
    line-height: 1.1;
    letter-spacing: 1px;
    overflow-wrap: anywhere;
  }

  #counter_placeholder {
    display: none;
  }

  #counter {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 10px;
    float: none;
    width: 100%;
    height: auto;
    margin: 0 auto 12px;
    padding: 0 10px;
    font-size: 14px;
  }

  #counteroben,
  #countertermine,
  #counterimpressum {
    width: auto;
    max-width: 100%;
    height: auto;
    flex: 1 1 145px;
    overflow-wrap: anywhere;
  }

  #main_text {
    float: none;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    text-align: left;
  }

  #indextext {
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  #indextextcontext {
    width: 100%;
    padding: 10px 12px 18px;
    text-align: left;
    font-size: 16px;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  #facebookteiler1 {
    width: auto;
    max-width: 100%;
  }

  #facebookteiler2 {
    width: auto;
    max-width: 100%;
    margin: 0;
  }

  #indextextcontextueberschrift {
    width: 100%;
    height: auto;
    min-height: 0;
    margin-top: 16px;
    font-size: 18px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  #werbung1,
  #werbung2 {
    width: 100%;
    height: auto;
    min-height: 30px;
    margin: 8px auto;
    padding: 0 8px;
    text-align: center;
    overflow-wrap: anywhere;
  }

  #werbung2 a {
    display: inline-block;
    margin: 3px 5px;
  }

  img,
  video,
  iframe,
  embed,
  object {
    max-width: 100%;
  }

  /* Other pages use the same fixed-width layout elements. */
  #context {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    padding: 0 10px;
  }

  #heading {
    width: 100%;
    height: auto;
    min-height: 0;
    font-size: clamp(30px, 7vw, 52px);
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  #heading1 {
    width: 100%;
    height: auto;
    margin-left: 0;
    font-size: clamp(20px, 5vw, 30px);
    overflow: visible;
  }

  #heading2,
  #bandheader,
  #mail_senden {
    height: auto;
    max-width: 100%;
    font-size: clamp(20px, 5vw, 32px);
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  #band1,
  #band2,
  #band3,
  #band4,
  #band5,
  #band6,
  #band1_hidden,
  #band2_hidden,
  #band3_hidden,
  #band4_hidden,
  #band5_hidden,
  #band6_hidden {
    max-width: 100%;
  }

  #band1,
  #band2,
  #band3,
  #band4,
  #band5,
  #band6 {
    width: 50%;
    height: auto;
    min-height: 0;
    padding: 6px;
  }

  #band1_hidden,
  #band2_hidden,
  #band3_hidden,
  #band4_hidden,
  #band5_hidden,
  #band6_hidden {
    width: 100%;
    height: auto;
  }

  #band1_hidden_all_1 {
    display: none;
  }

  #band1_hidden_all_2 {
    width: 100%;
    height: auto;
  }

  #impressum1, #impressum2, #impressum3,
  #kontakt1, #kontakt2, #kontakt3,
  #termin1, #termin2, #termin3,
  #admin1, #admin2, #admin3,
  #media1, #media2, #media3 {
    float: none;
    width: 100%;
    height: auto;
    margin: 0 auto;
    overflow: visible;
    text-align: left;
  }

  #impressum_holder {
    height: auto;
  }

  #impressum_text,
  #band_text,
  #band_text_inlay,
  #termin2_2,
  #media2_2,
  #media2_3 {
    width: 100%;
    height: auto;
    max-width: 100%;
    overflow: visible;
  }

  #media2_4 {
    width: 100%;
    max-width: 450px;
    background-size: 100% 100%;
  }

  #startmusik,
  #realmusik,
  #bilderrahmen,
  textarea,
  input,
  #kontakt4 {
    max-width: 100%;
  }

  textarea {
    width: 100%;
    margin-left: 0;
  }

  input {
    width: 100%;
    max-width: 100%;
    padding-left: 10px;
    padding-right: 10px;
  }

  label {
    float: none;
    display: block;
    width: 100%;
    margin: 8px 0 3px;
    text-align: left;
  }

  #terminrow1_1,
  #terminrow1_2 {
    float: none;
    width: 100%;
    height: auto;
    min-height: 40px;
  }
}

@media screen and (max-width: 480px) {
  #navi a,
  #naviback a {
    min-width: 72px;
    padding: 7px 6px;
    font-size: 15px;
  }

  #counter {
    font-size: 13px;
  }

  #indextextcontext {
    padding: 8px 10px 16px;
    font-size: 16px;
  }

  #facebookteiler1,
  #facebookteiler2 {
    float: none;
    height: auto;
  }

  #band1,
  #band2,
  #band3,
  #band4,
  #band5,
  #band6 {
    width: 100%;
  }
}


/* Korrektur für die Startseite auf Smartphone und Tablet */
@media screen and (max-width: 900px) {
  /* Veranstaltungs-Hinweis und Besucherzahlen nicht nebeneinander quetschen */
  #counter {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    margin: 0 auto 16px;
    padding: 0 12px;
    color: #111;
  }

  #countertermine {
    order: 1;
    display: block;
    flex: none;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #777;
    border-radius: 4px;
    color: #111;
    text-align: left;
    overflow-wrap: anywhere;
  }

  #counteroben {
    order: 2;
    display: block;
    flex: none;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.88);
    color: #111;
    overflow-wrap: anywhere;
  }

  /* Der Begrüßungstext soll nicht mehr direkt auf dem Foto liegen */
  #main_text,
  #indextext,
  #indextextcontext {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  #main_text {
    width: 100%;
    margin: 0;
    padding: 0 10px 12px;
  }

  #indextext {
    width: 100%;
    margin: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.96);
  }

  #indextextcontext {
    width: 100%;
    margin: 0;
    padding: 12px 14px 20px;
    background: rgba(255, 255, 255, 0.96);
    color: #111;
    font-size: 16px;
    line-height: 1.55;
    text-align: left;
    overflow-wrap: anywhere;
  }

  #indextextcontextueberschrift {
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 12px 0;
    color: #111;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  #facebookteiler1,
  #facebookteiler2 {
    float: none;
    width: 100%;
    height: auto;
    margin: 8px 0;
    text-align: center;
  }

  .fb-like {
    max-width: 100%;
  }
}

@media screen and (max-width: 480px) {
  #counter {
    padding-right: 10px;
    padding-left: 10px;
  }

  #countertermine {
    padding: 10px 12px;
    font-size: 15px;
  }

  #counteroben {
    font-size: 13px;
  }
}

/* Feinschliff für schmale Smartphone-Displays */
@media screen and (max-width: 600px) {
  #counter {
    gap: 8px;
    margin-bottom: 10px;
  }

  #countertermine {
    padding: 8px 10px;
    line-height: 1.3;
  }

  #counteroben {
    padding: 6px 10px;
    line-height: 1.35;
  }

  #main_text {
    padding: 0 8px 8px;
  }

  #indextextcontext {
    padding: 8px 12px 16px;
  }

  #indextextcontextueberschrift {
    margin: 4px 0 10px;
    padding: 0;
  }
}

/* Stern im Besucherbereich: Platz dauerhaft reservieren, damit nichts springt */
@media screen and (max-width: 900px) {
  #counteroben {
    min-height: 125px;
  }

  #counteroben img {
    display: inline-block;
    vertical-align: middle;
  }
}
