/*
 * PWB Services layout compatibility fixes.
 * These selectors match the class names output by the active theme templates.
 */

/* Top contact bar */
.topbar {
    width: 100%;
    background: #0d2014;
    color: #ffffff;
    font-size: 14px;
}

.topbar .topbar-inner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 20px;
    min-height: 42px;
}

.topbar .topbar-inner > span {
    min-width: 0;
    text-align: center;
}

.topbar a,
.topbar a:hover,
.topbar a:focus {
    color: #ffffff;
}

.topbar a:hover,
.topbar a:focus {
    text-decoration: underline;
}

/* Desktop header */
.site-header .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: 96px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.site-header .logo-wrap {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
}

.site-header .logo-wrap .logo {
    display: block;
    width: 120px !important;
    max-width: 120px !important;
    height: auto !important;
    max-height: 80px !important;
    object-fit: contain;
}

.site-header .main-nav {
    display: flex !important;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    gap: 28px;
    width: auto;
    margin: 0;
    padding: 0;
}

.site-header .main-nav a {
    display: block;
    padding: 12px 0;
    color: #111827;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
}

.site-header .main-nav a:hover,
.site-header .main-nav a:focus {
    color: #557f3e;
}

.site-header .nav-btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 30px;
    background: #557f3e;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    box-shadow: 0 8px 20px rgba(23, 53, 31, 0.16);
}

.site-header .nav-btn:hover,
.site-header .nav-btn:focus {
    background: #426731;
    color: #ffffff !important;
}

.site-header .menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #557f3e;
    color: #ffffff;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

/* Footer */
.site-footer .footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 45px;
}

.site-footer .footer-grid > div {
    min-width: 0;
}

.site-footer .footer-logo {
    display: block;
    width: 180px !important;
    max-width: 180px !important;
    height: auto !important;
    max-height: 145px !important;
    margin: 0 0 20px;
    object-fit: contain;
}

.site-footer .footer-grid > div:nth-child(2) > a {
    display: block;
    margin-bottom: 10px;
}

.site-footer .footer-grid p:last-child,
.site-footer .footer-grid > div:nth-child(2) > a:last-child {
    margin-bottom: 0;
}

/* Tablet */
@media (max-width: 1050px) {
    .site-header .nav-inner,
    .site-header .main-nav {
        gap: 17px;
    }

    .site-header .logo-wrap .logo {
        width: 105px !important;
        max-width: 105px !important;
        max-height: 72px !important;
    }

    .site-header .nav-btn {
        padding-right: 18px;
        padding-left: 18px;
    }
}

/* Mobile navigation */
@media (max-width: 840px) {
    .topbar .topbar-inner {
        grid-template-columns: 1fr;
        gap: 3px;
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .site-header .nav-inner {
        flex-wrap: wrap;
        gap: 10px 12px;
        min-height: 86px;
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .site-header .logo-wrap {
        order: 1;
    }

    .site-header .logo-wrap .logo {
        width: 92px !important;
        max-width: 92px !important;
        max-height: 70px !important;
    }

    .site-header .nav-btn {
        order: 2;
        margin-left: auto;
    }

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

    .site-header .main-nav {
        display: none !important;
        order: 4;
        flex: 0 0 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
        padding: 8px 0 10px;
        border-top: 1px solid #dce4e8;
    }

    .site-header .main-nav.is-open {
        display: flex !important;
    }

    .site-header .main-nav a {
        width: 100%;
        padding: 12px 4px;
        border-bottom: 1px solid #edf1f3;
        white-space: normal;
    }

    .site-header .main-nav a:last-child {
        border-bottom: 0;
    }

    .site-footer .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 35px;
    }

    .site-footer .footer-grid > div:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 540px) {
    .topbar .topbar-inner > span:last-child {
        display: none;
    }

    .site-header .nav-btn {
        display: none;
    }

    .site-header .menu-toggle {
        margin-left: auto;
    }

    .site-footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .site-footer .footer-grid > div:first-child {
        grid-column: auto;
    }

    .site-footer .footer-logo {
        width: 150px !important;
        max-width: 150px !important;
        max-height: 120px !important;
    }
}

