/* ==========================================================================
   mobile.css — responsive overrides for drwetter.eu
   Link this AFTER csskl.css / html.css in <head>:
     <link rel="stylesheet" href="/css/mobile.css">
   All rules are inside a media query, so the file is safe to load on all
   devices — it only kicks in for viewports <= 820px.
   ========================================================================== */

@media (max-width: 820px) {

  /* Safety net: never allow horizontal scrolling, even if some element
     still has a fixed width we forgot. */
  html, body {
    overflow-x: hidden;
    background: #ffffff;
  }

  /* --- Page frame: fluid instead of fixed widths ------------------------ */
  #map {
    width: auto;
    max-width: 800px;          /* keeps desktop look on big screens */
    margin-left: 5px;          /* room for the box-shadow */
    margin-right: 5px;
  }

  .workzone {
    background: #ffffff;
    width: auto;
    max-width: 731px;
  }

  .content_map {
    width: auto;
    max-width: 726px;
  }

  .content_left {
    width: auto;
    max-width: 700px;
  }

  #sub_profile {
    width: auto;
    max-width: 705px;
  }

  .rahmen {
    width: auto;               /* was sized by parent, now fluid */
    max-width: 100%;
    box-sizing: border-box;
  }


  /* --- Navigation -------------------------------------------------------- */
  /* .menu_point items are 174px wide and floated: on a phone they simply
     wrap to one item per line (vertical menu). No width change needed,
     just a little vertical spacing. */

/* --- Navigation: all four items on one line ----------------------------- */

#menu {
  display: flex;               /* no justify-content needed */
}

.menu_point {
  width: auto;
  flex: 1 1 0;                 /* four equal slots, exactly one row */
  min-width: 0;
  background-size: 100% 80%;
  font-size: 11px;             /* fallback */
  font-size: min(10px, 2vw);   /* a bit smaller than before */
  letter-spacing: -0.3px;      /* Verdana bold is wide — this helps a lot */
  padding-top: 5px;
}

.workzone {
  padding-left: 5px;
  padding-right: 5px;
}

#map {
  margin-left: 2px;
  margin-right: 2px;
  box-shadow: none;
}

  /* --- Floated images (pentest.png, risiko.png) -------------------------- */
  /* On narrow screens the text wrapping around a right-floated image gets
     cramped. Un-float them so they sit above the text at full width.
     (!important needed because float is set via inline style in HTML.) */
  .rahmen > div {
    float: none !important;
    margin: 8px auto;
  }

  .rahmen img {
    max-width: 100%;           /* already inline, kept here for safety */
    height: auto;
  }

  /* --- Footer ------------------------------------------------------------ */
  /* Two .footer_menu blocks of fixed 385px each = guaranteed overflow. */

.footer_table,
.footer_table tr,
.footer_table td {
  display: block;
  width: 100%;
}

.footer_copy,
.footer_impressum {
  text-align: left;
}

  .footer {
    height: auto;              /* was fixed at 15px, too short when stacked */
    padding: 2px 0 0 10px;
  }

  /* --- Readability (optional, remove if you want to keep 11px) ----------- */
  body {
    font-size: 13px;
  }

}

