/* Header & Navigation Fixes */

/* Fix header layout issues */
.header {
    position: relative;
    z-index: 1000;
    background-color: #060e15;
    padding: 20px 20px 25px !important;
}

/* Fix navigation wrapper */
.c-header-wrapper-tate {
    max-width: 1275px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

/* Fix desktop navigation layout */
.c-navigation-desktop-tate {
    max-width: 1381px;
    justify-content: space-between;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
    display: flex !important;
    position: relative;
    min-height: 80px;
    padding: 10px 0;
}

/* Fix logo positioning */
.c-logo-wrapper {
    width: 130px !important;
    height: 130px !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    order: 2; /* Place in middle */
}

.logo-image {
    width: 100% !important;
    height: auto !important;
    max-height: 100px !important;
    object-fit: contain;
    margin-top: 0 !important;
}

/* Fix navigation links */
.c-nav-links {
    min-width: 290px;
    grid-column-gap: 15px;
    grid-row-gap: 15px;
    flex-wrap: wrap;
    display: flex !important;
    order: 1; /* Place on left */
}

.c-navlink-tate {
    height: 39px;
    color: rgba(255, 255, 255, .5) !important;
    text-transform: uppercase;
    border-radius: 5px;
    justify-content: center;
    align-items: center;
    padding-left: 15px;
    padding-right: 15px;
    font-family: Generalsans, sans-serif;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    display: flex;
    transition: all 0.3s ease;
}

.c-navlink-tate:hover {
    color: rgba(255, 255, 255, 0.8) !important;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Fix CTA button section */
.c-cta-btn {
    width: auto !important;
    min-width: 200px;
    justify-content: flex-end;
    align-items: center;
    display: flex !important;
    gap: 15px;
    order: 3; /* Place on right */
}

/* Fix header buttons */
.c-login-button-desktop,
.c-header-button {
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-family: Generalsans, sans-serif !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    min-height: 44px;
    box-sizing: border-box;
}

.c-login-button-desktop {
    background: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

.c-login-button-desktop:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    color: rgba(255, 255, 255, 1) !important;
}

.c-header-button {
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4) !important;
    border: none !important;
    color: white !important;
}

.c-header-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
}

/* Fix announcement bar */
.annaucement-bar {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 10px 0;
    text-align: center;
}

.acb-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    max-width: 1275px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-block-acb {
    color: rgba(255, 255, 255, 0.9);
    font-family: Generalsans, sans-serif;
    font-weight: 500;
    font-size: 14px;
}

/* Mobile Navigation Fixes */
.c-navigation-mobile {
    display: none !important;
}

@media (max-width: 991px) {
    .c-navigation-desktop-tate {
        display: none !important;
    }
    
    .c-navigation-mobile {
        display: block !important;
    }
    
    .mobile-nav-wrapper {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 20px;
    }
    
    .menu-button-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 8px;
        cursor: pointer;
    }
    
    .brand {
        flex: 1;
        display: flex;
        justify-content: center;
    }
    
    .mobile-brand {
        max-height: 60px;
        width: auto;
    }
    
    .login-button {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
    }
    
    .nav-menu-mobile {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: #060e15;
        transition: left 0.3s ease;
        z-index: 9999;
        padding: 80px 30px 30px;
        box-sizing: border-box;
    }
    
    .nav-menu-mobile.w--open {
        left: 0;
    }
    
    .nav-link {
        display: block;
        padding: 15px 0;
        color: rgba(255, 255, 255, 0.8);
        text-decoration: none;
        font-family: Generalsans, sans-serif;
        font-weight: 500;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-link:hover {
        color: rgba(255, 255, 255, 1);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header {
        padding: 15px 15px 20px !important;
    }
    
    .c-header-wrapper-tate {
        padding: 0 10px;
    }
    
    .acb-wrapper {
        padding: 0 15px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .text-block-acb {
        font-size: 12px;
    }
}

/* Fix font loading */
@font-face {
    font-family: 'Generalsans-Fallback';
    src: local('Arial'), local('Helvetica'), local('sans-serif');
    font-display: swap;
}

/* Ensure text is visible during font loading */
.c-navlink-tate,
.c-login-button-desktop,
.c-header-button,
.text-block-acb {
    font-family: Generalsans, 'Generalsans-Fallback', Arial, sans-serif !important;
}

/* Fix image loading issues */
img {
    max-width: 100%;
    height: auto;
}

/* Loading states */
.logo-image {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.logo-image[src=""] {
    background: rgba(255, 0, 0, 0.2);
}

.logo-image:not([src]),
.logo-image[src=""],
.logo-image[src*="placeholder"] {
    background: rgba(255, 255, 255, 0.1);
    position: relative;
}

.logo-image:not([src])::after,
.logo-image[src=""]::after {
    content: "Logo Loading...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-family: Arial, sans-serif;
}