/**
 * Navigation Bar Styles
 * Based on Renault Digital Standard Guide - Page 37
 * Structure:
 * - Left: Emblem (vertically centered) + Brand Text (top) + Menu (vertically centered, same left as text)
 * - Right: Search, Locations, Dealer Logo (all vertically centered)
 */


/* ============================================
   NAVIGATION BAR CONTAINER
   ============================================ */

#main-navbar.navbar-default {
    background-color: #000000 !important;
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    height: 70px; /* Fixed header height */
    min-height: 70px;
    max-height: 70px;
    padding: 0;
    position: relative;
    z-index: 1000;
    overflow: visible;
}

.navbar-container {
    display: flex;
    align-items: center; /* Vertically center all sections */
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    position: relative;
    box-sizing: border-box;
    height: 70px; /* Same as navbar */
    min-height: 70px;
    max-height: 70px;
}

/* ============================================
   LEFT SECTION: Emblem + Brand Text + Menu
   ============================================ */

.navbar-left-wrapper {
    display: flex;
    align-items: center; /* Vertically center the wrapper */
    flex: 1 1 auto;
    padding-left: 44px; /* 44px from left edge */
    height: 70px; /* Full header height */
    box-sizing: border-box;
    gap: 43px; /* Gap between emblem and brand text */
    position: relative;
    overflow: visible !important; /* Allow dropdowns to overflow */
}

/* Emblem Container: Vertically centered */
.navbar-emblem-container {
    display: flex;
    align-items: center; /* Vertically center emblem */
    justify-content: center;
    height: 70px; /* Full header height */
    flex-shrink: 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    text-decoration: none;
    height: auto;
}

/* Renault Emblem */
.renault-emblem {
    display: block;
    height: auto;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    margin: 0;
    vertical-align: middle;
}

.renault-emblem-placeholder {
    display: block;
    width: 50px;
    height: 50px;
    color: #ffffff;
    font-size: 30px;
    line-height: 50px;
    text-align: center;
    margin: 0;
    vertical-align: middle;
}

/* Brand Text + Menu Container */
.navbar-brand-menu-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Left-align horizontally */
    justify-content: space-between; /* Space text at top, menu at bottom */
    height: 70px; /* Full header height */
    flex-shrink: 0;
    position: relative;
    width: 100%;
    flex: 1;
    padding-top: 8px; /* Small padding from top */
    padding-bottom: 8px; /* Small padding from bottom */
    overflow: visible !important; /* Allow dropdowns to overflow */
}

/* Business Name Text: "RENAULT | City name" - Top-aligned, left-aligned */
.navbar-brand-text-container {
    display: flex;
    align-items: flex-start; /* Top-align text */
    justify-content: flex-start; /* Left-align horizontally */
    margin-bottom: 2px; /* Small gap between text and menu */
    flex-shrink: 0;
    width: auto; /* Only as wide as content */
    order: 1; /* First - appears at top */
    padding-left: 0; /* No padding - starts exactly where RENAULT starts */
}

