/* Navbar Fixes for Sticky Navigation */

/* Fix sticky navbar and remove white gap issue */
header.site-header,
.site-header,
nav.navbar {
    position: sticky !important;
    top: 0;
    z-index: 1050;
    background: #fff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

/* Remove body padding that causes white gap */
body {
    padding-top: 0 !important;
}

/* Ensure no unwanted margins */
.navbar {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

/* Fix white block issue - ensure transparent backgrounds */
.navbar-container,
.header-wrapper,
.top-social3 {
    background: transparent !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Mobile specific adjustments */
@media (max-width: 767.98px) {
    body {
        padding-top: 56px; /* Smaller padding for mobile */
        padding-bottom: 60px; /* For bottom navigation */
    }
    
    /* Mobile top navigation improvements */
    .mobile-top-nav {
        height: 56px;
        box-shadow: 0 2px 4px rgba(0,0,0,.1);
    }
    
    /* Improve mobile navbar spacing */
    .mobile-top-nav .navbar-toggler {
        padding: 0.25rem 0.5rem;
        font-size: 1.25rem;
    }
    
    /* Center logo properly */
    .mobile-top-nav .navbar-brand {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* Mobile bottom navigation styling */
    .mobile-bottom-nav {
        background-color: #fff;
        box-shadow: 0 -2px 4px rgba(0,0,0,.1);
        padding: 0.5rem 0;
    }
    
    /* Better touch targets for mobile */
    .mobile-bottom-nav .nav-link {
        padding: 0.5rem;
        min-height: 44px; /* iOS touch target size */
    }
}

/* Desktop navbar improvements */
@media (min-width: 768px) {
    /* Remove cramped feeling from navbar */
    .navbar .container-fluid {
        padding: 0 2rem;
    }
    
    /* Better spacing for nav items */
    .navbar-nav .nav-item {
        margin: 0 0.5rem;
    }
    
    /* Fix social icons spacing */
    .navbar-social-container {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-left: 1rem;
    }
    
    .navbar-social-container .social-icon {
        font-size: 1.2rem;
        color: #6c757d;
        transition: color 0.3s ease;
    }
    
    .navbar-social-container .social-icon:hover {
        color: #0F75BD;
    }
}

/* Fix navbar collapse on mobile */
@media (max-width: 991.98px) {
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        box-shadow: 0 4px 6px rgba(0,0,0,.1);
        max-height: calc(100vh - 56px);
        overflow-y: auto;
    }
    
    /* Full-width dropdown items on mobile */
    .navbar-collapse .nav-item {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #e9ecef;
    }
    
    .navbar-collapse .nav-link {
        padding: 1rem;
    }
}

/* Fix language dropdown */
.language-container-landing {
    margin-left: auto;
}

.language-menu {
    max-height: 400px;
    overflow-y: auto;
}

/* Fix services dropdown */
.services-dropdown {
    white-space: nowrap;
}

.services-li .dropdown-menu {
    min-width: 280px;
}

/* Sign out button fixes */
.navbar .btn-link.nav-link {
    text-decoration: none;
    padding: 0.5rem 1rem !important;
    margin: 0 !important;
    line-height: normal !important;
}

/* Remove inline styles progressively */
@media (min-width: 992px) {
    .navbar .btn-link.nav-link {
        margin-top: 0 !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
}

/* Smooth scroll behavior when clicking anchors */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 76px; /* Account for fixed navbar */
}

/* Active state for current page */
.navbar-nav .nav-item .nav-link.active {
    color: #0F75BD;
    font-weight: 600;
}

/* Improve navbar brand/logo */
.navbar-brand img {
    height: 40px;
    width: auto;
    max-width: 100px;
}

/* Better hover states */
.navbar-nav .nav-link {
    transition: color 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: #0F75BD;
}

/* Add underline animation on hover */
.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #0F75BD;
    transition: width 0.3s ease, left 0.3s ease;
}

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

/* Fix overlapping content issues */
.top-social3.margin-top-20 {
    margin-top: 0 !important; /* Remove extra margin that breaks sticky */
}

/* Ensure navbar stays on top of all content */
.navbar {
    z-index: 1030 !important;
}

/* Better mobile menu animation */
.navbar-collapse.collapsing {
    transition: height 0.35s ease;
}

.navbar-collapse.show {
    animation: slideDown 0.35s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}