/* ============================================================================
   HEADER STYLES - Simple, Slow & Professional
   ============================================================================ */

.header {
    position: sticky;
    top: 0;
    z-index: 102;
    overflow: visible;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    position: relative;
    z-index: 103;
    box-shadow: 0 4px 18px 0 rgba(0, 0, 0, 0.08);
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    transform: translate3d(0, 0, 0);
    opacity: 1;
    will-change: transform;
    /* Simple, slow transition */
    transition: transform 0.8s ease-out, opacity 0.6s ease-out, padding 0.3s ease, box-shadow 0.3s ease;
}

    .header-top.hide {
        transform: translate3d(0, -100%, 0);
        opacity: 0;
        pointer-events: none;
        box-shadow: none;
        /* Gentle hide */
        transition: transform 0.7s ease-in, opacity 0.5s ease-in;
    }

    .header-top.show {
        animation: simpleSlideDown 0.9s ease-out forwards;
    }

@keyframes simpleSlideDown {
    from {
        transform: translate3d(0, -100%, 0);
        opacity: 0;
    }

    to {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }
}

/* Header Logo */
.header-logo {
    display: flex;
    align-items: center;
}

.logo-icon {
    width: 150px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: width 0.3s ease, height 0.3s ease;
}

    .logo-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        transition: transform 0.3s ease;
    }

.header.scrolled .logo-icon {
    width: 115px;
    height: 38px;
}

    .header.scrolled .logo-icon img {
        transform: scale(0.95);
    }

.logo-text {
    display: none;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    transition: gap 0.3s ease;
}

.header.scrolled .header-actions {
    gap: 8px;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f8f9fa;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.25s ease;
}

    .icon-btn svg {
        width: 20px;
        height: 20px;
        stroke-width: 2.5;
        transition: all 0.25s ease;
    }

.header.scrolled .icon-btn {
    width: 38px;
    height: 38px;
}

    .header.scrolled .icon-btn svg {
        width: 18px;
        height: 18px;
    }

.icon-btn:hover {
    background: #e9ecef;
    transform: scale(1.08);
}

    .icon-btn:hover svg {
        stroke: #d4a574;
    }

.icon-btn:active {
    transform: scale(0.95);
}

/* Flag */
.flag {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(212, 165, 116, 0.30);
    display: flex;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.25s ease;
}

.header.scrolled .flag {
    width: 32px;
    height: 32px;
}

.flag:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.flag-green {
    width: 33.33%;
    background-color: #009246;
}

.flag-white {
    width: 33.33%;
    background-color: white;
}

.flag-red {
    width: 33.33%;
    background-color: #ce2b37;
}

.notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: #ff4757;
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .header-top {
        padding: 16px 20px;
        transition: transform 0.7s ease-out, opacity 0.5s ease-out;
    }

        .header-top.hide {
            transition: transform 0.6s ease-in, opacity 0.4s ease-in;
        }

        .header-top.show {
            animation: simpleSlideDown 0.8s ease-out forwards;
        }

    .logo-icon {
        width: 130px;
        height: 45px;
    }

    .header.scrolled .logo-icon {
        width: 100px;
        height: 35px;
    }

    .header-logo,
    .header-actions,
    .icon-btn,
    .flag {
        transition-duration: 0.25s;
    }
}

/* Prevent layout shift */
.header::after {
    content: '';
    display: block;
    height: 0;
}

/* Prevent text selection */
.header-top * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
