/* Header styles - můžeš míchovat s vlastními CSS proměnnými */
:root {
    --bg-white: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --accent: #2563eb;
    --border: #e2e8f0;
    --link-color: #1d4ed8;
    --link-hover: #1e40af;
    --link-focus: rgba(37, 99, 235, 0.3);
    --link-underline: rgba(37, 99, 235, 0.28);
}

/* Shared link styles outside header navigation */
.hero a:not(.btn),
.features a,
.portfolio-section a,
.process-section a,
.faq-section a,
.contact-section a,
footer a {
    color: var(--link-color);
    text-decoration: underline;
    text-decoration-color: var(--link-underline);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.hero a:not(.btn):hover,
.features a:hover,
.portfolio-section a:hover,
.process-section a:hover,
.faq-section a:hover,
.contact-section a:hover,
footer a:hover {
    color: var(--link-hover);
    text-decoration-color: rgba(30, 64, 175, 0.55);
}

.hero a:not(.btn):focus-visible,
.features a:focus-visible,
.portfolio-section a:focus-visible,
.process-section a:focus-visible,
.faq-section a:focus-visible,
.contact-section a:focus-visible,
footer a:focus-visible {
    outline: 2px solid var(--link-focus);
    outline-offset: 3px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9));
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

/* LOGO */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--text-main);
    letter-spacing: -0.5px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.logo img {
    height: 30px;
    width: auto;
}

.logo:hover {
    transform: translateY(-1px);
}

/* NAVIGACE - desktop */
.site-nav {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.site-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
    white-space: nowrap;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
}

.site-nav a:hover {
    color: var(--accent);
    background: rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.site-nav a:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
    color: var(--accent);
    background: rgba(37, 99, 235, 0.1);
}

/* BACK LINK */
.back-link-wrapper {
    margin-left: auto;
    flex-shrink: 0;
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.25s ease, background-color 0.25s ease;
    white-space: nowrap;
    font-size: 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    background: rgba(255, 255, 255, 0.55);
}

.back-link:hover {
    color: var(--accent);
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.35);
}

/* HAMBURGER MENU */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 10px;
    cursor: pointer;
    padding: 10px;
    margin-left: auto;
    flex-shrink: 0;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.menu-toggle span {
    width: 24px;
    height: 2.5px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

.menu-toggle span + span {
    margin-top: 6px;
}

.menu-toggle:hover {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.35);
}

/* Hamburger animace -active state */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* MOBILE - do 768px */
@media (max-width: 768px) {
    .header-inner {
        height: 58px;
        padding: 0 4%;
    }

    .logo img {
        height: 25px;
    }

    /* Skryj desktop nav */
    .site-nav {
        position: absolute;
        top: 58px;
        left: 0;
        right: 0;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        overflow-y: auto;
        transition: max-height 0.3s ease, opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
        border-bottom: 1px solid rgba(148, 163, 184, 0.28);
        box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px);
        z-index: 150;
    }

    .site-nav.mobile-open {
        max-height: calc(100vh - 58px);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .site-nav a {
        padding: 1rem 5%;
        border-bottom: 1px solid rgba(148, 163, 184, 0.2);
        text-align: left;
        border-radius: 0;
        transform: none;
    }

    .site-nav a:last-child {
        border-bottom: none;
    }

    /* Ukaž hamburger menu */
    .menu-toggle {
        display: flex;
    }

    .back-link-wrapper {
        display: none;
    }
}

/* Malé mobily - do 480px */
@media (max-width: 480px) {
    .header-inner {
        height: 54px;
        padding: 0 3%;
    }

    .logo img {
        height: 23px;
    }

    .menu-toggle span {
        width: 20px;
        height: 2.2px;
    }

    .menu-toggle span + span {
        margin-top: 5px;
    }
}