/* Override WP theme animation classes that require JS to trigger */
/* Without the theme JS, elements with these classes stay at opacity: 0 */
.animate_afb,
.animate_afl,
.animate_afr,
.animate_afc,
.animate_afc.d1,
.animate_afc.d2 {
    opacity: 1 !important;
    transform: none !important;
}

/* Fix nav - the WP theme JS transforms type_desktop to type_mobile at runtime.
   Without JS, the nav stays type_desktop with hidden class on the list.
   Force the nav list to display in both cases. */
@media (min-width: 1000px) {
    .w-nav .w-nav-list.level_1.hidden,
    .w-nav .w-nav-list.level_1 {
        display: flex !important;
        height: auto !important;
        position: static !important;
        background: transparent !important;
        overflow: visible !important;
    }
    .w-nav .w-nav-list.level_1 .w-nav-item {
        display: inline-block !important;
    }
    .w-nav .w-nav-control {
        display: none !important;
    }
}

/* Mobile nav hamburger menu */
@media (max-width: 999px) {
    .header_hor .w-nav.type_desktop .w-nav-control,
    .w-nav .w-nav-control {
        display: block !important;
        text-align: center;
        padding: 0 0.8rem;
        color: inherit;
        font-size: 25px;
        line-height: 50px;
        cursor: pointer;
        text-decoration: none;
    }
    .w-nav .w-nav-control::before {
        content: "menu";
        font-family: "Material Icons";
        font-size: 25px;
    }
    .w-nav .w-nav-list.level_1,
    .w-nav .w-nav-list.level_1.hidden {
        display: none !important;
        position: absolute;
        top: 50px;
        left: 0;
        right: 0;
        background: #fff !important;
        z-index: 999;
        overflow: auto;
        box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    }
    .w-nav .w-nav-list.level_1.mobile-open,
    .w-nav .w-nav-list.level_1.hidden.mobile-open {
        display: block !important;
    }
    .w-nav .w-nav-list.level_1 .w-nav-item {
        display: block !important;
        border-bottom: 1px solid #eee;
    }
    .w-nav .w-nav-list.level_1 .w-nav-anchor {
        display: block;
        padding: 12px 15px;
        color: #333 !important;
        text-decoration: none;
    }
    .w-nav .w-nav-list.level_1 .w-nav-anchor:hover {
        color: #ff5722 !important;
    }
    /* Current page highlight */
    .w-nav .w-nav-list.level_1 .current-menu-item .w-nav-anchor,
    .w-nav .w-nav-list.level_1 .menu-item-home.current-menu-item .w-nav-anchor {
        color: #ff5722 !important;
    }
}

/* Ensure section background images display - us-base.min.css sets opacity:0
   and waits for JS to add .loaded class. Force visible. */
.l-section-img {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 1 !important;
}

/* Style Calendly button CTAs (hero/footer) */
a.trigger-calendly-btn {
    display: inline-block;
    background-color: #ff5722;
    color: #ffffff !important;
    padding: 0 22.5px;
    font-size: 15px;
    text-transform: uppercase;
    border-radius: 3px;
    text-decoration: none;
    line-height: 2.8;
    cursor: pointer;
}

/* Style inline Calendly links (within blog post text) */
a.trigger-calendly:not(.trigger-calendly-btn) {
    color: #ff5722;
    cursor: pointer;
    text-decoration: none;
}

/* Header fullscreen search overlay */
.w-search.active .w-search-background {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9) !important;
    z-index: 9998;
    opacity: 1 !important;
    border-radius: 0 !important;
    transform: none !important;
    pointer-events: auto !important;
}
.w-search.active .w-search-form {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    background: transparent !important;
}
.w-search.active .w-search-form input[name="s"] {
    font-size: 36px;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    color: #fff;
    width: 60%;
    max-width: 700px;
    padding: 10px 0;
    outline: none;
}
.w-search.active .w-search-form input[name="s"]::placeholder {
    color: rgba(255,255,255,0.4);
}
.w-search.active .w-search-close {
    display: block;
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 10000;
    width: 30px;
    height: 30px;
    cursor: pointer;
}
.w-search.active .w-search-close::before,
.w-search.active .w-search-close::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 2px;
    background: #fff;
    top: 14px;
    left: 0;
}
.w-search.active .w-search-close::before { transform: rotate(45deg); }
.w-search.active .w-search-close::after { transform: rotate(-45deg); }

/* Search results overlay */
#search-results-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    overflow-y: auto;
}
.search-results-inner {
    background: #fff;
    width: 90%;
    max-width: 700px;
    border-radius: 4px;
    padding: 30px;
    margin-bottom: 80px;
    position: relative;
}
.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.search-results-header h2 {
    margin: 0;
    font-size: 22px;
}
.search-results-close {
    font-size: 28px;
    cursor: pointer;
    color: #666;
    line-height: 1;
}
.search-result-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}
.search-result-item:last-child {
    border-bottom: none;
}
.search-result-item h3 {
    margin: 0 0 5px;
    font-size: 17px;
}
.search-result-item h3 a {
    color: #ff5722;
    text-decoration: none;
}
.search-result-item p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}
.search-no-results {
    color: #666;
    font-size: 16px;
}
.search-count {
    color: #999;
    font-size: 14px;
    margin-bottom: 10px;
}
