/* Public header, navigation, contacts and canonical account control. */

.public-topbar {
    position: fixed;
    z-index: 30;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1180px, calc(100% - 32px));
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    padding: 11px 16px 11px 14px;
    border: 1px solid rgba(255,255,255,.52);
    border-radius: var(--zf-radius-pill);
    background: rgba(247, 240, 226, .66);
    -webkit-backdrop-filter: blur(22px) saturate(1.16);
    backdrop-filter: blur(22px) saturate(1.16);
    box-shadow: 0 22px 70px rgba(31, 54, 36, .14);
}

.front-home .public-topbar {
    width: auto;
    left: clamp(16px, 3vw, 34px);
    right: auto;
    transform: none;
    min-height: 62px;
    padding: 10px 20px 10px 13px;
    background: rgba(255,250,238,.50);
}

.front-home .public-topbar nav,
.front-home .public-auth {
    display: none;
}

.public-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--zf-forest);
    text-decoration: none;
    font-family: "Gilroy", "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 900;
    letter-spacing: -.032em;
}

.public-brand::before { display: none; }

.public-brand img {
    display: block;
    width: 58px;
    height: 28px;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 9px 20px rgba(16,59,45,.16));
}

.public-brand span {
    display: block;
    font-size: 18px;
    line-height: 1;
    text-transform: uppercase;
    font-weight: 900;
}

.front-home .public-brand img {
    width: 64px;
    height: 31px;
}

.front-home .public-brand span {
    font-size: 18px;
    text-transform: uppercase;
}

.public-topbar nav {
    margin-left: 18px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(14px, 2vw, 28px);
    font-family: var(--zf-font-display);
    font-weight: 600;
}

.public-topbar nav a,
.public-auth a,
.public-auth button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: var(--zf-radius-pill);
    background: transparent;
    color: rgba(23,35,27,.72);
    text-decoration: none;
    font: inherit;
    font-weight: 720;
    cursor: pointer;
}

.public-topbar nav a {
    font-family: var(--zf-font-display);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.015em;
}

.public-topbar nav a:hover,
.public-auth a:hover,
.public-auth button:hover {
    background: rgba(255,255,255,.58);
    color: var(--zf-forest);
}

.public-auth,
.public-account-slot {
    display: flex;
    align-items: center;
    gap: 8px;
}

.public-auth { margin-left: auto; }
.public-auth form { margin: 0; }

.public-contacts {
    position: fixed;
    z-index: 31;
    top: 25px;
    right: 200px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    color: rgba(16,59,45,.88);
    text-align: right;
    text-shadow: 0 1px 0 rgba(255,250,238,.38), 0 10px 30px rgba(255,250,238,.26);
    font-family: "Gilroy", "Manrope", ui-sans-serif, system-ui, sans-serif;
    font-weight: 500;
    line-height: 1.06;
    letter-spacing: -.012em;
}

.public-contacts a,
.public-contacts span {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    font-size: clamp(15px, 1.08vw, 17px);
}

.public-contacts a:hover { color: var(--zf-forest); }

.public-contact-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 32;
    top: 16px;
    right: 14px;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255,255,255,.54);
    border-radius: 999px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.42), rgba(255,250,238,.16)),
        rgba(255,250,238,.34);
    color: var(--zf-forest);
    -webkit-backdrop-filter: blur(18px) saturate(1.28);
    backdrop-filter: blur(18px) saturate(1.28);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.58),
        0 14px 34px rgba(33,48,32,.10);
    cursor: pointer;
}

.public-contact-toggle svg {
    display: block;
    width: 21px;
    height: 21px;
    fill: currentColor;
}

/* One account control everywhere: guest button and signed-in menu share the same shell. */
.public-user-menu { position: relative; }

