/* ================= COMPREHENSIVE RESPONSIVE FIXES ================= */
/* Properly calculated positioning to prevent overflow at all screen widths */

/* 1. WHITE BAR VISIBILITY - Desktop only */
/* Show on desktop, hide on tablet and mobile */
.topbar {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Hide on tablet and mobile */
@media (max-width: 985px) {
    .topbar {
        display: none !important;
    }

    /* Pull blue nav to top when topbar is hidden */
    .nav-wrap {
        top: 0 !important;
    }
}

body.nav-mobile .topbar {
    display: none !important;
}


/* 2. LOGO SCALING AND POSITIONING */
@media (max-width: 1200px) {
    .floating-logo img {
        height: 240px !important;
    }

    .floating-logo {
        left: -60px !important;
    }
}

@media (max-width: 985px) {
    .floating-logo {
        left: 20px !important;
        /* Left-aligned inside navbar */
        top: 50% !important;
        /* Vertically centered */
        transform: translateY(-50%) !important;
        /* Perfect vertical centering */
    }

    .floating-logo img {
        height: 90px !important;
        /* Reduced to fit navbar height */
    }
}



@media (max-width: 768px) {
    .floating-logo {
        left: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

    .floating-logo img {
        height: 70px !important;
        /* Reduced to fit navbar */
    }
}

@media (max-width: 600px) {
    .floating-logo {
        left: 10px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

    .floating-logo img {
        height: 60px !important;
        /* Reduced to fit navbar */
    }

    /* Hide menu, show hamburger */
    .menu {
        display: none !important;
    }

    .burger {
        display: flex !important;
    }
}

/* 3. BLUE PILL WIDTH ADJUSTMENTS */
@media (max-width: 1200px) {
    :root {
        --nav-pill-max: 75% !important;
    }
}

@media (max-width: 985px) {
    :root {
        --nav-pill-max: 80% !important;
    }
}

@media (max-width: 850px) {
    :root {
        --nav-pill-max: 85% !important;
    }
}

@media (max-width: 800px) {
    :root {
        --nav-pill-max: 90% !important;
    }
}

@media (max-width: 600px) {
    :root {
        --nav-pill-max: 95% !important;
    }
}

/* 4. MENU POSITIONING AND SIZING - CRITICAL FIXES */

/* Add max-width to prevent menu from getting too wide */
.menu {
    max-width: 50% !important;
    justify-content: flex-start !important;
    /* CRITICAL: Changed from space-evenly to respect gaps */
}

/* Make white bar wrap instead of overflow */
.topbar .info {
    flex-wrap: wrap !important;
    justify-content: center !important;
}

@media (max-width: 1200px) {
    .menu {
        max-width: 55% !important;
        left: 42% !important;
        gap: 30px !important;
    }

    .menu a {
        font-size: 15px !important;
    }

    .cta {
        font-size: 14px !important;
        padding: 10px 22px !important;
    }

    .topbar .info {
        font-size: 13px !important;
        gap: 12px !important;
    }
}

/* CRITICAL: Fix for 1034px width overlap issue */
@media (max-width: 1100px) {
    .menu {
        gap: 20px !important;
    }

    .menu a {
        font-size: 14px !important;
    }

    .cta {
        font-size: 13px !important;
        padding: 9px 20px !important;
    }

    .topbar .info {
        font-size: 12px !important;
        gap: 10px !important;
    }
}


@media (max-width: 985px) {
    .menu {
        max-width: 60% !important;
        left: 40% !important;
        gap: 25px !important;
    }

    .menu a {
        font-size: 14px !important;
    }
}

@media (max-width: 850px) {
    .menu {
        max-width: 65% !important;
        left: 38% !important;
        gap: 15px !important;
    }

    .menu a {
        font-size: 13px !important;
    }

    .cta {
        font-size: 13px !important;
        padding: 10px 20px !important;
    }
}

@media (max-width: 800px) {
    .menu {
        max-width: 70% !important;
        left: 36% !important;
        gap: 10px !important;
    }

    .menu a {
        font-size: 12px !important;
    }

    /* Hide CTA button to save space */
    .cta {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .menu {
        gap: 8px !important;
    }

    .menu a {
        font-size: 11px !important;
    }
}

/* 5. WHITE BAR (TOPBAR) CONTENT FIXES */
@media (max-width: 800px) {
    .topbar .info {
        font-size: 11px !important;
        gap: 10px !important;
    }

    .icon svg {
        width: 20px !important;
        height: 20px !important;
    }
}

@media (max-width: 768px) {

    /* Hide hours info to prevent phone cutoff */
    .info-item:nth-child(2) {
        display: none !important;
    }
}

@media (max-width: 600px) {
    .topbar .info {
        font-size: 10px !important;
        gap: 8px !important;
    }

    .icon svg {
        width: 18px !important;
        height: 18px !important;
    }
}

/* 6. SERVICES DROPDOWN MENU */
/* Remove overflow hidden from navbar to allow dropdown to show */
.nav-wrap {
    overflow: visible !important;
}

.nav-bg {
    overflow: visible !important;
}

.nav {
    overflow: visible !important;
}

/* Dropdown container */
.has-dropdown {
    position: relative;
}

/* Dropdown menu */
.dropdown {
    position: absolute;
    top: calc(100% + 15px);
    /* Position below the menu item */
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 8px 0;
    min-width: 220px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transform: translateX(-50%) translateY(-10px);
    z-index: 10000;
    /* Very high z-index to appear above everything */
}

/* Show dropdown on hover */
.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Dropdown items */
.dropdown li {
    margin: 0;
    padding: 0;
}

.dropdown a {
    display: block;
    padding: 10px 20px;
    color: #333 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.dropdown a:hover {
    background: rgba(110, 0, 67, 0.08);
    color: var(--maroon) !important;
}

/* Hide dropdown on mobile (hamburger menu handles it) */
@media (max-width: 985px) {
    .dropdown {
        display: none !important;
    }
}