/**
 * Additional CSS fixes for Labtronik Website
 */

/* Make the navbar layout work better with contact info */
.navbar {
    justify-content: space-between;
    flex-wrap: wrap;
    position: static; /* Ensures navbar doesn't cover other elements */
}

.navbar > .navbar-brand {
    flex: 0 0 auto;
    margin-right: 0;
    z-index: 1;
}

.header-contact-info {
    order: 2;
    flex: 1 1 auto;
    justify-content: flex-end;
}

.navbar > .d-flex {
    order: 3;
    flex: 0 0 auto;
}

.navbar > .navbar-collapse {
    order: 4;
    flex: 0 0 100%;
    position: static; /* Prevent covering yellow strip on desktop */
}

/* Ensure mobile menu stays on top */
.navbar-collapse.show {
    height: auto !important;
}

/* Close button for mobile menu */
.close-menu-btn {
    /* Changed from display:none to make sure it appears when needed */
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px; /* Slightly larger to make more clickable */
    height: 40px; /* Slightly larger to make more clickable */
    border-radius: 50%;
    background-color: rgba(0,0,0,0.1); /* Slightly darker for better visibility */
    border: none;
    color: #333;
    font-size: 24px; /* Larger icon */
    cursor: pointer;
    z-index: 10000; /* Very high z-index to ensure it's on top */
    transition: all 0.2s ease;
}

.close-menu-btn:hover {
    background-color: rgba(0,0,0,0.1);
}

/* Desktop navbar style */
@media (min-width: 992px) {
    .navbar-collapse {
        position: static !important; /* Override any position settings for desktop */
    }
    
    .navbar .navbar-nav {
        display: flex !important;
        margin-top: 0 !important;
    }
}

@media (max-width: 991px) {
    .navbar-collapse.show .close-menu-btn {
        display: flex;
    }
    
    /* Better spacing for mobile menu items */
    .navbar-nav {
        padding: 40px 0 10px;
        width: 100%;
    }
    
    .navbar-nav .nav-item {
        margin: 0;
        width: 100%;
    }
    
    .navbar-nav .nav-link {
        padding: 15px 5px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        font-weight: 500;
        color: #333;
        font-size: 16px;
    }
    
    .navbar-nav .nav-link:active,
    .navbar-nav .nav-link:hover {
        background-color: rgba(0, 0, 0, 0.02);
    }
    
    .navbar-nav .nav-item:last-child .nav-link {
        border-bottom: none;
    }      /* Add Labtronik logo and since-1995 text to top of mobile menu */
    .navbar-collapse::before {
        content: '';
        display: block;
        background-image: url('../images/logo.png');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: left center;
        height: 30px;
        width: 120px;
        margin-bottom: 20px;
        position: relative;
    }    /* Add since 1995 text below logo in mobile menu */
    .navbar-collapse::after {
        content: attr(data-since);
        display: block;
        font-family: 'Times New Roman', serif;
        font-style: italic;
        font-size: 0.85rem;
        color: #003366;
        margin-bottom: 18px;
        text-align: center;
        width: 120px;
        margin-top: 5px;
        position: relative;
        top: 35px;
        right: 15px;
        right: 20px;
        letter-spacing: 0.05em;
        font-weight: 500;
    }
}