.public-account-trigger,
.public-user-menu > summary {
    -webkit-appearance: none;
    appearance: none;
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    display: grid;
    place-items: center;
    padding: 0;
    list-style: none;
    border: 1px solid rgba(16,59,45,.13);
    border-radius: 50%;
    background: rgba(255,255,255,.72);
    color: var(--zf-forest);
    box-shadow: 0 10px 24px rgba(16,59,45,.10);
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.public-account-trigger:hover,
.public-user-menu > summary:hover {
    border-color: rgba(16,59,45,.20);
    background: rgba(255,255,255,.94);
    box-shadow: 0 12px 28px rgba(16,59,45,.13);
}

.public-user-menu > summary::-webkit-details-marker { display: none; }

.public-account-trigger img,
.public-user-menu > summary img,
.public-user-menu img {
    display: block;
    width: 21px;
    height: 21px;
}

.public-user-menu > div {
    position: absolute;
    z-index: 1500;
    top: calc(100% + 10px);
    right: 0;
    min-width: 160px;
    padding: 10px;
    border: 1px solid rgba(16,59,45,.10);
    border-radius: 14px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 16px 42px rgba(16,59,45,.16);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

.public-user-menu a,
.public-user-menu button {
    width: 100%;
    display: block;
    min-height: 38px;
    padding: 9px 10px;
    border: 0;
    border-radius: 9px;
    background: none;
    color: var(--zf-ink);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.public-user-menu a:hover,
.public-user-menu button:hover {
    background: rgba(16,59,45,.07);
    color: var(--zf-forest);
}

.public-mobile-menu {
    display: none;
    position: relative;
    margin-left: auto;
}

.public-mobile-menu > summary {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    list-style: none;
    border: 1px solid rgba(16,59,45,.13);
    border-radius: 13px;
    background: rgba(255,255,255,.62);
    color: var(--zf-forest);
    cursor: pointer;
}

.public-mobile-menu > summary::-webkit-details-marker { display: none; }

.public-mobile-menu > summary img {
    width: 21px;
    height: 21px;
    display: block;
}

.public-mobile-menu[open] > summary { background: var(--zf-forest); }

.public-mobile-menu[open] > summary img { filter: brightness(0) invert(1); }

.public-mobile-menu-panel {
    position: absolute;
    z-index: 90;
    top: calc(100% + 10px);
    right: 0;
    width: min(280px, calc(100vw - 20px));
    max-height: calc(100vh - 86px);
    max-height: calc(100dvh - 86px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    display: grid;
    gap: 4px;
    padding: 9px;
    border: 1px solid rgba(255,255,255,.68);
    border-radius: 17px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 22px 56px rgba(16,59,45,.22);
    -webkit-backdrop-filter: blur(18px) saturate(1.08);
    backdrop-filter: blur(18px) saturate(1.08);
}

.public-mobile-menu-panel a,
.public-mobile-menu-panel button {
    width: 100%;
    min-height: 43px;
    display: flex;
    align-items: center;
    padding: 9px 12px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--zf-ink);
    font: 750 14px/1.25 var(--zf-font);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.public-mobile-menu-panel a:hover,
.public-mobile-menu-panel button:hover {
    background: rgba(16,59,45,.08);
    color: var(--zf-forest);
}

.public-mobile-menu-panel form { margin: 0; }

/* Account modal uses the same component on every public page. */
.zf-account-modal[hidden] { display: none !important; }

.zf-account-modal {
    position: fixed;
    inset: 0;
    z-index: 31000;
    display: grid;
    place-items: center;
    padding: 18px;
}

.zf-account-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(5,18,13,.58);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.zf-account-dialog {
    position: relative;
    z-index: 1;
    width: min(540px, 100%);
    max-height: min(88vh, 760px);
    overflow: auto;
    padding: 38px 34px 32px;
    border: 1px solid rgba(255,255,255,.78);
    border-radius: 28px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 30px 90px rgba(0,0,0,.28);
    color: var(--zf-ink);
}

.zf-account-close {
    position: absolute;
    top: 13px;
    right: 15px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #526158;
    font-size: 29px;
    line-height: 1;
    cursor: pointer;
}

.zf-account-close:hover { background: #eef2ef; }

.zf-account-body {
    text-align: center;
}

.zf-account-body h2 {
    margin: 0 42px 12px;
    color: var(--zf-forest);
    font-family: var(--zf-font-display);
    font-size: clamp(29px, 4vw, 36px);
    line-height: 1.08;
    letter-spacing: -.025em;
    text-align: center;
}

.zf-account-body > p,
.zf-account-lead,
.zf-account-call-note,
.zf-account-status {
    margin: 0 auto 18px;
    max-width: 440px;
    color: #5d6a62;
    font-size: 14px;
    line-height: 1.55;
    text-align: center;
}

.zf-account-lead strong {
    color: var(--zf-forest);
    font-weight: 800;
}

.zf-account-form {
    display: grid;
    gap: 12px;
    text-align: left;
}

.zf-account-form label {
    display: grid;
    gap: 6px;
    color: #4c5b53;
    font-size: 12px;
    font-weight: 750;
    text-align: left;
}

.zf-account-form input[type="text"],
.zf-account-form input[type="tel"] {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border: 1px solid rgba(16,59,45,.18);
    border-radius: 14px;
    background: #fff;
    color: var(--zf-ink);
    font: 600 15px/1.2 var(--zf-font);
    outline: none;
}

.zf-account-form input:focus {
    border-color: rgba(16,59,45,.52);
    box-shadow: 0 0 0 4px rgba(16,59,45,.08);
}

.zf-account-consent {
    display: grid;
    grid-template-columns: 18px 1fr;
    align-items: start;
    gap: 9px;
    font-weight: 550;
    line-height: 1.4;
    text-align: left;
}

.zf-account-consent input { margin: 2px 0 0; }
.zf-account-consent a { text-underline-offset: 2px; }

.zf-account-primary,
.zf-account-secondary {
    min-height: 48px;
    padding: 11px 18px;
    border-radius: 13px;
    font: 800 14px/1.2 var(--zf-font);
    cursor: pointer;
}

.zf-account-primary {
    width: 100%;
    border: 1px solid var(--zf-forest);
    background: var(--zf-forest);
    color: #fff;
}

.zf-account-secondary {
    border: 1px solid rgba(16,59,45,.18);
    background: #fff;
    color: var(--zf-forest);
}

.zf-account-primary:disabled,
.zf-account-secondary:disabled,
.zf-account-repeat-link:disabled {
    opacity: .55;
    cursor: wait;
}

.zf-account-error {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #efb5ba;
    border-radius: 10px;
    background: #fff1f2;
    color: #9c2630;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}

.zf-account-call-number {
    width: min(390px, 100%);
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 8px auto 18px;
    padding: 10px 18px;
    border: 1px solid rgba(16,59,45,.15);
    border-radius: 15px;
    background: rgba(16,59,45,.045);
    color: var(--zf-forest);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
    font-size: clamp(24px, 5vw, 31px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: .01em;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}

.zf-account-call-number:hover {
    border-color: rgba(16,59,45,.28);
    background: rgba(16,59,45,.07);
}

.zf-account-call-icon {
    display: none;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    fill: currentColor;
}

.zf-account-call-note {
    margin-bottom: 22px;
}

.zf-account-status {
    margin-bottom: 7px;
    color: var(--zf-forest);
    font-size: 15px;
    font-weight: 850;
    line-height: 1.35;
}

.zf-account-repeat-row {
    min-height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.zf-account-repeat-timer {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #879189;
    font-size: 12px;
    font-weight: 550;
    line-height: 1.35;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.zf-account-repeat-link {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--zf-forest);
    font: 650 12px/1.35 var(--zf-font);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.zf-account-repeat-link:hover { opacity: .72; }

/* Modal scroll lock must win over the homepage sections scroll state loaded later. */
body.zf-account-open { overflow: hidden !important; }

@media (max-width: 980px) {
    .public-topbar {
        top: 12px;
        width: calc(100% - 20px);
        min-height: 56px;
        justify-content: flex-start;
    }

    .front-home .public-topbar {
        left: 10px;
        width: auto;
        min-height: 54px;
        background: rgba(255,250,238,.54);
    }

    .public-topbar .public-desktop-nav,
    .front-home .public-topbar nav {
        display: none;
    }

    .public-topbar .public-desktop-auth {
        display: flex;
        order: 21;
        margin-left: 7px;
    }

    .front-home:not(.front-home-menu-visible) .public-topbar .public-desktop-auth {
        display: none;
    }

    .public-contact-toggle { display: inline-flex; }

    .public-contacts {
        top: 72px;
        right: 10px;
        min-width: 218px;
        padding: 14px 16px;
        border: 1px solid rgba(255,255,255,.54);
        border-radius: 22px;
        background:
            linear-gradient(135deg, rgba(255,255,255,.48), rgba(255,250,238,.20)),
            rgba(255,250,238,.70);
        -webkit-backdrop-filter: blur(20px) saturate(1.24);
        backdrop-filter: blur(20px) saturate(1.24);
        box-shadow:
            inset 0 1px 0 rgba(255,255,255,.58),
            0 20px 48px rgba(33,48,32,.16);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-6px) scale(.98);
        transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    }

    body.contacts-open .public-contacts {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    .public-contacts a,
    .public-contacts span {
        font-size: 14.5px;
        line-height: 1.25;
        text-shadow: none;
    }

    .public-brand { gap: 9px; }

    .public-brand img,
    .front-home .public-brand img {
        width: 52px;
        height: 25px;
    }

    .public-brand span,
    .front-home .public-brand span {
        font-size: 16px;
    }

    .public-mobile-menu {
        display: block;
        order: 20;
        margin-left: auto;
    }
}

@media (max-width: 520px) {
    .zf-account-modal { padding: 10px; }

    .zf-account-dialog {
        width: 100%;
        max-height: calc(100dvh - 20px);
        padding: 34px 18px 26px;
        border-radius: 22px;
    }

    .zf-account-close {
        top: 8px;
        right: 9px;
    }

    .zf-account-body h2 {
        margin-inline: 34px;
        font-size: 28px;
    }

    .zf-account-call-number {
        min-height: 58px;
        justify-content: space-between;
        padding-inline: 16px;
        font-size: clamp(23px, 7.2vw, 29px);
    }

    .zf-account-call-icon { display: block; }

    .zf-account-call-note {
        font-size: 13px;
        line-height: 1.48;
    }
}
