/* AI Chatbot dropdown. Caret is CSS-only so Font Awesome cannot shift the bar. */

.cs-nav-item--has-children {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.cs-nav-caret {
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
}

.cs-nav-caret::before {
    content: "";
    display: block;
    width: 0.38rem;
    height: 0.38rem;
    margin-top: -0.12rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.7;
}

.cs-nav-item--has-children:hover .cs-nav-caret::before,
.cs-nav-item--has-children:focus-within .cs-nav-caret::before {
    transform: rotate(225deg);
    opacity: 1;
}

.cs-nav-dropdown {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    left: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 12.75rem;
    padding: 0.4rem;
    gap: 0.3rem;
    background: rgba(17, 17, 17, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 0;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 16px 40px rgba(0, 0, 0, 0.65), 0 4px 12px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(0.35rem);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
    z-index: 60;
}

.cs-nav-dropdown::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 0.7rem;
}

.cs-nav-item--has-children:hover .cs-nav-dropdown,
.cs-nav-item--has-children:focus-within .cs-nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.cs-nav-dropdown__link {
    display: block;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    color: rgba(255, 255, 255, 0.88);
    padding: 0.6rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 0;
    background: transparent;
    border: 0;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.cs-nav-dropdown__link:after {
    content: none;
}

.cs-nav-dropdown__link:hover,
.cs-nav-dropdown__link:focus-visible {
    color: #fff;
    background: rgba(168, 16, 16, 0.28);
    border-color: transparent;
    outline: none;
}

.cs-nav-dropdown__link.active {
    color: #fff;
    background: rgba(168, 16, 16, 0.22);
    border-color: transparent;
    box-shadow: inset 3px 0 0 #a81010;
}

#hamburger-btn,
#close-menu-btn {
    cursor: pointer;
}

.cs-mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
    padding: 0 1.5rem 2.5rem;
    gap: 1.6rem;
}

#mobile-menu .mobile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0.35rem 0.35rem 0.55rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    background: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: color 0.2s ease;
}

#mobile-menu .mobile-link::after {
    content: "";
    position: absolute;
    left: 0.35rem;
    bottom: 0.15rem;
    width: 0;
    height: 2px;
    background: #a81010;
    transition: width 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

#mobile-menu .mobile-link:hover,
#mobile-menu .mobile-link:focus-visible,
#mobile-menu .mobile-link.active {
    color: #fff;
    background: none !important;
}

#mobile-menu .mobile-link:hover::after,
#mobile-menu .mobile-link:focus-visible::after,
#mobile-menu .mobile-link.active::after {
    width: calc(100% - 0.7rem);
}

#mobile-menu .cs-mobile-contact,
#mobile-menu .nav-main-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.35rem;
    padding: 0.75rem 1.6rem;
    color: #111 !important;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    background: #fff !important;
    border: 0 !important;
    border-radius: 9999px !important;
    box-shadow: none !important;
}

#mobile-menu .cs-mobile-contact::after,
#mobile-menu .nav-main-contact::after {
    display: none;
}

/* In-page AI Chatbot bar: label left of tabs, vertically centered. */
.cs-ai-subbar {
    background: #171717;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cs-ai-subbar__inner {
    max-width: 96rem;
    margin: 0 auto;
    padding: 0 1.25rem;
    min-height: 3.25rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.cs-ai-subbar__label {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin: 0;
    color: #a81010;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-indent: 0.18em;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
}

.cs-ai-subbar__list {
    display: flex;
    align-items: stretch;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cs-ai-subbar__link {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 0.85rem;
    height: 3.25rem;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 0;
    background: transparent;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.cs-ai-subbar__link:hover,
.cs-ai-subbar__link:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
    outline: none;
}

.cs-ai-subbar__link.is-current {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.cs-ai-subbar__link.is-current::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: #a81010;
}

@media (min-width: 768px) {
    .cs-ai-subbar__inner {
        padding: 0 2rem;
        gap: 1.25rem;
    }

    .cs-ai-subbar__link {
        padding: 0 1.15rem;
    }
}
