/*--------------------------------------------------------------
   Header & footer — responsive layer
   Loaded after style.css / responsive.css so it overrides the
   legacy theme rules for these two areas.
--------------------------------------------------------------*/

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

#masthead.site-header {
    padding: 0;
}

#masthead .site-contact {
    grid-template-columns: auto 1fr auto;
    column-gap: 24px;
    min-height: 88px;
}

#masthead .site-logo .logo {
    margin: 0;
    line-height: 0;
}

#masthead .site-logo .logo-dark.show-logo {
    width: 280px;
    max-width: 100%;
    max-height: none;
    padding: 0;
}

/* Desktop dropdowns also open on keyboard focus */
#masthead .main-nav li:focus-within > ul {
    opacity: 1;
    z-index: 9999;
    top: 100%;
    transform: scaleX(1);
}

/* Hamburger */
.site-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    background-color: var(--white);
    color: var(--primary-color);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.site-menu-toggle:hover,
.site-menu-toggle:focus-visible {
    background-color: var(--primary-color);
    color: var(--white);
    outline: none;
}

/* Small laptops / tablets landscape: nav moves to the drawer */
@media (max-width: 1199.98px) {
    #masthead .site-nav {
        display: none;
    }

    #masthead .site-contact {
        grid-template-columns: auto 1fr;
        column-gap: 16px;
        min-height: 76px;
    }

    #masthead .site-logo .logo-dark.show-logo {
        width: 230px;
    }

    #masthead .site-right {
        gap: 10px;
    }

    #masthead .site-right .header-search {
        width: 240px;
    }

    #masthead .site-right .site-right-btn {
        padding: 0 18px;
        font-size: 15px;
    }

    .site-menu-toggle {
        display: inline-flex;
    }
}

/* Tablets portrait */
@media (max-width: 991.98px) {
    #masthead .site-logo .logo-dark.show-logo {
        width: 210px;
    }

    #masthead .site-right .header-search {
        width: 200px;
    }
}

/* Phones: logo, Contact Us and toggle only */
@media (max-width: 767.98px) {
    #masthead .site-contact {
        column-gap: 10px;
        min-height: 68px;
    }

    #masthead .site-logo {
        min-width: 0;
    }

    #masthead .site-logo .logo-dark.show-logo {
        width: 190px;
    }

    #masthead .site-right {
        gap: 8px;
    }

    #masthead .site-right .header-search {
        display: none;
    }

    #masthead .site-right .site-right-btn {
        padding: 0 14px;
        font-size: 14px;
    }
}

@media (max-width: 575.98px) {
    #masthead .site-logo .logo-dark.show-logo {
        width: 160px;
    }
}

@media (max-width: 399.98px) {
    #masthead .site-contact {
        column-gap: 8px;
        min-height: 60px;
    }

    #masthead .site-logo .logo-dark.show-logo {
        width: 135px;
    }

    #masthead .site-right {
        gap: 6px;
    }

    #masthead .site-right .site-right-btn {
        height: 38px;
        padding: 0 10px;
        font-size: 13px;
    }

    .site-menu-toggle {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
}

@media (max-width: 339.98px) {
    #masthead .site-logo .logo-dark.show-logo {
        width: 120px;
    }
}

/* ========================= MOBILE DRAWER ========================= */

.mobile-nav.offcanvas {
    --bs-offcanvas-width: min(340px, 86vw);
    --bs-offcanvas-zindex: 100001;
    border-left: 0;
    box-shadow: -12px 0 32px rgba(9, 15, 29, 0.18);
}

.offcanvas-backdrop {
    z-index: 100000;
}

.offcanvas-backdrop.show {
    opacity: 0.45;
}

.mobile-nav .offcanvas-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.mobile-nav-logo {
    display: block;
    line-height: 0;
}

.mobile-nav-logo img {
    width: 160px;
    height: auto;
}

.mobile-nav .btn-close {
    margin: 0 0 0 auto;
    padding: 10px;
    opacity: 0.7;
}

.mobile-nav .btn-close:hover,
.mobile-nav .btn-close:focus {
    opacity: 1;
    box-shadow: none;
}

.mobile-nav .offcanvas-body {
    display: flex;
    flex-direction: column;
    padding: 8px 0 24px;
}

