/* Maman Clown Website - Header Component Styles */

/* Header */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Header Right Section (language + hamburger) */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

#site-header.hidden {
    transform: translateY(-100%);
}

/* Logo */
.header-logo {
    width: 148px;
    height: 60px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Fallback for failed logo load */
.header-logo[alt]::after {
    content: attr(alt);
    display: block;
    padding: 10px;
    border: 2px solid #ddd;
    background: #f5f5f5;
    font-size: 12px;
    text-align: center;
}

/* Page Title */
.page-title {
    font-family: "Comic Neue", "Comic Sans MS", cursive;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.2em 0.6em;
    border-radius: 1.5em;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    /* Multiple backgrounds: gradient for text, white for pill */
    background:
        linear-gradient(90deg, #FF0000, #FF7F00, #FFB700, #00FF00, #0000FF, #4B0082, #9400D3),
        linear-gradient(white, white);
    background-clip: text, padding-box;
    -webkit-background-clip: text, padding-box;
    -webkit-text-fill-color: transparent;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 8px;
    align-items: center;
}

.lang-link {
    font-family: "Comic Neue", "Comic Sans MS", cursive;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    color: #666;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.lang-link:hover {
    background: #f0f0f0;
    color: #00a700;
}

.lang-link.active {
    background: #00a700;
    color: white;
    pointer-events: none;
}

/* Hamburger Button */
.hamburger {
    width: 44px;
    height: 44px;
    background: #00a700;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.2s ease;
    position: relative;
    z-index: 1002;
}

.hamburger:hover {
    transform: scale(1.05);
}

.hamburger:focus {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

/* Menu Overlay */
#menu-overlay {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-overlay.active {
    visibility: visible;
    opacity: 1;
}

/* Dropdown Menu */
#menu {
    position: fixed;
    top: 70px;
    right: 20px;
    width: 220px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px) scaleY(0.8);
    transform-origin: top right;
    transition: max-height 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                opacity 0.4s ease-out,
                transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    will-change: max-height, opacity, transform;
}

#menu.open {
    max-height: 400px;
    opacity: 1;
    transform: translateY(0) scaleY(1);
}

/* Menu Links */
.menu-link {
    display: block;
    padding: 14px 20px;
    font-family: "Comic Neue", "Comic Sans MS", cursive;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    text-align: left;
    color: #333;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease, padding-left 0.2s ease;
    /* Rainbow text effect */
    background: linear-gradient(90deg, #FF0000, #FF7F00, #FFB700, #00FF00, #0000FF, #4B0082, #9400D3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.menu-link:first-child {
    border-radius: 8px 8px 0 0;
}

.menu-link:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.menu-link:hover {
    background: #f5f5f5;
    -webkit-text-fill-color: initial;
    padding-left: 25px;
}

.menu-link:focus {
    outline: 3px solid #0066cc;
    outline-offset: -3px;
}

/* Mobile Adjustments */
@media (max-width: 640px) {
    .page-title {
        font-size: 1.2rem;
    }
    
    #menu {
        right: 10px;
        width: 200px;
    }
    
    .menu-link {
        padding: 12px 16px;
        font-size: 1rem;
    }
    
    .menu-link:hover {
        padding-left: 20px;
    }
    
    .lang-link {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .hamburger {
        border: 3px solid white;
    }
    
    .menu-link:focus {
        outline-width: 4px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    #site-header,
    #menu-overlay,
    #menu,
    .hamburger {
        transition-duration: 0.01ms !important;
    }
}
