/*
 * PROFESSIONAL HEADER & NAVIGATION
 * Version: 1.0.0
 * Clean, modern navigation matching Professional Clean Design
 */

/* ===========================
   HEADER
   =========================== */

.professional-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid #e0e0e0;
    z-index: 1000;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.professional-header.scrolled {
    padding: 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    border-bottom-color: transparent;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    gap: 40px;
}

/* Logo */
.header-brand {
    flex-shrink: 0;
}

.brand-link {
    display: block;
    line-height: 0;
}

.brand-logo {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.brand-link:hover .brand-logo {
    transform: scale(1.05);
}

/* ===========================
   DESKTOP NAVIGATION
   =========================== */

.desktop-nav {
    flex: 1;
    display: none;
}

.main-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-menu > li {
    position: relative;
}

.main-menu > li > a {
    display: block;
    color: #3c3c3c;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.main-menu > li > a:hover,
.main-menu > li.current-menu-item > a,
.main-menu > li.current_page_item > a {
    color: #ff675b;
    background: rgba(255, 103, 91, 0.05);
}

/* Dropdown Indicator - Caret Icon */
.main-menu .menu-caret {
    font-size: 10px;
    margin-left: 6px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.main-menu .menu-item-has-children.menu-open .menu-caret {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.main-menu .sub-menu {
    display: block !important;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    padding: 8px;
    min-width: 220px;
    list-style: none;
    margin: 8px 0 0 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 100;
}

.main-menu .sub-menu.show {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
}

/* Prevent hover-based closing */
.main-menu .menu-item-has-children:hover > .sub-menu {
    /* Don't use display: block here - use the .show class instead */
}

/* Keep submenu open when hovering over it */
.main-menu .menu-item-has-children {
    position: relative;
}

.main-menu .menu-item-has-children.menu-open > a {
    color: #ff675b;
    background: rgba(255, 103, 91, 0.05);
}

.main-menu .sub-menu li {
    margin: 0;
}

.main-menu .sub-menu a {
    display: block;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.main-menu .sub-menu a:hover {
    color: #ff675b;
    background: rgba(255, 103, 91, 0.05);
    padding-left: 20px;
}

/* ===========================
   HEADER RIGHT
   =========================== */

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-phone-link {
    display: none;
    align-items: center;
    gap: 8px;
    color: #3c3c3c;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.header-phone-link i {
    color: #ff675b;
    font-size: 16px;
}

.header-phone-link:hover {
    background: rgba(255, 103, 91, 0.05);
    color: #ff675b;
}

.header-cta-btn {
    display: none;
    padding: 12px 24px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.header-cta-primary {
    background: linear-gradient(135deg, #ff675b 0%, #ff8a7a 100%);
    box-shadow: 0 2px 10px rgba(255, 103, 91, 0.2);
}

.header-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 103, 91, 0.3);
}

.header-cta-secondary {
    background: linear-gradient(135deg, #3c3c3c 0%, #2d2d2d 100%);
    box-shadow: 0 2px 10px rgba(60, 60, 60, 0.2);
}

.header-cta-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(60, 60, 60, 0.3);
    color: #ffffff;
}

/* Mobile Phone Icon */
.mobile-phone-icon {
    display: none;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff675b 0%, #ff8a7a 100%);
    color: #ffffff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(255, 103, 91, 0.2);
}

.mobile-phone-icon i {
    font-size: 18px;
}

.mobile-phone-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(255, 103, 91, 0.3);
}

/* Mobile Toggle */
.mobile-toggle {
    width: 32px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 10001;
}

.toggle-bar {
    width: 100%;
    height: 3px;
    background: #3c3c3c;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-toggle:hover .toggle-bar {
    background: #ff675b;
}

.mobile-toggle.active .toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
    background: #ff675b;
}

.mobile-toggle.active .toggle-bar:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.mobile-toggle.active .toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
    background: #ff675b;
}

/* ===========================
   MOBILE MENU SLIDE
   =========================== */

.mobile-menu-slide {
    position: fixed;
    top: 90px;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.mobile-menu-slide.active {
    max-height: calc(100vh - 90px);
    overflow-y: auto;
}

.mobile-menu-inner {
    padding: 20px 20px 30px;
}

/* Mobile Navigation */
.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-list > li {
    margin-bottom: 4px;
}

.mobile-menu-list > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #3c3c3c;
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 600;
    padding: 14px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-list > li > a:hover,
.mobile-menu-list .current-menu-item > a,
.mobile-menu-list .current_page_item > a {
    color: #ff675b;
    background: rgba(255, 103, 91, 0.05);
}

/* Submenu toggle button */
.submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 103, 91, 0.1);
    border-radius: 6px;
    color: #ff675b;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 10px;
}

.submenu-toggle:hover {
    background: #ff675b;
    color: #ffffff;
}

.submenu-toggle i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.menu-item-has-children.open .submenu-toggle i {
    transform: rotate(180deg);
}

/* Mobile Sub-menu */
.mobile-menu-list .sub-menu {
    list-style: none;
    margin: 4px 0 8px 0;
    padding: 8px 0;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    display: none;
}

.mobile-menu-list .sub-menu.active {
    display: block;
}

.mobile-menu-list .sub-menu a {
    display: block;
    color: #6c757d;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 10px 16px 10px 32px;
    transition: all 0.2s ease;
    position: relative;
}

.mobile-menu-list .sub-menu a::before {
    content: '→';
    position: absolute;
    left: 16px;
    color: #ff675b;
    opacity: 0;
    transition: all 0.2s ease;
}

.mobile-menu-list .sub-menu a:hover {
    color: #ff675b;
    background: rgba(255, 103, 91, 0.05);
    padding-left: 36px;
}

.mobile-menu-list .sub-menu a:hover::before {
    opacity: 1;
}


/* Mobile Contact */
.mobile-menu-contact {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #3c3c3c;
    text-decoration: none;
    font-weight: 500;
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(255, 103, 91, 0.03);
    transition: all 0.3s ease;
}

.mobile-contact-item i {
    color: #ff675b;
    font-size: 16px;
}

.mobile-contact-item:hover {
    background: rgba(255, 103, 91, 0.08);
    color: #ff675b;
}

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

/* Increase header container width for more menu items */
@media (min-width: 1200px) {
    .professional-header .container {
        max-width: 1400px;
    }
}

@media (min-width: 1400px) {
    .professional-header .container {
        max-width: 1400px;
    }
}

/* Reduce menu item spacing on larger screens for better fit */
@media (min-width: 1200px) {
    .main-menu {
        gap: 4px;
    }

    .main-menu > li > a {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
}

@media (min-width: 1400px) {
    .main-menu {
        gap: 6px;
    }

    .main-menu > li > a {
        padding: 10px 16px;
        font-size: 0.9375rem;
    }
}

@media (min-width: 992px) {
    .desktop-nav {
        display: block;
    }

    .header-phone-link {
        display: flex;
    }

    .header-cta-btn {
        display: inline-block;
    }

    .mobile-phone-icon {
        display: none !important;
    }

    .mobile-toggle {
        display: none !important;
    }

    .mobile-menu-slide {
        display: none !important;
    }
}

@media (max-width: 991px) {
    .header-inner {
        gap: 12px;
    }

    .brand-logo {
        height: 40px;
    }

    /* Hide desktop phone link */
    .header-phone-link {
        display: none !important;
    }

    /* Show mobile items */
    .header-cta-btn {
        display: inline-block;
        padding: 8px 14px;
        font-size: 0.75rem;
    }

    .mobile-phone-icon {
        display: flex;
        width: 36px;
        height: 36px;
    }

    .mobile-phone-icon i {
        font-size: 16px;
    }

    /* Adjust header-right spacing */
    .header-right {
        gap: 8px;
    }

    /* Move mobile toggle to the left on ALL mobile/tablet */
    .mobile-toggle {
        order: -1;
        margin-right: 12px;
    }

    .header-brand {
        order: 0;
    }

    .header-right {
        order: 1;
        margin-left: auto;
    }
}

@media (max-width: 767px) {
    .professional-header {
        padding: 0;
    }

    .mobile-menu-slide {
        top: 70px;
    }

    .mobile-menu-slide.active {
        max-height: calc(100vh - 70px);
    }

    .brand-logo {
        height: 32px;
    }

    .header-inner {
        gap: 6px;
    }

    /* Ensure mobile toggle stays on left */
    .mobile-toggle {
        width: 28px;
        height: 20px;
        margin-right: 8px;
    }

    .header-right {
        gap: 4px;
    }

    /* Smaller buttons on mobile */
    .header-cta-btn {
        padding: 6px 10px;
        font-size: 0.65rem;
    }

    .mobile-phone-icon {
        width: 32px;
        height: 32px;
    }

    .mobile-phone-icon i {
        font-size: 14px;
    }

    .toggle-bar {
        height: 2.5px;
    }
}

/* Extra small devices - iPhone 17 Pro, etc */
@media (max-width: 430px) {
    .header-inner {
        gap: 4px;
        padding: 15px 0;
    }

    .brand-logo {
        height: 28px;
    }

    .mobile-toggle {
        width: 26px;
        height: 18px;
        margin-right: 6px;
    }

    .header-right {
        gap: 3px;
    }

    .header-cta-btn {
        padding: 5px 8px;
        font-size: 0.6rem;
    }

    .mobile-phone-icon {
        width: 30px;
        height: 30px;
    }

    .mobile-phone-icon i {
        font-size: 13px;
    }
}

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

/* Smooth transitions */
* {
    -webkit-tap-highlight-color: transparent;
}
