/*
============================================================
SORIANO'S MOBILE AUTO CARE
GLOBAL HEADER / NAVIGATION
============================================================

This stylesheet contains ONLY global header/navigation styles.

Includes:
- Fixed navbar
- Logo
- Main navigation
- Services dropdown
- Get a Quote button
- Social icons
- Phone button
- Mobile menu

============================================================
*/

/* ==========================================================
   1. NAVBAR
   ========================================================== */

.navbar {
    background: linear-gradient(
        to bottom,
        rgba(0, 10, 20, 0.95),
        rgba(0, 10, 20, 0.85)
    );
    height: 80px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 132, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ==========================================================
   2. NAVIGATION CONTAINER
   ========================================================== */

.nav-container {
    width: 90%;
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================
   3. LOGO
   ========================================================== */

.nav-logo-wrapper {
    position: relative;
    height: 80px;
    display: flex;
    align-items: center;
    z-index: 1010;
}

.nav-logo-wrapper a {
    display: block;
    line-height: 0;
}

.main-logo-img {
    height: 110px;
    width: auto;
    object-fit: contain;
    position: absolute;
    top: 50%;
    transform: translateY(-42%);
    transition: transform 0.3s ease, filter 0.3s ease;
    filter:
        drop-shadow(0 8px 12px rgba(0, 0, 0, 0.7))
        drop-shadow(0 0 4px rgba(0, 132, 255, 0.2));
}

.nav-logo-wrapper a:hover .main-logo-img {
    transform: translateY(-40%) scale(1.03);
    filter:
        drop-shadow(0 10px 16px rgba(0, 0, 0, 0.8))
        drop-shadow(0 0 8px rgba(0, 195, 255, 0.4));
}

.nav-logo-fallback {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
}

.nav-logo-fallback span {
    color: #0084ff;
}

/* ==========================================================
   4. MAIN NAVIGATION
   ========================================================== */

.nav-links {
    display: flex;
    list-style: none;
    gap: 35px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links > li {
    position: relative;
}

.nav-links a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #00c3ff;
}

/* ==========================================================
   5. SERVICES DROPDOWN
   ========================================================== */

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.nav-dropdown-toggle i {
    font-size: 0.65rem;
    transition: transform 0.25s ease;
}

.nav-dropdown:hover .nav-dropdown-toggle i,
.nav-dropdown:focus-within .nav-dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 18px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);

    min-width: 230px;
    margin: 0;
    padding: 10px 0;

    list-style: none;
    background: rgba(3, 9, 20, 0.98);
    border: 1px solid rgba(0, 132, 255, 0.28);
    border-top: 2px solid #0084ff;
    border-radius: 0 0 8px 8px;

    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;

    z-index: 1100;
}

/* Small visual bridge between Services and dropdown */
.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
    width: 100%;
    margin: 0;
}

.dropdown-menu li a {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 13px 20px;

    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.4px;

    text-transform: uppercase;
    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        padding-left 0.25s ease;
}

.dropdown-menu li a:hover,
.dropdown-menu li a:focus {
    color: #00c3ff;
    background: rgba(0, 132, 255, 0.12);
    padding-left: 25px;
}

/* ==========================================================
   6. GET A QUOTE BUTTON
   ========================================================== */

.btn-nav-quote {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 20px;
    border-radius: 6px;

    background: linear-gradient(135deg, #0084ff, #0056b3);
    color: #ffffff !important;

    font-weight: 800 !important;
    box-shadow: 0 4px 15px rgba(0, 132, 255, 0.30);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
}

.btn-nav-quote:hover {
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 132, 255, 0.45);
    filter: brightness(1.08);
}

/* ==========================================================
   7. SOCIAL LINKS
   ========================================================== */

.nav-social-group {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 10px;
    margin-right: 5px;
}

.nav-social-group a {
    color: #cbd5e1;
    font-size: 1.15rem;
    text-decoration: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    transition: all 0.3s ease;
}

.nav-social-group a:hover {
    color: #ff9900;
    transform: translateY(-2px);
    text-shadow: 0 0 10px rgba(255, 153, 0, 0.4);
}

/* ==========================================================
   8. PHONE BUTTON
   ========================================================== */

.btn-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(135deg, #0084ff, #0056b3);
    padding: 12px 24px;
    border-radius: 6px;

    color: #ffffff !important;
    font-weight: 800 !important;

    box-shadow: 0 4px 15px rgba(0, 132, 255, 0.3);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
}

.btn-nav:hover {
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 132, 255, 0.45);
    filter: brightness(1.08);
}

/* ==========================================================
   9. MOBILE MENU BUTTON
   ========================================================== */

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;

    color: #00c3ff;
    font-size: 1.6rem;
    line-height: 1;

    z-index: 1010;
}

/* ==========================================================
   10. RESPONSIVE / MOBILE NAVIGATION
   ========================================================== */

