/**
 * BoardSync Custom Navigation Styles
 * Professional, clean navigation with prominent CTA
 * Simplified with consolidated selectors for easier maintenance
 *
 * ARCHITECTURAL DECISION: Using !important declarations
 * Why: Astra parent theme uses high-specificity selectors and its own !important
 * declarations that we cannot override in a child theme without matching specificity.
 *
 * Alternatives considered:
 * - Custom theme rebuild: 30-40 hours, delays higher-priority features (Clerk SSO, etc.)
 * - Ultra-specific selectors: More verbose, still requires !important in some cases
 *
 * This is an acceptable tradeoff given our focus on authentication, multi-tenancy,
 * and scale challenges. Navigation CSS is <1% of our technical complexity.
 *
 * Reviewed: 2025-01-07
 */

/* ============================================
   Header Container Styles
   ============================================ */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #D1D5DB;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15);
}

.main-header-bar {
    padding: 0 2rem;
}

/* ============================================
   Logo
   ============================================ */
.site-branding img,
.custom-logo-link img {
    max-height: 50px;
    width: auto;
}

/* ============================================
   Navigation Menu - Base Styles
   ============================================ */
.site-header .menu-item {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-header .menu-item a {
    color: #334155;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 0.75rem 1rem;
    display: block;
}

.site-header .menu-item a:hover {
    color: #046bd2;
}

/* ============================================
   CTA Button Styling
   ============================================ */
/* Override Astra's default button padding (15px 30px) which makes nav CTAs too large.
   Using individual padding properties with !important because Astra's .ast-button
   and .menu-toggle rules use the same specificity.
   Multiple selectors to increase specificity above Astra's theme. */
.site-header .ast-builder-menu .menu-item.boardsync-cta-button a,
.site-header .main-header-menu .menu-item.boardsync-cta-button a,
.site-header .menu-item.boardsync-cta-button a,
.site-header .boardsync-cta-button a {
    background: #1a2b4a !important;
    color: #ffffff !important;
    padding-top: 8px !important;
    padding-right: 18px !important;
    padding-bottom: 8px !important;
    padding-left: 18px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08) !important;
    border: none !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    width: auto !important;
    max-width: none !important;
    min-height: auto !important;
    height: auto !important;
}

.site-header .boardsync-cta-button a::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f086";
}

.site-header .boardsync-cta-button a:hover {
    background: #0f172a;
    color: #ffffff !important;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    transform: translateY(-2px);
}

/* ============================================
   Mobile Menu Styles
   ============================================ */
@media (max-width: 921px) {
    .main-header-bar {
        padding: 0 1rem;
    }

    .site-header .menu-item {
        width: 100%;
    }

    .site-header .menu-item a {
        padding: 1rem;
        border-bottom: 1px solid #f1f5f9;
    }

    /* CTA button on mobile - prevent full-width stretch and maintain visibility.
       Mobile menu items default to width: 100%, so we override with auto and center. */
    .site-header .boardsync-cta-button a {
        margin: 1rem auto !important;
        padding: 10px 18px !important;
        background: #1a2b4a !important;
        color: #ffffff !important;
        text-align: center;
        justify-content: center;
        display: inline-flex !important;
        width: auto !important;
        max-width: max-content !important;
        border-bottom: none !important;
    }
}

/* ============================================
   Tablet Adjustments
   ============================================ */
@media (max-width: 768px) {
    .site-header .menu-item a {
        font-size: 15px;
    }

    .site-header .boardsync-cta-button a {
        padding: 10px 20px;
        font-size: 15px;
    }
}
