/**
 * SystemDR Theme - Navbar Styles
 * Professional navbar layout with proper Flexbox and responsive design
 * Google Cloud Documentation inspired design
 * Extracted from header.php inline styles for proper caching
 */

/* Google Cloud Documentation Typography */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&display=swap');

/* ===================================
   NAVBAR CONTAINER & LAYOUT
   =================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid #e8eaed;
    box-shadow: none;
    transition: none;
}

.site-header.scrolled {
    border-bottom: 1px solid #e8eaed;
    box-shadow: none;
}

/* Position navbar below WordPress admin bar when logged in */
body.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 0px;
    }
}

.header-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px; /* Google Cloud Documentation uses 64px */
    gap: 24px;
    flex-wrap: nowrap;
    overflow: visible; /* Allow dropdowns to escape - prevent scrollbar via flex constraints instead */
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Add padding to body to prevent content from going under fixed navbar */
body {
    padding-top: 64px; /* Match Google Cloud Documentation header height */
}

/* Adjust body padding when admin bar is present */
body.admin-bar {
    padding-top: 64px;
}

@media screen and (max-width: 782px) {
    body.admin-bar {
        padding-top: 64px;
    }
}

/* Additional overflow protection for zoom scenarios */
.header-container > * {
    min-width: 0; /* Allow all direct children to shrink */
}