@media (max-width: 768px) {

    .navbar {
        height: 80px;
    }

    .nav-container {
        width: 92%;
    }

    .main-logo-img {
        height: 90px;
        transform: translateY(-45%);
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none !important;
        flex-direction: column !important;

        position: absolute !important;
        top: 80px;
        left: 0;

        width: 100%;

        background-color: rgba(3, 9, 20, 0.98) !important;
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);

        border-bottom: 3px solid #0084ff;

        padding: 20px 0 !important;
        margin: 0 !important;
        gap: 0 !important;

        box-shadow: 0 15px 25px rgba(0, 0, 0, 0.6);

        z-index: 9999;
    }

    .nav-links.show {
        display: flex !important;
    }

    .nav-links > li {
        width: 100%;
        text-align: center;
        margin: 10px 0;
        padding: 0 20px;
    }

    .nav-links > li > a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 8px 0;
    }

    /* Mobile Services dropdown */
    .nav-dropdown {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .nav-dropdown-toggle {
        justify-content: center;
    }

    .dropdown-menu {
        position: static;
        transform: none;

        width: 100%;
        min-width: 0;

        margin-top: 5px;
        padding: 5px 0;

        background: rgba(0, 132, 255, 0.07);
        border: 1px solid rgba(0, 132, 255, 0.18);
        border-radius: 6px;

        box-shadow: none;

        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        pointer-events: none;

        transition:
            opacity 0.25s ease,
            max-height 0.3s ease,
            visibility 0.25s ease;
    }

    .dropdown-menu::before {
        display: none;
    }

    .nav-dropdown:hover .dropdown-menu,
    .nav-dropdown:focus-within .dropdown-menu {
        opacity: 1;
        visibility: visible;
        max-height: 320px;
        pointer-events: auto;
    }

    .dropdown-menu li a {
        justify-content: center;
        padding: 12px 15px;
        font-size: 0.76rem;
    }

    .dropdown-menu li a:hover,
    .dropdown-menu li a:focus {
        padding-left: 15px;
    }

    .btn-nav-quote {
        display: inline-flex !important;
        width: 80% !important;
        margin: 5px auto;
    }

    .nav-social-item {
        margin-top: 8px !important;
    }

    .nav-social-group {
        justify-content: center;
    }

    .btn-nav {
        display: inline-flex !important;
        width: 80%;
    }
}

/* ==========================================================
   11. SMALL MOBILE SCREENS
   ========================================================== */

@media (max-width: 480px) {

    .nav-container {
        width: 94%;
    }

    .main-logo-img {
        height: 86px;
    }

    .nav-links {
        padding: 16px 0 !important;
    }

    .nav-links > li {
        margin: 8px 0;
    }

    .dropdown-menu li a {
        font-size: 0.72rem;
    }

}


/* ==========================================================
   12. SERVICES DROPDOWN — STRUCTURE COMPATIBILITY
   ----------------------------------------------------------
   This block styles the submenu even if the HTML uses a
   nested <ul> without the .dropdown-menu class.
   ========================================================== */

.nav-links > li:has(> ul) {
    position: relative;
}

.nav-links > li:has(> ul) > ul {
    position: absolute;
    top: calc(100% + 18px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);

    display: block;
    min-width: 230px;
    width: max-content;

    margin: 0;
    padding: 8px 0;

    list-style: none;

    background: rgba(3, 9, 20, 0.98);
    border: 1px solid rgba(0, 132, 255, 0.28);
    border-top: 2px solid #0084ff;
    border-radius: 0 0 8px 8px;

    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.55);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    z-index: 1100;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;
}

.nav-links > li:has(> ul)::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 18px;
}

.nav-links > li:has(> ul):hover > ul,
.nav-links > li:has(> ul):focus-within > ul {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.nav-links > li:has(> ul) > ul li {
    width: 100%;
    margin: 0;
    padding: 0;
}

.nav-links > li:has(> ul) > ul li a {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;

    padding: 12px 20px;

    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;

    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;

    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        padding-left 0.25s ease;
}

.nav-links > li:has(> ul) > ul li a:hover,
.nav-links > li:has(> ul) > ul li a:focus {
    color: #00c3ff;
    background: rgba(0, 132, 255, 0.12);
    padding-left: 25px;
}

/* Remove browser-generated bullets from the Services submenu */
.nav-links > li:has(> ul) > ul li::marker {
    content: "";
}

/* ==========================================================
   MOBILE — SERVICES SUBMENU
   ========================================================== */

@media (max-width: 768px) {

    .nav-links > li:has(> ul) > ul {
        position: static;
        transform: none;

        width: 100%;
        min-width: 0;
        max-height: none;

        margin: 5px 0 0;
        padding: 5px 0;

        background: rgba(0, 132, 255, 0.07);
        border: 1px solid rgba(0, 132, 255, 0.18);
        border-radius: 6px;

        box-shadow: none;

        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-links > li:has(> ul)::after {
        display: none;
    }

    .nav-links > li:has(> ul) > ul li a {
        justify-content: center;
        padding: 11px 15px;
        font-size: 0.75rem;
    }

    .nav-links > li:has(> ul) > ul li a:hover,
    .nav-links > li:has(> ul) > ul li a:focus {
        padding-left: 15px;
    }
}