/* Modern Header & Logo Enhancements */
/* ================================== */

/* Enhanced Top Header */
header .top-header {
    background: linear-gradient(135deg, 
        rgba(15, 15, 35, 0.95) 0%, 
        rgba(26, 26, 46, 0.95) 25%, 
        rgba(22, 33, 62, 0.95) 50%, 
        rgba(15, 52, 96, 0.95) 75%, 
        rgba(83, 52, 131, 0.95) 100%) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    position: relative;
    overflow: hidden;
    padding: 20px 0 !important;
}

/* Animated background elements */
header .top-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(102, 126, 234, 0.05) 50%, 
        transparent 70%);
    animation: headerShimmer 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes headerShimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

/* Enhanced Header Layout */
header .block-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 30px !important;
    position: relative;
    z-index: 2;
}

/* Modern Logo Enhancements */
.block-logo {
    flex: 0 0 auto !important;
    position: relative;
}

.brand-logo.modern-logo {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 28px !important;
    font-weight: 900 !important;
    text-decoration: none !important;
    position: relative;
    transition: all 0.3s ease !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
}

.brand-logo.modern-logo:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

/* Enhanced Logo Text - Flat Design */
.logo-part-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-weight: 900 !important;
    margin-right: 2px !important;
    position: relative;
    text-shadow: none !important;
    filter: none !important;
}

.logo-part-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-weight: 900 !important;
    position: relative;
    text-shadow: none !important;
    filter: none !important;
}


/* Enhanced Search Bar */
.block-search {
    flex: 1 !important;
    max-width: 500px !important;
    margin: 0 20px !important;
}

.block-search .form-control {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 2px solid rgba(102, 126, 234, 0.2) !important;
    border-radius: 25px !important;
    color: white !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    padding: 15px 50px 15px 20px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
    height: auto !important;
}

.block-search .form-control:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2), 
                0 8px 32px rgba(102, 126, 234, 0.3) !important;
    transform: translateY(-2px) !important;
    background: rgba(255, 255, 255, 0.12) !important;
}

.block-search .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
    font-style: italic !important;
}

/* Enhanced Mobile Menu Button */
.trigger-mobile-menu {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 2px solid rgba(102, 126, 234, 0.2) !important;
    border-radius: 12px !important;
    padding: 12px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
}

.trigger-mobile-menu:hover {
    background: rgba(102, 126, 234, 0.2) !important;
    border-color: #667eea !important;
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.3) !important;
}

.trigger-mobile-menu img {
    filter: brightness(0) invert(1) !important;
    width: 24px !important;
    height: 24px !important;
    transition: transform 0.3s ease !important;
}

.trigger-mobile-menu:hover img {
    transform: rotate(90deg) !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .block-search {
        max-width: 400px !important;
    }
    
    .brand-logo.modern-logo {
        font-size: 24px !important;
        padding: 10px 16px !important;
    }
}

@media (max-width: 992px) {
    header .block-header {
        gap: 20px !important;
    }
    
    .block-search {
        max-width: 300px !important;
    }
    
    .brand-logo.modern-logo {
        font-size: 22px !important;
        padding: 8px 14px !important;
    }
}

@media (max-width: 768px) {
    header .top-header {
        padding: 15px 0 !important;
    }
    
    .block-search {
        display: none !important;
    }
    
    .block-header {
        justify-content: space-between !important;
    }
    
    .brand-logo.modern-logo {
        font-size: 20px !important;
        padding: 8px 12px !important;
    }
    
    .trigger-mobile-menu {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

@media (max-width: 480px) {
    .brand-logo.modern-logo {
        font-size: 18px !important;
        padding: 6px 10px !important;
    }
    
    .trigger-mobile-menu {
        padding: 10px !important;
    }
    
    .trigger-mobile-menu img {
        width: 20px !important;
        height: 20px !important;
    }
}

/* Logo Animation on Page Load */
@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.8);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-5px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.brand-logo.modern-logo {
    animation: logoEntrance 0.8s ease-out;
}

/* Search Bar Animation */
@keyframes searchEntrance {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.block-search {
    animation: searchEntrance 0.8s ease-out 0.2s both;
}

/* Mobile Menu Button Animation */
@keyframes menuButtonEntrance {
    0% {
        opacity: 0;
        transform: translateX(30px) rotate(-90deg);
    }
    100% {
        opacity: 1;
        transform: translateX(0) rotate(0deg);
    }
}

.trigger-mobile-menu {
    animation: menuButtonEntrance 0.8s ease-out 0.4s both;
}

/* Header Glow Effect */
header .top-header {
    position: relative;
}

header .top-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(102, 126, 234, 0.5) 25%, 
        rgba(247, 51, 252, 0.5) 50%, 
        rgba(102, 126, 234, 0.5) 75%, 
        transparent 100%);
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .brand-logo.modern-logo,
    .block-search,
    .trigger-mobile-menu,
    header .top-header::before,
    header .top-header::after {
        animation: none !important;
        transition: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    header .top-header {
        background: rgba(0, 0, 0, 0.95) !important;
        border-bottom: 3px solid white !important;
    }
    
    .brand-logo.modern-logo {
        background: white !important;
        color: black !important;
        border: 2px solid white !important;
    }
    
    .logo-part-1,
    .logo-part-2 {
        -webkit-text-fill-color: black !important;
        background: white !important;
    }
}