/* Ensure buttons in header-actions never overflow */
.header-actions .btn,
.header-actions a {
    max-width: 150px; /* Limit maximum width of buttons */
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ===================================
   SITE BRANDING (LOGO)
   =================================== */

.site-branding {
    flex-shrink: 1; /* Allow logo to shrink when space is limited */
    min-width: 0; /* Allow proper text truncation if needed */
    max-width: 220px; /* Limit maximum width to prevent excessive space usage */
    overflow: hidden; /* Prevent logo from overflowing */
    white-space: nowrap; /* Keep logo text on one line */
    text-overflow: ellipsis; /* Add ellipsis if text is too long */
}

/* Custom Site Logo Styling - Google Cloud Documentation Style */
.site-logo {
    font-size: 22px;
    font-weight: 400; /* Google Cloud uses regular weight, not bold */
    color: #202124; /* Google Cloud uses dark gray, not blue */
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.5;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 0;
}

.site-logo img {
    margin-right: 8px;
    vertical-align: middle;
    max-height: 24px; /* Reduced from 32px for compact navbar */
    width: auto;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.site-logo .site-name {
    display: inline-block;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===================================
   MAIN NAVIGATION (MENU)
   =================================== */

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 4px; /* Reduced gap for more compact menu */
    margin: 0 auto; /* Center the menu container */
    padding: 0;
    align-items: center;
    justify-content: center; /* Center menu items */
    flex-wrap: nowrap; /* Prevent wrapping */
    overflow: visible; /* Allow dropdowns to escape */
    max-width: 100%; /* Prevent menu from exceeding container */
    min-width: 0; /* Allow menu to shrink */
    width: auto; /* Allow menu to size based on content for centering */
    box-sizing: border-box;
}

.main-navigation {
    flex: 1 1 auto; /* Allow navigation to grow and shrink */
    display: flex;
    justify-content: center; /* Center the navigation */
    align-items: center;
    overflow: visible; /* Allow dropdowns to escape and be visible */
    min-width: 0; /* Allow navigation to shrink */
    flex-shrink: 1; /* Allow navigation to shrink when space is limited */
    max-width: calc(100% - 400px); /* Reserve space for logo and buttons */
    margin: 0 16px; /* Add margin for better spacing */
    margin-right: 20px; /* Ensure minimum gap before header-actions */
    position: relative; /* For proper dropdown positioning */
}

/* Ensure desktop styles are NOT affected by mobile menu styles */
@media (min-width: 769px) {
    .main-navigation.mobile-menu-open {
        /* Reset any mobile-specific styles on desktop */
        position: static !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        width: auto !important;
        max-height: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

.main-navigation .menu-item {
    display: flex;
    align-items: center;
    white-space: nowrap; /* Prevent menu items from wrapping */
    flex-shrink: 1; /* Allow shrinking when space is limited */
    overflow: visible; /* Remove scroll from menu items */
    position: relative;
    min-width: 0; /* Allow menu items to shrink below their content size */
}

.main-navigation a {
    text-decoration: none;
    color: #5f6368; /* Google Cloud Documentation gray */
    font-weight: 400; /* Regular weight like Google Cloud */
    transition: color 0.2s ease;
    font-size: 14px;
    padding: 8px 12px;
    line-height: 1.5;
    white-space: nowrap;
    display: inline-block;
    overflow: visible;
    border-radius: 4px;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.main-navigation a:hover {
    color: #202124; /* Darker on hover */
    background: transparent; /* No background on hover like Google Cloud */
}

/* Ensure menu items display properly - prevent text wrapping */
.main-navigation .menu-item a {
    white-space: nowrap;
    overflow: visible;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Clean navbar layout for non-logged-in users */
.main-navigation #primary-menu {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center; /* Center menu items */
    gap: 8px;
    margin: 0 auto; /* Center the menu container */
    padding: 0;
    overflow: visible; /* Allow dropdowns to escape */
    min-width: 0; /* Allow menu to shrink */
    max-width: 100%; /* Prevent menu from exceeding container */
    width: auto; /* Allow menu to size based on content for centering */
    box-sizing: border-box;
}

.main-navigation #primary-menu .menu-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 1; /* Allow shrinking when space is limited */
    overflow: visible; /* Remove scroll from menu items */
    min-width: 0; /* Allow menu items to shrink below their content size */
}

/* Navigation Dropdown Menus - General Styles */
.main-navigation .menu-item-has-children {
    position: relative;
    display: flex;
    align-items: center;
    overflow: visible; /* Ensure dropdowns can show */
}

/* Create invisible hover bridge between parent menu and dropdown */
.main-navigation .menu-item-has-children::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 4px;
    background: transparent;
    z-index: 1000;
    pointer-events: auto;
}

.main-navigation .menu-item-has-children > a {
    white-space: nowrap; /* Keep parent menu item text on one line */
}

.main-navigation .sub-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: #ffffff;
    border: 1px solid #e8eaed; /* Google Cloud border color */
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow like Google Cloud */
    min-width: fit-content;
    width: fit-content;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 1001;
    list-style: none;
    margin: 0;
    margin-top: 0;
    overflow: visible;
    height: auto;
    pointer-events: none;
}

.main-navigation .menu-item-has-children:hover .sub-menu,
.main-navigation .sub-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto; /* Enable interaction when visible */
}

.main-navigation .sub-menu li {
    margin: 0;
    display: block;
    width: 100%;
    white-space: nowrap;
}

.main-navigation .sub-menu a {
    display: block;
    padding: 12px 20px;
    color: #5f6368; /* Google Cloud gray */
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    border-bottom: none;
    width: 100%;
    box-sizing: border-box;
    border-radius: 0;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.main-navigation .sub-menu li:first-child a {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.main-navigation .sub-menu li:last-child a {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.main-navigation .sub-menu a:hover {
    background: #f8f9fa; /* Google Cloud hover background */
    color: #202124; /* Darker text on hover */
}

.main-navigation .sub-menu li:last-child a {
    border-bottom: none;
}

/* Admin-only menu item styling */
.menu-item.admin-only a {
    color: #dc2626;
    font-weight: 600;
}

.menu-item.admin-only a:hover {
    color: #b91c1c;
}

/* Premium-only menu item styling */
.menu-item.premium-only a {
    color: #059669;
    font-weight: 600;
}

.menu-item.premium-only a:hover {
    color: #047857;
}

/* Ensure header containers don't clip dropdown */
.header-container,
.header-actions,
.main-navigation {
    overflow: visible !important;
}

/* Remove scroll from all menu items */
.main-navigation .menu-item,
.main-navigation .menu-item a,
.main-navigation ul,
.main-navigation #primary-menu {
    overflow: visible !important;
}

/* Ensure menu items with dropdowns allow overflow */
.main-navigation .menu-item-has-children {
    overflow: visible !important;
}

/* ===================================
   HEADER ACTIONS (BUTTONS & USER PROFILE)
   =================================== */

.header-actions {
    display: flex;
    gap: 12px; /* Slightly increased gap */
    align-items: center;
    flex-shrink: 0; /* Prevent buttons from shrinking - they need their space */
    white-space: nowrap; /* Prevent button text from wrapping */
    min-width: fit-content; /* Ensure buttons have enough space */
    overflow: visible; /* Allow buttons to show properly */
    margin-left: auto; /* Push buttons to the right */
    padding-left: 20px; /* Add padding to separate from navigation */
    position: relative; /* For separator line */
    z-index: 10; /* Ensure header-actions stays above navigation items */
}

/* Visual separator between navigation and buttons - Google Cloud style */
.header-actions::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 24px;
    background: #e8eaed; /* Google Cloud border color */
}

.header-actions .btn {
    white-space: nowrap;
    flex-shrink: 0;
    min-width: fit-content;
    overflow: visible;
    text-overflow: clip;
    padding: 8px 16px; /* Google Cloud button padding */
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px; /* Google Cloud border radius */
    transition: background-color 0.2s ease; /* Simple transition like Google Cloud */
    box-shadow: none; /* No shadow like Google Cloud */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.5;
    border: none;
    gap: 6px;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.btn {
    padding: 8px 16px; /* Google Cloud button padding */
    border: none;
    border-radius: 4px; /* Google Cloud border radius */
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease; /* Simple transition */
    font-size: 14px;
    line-height: 1.5;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.btn-primary {
    background: #1a73e8; /* Google Cloud blue */
    color: white;
    border: none;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.btn-primary:hover {
    background: #1967d2; /* Slightly darker blue on hover */
    transform: none; /* No transform like Google Cloud */
    box-shadow: none; /* No shadow like Google Cloud */
}

.btn-primary:active {
    background: #1557b0; /* Darker on active */
    transform: none;
    box-shadow: none;
}

.btn-primary:focus {
    outline: 2px solid rgba(26, 115, 232, 0.4);
    outline-offset: 2px;
}

.btn-secondary {
    background: white;
    color: #1a73e8; /* Google Cloud blue */
    border: 1px solid #dadce0; /* Google Cloud border */
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.btn-secondary:hover {
    background: #f8f9fa; /* Google Cloud hover */
    color: #1967d2; /* Slightly darker blue */
    border-color: #dadce0;
    transform: none; /* No transform like Google Cloud */
    box-shadow: none; /* No shadow like Google Cloud */
}

.btn-secondary:active {
    background: #f1f3f4; /* Slightly darker on active */
    transform: none;
    box-shadow: none;
}

.btn-secondary:focus {
    outline: 2px solid rgba(26, 115, 232, 0.4);
    outline-offset: 2px;
}

/* ===================================
   USER PROFILE DROPDOWN
   =================================== */

.user-profile-dropdown {
    position: relative;
    display: inline-block;
    z-index: 1001;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid #dadce0; /* Google Cloud border */
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
    color: #202124; /* Google Cloud text color */
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    white-space: nowrap;
    line-height: 1.5;
}

.user-profile-btn:hover {
    background: #f8f9fa; /* Google Cloud hover */
    border-color: #dadce0;
}

.user-profile-btn img {
    border-radius: 50%;
    width: 28px; /* Reduced from 32px for compact navbar */
    height: 28px; /* Reduced from 32px for compact navbar */
    flex-shrink: 0;
}

.user-name {
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e8eaed; /* Google Cloud border */
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow like Google Cloud */
    min-width: 200px;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    margin-top: 8px;
    display: block !important;
}

.user-dropdown-menu.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
    display: block !important;
}

.user-dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #5f6368; /* Google Cloud gray */
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
}

.user-dropdown-menu a:hover {
    background: #f8f9fa; /* Google Cloud hover */
    color: #202124; /* Darker text on hover */
}

.user-dropdown-menu a:last-child {
    border-bottom: none;
}

.user-dropdown-menu hr {
    margin: 8px 0;
    border: none;
    border-top: 1px solid #e8eaed; /* Google Cloud border */
}

.user-dropdown-menu .logout-link {
    color: #dc2626;
}

.user-dropdown-menu .logout-link:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* ===================================
   PREMIUM MEMBERSHIP INDICATOR
   =================================== */

/* Premium badge next to user name in navbar */
.premium-badge-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #34a853 0%, #1e8e3e 100%);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
    white-space: nowrap;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Premium membership info in dropdown */
.premium-membership-info {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border-bottom: 1px solid #c8e6c9;
    color: #1e7e34;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.premium-membership-info svg {
    flex-shrink: 0;
}

.premium-membership-info span {
    white-space: nowrap;
}

/* Mobile adjustments for premium badge */
@media (max-width: 768px) {
    .premium-badge-indicator {
        font-size: 9px;
        padding: 2px 6px;
        margin-left: 6px;
    }
    
    .premium-membership-info {
        padding: 10px 14px;
        font-size: 12px;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .premium-badge-indicator {
        font-size: 8px;
        padding: 1px 5px;
        margin-left: 4px;
    }
}

/* ===================================
   MOBILE MENU TOGGLE (HAMBURGER)
   =================================== */

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1002;
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    order: 2; /* Position burger icon in the middle */
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--sdc-text-primary, #2d3748);
    margin: 5px auto;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Ensure burger icon stays centered on mobile even when active */
@media (max-width: 768px) {
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-active {
    overflow: hidden;
}

/* ===================================
   RESPONSIVE BREAKPOINTS
   =================================== */

/* For zoom scenarios - reduce sizes progressively */
@media (max-width: 1400px) {
    .header-container {
        gap: 20px;
    }
    
    .header-actions {
        gap: 10px;
    }
    
    .header-actions .btn {
        padding: 9px 16px;
        font-size: 13px;
    }
}

/* Additional protection for high zoom levels */
@media (max-width: 1100px) {
    .header-container {
        gap: 16px;
        padding: 0 20px;
    }
    
    .main-navigation {
        max-width: calc(100% - 300px); /* Reserve space for logo and buttons */
        margin: 0 8px;
        margin-right: 16px; /* Ensure minimum gap before header-actions */
        overflow: visible; /* Allow dropdowns to escape */
    }
    
    .main-navigation ul {
        gap: 2px;
    }
    
    .main-navigation a {
        font-size: 14px;
        padding: 8px 8px; /* Reduced from 16px 8px for compact navbar */
    }
    
    .header-actions {
        gap: 8px;
        flex-shrink: 0; /* Prevent buttons from shrinking */
        z-index: 10; /* Ensure header-actions stays above navigation items */
    }
    
    .header-actions .btn {
        padding: 10px 14px;
        font-size: 13px;
        flex-shrink: 0; /* Prevent buttons from shrinking */
    }
    
    .site-branding {
        max-width: 200px;
        flex-shrink: 1; /* Allow logo to shrink if needed */
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .header-container {
        padding: 0 20px;
        gap: 20px; /* Maintain good spacing */
        overflow: hidden; /* Ensure overflow is hidden */
    }
    
    .main-navigation {
        max-width: calc(100% - 350px); /* Reserve space for logo and buttons */
        margin: 0 12px;
        margin-right: 18px; /* Ensure minimum gap before header-actions */
        overflow: visible; /* Allow dropdowns to escape */
    }
    
    .main-navigation a {
        font-size: 14px;
        padding: 8px 10px; /* Reduced from 16px 10px for compact navbar */
    }
    
    .main-navigation ul {
        gap: 2px;
    }
    
    .header-actions {
        gap: 10px; /* Maintain gap for buttons */
        flex-shrink: 0; /* Prevent buttons from shrinking */
        padding-left: 16px; /* Maintain padding */
        z-index: 10; /* Ensure header-actions stays above navigation items */
    }
    
    .header-actions .btn {
        padding: 10px 16px; /* Maintain good button size */
        font-size: 14px;
    }
}

@media (max-width: 1024px) {
    .header-container {
        padding: 0 18px;
        gap: 16px;
        overflow: hidden; /* Ensure overflow is hidden */
    }
    
    .main-navigation {
        flex-shrink: 1; /* Allow navigation to shrink */
        min-width: 0;
        max-width: calc(100% - 320px); /* Reserve space for logo and buttons */
        margin: 0 8px;
        margin-right: 14px; /* Ensure minimum gap before header-actions */
        overflow: visible; /* Allow dropdowns to escape */
    }
    
    .main-navigation a {
        font-size: 14px;
        padding: 8px 8px; /* Reduced from 16px 8px for compact navbar */
    }
    
    .main-navigation ul {
        gap: 2px;
    }
    
    .header-actions {
        gap: 8px;
        flex-shrink: 0; /* Prevent buttons from shrinking */
        min-width: fit-content;
        padding-left: 12px; /* Reduce padding on smaller screens */
        z-index: 10; /* Ensure header-actions stays above navigation items */
    }
    
    .header-actions .btn {
        padding: 10px 14px; /* Maintain readable button size */
        font-size: 13px;
        flex-shrink: 0; /* Prevent buttons from shrinking */
    }
    
    /* Hide navigation menu items if space is too limited */
    .main-navigation ul li:nth-child(n+5) {
        display: none; /* Hide menu items after the 4th one */
    }
}

/* Mobile Dropdown Styles - Only for tablet sizes, not mobile */
@media (min-width: 769px) and (max-width: 900px) {
    .main-navigation .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0;
        padding-left: 20px;
        margin-top: 0;
        display: none;
    }
    
    .main-navigation .menu-item-has-children.open .sub-menu {
        display: block;
    }
    
    .main-navigation .sub-menu a {
        padding: 12px 16px;
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 64px; /* Match Google Cloud Documentation */
    }
    
    .header-container {
        height: 64px; /* Match Google Cloud Documentation */
        padding: 0 16px;
        gap: 16px;
        overflow: visible !important;
        position: relative;
        flex-wrap: nowrap;
    }
    
    .site-branding {
        max-width: 200px;
        flex-shrink: 1;
        order: 1; /* Logo on the left */
    }
    
    .mobile-menu-toggle {
        display: block;
        order: 2; /* Burger icon in the center */
        position: absolute;
        left: 50%;
        margin-left: -20px; /* Half of button width (40px) to center it */
    }
    
    .header-actions {
        gap: 8px;
        flex-shrink: 0;
        min-width: fit-content;
        padding-left: 12px;
        order: 3; /* Buttons on the right */
        margin-left: auto; /* Push to the right */
    }
    
    /* Hide separator on mobile */
    .header-actions::before {
        display: none;
    }
    
    .header-actions .btn {
        padding: 8px 12px;
        font-size: 13px;
        flex-shrink: 0;
    }
    
    /* Hide main navigation menu items by default on mobile */
    .main-navigation {
        position: fixed !important;
        top: 64px !important; /* Match Google Cloud Documentation header height */
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        background: #ffffff !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
        border-top: 1px solid #e2e8f0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: max-height 0.4s cubic-bezier(0.4, 0.0, 0.2, 1),
                    opacity 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
                    visibility 0.3s cubic-bezier(0.4, 0.0, 0.2, 1) !important;
        z-index: 10001 !important; /* Higher z-index to ensure visibility above all elements */
        margin: 0 !important;
        order: 4 !important;
        transform: translateY(-10px) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        text-align: center !important;
        padding: 0 !important;
    }
    
    /* Show menu when mobile-menu-open class is active */
    .main-navigation.mobile-menu-open {
        max-height: 1000px !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        text-align: center !important;
        z-index: 10001 !important;
        position: fixed !important;
        top: 64px !important; /* Match Google Cloud Documentation header height */
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        height: auto !important;
        pointer-events: auto !important;
    }
    
    /* Account for WordPress admin bar on mobile */
    body.admin-bar .main-navigation.mobile-menu-open {
        top: 64px !important; /* Match Google Cloud Documentation header height */
    }
    
    /* FORCE CENTER ALIGNMENT - Override all desktop styles */
    .main-navigation.mobile-menu-open ul,
    .main-navigation.mobile-menu-open #primary-menu {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 0 !important;
        padding: 12px 0 !important;
        margin: 0 auto !important;
        width: 100% !important;
        list-style: none !important;
        flex-wrap: nowrap !important;
    }
    
    .main-navigation.mobile-menu-open .menu-item {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        border-bottom: 1px solid #f1f5f9 !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
    }
    
    .main-navigation.mobile-menu-open .menu-item:last-child {
        border-bottom: none !important;
    }
    
    .main-navigation.mobile-menu-open .menu-item a {
        width: 100% !important;
        text-align: center !important;
        padding: 16px 20px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 16px !important;
        color: #2d3748 !important;
        transition: all 0.2s ease !important;
        border-radius: 0 !important;
        margin: 0 auto !important;
        text-decoration: none !important;
        white-space: nowrap !important;
    }
    
    .main-navigation.mobile-menu-open .menu-item a:hover,
    .main-navigation.mobile-menu-open .menu-item a:active {
        background: #f7fafc !important;
        color: #0056d2 !important;
    }
    
    /* Mobile submenu styles - CENTERED */
    .main-navigation.mobile-menu-open .sub-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 auto !important;
        background: #f8fafc !important;
        display: none !important;
        max-height: 0 !important;
        overflow: hidden !important;
        transition: max-height 0.3s ease !important;
        width: 100% !important;
        list-style: none !important;
        text-align: center !important;
    }
    
    .main-navigation.mobile-menu-open .menu-item-has-children.open .sub-menu {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        max-height: 500px !important;
        padding: 8px 0 !important;
        margin: 0 auto !important;
        width: 100% !important;
    }
    
    .main-navigation.mobile-menu-open .sub-menu li {
        border-bottom: 1px solid #e2e8f0 !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .main-navigation.mobile-menu-open .sub-menu li:last-child {
        border-bottom: none !important;
    }
    
    .main-navigation.mobile-menu-open .sub-menu a {
        padding: 12px 20px !important;
        font-size: 13px !important;
        color: #4a5568 !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        margin: 0 auto !important;
        text-decoration: none !important;
    }
    
    .main-navigation.mobile-menu-open .sub-menu a:hover {
        background: #f1f5f9 !important;
        color: #0056d2 !important;
    }
    
    /* Add indicator for menu items with children - CENTERED */
    .main-navigation.mobile-menu-open .menu-item-has-children > a {
        position: relative !important;
        padding-right: 40px !important; /* Space for indicator */
    }
    
    .main-navigation.mobile-menu-open .menu-item-has-children > a::after {
        content: '▼' !important;
        position: absolute !important;
        right: 20px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        font-size: 12px !important;
        transition: transform 0.3s ease !important;
        color: #718096 !important;
        margin: 0 !important;
    }
    
    .main-navigation.mobile-menu-open .menu-item-has-children.open > a::after {
        transform: translateY(-50%) rotate(180deg) !important;
    }
    
    /* Center any icons or inline content within menu links */
    .main-navigation.mobile-menu-open .menu-item a svg,
    .main-navigation.mobile-menu-open .menu-item a img,
    .main-navigation.mobile-menu-open .menu-item a i {
        margin: 0 auto !important;
        display: inline-block !important;
    }
    
    /* Center any icons or inline content within submenu links */
    .main-navigation.mobile-menu-open .sub-menu a svg,
    .main-navigation.mobile-menu-open .sub-menu a img,
    .main-navigation.mobile-menu-open .sub-menu a i {
        margin: 0 auto !important;
        display: inline-block !important;
    }
    
    /* Adjust body padding when menu is open to account for dropdown */
    body.mobile-menu-active {
        padding-top: 64px; /* Match Google Cloud Documentation */
        overflow: hidden !important;
    }
    
    /* Ensure site-header doesn't clip the mobile menu */
    .site-header {
        overflow: visible !important;
    }
}

/* Very small screens optimization */
@media (max-width: 480px) {
    .header-container {
        padding: 12px 12px;
    }
    
    .site-branding {
        max-width: 150px;
        font-size: 18px;
    }
    
    .header-actions .btn {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .mobile-menu-toggle {
        width: 36px;
        height: 36px;
        margin-left: -18px; /* Adjust for smaller button */
    }
    
    /* FORCE CENTER ALIGNMENT on very small screens */
    .main-navigation.mobile-menu-open .menu-item a {
        padding: 14px 16px !important;
        font-size: 15px !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .main-navigation.mobile-menu-open .sub-menu a {
        padding: 10px 16px !important;
        font-size: 14px !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
    }
}


/* Google Sign In Container */
.google-signin-container {
    display: flex;
    align-items: center;
}

@media (max-width: 991px) {
    .google-signin-container {
        width: 100%;
        margin-bottom: 12px;
    }
}

