/**
 * SAW Bento - Header Card
 * 
 * Hlavní header s navigací, názvem a badges.
 * Šrafování (stripe) inspirované průmyslovým designem.
 * 
 * @version 1.0.0
 */

/* ===== HEADER CONTAINER ===== */
.bento-header {
    grid-column: 1 / -1;
    position: relative;
    background: var(--bento-header-bg);
    border-radius: var(--bento-header-radius);
    overflow: hidden;
    color: var(--bento-text-inverse);
}

/* Remove default hover effect */
.bento-header:hover {
    transform: none;
    box-shadow: var(--bento-card-shadow);
}

/* ===== BACKGROUND SHAPES ===== */
.bento-header::before,
.bento-header::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    pointer-events: none;
}

.bento-header::before {
    width: 300px;
    height: 300px;
    background: white;
    top: -150px;
    right: -50px;
}

.bento-header::after {
    width: 200px;
    height: 200px;
    background: white;
    bottom: -100px;
    left: -50px;
}

.bento-header-nav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    z-index: 2;
}

.bento-header-nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.bento-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color var(--bento-transition-fast);
    text-decoration: none;
}

.bento-nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.bento-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.bento-nav-btn:disabled:hover {
    background: rgba(255, 255, 255, 0.15);
}

.bento-nav-close:hover {
    background: rgba(239, 68, 68, 0.6);
}

.bento-nav-btn .saw-icon,
.bento-nav-btn svg {
    width: 18px;
    height: 18px;
}

.bento-header-breadcrumb {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

/* ===== CONTENT ===== */
.bento-header-content {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 20px 20px;
    z-index: 2;
}

.bento-header-main {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.bento-header-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bento-header-icon .saw-icon,
.bento-header-icon svg {
    width: 28px;
    height: 28px;
}

/* ===== HEADER IMAGE ===== */
.bento-header-image {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.bento-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bento-header-info {
    flex: 1;
}

.bento-header-module {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.7;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bento-header-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.bento-header-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ===== BADGES IN HEADER ===== */
.bento-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.bento-badge--primary {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.bento-badge--success {
    background: rgba(34, 197, 94, 0.3);
    border-color: rgba(34, 197, 94, 0.4);
    color: #bbf7d0;
}

.bento-badge--warning {
    background: rgba(245, 158, 11, 0.3);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fef3c7;
}

.bento-badge--danger {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fecaca;
}

.bento-badge--info {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.4);
    color: #bfdbfe;
}

.bento-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: bento-pulse 2s infinite;
}

.bento-badge-icon {
    font-size: 0.875rem;
}

@keyframes bento-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ===== STRIPE (ŠRAFOVÁNÍ) ===== */
.bento-header-stripe {
    position: relative;
    height: 8px;
    background: repeating-linear-gradient(-45deg,
            var(--bento-brand-500),
            var(--bento-brand-500) 10px,
            var(--bento-brand-400) 10px,
            var(--bento-brand-400) 20px);
    z-index: 2;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .bento-header-nav {
        padding: 8px 12px;
    }

    .bento-header-content {
        padding: 0 12px 12px;
        flex-direction: column;
        align-items: flex-start;
    }

    .bento-header-main {
        flex-direction: row;
        /* Keep horizontal on mobile for compactness */
        gap: 10px;
        align-items: center;
    }

    .bento-header-icon {
        width: 40px;
        height: 40px;
    }

    .bento-header-icon svg {
        width: 20px;
        height: 20px;
    }

    .bento-header-title {
        font-size: 1.125rem;
        margin-bottom: 6px;
    }

    .bento-header-badges {
        flex-direction: row;
        /* Horizontal badges for compactness */
        flex-wrap: wrap;
        gap: 4px;
    }

    .bento-badge {
        padding: 4px 8px;
        font-size: 0.6875rem;
    }

    .bento-nav-btn {
        width: 32px;
        height: 32px;
    }

    .bento-header-stripe {
        height: 4px;
        /* Thinner stripe on mobile */
    }
}

@media (max-width: 480px) {
    .bento-header-breadcrumb {
        display: none;
    }

    .bento-header-title {
        font-size: 1rem;
    }

    .bento-header-icon {
        width: 36px;
        height: 36px;
    }

    .bento-header-icon svg {
        width: 18px;
        height: 18px;
    }
}