/* ==========================================================================
   layout.css
   Parts on every page: logo, header (with mobile menu) and footer.
   ========================================================================== */

/* ---------- Logo ---------- */
.qo-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--qo-teal);            /* colour of the square behind the sparkle */
}
.qo-logo__mark { width: 38px; height: 38px; flex-shrink: 0; }   /* never squeezed by a crowded header */
.qo-logo__text { color: var(--qo-ink); font-size: 23px; font-weight: 700; letter-spacing: -0.03em; }
.qo-logo__accent { color: var(--qo-teal); }
.qo-logo--light .qo-logo__text { color: var(--qo-white); }
.qo-logo--light .qo-logo__accent { color: var(--qo-sun); }
.qo-logo--light { color: rgba(255, 255, 255, 0.14); }

/* ---------- Header ---------- */
.qo-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    transition: box-shadow 0.3s;
}
.qo-header.is-stuck { box-shadow: 0 4px 24px rgba(16, 39, 61, 0.08); }
.qo-header__bar {
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: var(--qo-header-h);
}

/* Main menu (desktop: inline in the bar) */
.qo-nav { margin-inline: auto; }
.qo-nav__list { display: flex; gap: 8px; }
.qo-nav__link {
    display: block;
    padding: 10px 18px;
    border-radius: 50px;
    font-weight: 500;
    transition: background-color 0.25s, color 0.25s;
}
.qo-nav__link:hover { background: var(--qo-mist); }
.qo-nav__link.is-active { background: var(--qo-aqua); color: var(--qo-teal-dark); font-weight: 600; }
.qo-nav__quote { display: none; }

.qo-header__actions { display: flex; align-items: center; gap: 16px; }
.qo-header__phone { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.qo-header__phone-icon {
    display: grid;
    place-items: center;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--qo-aqua);
    color: var(--qo-teal);
    font-size: 18px;
}
.qo-header__phone:hover .qo-header__phone-text { color: var(--qo-teal); }

/* Burger button: three bars that turn into an X */
.qo-header__menu-btn {
    display: none;
    place-items: center;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--qo-ink);
}
.qo-burger { display: grid; gap: 4px; width: 18px; }
.qo-burger span { display: block; height: 2px; border-radius: 2px; background: var(--qo-white); transition: transform 0.3s, opacity 0.3s; }
.qo-header.is-menu-open .qo-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.qo-header.is-menu-open .qo-burger span:nth-child(2) { opacity: 0; }
.qo-header.is-menu-open .qo-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Tablet: phone number shrinks to its icon and spacing tightens so the bar fits at 768px */
@media (max-width: 1024px) {
    .qo-header__phone-text { display: none; }
    .qo-header__bar { gap: 16px; }
    .qo-header__actions { gap: 10px; }
    .qo-nav__list { gap: 2px; }
    .qo-nav__link { padding: 10px 14px; }
    .qo-header__quote { padding-inline: 20px; }
}

/* Mobile: menu becomes a panel under the bar */
@media (max-width: 767px) {
    .qo-header__bar { gap: 12px; }
    .qo-header__menu-btn { display: grid; }
    .qo-header__quote { display: none; }
    .qo-header__actions { margin-left: auto; gap: 8px; }
    .qo-logo__text { font-size: 20px; }
    .qo-logo__mark { width: 34px; height: 34px; }

    .qo-nav {
        position: absolute;
        top: 100%; left: 0; right: 0;
        margin: 0;
        padding: 12px var(--qo-gutter) 24px;
        background: var(--qo-white);
        box-shadow: 0 16px 24px rgba(16, 39, 61, 0.1);
        display: none;
    }
    .qo-header.is-menu-open .qo-nav { display: block; }
    .qo-nav__list { flex-direction: column; gap: 4px; }
    .qo-nav__link { padding: 14px 16px; border-radius: 14px; font-size: 18px; }
    .qo-nav__quote { display: flex; margin-top: 12px; width: 100%; }
}

/* ---------- Footer ---------- */
.qo-footer {
    padding-top: 72px;              /* no top margin: the last section's own padding gives the space */
    background: var(--qo-ink);
    color: var(--qo-on-dark-muted);
    font-size: 16px;
}
.qo-footer__cols {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.1fr 1fr;
    gap: 40px;
    padding-bottom: 56px;
}
.qo-footer__about { margin: 20px 0 24px; max-width: 300px; }
/* Proximity rule: heading-to-list gap (18px) is bigger than the gap between items (10px) */
.qo-footer__head { margin-bottom: 18px; color: var(--qo-white); font-size: 18px; }
.qo-footer__list { display: grid; gap: 10px; }
.qo-footer__list a:hover { color: var(--qo-sun); }
.qo-footer__list--icons li > * { display: inline-flex; align-items: center; gap: 10px; word-break: break-word; }
.qo-footer__list--icons .qo-icon { color: var(--qo-sun); }

.qo-socials { display: flex; gap: 10px; }
.qo-socials a {
    display: grid;
    place-items: center;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--qo-white);
    transition: background-color 0.25s, color 0.25s;
}
.qo-socials svg { width: 18px; height: 18px; fill: currentColor; }
.qo-socials a:hover { background: var(--qo-sun); color: var(--qo-ink); }

.qo-hours dd { color: var(--qo-white); }
.qo-hours--dark dd { color: var(--qo-ink); }

.qo-footer__bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding-block: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 15px;
}
.qo-footer__bar a { text-decoration: underline; text-underline-offset: 3px; }
.qo-footer__bar a:hover { color: var(--qo-sun); }

@media (max-width: 1024px) {
    .qo-footer__cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
    .qo-footer { padding-top: 56px; }
    .qo-footer__cols { grid-template-columns: 1fr; gap: 36px; }
}
