/* --- 1. ZÁKLADNÍ NASTAVENÍ STRÁNKY --- */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    padding-top: 70px; /* Vytvoří přesný prostor nahoře, aby lišta nic nepřekrývala */
    background-color: #ff8b1f; /* Tvoje oranžová barva pozadí */
    color: #333333;
}

html {
            scroll-behavior: smooth;
        }

main {
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 20px;
}

p, li {
    color: #000000;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* --- 2. JEDINÁ A STABILNÍ FIXNÍ LIŠTA --- */
/* Odstraněny duplicity. Toto pravidlo teď kompletně a čistě ovládá celou lištu */
header, .main-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 70px !important;
    background-color: #ffffff !important;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    z-index: 99999 !important;
    box-sizing: border-box !important; /* Klíčové: padding neroztáhne lištu mimo displej */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Logo uvnitř lišty */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: bold;
    font-size: 20px;
    color: #111111;
    text-transform: uppercase;
}

.logo-img {
    height: 35px;
    width: auto;
}

/* Navigace v liště */
.main-header nav ul, nav ul {
    display: flex;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-header nav ul li a, nav ul li a {
    text-decoration: none;
    color: #555555;
    font-size: 14px;
    font-weight: 600;
}

.main-header nav ul li a.active, nav ul li a.active {
    color: #000000;
}

/* --- 3. ÚVODNÍ BANNERY (Pro všechny stránky stejné) --- */
.hero-banner {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 350px;
    display: flex;
    align-items: center;
    padding: 0 50px;
    margin-bottom: 30px;
    box-sizing: border-box;
}

.hero-content {
    max-width: 800px;
    text-align: left;
}

.hero-title {
    background-color: #f1b504;
    color: #000000;
    display: inline-block;
    padding: 12px 25px;
    font-size: 38px;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0 0 15px 0;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.3);
}

.hero-subtitle {
    background-color: #ffffff;
    color: #333333;
    display: inline-block;
    padding: 10px 20px;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.15);
}

/* --- 4. BÍLÉ BOXY PRO TEXTY --- */
.setup-section, main {
    max-width: 1000px;
    margin: 20px auto;
    padding: 30px;
    background-color: #ffffff !important; /* Natvrdo vrátí bílé podbarvení textů */
    box-sizing: border-box;
}

h2 {
    font-size: 24px;
    text-transform: uppercase;
    color: #111111;
    margin-top: 40px;
}

h3 {
    font-size: 18px;
    text-transform: uppercase;
    color: #ff0000;
    margin-top: 30px;
    border-bottom: 1px dashed #e0e0e0;
    padding-bottom: 5px;
}

/* Kvízová tlačítka Šéfa mechanika */
.question {
    margin-bottom: 20px;
    background-color: #eee;
    padding: 20px;
    border-radius: 8px;
}

.button {
    display: inline-block;
    padding: 12px 22px;
    margin: 8px 0;
    background-color: #ddd;
    border: 1px solid #ff8b1f;
    border-radius: 5px;
    text-align: left;
    cursor: pointer;
    width: 100%;
}

.button:hover {
    background-color: #ff8b1f;
}

.hidden {
    display: none;
}

.recommendations {
    background-color: #eee;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-top: 10px;
}

/* --- 5. RESPONSIVITA (MOBILNÍ TELEFONY) --- */
@media (max-width: 768px) {
    body {
        padding-top: 70px !important;
    }

    header, .main-header {
        height: 70px !important;
    }

    /* Oprava banneru: Už nebude schovávat nadpisy pod lištu */
    .hero-banner {
        height: auto !important;
        padding: 30px 15px !important;
        margin-bottom: 20px;
    }

    .hero-title {
        font-size: 22px !important;
        padding: 8px 12px !important;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 14px !important;
        padding: 8px 12px !important;
    }

    /* Standardní nastavení pro main na všech běžných stránkách (Šéf Mechanik atd.) */
    main {
        margin: 20px auto !important;
        padding: 0 20px !important;
        background-color: transparent !important;
    }

    /* CÍLENÁ OPRAVA PRO STRÁNKU VŠE O NASTAVENÍ */
    /* Vynutíme, aby se hlavní kontejner roztáhl, POUZE pokud je v něm sekce nastavení */
    main:has(.setup-section),
    body:has(.setup-section) main {
        margin: 10px auto !important;
        padding: 0 5px !important;
    }

    /* Samotný bílý box s textem nastavení dostane ideální prostor pro mobilní displej */
    .setup-section {
        margin: 0 !important;
        padding: 15px 10px !important;
        background-color: #ffffff !important;
        border-radius: 4px;
    }

    /* Šedé krabičky jednotlivých parametrů se přizpůsobí okraji */
    .component-box {
        padding: 12px 10px !important;
        margin-bottom: 15px !important;
    }

    /* Zmenšení hlavních nadpisů sekcí, aby se na mobilu nelámaly po písmenech */
    .setup-section h2,
    .section-main-title {
        font-size: 20px !important;
        line-height: 1.2 !important;
        letter-spacing: -0.5px;
    }

    /* Zmenšení nadpisů jednotlivých komponent */
    .component-title {
        font-size: 1.1em !important;
        line-height: 1.3 !important;
    }

    /* Tlačítko pro mobilní menu (tři čárky) */
    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 20px;
        background: transparent !important;
        border: none !important;
        padding: 0;
    }

    .menu-toggle span {
        display: block;
        width: 100%;
        height: 3px;
        background: #333;
    }

    .main-header nav ul, nav ul {
        display: none !important;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: #ffffff;
        padding: 20px 0;
    }

    .main-header nav ul.active, nav ul.active {
        display: flex !important;
    }
}