/* BIM Portal Common Styles */
.bg-dark-primary {
    background: rgba(10, 14, 39, 0.95) !important;
    backdrop-filter: blur(20px);
}

.border-cyan-glow {
    border-color: rgba(0, 245, 255, 0.2) !important;
}

/* Header styles */
.header {
    position: sticky;
    top: 0;
    box-shadow: 0 4px 20px rgba(0, 245, 255, 0.1);
}

.header-content {
    position: relative;
    padding: 1rem 0;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-title h1 {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(90deg, #00f5ff, #0099ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.site-title p {
    color: #8b9dc3;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Navigation container and spacing */
.nav-container {
    display: flex !important;
    align-items: center !important;
    gap: 2rem !important;
}

/* Navigation link hover effects */
.nav-link {
    position: relative !important;
    transition: all 0.3s ease !important;
    padding: 0.75rem 1rem !important;
    margin: 0 0.5rem !important;
    border-radius: 0.375rem !important;
    color: #d1d5db !important;
    font-weight: 500 !important;
    font-size: 1rem !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

.nav-link:hover {
    color: #00f5ff !important;
    background: rgba(0, 245, 255, 0.1) !important;
}

.nav-link.active {
    color: #00f5ff !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00f5ff, #0099ff);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Sign In Button Styles */
.auth-section {
    display: flex;
    align-items: center;
}

.sign-in-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #00f5ff 0%, #0099ff 100%);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 245, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.sign-in-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.sign-in-btn:hover::before {
    left: 100%;
}

.sign-in-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 245, 255, 0.4);
    text-decoration: none;
    color: #fff;
}

.sign-in-btn svg {
    transition: transform 0.3s ease;
}

.sign-in-btn:hover svg {
    transform: translateX(2px);
}

/* Center Section Styles */
.center-section {
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: center;
    padding: 0 2rem;
}

.header-country-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Footer styles */
.footer {
    background: rgba(10, 14, 39, 0.95) !important;
    border-top: 1px solid rgba(0, 245, 255, 0.2) !important;
    color: #fff !important;
}

.footer-content {
    color: #fff !important;
}

.footer-brand {
    margin-bottom: 2rem;
}

.footer-brand h3 {
    color: #00f5ff !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin-bottom: 1rem !important;
}

.footer-brand p {
    color: #8b9dc3 !important;
    line-height: 1.6 !important;
    font-size: 0.95rem !important;
}

.footer-links {
    margin-bottom: 1.5rem;
}

.footer-links h4 {
    color: #00f5ff !important;
    font-weight: 600 !important;
    margin-bottom: 1rem !important;
    font-size: 1.1rem !important;
}

.footer-links ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer-links li {
    margin-bottom: 0.5rem !important;
}

.footer-links a {
    color: #8b9dc3 !important;
    transition: color 0.3s ease !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
}

.footer-links a:hover {
    color: #00f5ff !important;
}

.footer-bottom {
    border-top: 1px solid rgba(0, 245, 255, 0.2) !important;
    padding-top: 1.5rem !important;
    text-align: center !important;
    color: #5a6a85 !important;
    font-size: 0.875rem !important;
    margin-top: 2rem !important;
}

/* Mobile menu dark theme and positioning */
#mobile-menu {
    background: rgba(10, 14, 39, 0.98);
    backdrop-filter: blur(20px);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Ensure mobile menu starts hidden */
#mobile-menu.hidden {
    display: none !important;
}

/* When mobile menu is shown */
#mobile-menu:not(.hidden) {
    display: block !important;
}

/* Force responsive navigation visibility */
@media (max-width: 1023px) {
    /* Hide desktop navigation on mobile/tablet - More specific selectors */
    nav .nav-container,
    .header .nav-container,
    div.nav-container {
        display: none !important;
    }

    /* Show mobile menu button container - More specific selectors */
    nav div.lg\:hidden,
    .header div.lg\:hidden,
    div.lg\:hidden.flex {
        display: flex !important;
        align-items: center !important;
        visibility: visible !important;
    }

    /* Ensure mobile menu button is visible */
    #mobile-menu-button {
        display: flex !important;
        visibility: visible !important;
    }

    /* Ensure mobile menu stays hidden by default on mobile */
    #mobile-menu.hidden {
        display: none !important;
    }

    /* Only show mobile menu when not hidden */
    #mobile-menu:not(.hidden) {
        display: block !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 50 !important;
    }
}

