header {
    position: relative;
    height: 300px;    
    background-image: url('../img/main-background.webp');
    background-size: cover; 
    background-position: center;
    z-index: 5000;
}

/* posun při přechodu na sekci kliknutím na menu, aby nebyl nadpis schovaný */
section {
    scroll-margin-top: 80px;
  }  

/* ----- MENU ----- */

.menu-bar {
    position: fixed;
    width: 100%;
    max-width: 1200px;
    top: 0;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px 0;
    margin: 0 auto;
    z-index: 1000;
}

.menu-bar nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
    padding: 0px; 
    margin: 0px;
}

.menu-bar nav ul li {
    margin: 0 15px;
}

.menu-bar nav ul li a {
    text-decoration: none;
    color: white;
    font-size: 1.4rem;
    transition: color 0.3s;
}

.menu-bar nav ul li a:hover {
    color: rgb(191, 139, 26, 1);
}

/* Responzivní styl */
@media (max-width: 768px) {
    .menu-bar nav ul {
        flex-direction: column;
        align-items: center;
    }

    .menu-bar nav ul li {
        margin: 10px 0;
    }
}

/* Desktopové menu */
.desktop-menu {
    display: flex;
    justify-content: center;
    background-color: #161616;
    gap: 20px;
    font-family: var(--main-200);
    font-size: 1.4rem;
    text-align: center;
    color: rgb(255, 255, 255, 1);
    padding: 10px 0;
}

.desktop-menu ul li {
    margin: 0;
}

.desktop-menu ul li.lang-item {
    margin: 0 4px;
}

/* Hamburger menu */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.9);
    position: fixed;
    top: 50px;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 50px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 1000;
    font-family: var(--main-200);
    font-size: 1.0rem;
    text-align: center;
    color: rgb(255, 255, 255, 1);
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu ul li {
    padding: 10px 20px;
    border-bottom: 1px solid rgb(85, 85, 85, 1);
}

.mobile-menu ul li a {
    text-decoration: none;
    color: rgb(255, 255, 255, 1);
}

.mobile-menu ul li.lang-item {
    padding: 5px 20px;
}

/* Zobrazení hamburger menu na mobilních zařízeních */
@media (max-width: 768px) {
    .desktop-menu {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .mobile-menu.active {
        display: flex;
    }
}

/* ----- ZÁHLAVÍ ----- */

/* KONTEJNER ZÁHLAVÍ */
.head-container {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* LOGO ESC Room v záhlaví */
.logo-company {
    width: 100px;
}

/* TELEFONNÍ ČÍSLO v záhlaví */
.head-phone-number {
    font-family: var(--main-400);
    font-size: 2.5em;
    color: rgb(255, 255, 255, 1);
    position: absolute;
    top: 75%; left: 10px;
    animation: moveLeftRight 12s ease-in-out infinite alternate;
}

    /* animace posouvání telefonního čísla v záhlaví */
    @keyframes moveLeftRight {from {transform: translateX(0); } to {transform: translateX(100px);}}
  
    /* responzivní úprava pro mobilní zařízení */
    @media (max-width: 768px) {
        .head-phone-number {font-size: 1.2em; top: 85%; left: 10px; animation: moveLeftRightMobile 8s ease-in-out infinite alternate;}
  
        @keyframes moveLeftRightMobile {from {transform: translateX(0);} to {transform: translateX(50px);}}
    }

/* E-MAILOVÁ ADRESA v záhlaví */
.head-email {
    font-family: var(--main-400);
    font-size: 2em;
    color: rgb(255, 255, 255, 1);
    position: absolute;
    top: 10%; right: 10px;
    animation: moveRightLeft 12s ease-in-out infinite alternate; /* Definice animace */
  }
  
    /* animace posouvání e-mailové adresy v záhlaví */
    @keyframes moveRightLeft {from {transform: translateX(0);} to {transform: translateX(-100px);}}
  
    /* responzivní úprava pro mobilní zařízení */
    @media (max-width: 768px) {
        .head-email {font-size: 1.2em; top: 5%;right: 10px; animation: moveRightLeftMobile 12s ease-in-out infinite alternate;}
  
    @keyframes moveRightLeftMobile {from {transform: translateX(0);} to {transform: translateX(-50px);}}
    }

/* NADPIS "ESC Room" v záhlaví */
.head-title-main {
    font-family: var(--main-400);
    font-size: 1.8rem;
    text-align: center;
    color: rgb(254, 254, 255, 1);
    margin-bottom: 0px;
}

/* PODNADPIS "Únikové hry" v záhlaví */
.head-title-sub {
    font-family: var(--main-400);
    font-size: 1.0rem;
    color: rgb(254, 254, 255, 1);
    text-align: center;
    margin-bottom: 20px;
}

.flag {
    width: 24px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
    object-fit: fill;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.menu-bar nav ul li a:hover .flag,
.menu-bar nav ul li a:focus-visible .flag {
    transform: translateY(-1px) scale(1.08);
    filter: brightness(1.08) saturate(1.08);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45), 0 2px 6px rgba(0, 0, 0, 0.35);
}