/* ============================================================
   Navigation – BitsyBows Theme (Component: .main-navigation)
   Fully CSS-driven responsive horizontal menu
============================================================ */

/* --- 1. CONTAINERS --- */
.nav-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.main-navigation {
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
}

/* --- 2. PRIMARY MENU (.primary-menu) --- */
.primary-menu {
    display: flex;
    flex-wrap: wrap;           /* Allow wrapping to multiple lines */
    justify-content: center;   /* Center lines horizontally */
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* --- 3. TOP-LEVEL ITEMS & LINKS --- */
.primary-menu > li {
    list-style: none;
    margin: 0;                /* Remove gaps between items */
    flex-shrink: 1;           /* Allow items to shrink if needed */
}

.primary-menu > li > a {
    display: block;
    text-decoration: none;
    color: black;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    font-size: clamp(0.65rem, 1.2vw, 1rem); /* Responsive font size */
    padding: clamp(6px, 1vw, 12px) clamp(12px, 2vw, 26px); /* Responsive padding */
    width: auto;              /* Let width shrink with text */
    height: auto;
    line-height: 1.2;         /* Center text vertically naturally */
    transition: all 0.3s ease;
    background: none;         /* Remove background image/color */
}

/* --- 4. SUB-MENU STYLES (.sub-menu) --- */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    list-style: none;
    margin: 0;
    padding: 6px 0;
    min-width: 120px;
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.primary-menu > li:hover > .sub-menu,
.primary-menu > li.focus > .sub-menu {
    opacity: 1;
    visibility: visible;
}

.sub-menu a {
    display: block;
    padding: 4px 10px;
    text-decoration: none;
    color: black;
    white-space: nowrap;
    font-size: clamp(0.55rem, 1vw, 0.85rem); /* Responsive submenu font */
    transition: background-color 0.3s;
}

.sub-menu a:hover {
    background-color: #f5f5f5;
}

/* --- 5. LIMIT MENU WIDTH --- */
.primary-menu-wrapper {
    width: 75%;              /* Menu container takes ~75% of screen width */
    margin: 0 auto;          /* Center horizontally */
    display: flex;
    justify-content: center;
    flex-wrap: wrap;         /* Allow wrapping */
}

