/* =====================================================
   mobile.css - Responzivní úpravy pro mobilní zařízení
   ČSV ZO Olomouc
   ===================================================== */

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

  /* Zrušit pevnou min-width z body */
  body {
    min-width: 0 !important;
    text-align: left;
  }

  /* Hlavní wrapper - plná šířka místo 770px */
  #main {
    width: 100% !important;
    background-image: none !important; /* img/main.jpg - opakující se dekorace po stranách */
  }

  /* === LOGO h1 === */
  /* Originál: width:770px, height:157px, position:relative, span absolutně přes celý h1 */
  /* Text je v <a>, span je prázdný — bílý čtverec vzniká z h1 výšky bez obrázku */
  h1 {
    width: 100% !important;
    height: auto !important;
    background: #4a3000 !important;
    overflow: visible !important;
    position: static !important;
  }
  h1 a {
    display: block !important;
    position: static !important;
    color: #FF8C00 !important;
    text-decoration: none !important;
	text-align: center !important;
    padding: 10px 12px !important;
    font-size: 1.1em !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
  }
  h1 span {
    display: none !important;
  }

  /* === HORNÍ NAVIGACE #top === */
  /* Originál: height:25px, background img/ul.jpg, text-align:right */
  ul#top {
    height: auto !important;
    background-image: none !important;
    background-color: #333 !important;
    text-align: center !important;
    padding: 6px 8px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 4px !important;
  }

  ul#top li {
    line-height: 1.8 !important;
  }

  #top a:link, #top a:visited {
    color: #FFB347 !important;
    padding: 3px 6px !important;
  }

  /* === LEVÉ MENU #left === */
  /* Originál: width:170px, float:left — způsobuje, že obsah má margin-left:185px */
  ul#left {
    float: none !important;
    width: 100% !important;
    padding: 0 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-bottom: 2px solid #FF8C00 !important;
    margin-bottom: 10px !important;
    background: #f9f9f9 !important;
  }

  ul#left li {
    flex-shrink: 0 !important;
    margin: 0 !important;
    font-size: 80% !important;
  }

  /* Originál: #left a má width:170px, border, background img/li.jpg */
  #left a,
  #left li > a {
    width: auto !important;
    display: block !important;
    padding: 8px 12px !important;
    border: none !important;
    border-right: 1px solid #ccc !important;
    background-image: none !important;
    background-color: transparent !important;
    white-space: nowrap !important;
  }

  #left a:hover {
    border: none !important;
    border-right: 1px solid #ccc !important;
    background-color: #fff3e0 !important;
  }

  /* === OBSAH - zrušit margin-left:185px === */
  /* Originál: h2, h3, p mají margin: ... 25px 0 185px (kvůli float menu) */
  h2 {
    margin: 10px 10px !important;
  }

  h3 {
    margin: 5px 10px 0 10px !important;
    padding: 5px 8px !important;
  }

  p {
    margin: 0 10px !important;
    padding: 5px 0 !important;
  }

  /* Patička */
  p#foot {
    height: 30px !important;
    background-image: none !important;
    background-color: #eee !important;
    margin: 0 !important;
  }

  p#copy {
    text-align: center !important;
  }

  /* Obrázek ilustrace */
  img#ilustr {
    float: none !important;
    display: block !important;
    margin: 10px auto !important;
    max-width: 90% !important;
    height: auto !important;
  }

  /* Obecné obrázky */
  img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Tabulky - scrollovatelné */
  table {
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    max-width: 100% !important;
  }

  /* Zalamování dlouhých slov (URL, emaily apod.) */
  p, h3, li {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }
}
