/* =====================================================================
   Public site header: top bar + main navbar.

   The theme's top bar was desktop-only (d-none d-lg-block), set 16px text
   with 1px letter-spacing and let every item wrap, so on a normal laptop the
   address broke over two lines and each link's icon sat on a different line
   from its label. This replaces it with one bar that works from 320px phones
   to 4K screens: items never wrap, lower-priority labels collapse to icons as
   space runs out, and the address truncates with an ellipsis (full text in
   the tooltip).

   Breakpoints (Bootstrap): <576 phone · 576 sm · 768 md tablet · 992 lg ·
   1200 xl desktop · 1400 xxl large.
   ===================================================================== */

/* ---- Top bar -------------------------------------------------------- */
.site-topbar {
    background: var(--bs-primary);
    color: #fff;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: .8125rem;
    line-height: 1.2;
}
.site-topbar a { color: #fff; text-decoration: none; }
.site-topbar a:hover, .site-topbar a:focus-visible { color: var(--bs-secondary); }
.site-topbar i { color: var(--bs-secondary); }

.site-topbar-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: .75rem; min-height: 40px; padding-top: .35rem; padding-bottom: .35rem;
}
.st-group { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.st-contact { flex: 1 1 auto; overflow: hidden; }
.st-actions { flex: 0 0 auto; }

/* Items keep their natural width; only the address below may shrink. */
.st-item {
    display: inline-flex; align-items: center; gap: .4rem;
    white-space: nowrap; flex-shrink: 0;
}
.st-item i { flex-shrink: 0; font-size: .95em; }

/* The address is the longest item and the least important: it shrinks
   first and truncates rather than pushing everything onto a second line. */
.site-topbar .st-address { flex: 0 1 auto; flex-shrink: 1; min-width: 60px; overflow: hidden; }
.st-address span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* Language switch: a small pill group. */
.st-lang { display: inline-flex; align-items: center; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; overflow: hidden; }
.st-lang a { padding: .2rem .5rem; font-size: .72rem; font-weight: 600; letter-spacing: .5px; opacity: .8; }
.st-lang a.active { background: #fff; color: var(--bs-primary); opacity: 1; }
.st-lang a:not(.active):hover { opacity: 1; background: rgba(255, 255, 255, .15); color: #fff; }

/* Login: the one call-to-action in the bar, so it gets a button shape. */
.st-login {
    display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
    background: var(--bs-secondary); color: #fff !important; font-weight: 600;
    border-radius: 999px; padding: .3rem .85rem;
}
.st-login i { color: #fff; }
.st-login:hover, .st-login:focus-visible { background: #fff; color: var(--bs-primary) !important; }
.st-login:hover i, .st-login:focus-visible i { color: var(--bs-primary); }

.st-social { display: inline-flex; gap: .35rem; }
.st-social a {
    width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(255, 255, 255, .95); font-size: .8rem;
}
.st-social a i { color: var(--bs-secondary); }
.st-social a:hover { background: var(--bs-secondary); }
.st-social a:hover i { color: #fff; }

/* Divider dots between groups on wider screens. */
.st-sep { width: 1px; align-self: stretch; background: rgba(255, 255, 255, .25); }

/* Phones: full-bleed strip, icons only for contact, compact controls. */
@media (max-width: 575.98px) {
    .site-topbar-inner { gap: .5rem; min-height: 38px; }
    .st-group { gap: .6rem; }
    .st-contact .st-item .st-label { display: none; }
    .st-contact .st-item i { font-size: 1.05rem; }
    .st-login { padding: .28rem .7rem; }
}

/* From large screens up the bar takes the theme's rounded "tab" shape. */
@media (min-width: 992px) {
    .site-topbar-wrap { padding-top: .5rem; }
    .site-topbar { border-radius: 0 40px; }
    .site-topbar-inner { min-height: 44px; padding-left: 1.25rem; padding-right: 1.25rem; }
    .site-topbar { font-size: .84rem; }
}
@media (min-width: 1400px) {
    .st-group { gap: 1rem; }
}
/* Large screens: let the whole header use the extra width (top bar and
   navbar together, so they stay aligned) instead of truncating the address. */
@media (min-width: 1600px) {
    .site-header .container,
    .site-header .container-lg { max-width: 1540px; }
    .site-topbar { font-size: .875rem; }
    .st-group { gap: 1.25rem; }
}

/* ---- Main navbar ---------------------------------------------------- */
.site-header .navbar { padding-top: .6rem; padding-bottom: .6rem; flex-wrap: wrap; }
.site-header .navbar-brand { margin-right: 1rem; padding: 0; }
.site-header .navbar-brand img { height: 60px; width: auto; max-width: 220px; object-fit: contain; }

/* Buttons on the right: phone block (large screens), Apply, search, menu. */
.site-nav-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.site-nav-actions .btn-apply { white-space: nowrap; }
.site-nav-actions .navbar-toggler {
    border: 2px solid var(--bs-primary); border-radius: 12px; padding: .35rem .7rem; box-shadow: none;
}
.site-nav-actions .navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .25); }

.site-phone { display: flex; align-items: center; gap: .75rem; padding-right: 1rem; margin-right: .25rem; border-right: 2px solid var(--bs-primary); text-decoration: none; }
.site-phone .site-phone-icon { position: relative; font-size: 1.6rem; color: var(--bs-primary); }
.site-phone .site-phone-icon .fa-comment-dots { position: absolute; top: -8px; right: -12px; font-size: .9rem; color: var(--bs-secondary); }
.site-phone .site-phone-text { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.site-phone .site-phone-text small { color: var(--bs-primary); font-size: .8rem; }
.site-phone .site-phone-text b { color: var(--bs-secondary); font-weight: 600; font-size: .95rem; }

.site-header .navbar-nav .nav-link { white-space: nowrap; }

/* Below xl the menu collapses into a panel under the logo row. */
@media (max-width: 1199.98px) {
    .site-header .navbar-collapse {
        order: 3; flex-basis: 100%;
        margin-top: .6rem; border-radius: 1rem; background: #fff;
        box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    }
    .site-header .navbar-collapse .navbar-nav { padding: .5rem 1rem; }
    .site-header .navbar-collapse .nav-link { padding: .7rem .25rem; border-bottom: 1px dashed rgba(0, 0, 0, .08); }
    .site-header .navbar-collapse .nav-item:last-child .nav-link,
    .site-header .navbar-collapse .nav-link:last-child { border-bottom: 0; }
    .site-header .navbar-collapse .dropdown-menu { box-shadow: none; border-radius: .75rem; margin: .25rem 0 .5rem; }
}
@media (max-width: 991.98px) {
    .site-header .navbar-brand img { height: 50px; max-width: 180px; }
}
@media (max-width: 575.98px) {
    .site-header .navbar-brand img { height: 42px; max-width: 150px; }
    .site-nav-actions { gap: .35rem; }
    .site-nav-actions .btn-md-square { width: 40px; height: 40px; }
}
@media (min-width: 1200px) {
    /* Menu centred between the logo and the action buttons. */
    .site-nav-actions { order: 3; margin-left: 0; }
    .site-header .navbar-collapse { order: 2; }
}
@media (min-width: 1200px) and (max-width: 1399.98px) {
    /* Tighter menu spacing so seven items + Apply fit at 1200px. */
    .site-header .navbar-nav .nav-link { padding-left: .6rem !important; padding-right: .6rem !important; }
}
@media (min-width: 1600px) {
    .site-header .navbar-brand img { height: 68px; max-width: 240px; }
}