@media (min-width: 1024px) {
    /* Show desktop navigation on large screens */
    .nav-container.hidden.lg\:flex,
    .nav-container {
        display: flex !important;
        align-items: center !important;
        gap: 2rem !important;
    }

    /* Hide mobile menu button on desktop */
    .lg\\:hidden.flex.items-center,
    div.lg\\:hidden {
        display: none !important;
    }
}

/* Mobile Responsive Styles */
@media (max-width: 1024px) {
    /* Header adjustments for tablets */
    .header-content {
        padding: 0.75rem 2rem;
    }

    .logo-section {
        gap: 0.75rem;
    }

    .site-title h1 {
        font-size: 1.1rem;
    }

    .site-title p {
        font-size: 0.8rem;
    }

    /* Sign-in button tablet adjustments */
    .sign-in-btn {
        color: #fff;
        padding: 0.625rem 1.25rem;
        font-size: 0.85rem;
    }

    /* Center section tablet adjustments */
    .center-section {
        padding: 0 1rem;
    }

    .header-country-text {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    /* Mobile header fixes */
    .header-content {
        padding: 0.5rem 0;
    }

    .flex.justify-between.h-20 {
        height: auto !important;
        min-height: 4rem;
        padding: 0.5rem 0;
    }

    .logo-section {
        gap: 0.5rem;
        flex: 1;
        min-width: 0;
    }

    .logo img {
        height: 2.5rem !important;
        width: auto;
    }

    .site-title {
        min-width: 0;
        flex: 1;
    }

    .site-title h1 {
        font-size: 0.95rem !important;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .site-title p {
        font-size: 0.7rem !important;
        line-height: 1.1;
        margin-top: 0.125rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Mobile menu button */
    #mobile-menu-button {
        padding: 0.5rem !important;
        margin-left: 0.5rem;
        flex-shrink: 0;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(0, 245, 255, 0.1) !important;
        border: 1px solid rgba(0, 245, 255, 0.3) !important;
        border-radius: 0.375rem !important;
        color: #00f5ff !important;
    }

    #mobile-menu-button:hover {
        background: rgba(0, 245, 255, 0.2) !important;
        border-color: rgba(0, 245, 255, 0.5) !important;
    }

    #mobile-menu-button svg {
        width: 1.5rem !important;
        height: 1.5rem !important;
        color: #00f5ff !important;
    }

    /* Mobile menu improvements */
    #mobile-menu {
        border-radius: 0.5rem;
        border: 1px solid rgba(0, 245, 255, 0.2);
    }

    #mobile-menu a {
        font-size: 0.9rem !important;
        padding: 0.75rem 1rem !important;
    }

    /* Sign-in button mobile adjustments */
    .sign-in-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        gap: 0.375rem;
    }

    .sign-in-btn svg {
        width: 16px;
        height: 16px;
    }

    /* Center section mobile adjustments */
    .center-section {
        display: none;
    }
}

@media (max-width: 480px) {
    /* Extra small mobile devices */
    .header-content {
        padding: 0.25rem 0;
    }

    .flex.justify-between.h-20 {
        min-height: 3.5rem;
    }

    .logo img {
        height: 2rem !important;
    }

    .site-title h1 {
        font-size: 0.85rem !important;
    }

    .site-title p {
        font-size: 0.65rem !important;
    }

    .max-w-7xl.mx-auto.px-4 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    /* Sign-in button extra small mobile adjustments */
    .sign-in-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
        gap: 0.25rem;
    }

    .sign-in-btn svg {
        width: 14px;
        height: 14px;
    }
}