.mobile-nav-menu,
.mobile-nav-sub {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mobile-nav-menu > li {
    border-bottom: 1px solid #eef1f5;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0;
    padding: 15px 20px;
    border: 0;
    background: transparent;
    color: var(--primary-color);
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
    background-color: #f4f7fb;
    color: var(--primary-color);
    outline: none;
}

.mobile-nav-link.is-active {
    color: var(--primary-color);
    box-shadow: inset 3px 0 0 var(--primary-color);
}

.mobile-nav-link .fa {
    font-size: 18px;
    transition: transform 0.25s ease;
}

.mobile-nav-link:not(.collapsed) .fa {
    transform: rotate(180deg);
}

.mobile-nav-sub {
    padding-bottom: 8px;
    background-color: #f7f9fc;
}

.mobile-nav-sub a,
.mobile-nav-sub .mobile-nav-empty {
    display: block;
    padding: 10px 20px 10px 32px;
    color: #3c4a5e;
    font-size: 15px;
    line-height: 1.35;
    text-decoration: none;
}

.mobile-nav-sub a:hover,
.mobile-nav-sub a:focus-visible,
.mobile-nav-sub a.is-active {
    color: var(--primary-color);
    font-weight: 600;
    outline: none;
}

.mobile-nav-sub .mobile-nav-empty {
    color: #8a94a6;
}

.mobile-nav-cta {
    display: block;
    margin: 24px 20px 0;
    padding: 12px 20px;
    border-radius: 10px;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.mobile-nav-cta:hover,
.mobile-nav-cta:focus {
    background-color: var(--primary-dark);
    color: var(--white);
}

/* ============================ FOOTER ============================ */

#footer-widgets.footer-widgets {
    padding: 72px 0 40px;
    color: #d8dee8;
}

#footer-widgets .row {
    row-gap: 36px;
}

#footer-widgets .footer-sidebar,
#footer-widgets .footer-sidebar.footer-1 .widget_text {
    padding-bottom: 0;
    text-align: left;
}

#footer-widgets .widget .widget-title {
    position: relative;
    margin: 0 0 20px;
    padding: 0 0 12px;
    font-size: 16px;
    letter-spacing: 0.06em;
    line-height: 1.3;
}

#footer-widgets .widget .widget-title::after {
    display: block;
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36px;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.45);
    display: none;
}

#footer-widgets .footer-about p {
    max-width: 360px;
    margin: 0;
    color: #d8dee8;
    font-size: 15px;
    line-height: 1.8;
}

#footer-widgets .footer-about strong {
    color: var(--white);
}

#footer-widgets .menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

#footer-widgets .menu li {
    padding: 5px 0;
}

#footer-widgets .menu li a {
    display: inline-block;
    color: #d8dee8;
    font-size: 15px;
    line-height: 1.4;
    transition: color 0.25s ease, transform 0.25s ease;
}

#footer-widgets .menu li a:hover,
#footer-widgets .menu li a:focus-visible {
    color: var(--white);
    transform: translateX(3px);
}

.footer-contact {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    color: #d8dee8;
    font-size: 15px;
    line-height: 1.6;
}

.footer-contact li:last-child {
    margin-bottom: 0;
}

.footer-contact .fa {
    flex: 0 0 16px;
    margin-top: 4px;
    color: var(--white);
    font-size: 15px;
    text-align: center;
    opacity: 0.85;
}

.footer-contact span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.footer-contact strong {
    color: var(--white);
    font-weight: 600;
}

.footer-contact a {
    color: #d8dee8;
    transition: color 0.25s ease;
}

.footer-contact a:hover,
.footer-contact a:focus-visible {
    color: var(--white);
}

/* Bottom bar */
#colophon.site-footer {
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

#colophon .footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
}

#colophon .footer-copyright {
    color: var(--white);
    font-size: 14px;
    line-height: 1.5;
}

#colophon .footer-social {
    display: flex;
    gap: 10px;
    padding: 0;
}

#colophon .footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    color: var(--white);
    font-size: 15px;
    transition: background-color 0.25s ease, color 0.25s ease;
}

#colophon .footer-social a:hover,
#colophon .footer-social a:focus-visible {
    background-color: var(--white);
    color: var(--primary-color);
}

@media (max-width: 991.98px) {
    #footer-widgets.footer-widgets {
        padding: 56px 0 36px;
    }

    #footer-widgets .footer-about p {
        max-width: 640px;
    }
}

@media (max-width: 767.98px) {
    #colophon .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 575.98px) {
    #footer-widgets.footer-widgets {
        padding: 44px 0 32px;
    }

    #footer-widgets .row {
        row-gap: 30px;
    }

    #footer-widgets .menu li a,
    .footer-contact li,
    #footer-widgets .footer-about p {
        font-size: 14px;
    }
}
