/* Modern Navigation and Top Bar Styles */

/* Top Bar */
.top-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 0;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.top-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-bar-left a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.top-bar-left a:hover {
    opacity: 0.9;
}

.top-bar-left a svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-bar-social {
    display: flex;
    gap: 10px;
}

.top-bar-social a {
    color: white;
    font-size: 16px;
    transition: transform 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.top-bar-social a:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.3);
}

/* Main Header */
.site-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.main-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s;
    height: 60px;
    max-width: 200px;
}

.site-logo:hover {
    transform: scale(1.05);
}

.site-logo img {
    height: 60px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    /* Ensure high-quality rendering for scaled images */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: auto;
    -ms-interpolation-mode: bicubic;
    /* Prevent blurring on scaling */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    /* Force hardware acceleration for better rendering */
    will-change: transform;
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.main-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
    align-items: center;
}

.main-nav-menu li {
    position: relative;
}

.main-nav-menu li a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    padding: 10px 0;
    display: block;
    transition: color 0.3s;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.main-nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
}

.main-nav-menu li a:hover,
.main-nav-menu li.current-menu-item a {
    color: #667eea;
}

.main-nav-menu li a:hover::after,
.main-nav-menu li.current-menu-item a::after {
    width: 100%;
}

/* Header Social Icons */
.header-social-icons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-social-icons a {
    color: #667eea;
    font-size: 18px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0f0f0;
}

.header-social-icons a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
}

/* Mobile Header */
.mobile-header {
    display: none !important;
    padding: 15px 20px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.mobile-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-logo {
    display: flex;
    align-items: center;
    height: 50px;
    max-width: 180px;
}

.mobile-logo img {
    height: 50px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    /* Ensure high-quality rendering */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: auto;
    -ms-interpolation-mode: bicubic;
    /* Prevent blurring on scaling */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: transform 0.3s;
}

.mobile-menu-toggle.active {
    transform: rotate(90deg);
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #667eea;
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 20px 0;
    display: none;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid #eee;
    margin-top: 15px;
}

.mobile-nav-menu.show {
    display: flex;
}

.mobile-nav-menu li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-menu li a {
    display: block;
    padding: 15px 0;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.mobile-nav-menu li a:hover,
.mobile-nav-menu li.current-menu-item a {
    color: #667eea;
    padding-left: 10px;
}

.mobile-social-icons {
    display: flex;
    gap: 15px;
    padding: 20px 0 0;
    border-top: 1px solid #eee;
    margin-top: 15px;
}

.mobile-social-icons a {
    color: #667eea;
    font-size: 20px;
}

/* Responsive */
@media (max-width: 921px) {
    .top-bar.desktop-header {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    
    header.desktop-header,
    header.site-header.desktop-header,
    #new-masthead.desktop-header {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
    }
    
    .mobile-header {
        display: block !important;
        visibility: visible !important;
        position: sticky;
        top: 0;
        z-index: 1000;
    }
}

@media (min-width: 922px) {
    .mobile-header,
    #mobile-masthead {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
    }
    
    header.desktop-header,
    header.site-header.desktop-header,
    #new-masthead.desktop-header,
    .top-bar.desktop-header {
        display: block !important;
        visibility: visible !important;
    }
}

/* Smooth Transitions */
* {
    transition: background-color 0.3s, color 0.3s, transform 0.3s;
}

