@media screen and (max-width: 1080px) {

  /* ----------------------------------------------------------------
   * 0) Base safety: prevent horizontal overflow by defaults
   * ---------------------------------------------------------------- */

  *, *::before, *::after {
    box-sizing: border-box;
  }

  html,
  body {
    height: auto;
    min-height: 100%;
    min-width: 0;
  }

  body {
    margin: 0;          /* overrides body { margin: ...em } */
    overflow: auto;     /* do not force hidden overflow on small screens */
  }

  /* ----------------------------------------------------------------
   * 1) Disable the fixed "app" layout (menu + scr + footer + tabs)
   * ---------------------------------------------------------------- */

  #main_menu,
  #scr,
  #footer,
  #footer_menu,
  #tabs {
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
  }

  #main_menu,
  #footer_menu {
    width: auto !important;  /* overrides width: 17em */
  }

  #scr {
    overflow: visible !important; /* overrides overflow:auto */
    padding: 1em !important;
  }

  #footer {
    height: auto !important; /* overrides fixed height */
    padding: 0.75em 1em;
  }

  /* Footer texts are fixed-position in main.css */
  #copyright,
  #sponsored,
  #webmaster {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    text-align: center !important;
    display: block;
    margin: 0.4em 0;
  }

  /* ----------------------------------------------------------------
   * 2) Text wrapping: allow links/titles to break on narrow screens
   * ---------------------------------------------------------------- */

  #scr a,
  #scr h1, #scr h2, #scr h3, #scr h4, #scr h5, #scr h6,
  a.external {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  h1, h2, h3, h4, h5, h6 {
    hyphens: auto;
  }

  /* ----------------------------------------------------------------
   * 3) Media scaling: never allow media/table to overflow the content
   * ---------------------------------------------------------------- */

  #scr img,
  #scr object,
  #scr iframe,
  #scr video,
  #scr table {
    max-width: 100% !important;
  }

  #scr iframe,
  #scr video {
    width: 100% !important;
  }

  /* If you want 80% for general-info only, keep it here (more specific) */
  #general-info img,
  #general-info object,
  #general-info iframe,
  #general-info video {
    max-width: 80%;
    height: auto;
    display: block;
    margin: 0 auto !important;
  }

  /* ----------------------------------------------------------------
   * 4) Header: reduce size and remove absolute positioning blocks
   * ---------------------------------------------------------------- */

  #header {
    font-size: 75%;
    padding-bottom: 0.8em;
  }

  #h1_left,
  #h1_right,
  #flags_left,
  #flags_right {
    position: static !important;
    text-align: center !important;
    display: block;
    margin: 0.2em 0;
  }

  /* Restore inline layout inside h1 */
  #header h1 span {
    display: inline !important;
  }

  #logo {
    margin: 0 0 0.5em 0 !important;
  }

  #logo object {
    margin: 0.2em !important;
    display: inline-block;
  }

  /* ----------------------------------------------------------------
   * 5) Touch menu: disable hover-only submenu behaviour
   * ---------------------------------------------------------------- */

  #main_menu li a,
  #main_menu li a.not_selective,
  #main_menu li a.not_selective:hover,
  #main_menu li a.not_selective:focus {
    padding: 12px 12px 12px 1em; /* larger tap target */
  }

  #main_menu li ul {
    max-height: none !important;
    overflow: visible !important;
  }

  /* ----------------------------------------------------------------
   * 6) Burger button: visible only on mobile (HTML contains it always)
   * ---------------------------------------------------------------- */

  #menu-toggle {
    display: none;
  }

  #menu-toggle-label {
    display: block !important;

    position: fixed;
    top: 0;
    right: 0;
    left: auto;

    padding: 0.2em 0.4em;

    font-size: 2em;
    cursor: pointer;
    z-index: 1001;

    background-color: #A4C7D9;
    border-left: 2px solid #6FA5BA;
    border-bottom: 2px solid #6FA5BA;

    border-radius: 0 0 0 10px;
  }

  /* ----------------------------------------------------------------
   * 7) Mobile sliding menu (checkbox-driven)
   * ---------------------------------------------------------------- */

  #main_menu {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;

    width: 80% !important;
    max-width: 320px;

    transform: translateX(-100%);
    transition: transform 0.3s ease;

    z-index: 1000;
    overflow: auto;
  }

  /* When checkbox is checked, slide the menu in */
  #menu-toggle:checked ~ #content #main_menu {
    transform: translateX(0);
  }

  /* ----------------------------------------------------------------
   * 8) Seminar list: remove default offsets for a clean mobile block
   * ---------------------------------------------------------------- */

  .seminar_list,
  .seminar_list ul {
    margin: 0 !important;
    padding: 0 !important;
  }

  .seminar_list li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  /* ----------------------------------------------------------------
   * 9) Person cards: turn legacy negative-indent layout into a flexy card
   * ---------------------------------------------------------------- */

  .informative_list li.vcard.person {
    text-indent: 0 !important;
    margin: 0.8em 0 !important;
    padding: 0.8em !important;
    border-radius: 0.5em;
  }

  .informative_list li.vcard.person > a {
    float: left;
    margin: 0 0.8em 0.4em 0 !important;
  }

  .informative_list li.vcard.person img.photo {
    width: 60px;
    height: auto;
    margin: 0 !important;
    border-radius: 4px;
  }

  .informative_list li.vcard.person h3.fn,
  .informative_list li.vcard.person h4.fn,
  .informative_list li.vcard.person h5.fn {
    text-align: left;
    margin: 0 0 0.2em 0 !important;
    white-space: normal !important;
  }

  .informative_list li.vcard.person:after {
    content: "";
    display: block;
    clear: both;
  }

  /* ----------------------------------------------------------------
   * 10) Company cards: same idea, plus normalize inline SVG margins/sizes
   * ---------------------------------------------------------------- */

  .informative_list li.vcard.company {
    text-indent: 0 !important;
    margin: 0.8em 0 !important;
    padding: 0.8em !important;
    border-radius: 0.5em;
  }

  .informative_list li.vcard.company > object.svg {
    float: left;
    margin: 0 0.6em 0.4em 0 !important; /* overrides inline margin */
  }

  .informative_list li.vcard.company > object.svg[width="71"] {
    width: 48px !important;
    height: auto !important;
  }

  .informative_list li.vcard.company > object.svg:not([width="71"]) {
    max-width: 120px;
    height: auto !important;
  }

  .informative_list li.vcard.company h3.fn {
    text-align: left;
    margin: 0 0 0.2em 0 !important;
    white-space: normal !important;
  }

  .informative_list li.vcard.company .adr {
    display: block;
  }

  .informative_list li.vcard.company:after {
    content: "";
    display: block;
    clear: both;
  }

  /* ----------------------------------------------------------------
   * 11) Tables: allow horizontal scrolling instead of breaking layout
   * ---------------------------------------------------------------- */

  .table_inside {
    width: 100% !important;
    overflow-x: auto;
  }

  .table_inside table {
    width: 100% !important;
    min-width: 480px; /* prevents unreadable collapse */
  }

  .table_inside table th,
  .table_inside table td {
    white-space: nowrap;
  }

  /* ----------------------------------------------------------------
   * 12) Pop-up window: fit into viewport
   * ---------------------------------------------------------------- */

  #info_window {
    width: auto !important;
    margin-left: 0 !important;
    left: 2.5vw !important;
    right: 2.5vw !important;
    top: 8vh !important;
    height: 80vh !important;
  }

}

