/* Responsive CSS pro starý tws() template
 * Breakpoint 1040px: tablety, malé desktopty – fluid layout
 * Breakpoint 900px:  hamburger menu
 * Breakpoint 768px:  mobil – 1-sloupcový layout
 */

/* Hamburger button – skrytý na desktopu */
#menu-toggle {
  display: none;
}


/* =========================================================
   BREAKPOINT 1040px – tablety, malé desktopty
   ========================================================= */
@media screen and (max-width: 1040px) {

  #center-content {
    width: 100%;
    max-width: 1037px;
    box-sizing: border-box;
  }

  #header {
    width: 100%;
    max-width: 1037px;
    height: auto;
    box-sizing: border-box;
  }

  #mains {
    width: 100%;
    max-width: 970px;
    box-sizing: border-box;
  }

  #categoryPath {
    width: 100%;
    max-width: 970px;
    box-sizing: border-box;
  }

  #banner-rectangle {
    width: 100%;
    max-width: 970px;
    box-sizing: border-box;
  }

  #mains #pansea {
    width: 100%;
    box-sizing: border-box;
  }

  /* Banner se nevejde vedle loga – přesunout pod logo */
  #media {
    float: none;
    clear: both;
    width: 100%;
    height: auto;
    text-align: center;
  }

}


/* =========================================================
   BREAKPOINT 900px – hamburger menu
   ========================================================= */
@media screen and (max-width: 900px) {

  /* Hamburger tlačítko */
  #menu-toggle {
    display: block;
    float: right;
    margin: 10px 10px 0 0;
    padding: 8px 12px;
    background-color: #0078CC;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    border-radius: 3px;
  }

  #menu-toggle.open {
    background-color: #D05300;
  }

  #menu-toggle i {
    pointer-events: none;
  }

  /* Skrýt horizontální menu */
  #menu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #0078CC;
    margin: 0;
    padding: 0;
    white-space: normal;
    overflow-x: visible;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  }

  /* Otevřený stav */
  #menu.open {
    display: block;
  }

  /* Položky jako blok */
  #menu li {
    display: block;
    float: none;
    margin: 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
  }

  #menu li a {
    display: block;
    width: auto !important;
    height: auto !important;
    padding: 10px 20px !important;
    text-align: left;
    box-sizing: border-box;
    white-space: normal;
    line-height: 1.4;
  }

  /* Podmenu – zobrazit jako statický odsazený seznam */
  #menu ul {
    display: block !important;
    position: static !important;
    left: auto !important;
    width: 100% !important;
    top: auto !important;
    background-color: transparent;
    padding: 0;
    margin: 0;
    box-shadow: none;
  }

  #menu ul li {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    border-left: none;
  }

  #menu ul li a {
    padding-left: 35px !important;
    background-color: #0E5DB4 !important;
    font-size: 9pt;
  }

  #menu ul li a:hover,
  #menu ul li:hover {
    background-color: #2482D2 !important;
  }

  /* Vnořené podmenu (2. úroveň) */
  #menu ul ul {
    position: static !important;
    left: auto !important;
    margin: 0 !important;
    width: 100% !important;
  }

  #menu ul ul li a {
    padding-left: 50px !important;
    background-color: #0A4E9E !important;
  }

}


/* =========================================================
   BREAKPOINT 768px – mobil
   ========================================================= */
@media screen and (max-width: 768px) {

  /* --- Header --- */
  #header {
    background-color: #12529D;
    background-image: none;
  }

  #logo {
    width: 100%;
    height: auto;
    float: none;
  }

  #logo strong {
    top: 0;
  }

  #logo strong a {
    width: auto;
    height: 60px;
  }

  #linka {
    margin: 10px 10px 0 10px;
  }

  /* --- Obsahová část --- */
  #mains {
    width: 100%;
    padding: 0 5px;
    box-sizing: border-box;
  }

  #mains #pansea {
    height: auto;
  }

  #mains #pansea #leva-cast {
    width: 100%;
    float: none;
  }

  #mains #pansea form {
    float: none;
    width: 100%;
  }

  /* --- 3-sloupcový layout → 1 sloupec --- */
  #tmp_float_box {
    width: 100%;
    float: none;
    box-sizing: border-box;
  }

  #maincontent-3sl {
    width: 100%;
    float: none;
    box-sizing: border-box;
  }

  /* Levý sloupec – skrýt na mobilu */
  #sidebar-left-3sl {
    display: none;
  }

  #sidebar-right-3sl {
    width: 100%;
    float: none;
    clear: both;
    box-sizing: border-box;
  }

  /* --- 2-sloupcový layout → 1 sloupec --- */
  #maincontent-2sl {
    width: 100%;
    float: none;
    box-sizing: border-box;
  }

  #sidebar-right-2sl {
    width: 100%;
    float: none;
    clear: both;
    box-sizing: border-box;
  }

  /* --- Obrázky – fluid --- */
  img {
    max-width: 100%;
    height: auto;
  }

  /* --- Banner & breadcrumb --- */
  #banner-rectangle {
    width: 100%;
    box-sizing: border-box;
  }

  #categoryPath {
    width: 100%;
    box-sizing: border-box;
  }

  /* --- Patička --- */
  #footer {
    padding: 1em 10px;
    box-sizing: border-box;
  }

  /* --- Nejnovější článek (úvodní strana) --- */
  div.nejnovejsi-clanek .box {
    height: auto;
  }

  div.nejnovejsi-clanek p {
    height: auto;
  }

  div.nejnovejsi-clanek div.vice-info {
    width: 100%;
    float: none;
  }

  div.nejnovejsi-clanek2 {
    width: 100%;
    height: auto;
    float: none;
    box-sizing: border-box;
  }

  div.nejnovejsi-clanek2 div.box {
    height: auto;
  }

  div.fotoalba {
    width: auto!important;
  }

  .box50L,
  .box50R {
    float: none;
    width: 100%;
  }

}