.navbar-brand-text {
    font-family: 'NouvelR', sans-serif;
    color: #ffffff !important;
    white-space: nowrap;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.brand-name-bold {
    font-size: 18px; /* DECA size */
    line-height: 20px;
    font-weight: 700;
    text-transform: uppercase;
}

.brand-separator {
    font-size: 18px; /* DECA size */
    line-height: 20px;
    font-weight: 700;
    text-transform: uppercase;
}

.brand-city-name {
    font-size: 18px; /* DECA size */
    line-height: 20px;
    font-weight: 400; /* Regular weight for city name */
    text-transform: uppercase;
}


/* General menu section (for backward compatibility) */
.navbar-menu-section {
    display: flex !important;
    align-items: center; /* Vertically center menu */
    justify-content: flex-start; /* Left-align menu horizontally */
    width: auto; /* Only as wide as menu items */
    padding: 0;
    margin: 0;
    margin-top: 0;
    margin-left: 0 !important; /* No left margin - starts exactly where RENAULT starts */
    padding-left: 0 !important; /* No left padding - aligns with RENAULT */
    min-height: auto;
    box-sizing: border-box;
    height: auto !important;
    overflow: visible !important;
    visibility: visible !important; /* Ensure menu is visible */
    opacity: 1 !important; /* Ensure menu is fully opaque */
    flex-shrink: 0;
    /* Positioned below text using flex order */
    order: 2; /* Second - appears below text */
    position: relative; /* Use flex order, not absolute */
}

.navbar-menu-section .navbar-nav {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
    padding-left: 0 !important; /* No left padding - aligns with RENAULT */
    flex-wrap: nowrap; /* Keep items on one line */
    gap: 0; /* No gap - spacing handled by padding */
    visibility: visible !important; /* Ensure nav is visible */
    opacity: 1 !important; /* Ensure nav is fully opaque */
    overflow: visible !important; /* Allow dropdowns to overflow */
    position: relative; /* For absolute positioning of dropdowns */
}

.navbar-menu-section .navbar-nav > li {
    margin: 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
    position: relative; /* For absolute positioning of dropdowns */
    overflow: visible !important; /* Allow dropdowns to overflow */
}

.navbar-menu-section .navbar-nav > li > a {
    color: #ffffff !important;
    font-family: 'NouvelR', sans-serif;
    font-size: 13px; /* Nav text size */
    line-height: 16px;
    font-weight: 700; /* Bold weight for menu items as per image */
    text-transform: uppercase;
    padding: 8px 15px; /* Even spacing between menu items */
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    white-space: nowrap;
}

.navbar-menu-section .navbar-nav > li > a:hover,
.navbar-menu-section .navbar-nav > li > a:focus {
    color: #EFDF00 !important; /* Primary yellow */
    background-color: transparent;
    text-decoration: none;
}

/* ============================================
   DROPDOWN SUBMENUS (Level 2 & Level 3)
   ============================================ */
/* Desktop menu dropdown styles moved to desktop-menu.css */

/* First menu item starts exactly where RENAULT starts (Desktop only) */
@media (min-width: 992px) {
    .navbar-menu-section .navbar-nav > li:first-child > a {
        padding-left: 0 !important; /* No left padding - aligns perfectly with RENAULT */
        padding-right: 15px; /* Keep right padding for spacing */
        margin-left: 0 !important; /* No left margin */
    }
    
    /* Ensure menu section aligns with brand text */
    .navbar-menu-section {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
    
    .navbar-menu-section .navbar-nav {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
}

/* Hide desktop menu on mobile devices */
@media (max-width: 991px) {
    /* Hide desktop left section (emblem, brand text, menu) */
    .navbar-left-wrapper {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    
    /* Hide desktop right section (utility icons, dealer logo) */
    .navbar-right-section {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    
    /* Hide desktop menu section */
    .navbar-menu-section {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    
    .navbar-menu-section .navbar-nav {
        display: none !important;
    }
}



/* ============================================
   RIGHT SECTION: Utility Icons + Dealer Logo
   All vertically centered in header
   ============================================ */

.navbar-right-section {
    display: flex;
    align-items: center; /* Vertically center all elements */
    justify-content: flex-end;
    flex: 0 0 auto;
    margin-left: auto;
    padding-right: 24px; /* 24px from right edge */
    height: 70px; /* Full header height */
    min-height: 70px;
    gap: 20px;
    box-sizing: border-box;
}

/* Utility Icons */
.navbar-utils {
    display: flex;
    align-items: center; /* Vertically center icons */
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 10px; /* Reduced gap between icons */
}

.navbar-utils li {
    margin: 0;
    padding: 0;
}

.navbar-utils a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
    transition: color 0.3s ease;
    padding: 2px; /* Reduced padding */
    overflow: visible;
    min-width: auto;
    min-height: auto;
}

.navbar-utils a:hover,
.navbar-utils a:focus {
    color: #EFDF00; /* Primary yellow */
    text-decoration: none;
}

.navbar-utils .glyphicon,
.navbar-utils .navbar-icon {
    font-size: 14px; /* Reduced from 18px */
    margin-bottom: 2px; /* Reduced margin */
    display: block;
    width: auto;
    height: auto;
    min-width: 14px; /* Reduced from 18px */
    min-height: 14px; /* Reduced from 18px */
    color: #ffffff;
    flex-shrink: 0;
}

.navbar-utils .navbar-icon {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible !important;
}

.navbar-utils .navbar-icon svg {
    width: auto !important;
    height: auto !important;
    min-width: 14px !important; /* Reduced from 18px */
    min-height: 14px !important; /* Reduced from 18px */
    max-width: 14px !important; /* Added max-width for consistency */
    max-height: 14px !important; /* Added max-height for consistency */
    fill: #ffffff !important;
    color: #ffffff !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    box-sizing: content-box !important;
    padding: 0 !important;
    margin: 0 !important;
}

.navbar-utils .custom-icon {
    font-size: 14px; /* Reduced from 18px */
    margin-bottom: 2px; /* Reduced margin */
    display: inline-block;
}

.navbar-utils .utils-label {
    font-family: 'NouvelR', sans-serif;
    font-size: 10px; /* Reduced from 12px */
    line-height: 12px; /* Reduced from 15px */
    font-weight: 400;
    text-transform: none;
    white-space: nowrap; /* Prevent text wrapping */
}

/* Dealer Logo */
.navbar-dealer-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Vertically center logo */
    margin-left: 20px;
    height: 70px; /* Full header height */
}

.navbar-dealer-logo a {
    text-decoration: none;
    display: block;
}

.dealer-logo {
    display: block;
    object-fit: contain;
    margin-bottom: 4px;
    /* Default: 83px × 83px (as per guidelines) */
    width: 83px;
    height: 83px;
    max-width: 83px;
    max-height: 83px;
    flex-shrink: 0;
}

.dealer-name-text {
    text-align: center;
    margin-top: 0;
    line-height: 1.2;
}

.dealer-name-text div {
    font-family: 'NouvelR', sans-serif;
    font-size: 12px; /* Sous-mention size */
    line-height: 15px;
    font-weight: 400;
    color: #ffffff;
    text-transform: none;
    white-space: nowrap;
    margin: 0;
    padding: 0;
}


