/* ========================================
   HEADER KOMPONENTA - BEM METODIKA
   MOBILE FIRST - základní styly pro mobil
   ======================================== */

/* ========================================
   HLAVNÍ KONTEJNER HEADERU
   ======================================== */

.header {
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
}

.header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 60px;
}

/* ========================================
   LOGO - MOBIL
   ======================================== */

.header__logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    z-index: 1001;
}

.header__logo-link {
    text-decoration: none;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

.header__logo-image {
    height: 36px;
    width: auto;
    display: block;
}

.header__logo-text {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ========================================
   NAVIGACE - MOBIL (Výsuvné menu)
   ======================================== */

.header__nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    background-color: #ffffff;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.15);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1002;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.header__nav--open {
    right: 0;
}

.header__nav-list {
    list-style: none;
    padding: 80px 20px 40px 20px;
    margin: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.header__nav-item {
    width: 100%;
}

.header__nav-link {
    display: block;
    padding: 14px 16px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.header__nav-link:hover,
.header__nav-link:active {
    background-color: #f8f9fa;
    color: #667eea;
}

.header__nav-link--active {
    font-weight: 700;
    color: #667eea;
    background-color: #f0f3ff;
}

.header__nav-link--important {
    border: 2px solid #ff6b35;
    color: #ff6b35;
    font-weight: 600;
    text-align: center;
    margin-top: 8px;
}

.header__nav-link--important:hover {
    background-color: #ff6b35;
    color: #ffffff;
}

.header__nav-link--highlight {
    background-color: #667eea;
    color: #ffffff;
    font-weight: 600;
    text-align: center;
}

.header__nav-link--highlight:hover {
    background-color: #5568d3;
    color: #ffffff;
}

/* ========================================
   PRAVÁ STRANA - AKCE (MOBIL)
   ======================================== */

.header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    z-index: 1001;
}

/* Tlačítko přidat stanici - zobrazit text + ikona */
.header__add-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff3d00 100%);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    white-space: nowrap;
}

.header__add-button:hover,
.header__add-button:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.5);
    background: linear-gradient(135deg, #ff7d4d 0%, #ff5722 100%);
}

.header__add-button-icon {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.header__add-button-text {
    display: inline;
}

/* Ikona přihlášení - MOBIL */
.header__login-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f8f9fa;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.header__login-icon:hover,
.header__login-icon:active {
    background-color: #667eea;
    color: #ffffff;
    transform: scale(1.05);
}

.header__login-svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   HAMBURGER MENU - MOBIL
   ======================================== */

.header__menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1003;
    transition: transform 0.3s ease;
}

.header__menu-toggle:active {
    transform: scale(0.95);
}

.header__menu-line {
    width: 26px;
    height: 3px;
    background-color: #2c3e50;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.header__menu-toggle:hover .header__menu-line,
.header__menu-toggle:active .header__menu-line {
    background-color: #667eea;
}

/* Hamburger animace při otevření */
.header__menu-toggle--open .header__menu-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.header__menu-toggle--open .header__menu-line:nth-child(2) {
    opacity: 0;
}

.header__menu-toggle--open .header__menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ========================================
   OVERLAY - MOBIL (Tmavé pozadí při otevřeném menu)
   ======================================== */

.header__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.header__overlay--visible {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   RESPONZIVITA - TABLET (768px+)
   ======================================== */

@media (min-width: 768px) {
    .header__container {
        padding: 12px 40px;
        min-height: 70px;
    }

    .header__logo-image {
        height: 42px;
    }

    .header__logo-text {
        font-size: 22px;
    }

    .header__actions {
        gap: 12px;
    }

    /* Tlačítko - TABLET: Zobrazit text i ikonu */
    .header__add-button {
        padding: 12px 24px;
        font-size: 15px;
    }

    .header__add-button-icon {
        font-size: 18px;
    }

    .header__login-icon {
        width: 44px;
        height: 44px;
    }

    .header__login-svg {
        width: 22px;
        height: 22px;
    }
}

/* ========================================
   RESPONZIVITA - DESKTOP (1024px+)
   ======================================== */

@media (min-width: 1024px) {
    .header {
        position: sticky;
    }

    .header__container {
        padding: 12px 20px;
        min-height: 76px;
    }

    .header__logo-image {
        height: 46px;
    }

    .header__logo-text {
        font-size: 24px;
    }

    /* NAVIGACE - DESKTOP: Horizontální menu místo výsuvného */
    .header__nav {
        position: static;
        width: auto;
        max-width: none;
        height: auto;
        background-color: transparent;
        box-shadow: none;
        overflow-y: visible;
        display: flex;
        align-items: center;
        flex: 1;
        justify-content: flex-end;
        margin: 0 16px 0 0;
        transition: none;
    }

    .header__nav-list {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 0;
        gap: 2px;
        flex-wrap: nowrap;
        min-height: auto;
    }

    .header__nav-item {
        width: auto;
    }

    .header__nav-link {
        padding: 10px 14px;
        font-size: 15px;
        font-weight: 600;
        white-space: nowrap;
    }

    .header__nav-link--active {
        background-color: transparent;
        color: #667eea;
        position: relative;
    }

    .header__nav-link--active::after {
        content: '';
        position: absolute;
        bottom: 6px;
        left: 14px;
        right: 14px;
        height: 3px;
        background-color: #667eea;
        border-radius: 2px;
    }

    .header__nav-link--important,
    .header__nav-link--highlight {
        margin-top: 0;
        margin-left: 8px;
    }

    /* Skrýt položky určené jen pro mobil */
    .header__nav-item--hide-desktop {
        display: none;
    }

    /* AKCE - větší rozestupy */
    .header__actions {
        gap: 16px;
    }

    .header__add-button {
        padding: 12px 28px;
        font-size: 16px;
    }

    .header__add-button-icon {
        font-size: 18px;
    }

    .header__login-icon {
        width: 48px;
        height: 48px;
    }

    .header__login-svg {
        width: 24px;
        height: 24px;
    }

    /* HAMBURGER - skrýt na desktopu */
    .header__menu-toggle {
        display: none;
    }

    /* OVERLAY - skrýt na desktopu */
    .header__overlay {
        display: none !important;
    }
}
