/**
 * Orion Header & Footer – Elementor compatibility overrides
 * Styles not covered by Tailwind utilities or requiring Elementor scoping.
 *
 * @package Orion_Construction
 */

/* Elementor Orion Main Header – ensure widget CSS can override Tailwind utilities */
.elementor-widget-orion-main-header .elementor-widget-container {
    width: 100%;
}

.elementor-location-header .orion-html-header,
.elementor-location-footer .orion-html-footer {
    width: 100%;
}

.elementor-location-header .elementor-section-wrap > .elementor-section,
.elementor-location-header .e-con {
    --padding-top: 0;
    --padding-bottom: 0;
}

/* --------------------------------------------------------------------------
   Sticky header helper (JS adds .sticky-header)
   -------------------------------------------------------------------------- */
.orion-html-header .header.orion-sticky-enabled.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

body.admin-bar .orion-html-header .header.orion-sticky-enabled.sticky-header {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .orion-html-header .header.orion-sticky-enabled.sticky-header {
        top: 46px;
    }
}

/* --------------------------------------------------------------------------
   Scroll + hover: menu items use black (#000) by default
   -------------------------------------------------------------------------- */
.orion-html-header .header.sticky-header .navbar .nav-tab,
.orion-html-header .header.sticky-header .navbar .nav-tab-2,
.orion-html-header .header.bg-white .navbar .nav-tab,
.orion-html-header .header.bg-white .navbar .nav-tab-2 {
    color: #000 !important;
}

.orion-html-header .header .navbar .nav-tab:hover,
.orion-html-header .header .navbar .nav-tab-2:hover,
.orion-html-header .header .navbar li .nav-tab:hover,
.orion-html-header .header .navbar li .nav-tab-2:hover {
    color: #000 !important;
}

.orion-html-header .header.sticky-header .navbar .dropdown-svg,
.orion-html-header .header.bg-white .navbar .dropdown-svg,
.orion-html-header .header.sticky-header .dropdown .dropdown-toggle svg,
.orion-html-header .header.bg-white .dropdown .dropdown-toggle svg {
    stroke: #000 !important;
    color: #000 !important;
}

/* --------------------------------------------------------------------------
   Mobile nav panel – Elementor z-index stacking
   -------------------------------------------------------------------------- */
.orion-html-header .mobile-nav.open {
    z-index: 70;
}

.orion-html-header #pageOverlay:not(.hidden) {
    z-index: 40;
}

/* --------------------------------------------------------------------------
   Footer Tailwind renderer inside theme / Elementor
   -------------------------------------------------------------------------- */
.orion-tailwind-footer,
.elementor-footer .orion-html-footer {
    width: 100%;
}

.orion-html-footer footer {
    width: 100%;
}

/* --------------------------------------------------------------------------
   Footer widgets inside Elementor footers (legacy)
   -------------------------------------------------------------------------- */
.elementor-location-footer .orion-footer-logo,
.elementor-location-footer .orion-footer-navigation,
.elementor-location-footer .orion-footer-services,
.elementor-location-footer .orion-footer-contact,
.elementor-location-footer .orion-footer-social,
.elementor-location-footer .orion-footer-copyright {
    position: relative;
    z-index: 2;
}

.orion-html-header #searchIcon,
.orion-html-header .orion-search-submit svg {
    flex-shrink: 0;
}

.orion-html-header .orion-search-submit {
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    line-height: 0;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Search panel – match orion-2 HTML layout & animation hooks
   -------------------------------------------------------------------------- */
.orion-html-header #searchPanel {
    width: 100%;
}

.orion-html-header #searchBox {
    transition: all 0.3s ease-in-out;
}

.orion-html-header #searchCloseInside,
.orion-html-header #closeSearch {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.orion-html-header #searchCloseInside.opacity-100,
.orion-html-header #closeSearch.opacity-100 {
    opacity: 1;
    pointer-events: auto;
}

.orion-html-header #searchSuggestions.search-suggestions-panel {
    z-index: 55;
}

.orion-html-header .header-three #searchPanel {
    margin-top: 0.75rem;
    border-top-left-radius: 9999px;
    border-top-right-radius: 9999px;
}

@media (min-width: 1024px) {
    .orion-html-header .header-three #searchPanel {
        margin-top: 0;
        border-top-left-radius: 9999px;
        border-top-right-radius: 9999px;
    }
}

.orion-html-header .header-three.sticky-header #searchPanel,
.orion-html-header .header-three.sticky-header .searchBox {
    border-radius: 0;
    margin-top: 0;
}

/* --------------------------------------------------------------------------
   Search form – WordPress search input reset inside Tailwind panel
   -------------------------------------------------------------------------- */
.orion-html-header #searchBox form[role="search"] {
    margin: 0;
}

.orion-html-header #searchBox input[type="search"] {
    border: 0;
    background: transparent;
    box-shadow: none;
    outline: none !important;
}

/* --------------------------------------------------------------------------
   Accessibility – focus visible for keyboard navigation
   -------------------------------------------------------------------------- */
.orion-html-header .nav-tab:focus-visible,
.orion-html-header .nav-tab-2:focus-visible,
.orion-html-header .mobile-toggle:focus-visible,
.orion-html-header #searchButton:focus-visible {
    outline: 2px solid #186F65;
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Performance – lazy-loaded images in mega menu
   -------------------------------------------------------------------------- */
.orion-html-header .dropdown-menu img[loading="lazy"] {
    content-visibility: auto;
}
