/* Shared site header, navbar & client portal modal (matches index.html) */

*, *::before, *::after { box-sizing: border-box; }

:root {
    --blue-top: #0a2e46;
    --blue-header: #1a5278;
    --blue-btn: #1e5a82;
    --blue-btn-dark: #164a6c;
    --blue-light: #e8f4fc;
    --gold: #b8923a;
    --gold-btn: linear-gradient(180deg, #c4a24e 0%, #a88432 100%);
    --blue-btn-grad: linear-gradient(180deg, #256992 0%, #1a5278 100%);
    --page-bg: #edf4fa;
    --panel-bg: #e8f1f8;
    --border-blue: #6aadcf;
    --text-dark: #111;
    --text-navy: #1a5278;
    --text-muted: #64748b;
    --nav-active-bg: #c5dff0;
    --white: #fff;
    --input-bg: #f4f7fa;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 999px;
    --shadow-sm: 0 2px 8px rgba(26,82,120,0.08);
    --shadow-md: 0 6px 20px rgba(26,82,120,0.12);
    --shadow-lg: 0 12px 40px rgba(26,82,120,0.15);
    --shadow-btn: 0 4px 0 rgba(0,0,0,0.15), 0 6px 16px rgba(0,0,0,0.1);
    --transition: 0.22s ease;
    --font-en: "Roboto", sans-serif;
    --font-hi: "Noto Sans Devanagari", sans-serif;
    --page-w: 1100px;
}

.wrap {
    width: min(var(--page-w), 94%);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 16px rgba(10,46,70,0.08);
    transition: box-shadow 0.22s ease;
}

.site-header a,
.site-header .nav-menu__auth-btn {
    text-decoration: none;
}
.site-header.is-scrolled {
    box-shadow: 0 4px 24px rgba(10,46,70,0.14);
}
.site-header.is-scrolled .navbar { padding: 10px 0; }
.site-header.is-scrolled .logo-wrap img { height: 48px; }

.navbar__actions {
    display: none;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.btn-login-outline {
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--blue-header);
    border: 1.5px solid var(--blue-header);
    border-radius: var(--radius-sm);
    background: transparent;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.22s ease;
    text-decoration: none;
}
.btn-login-outline:hover { background: #f1f5f9; }
.btn-login-gold {
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--white) !important;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--gold-btn);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    white-space: nowrap;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    text-decoration: none;
}
.btn-login-gold:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

.navbar {
    background: var(--white);
    padding: 14px 0;
    transition: padding 0.22s ease;
}
.navbar__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.logo-wrap {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.logo-wrap img {
    height: 56px;
    width: auto;
    max-width: min(280px, 52vw);
    object-fit: contain;
    display: block;
    transition: height 0.22s ease;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
}
.nav-menu > li > a,
.nav-menu > li > .nav-item {
    display: block;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-navy);
    border-radius: var(--radius-sm);
    line-height: 1.25;
    text-align: center;
    transition: background 0.22s ease;
    text-decoration: none;
}
.nav-menu > li > a:hover { background: #f1f5f9; }
.nav-menu > li > a.active {
    background: var(--nav-active-bg);
    font-weight: 600;
}

.nav-call {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--blue-btn-grad);
    color: var(--white) !important;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(26,82,120,0.08);
    text-decoration: none;
    white-space: nowrap;
}
.nav-call:hover { opacity: 0.92; color: var(--white) !important; }

.nav-toggle {
    display: none;
    background: var(--blue-light);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    font-size: 22px;
    color: var(--text-navy);
    cursor: pointer;
}

/* Modal */
.form-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.form-modal.is-open { display: flex; }
.form-modal.is-forced .form-modal__close { display: none !important; }
.form-modal.is-forced .form-modal__backdrop { pointer-events: none !important; }
.form-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6,30,50,0.6);
    backdrop-filter: blur(3px);
    animation: siteNavFadeIn 0.2s ease;
}
.form-modal__box {
    position: relative;
    z-index: 2;
    width: min(460px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px 24px 24px;
    box-shadow: 0 12px 40px rgba(26,82,120,0.15);
    border: 2px solid var(--border-blue);
    animation: siteNavSlideUp 0.28s ease;
}
@keyframes siteNavFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes siteNavSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.form-modal__close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    font-size: 22px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.22s ease;
}
.form-modal__close:hover { background: #e2e8f0; color: var(--text-navy); }
.form-modal__title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-navy);
    margin-bottom: 4px;
    padding-right: 36px;
}
.form-modal__sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 14px;
}
.form-modal__service {
    display: inline-block;
    background: var(--blue-light);
    color: var(--text-navy);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    border: 1px solid rgba(106,173,207,0.35);
}
.form-modal label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-navy);
    margin-bottom: 6px;
}
.form-modal input,
.form-modal textarea {
    width: 100%;
    padding: 11px 14px;
    margin-bottom: 14px;
    border: 1.5px solid #c5d8e6;
    border-radius: var(--radius-sm);
    background: var(--input-bg, #f4f7fa);
    font-size: 14px;
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
}
.form-modal input:focus,
.form-modal textarea:focus {
    outline: none;
    border-color: var(--border-blue);
    box-shadow: 0 0 0 3px rgba(106,173,207,0.25);
}
.form-modal__submit {
    width: 100%;
    padding: 13px;
    background: var(--blue-btn-grad);
    color: var(--white);
    border: none;
    border-radius: var(--radius-pill);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(26,82,120,0.08);
    transition: transform 0.22s ease;
}
.form-modal__submit:hover { transform: translateY(-1px); }
.form-modal__submit.is-loading,
.auth-choice-btn.is-loading,
#otpResend.is-loading {
    opacity: 0.75;
    pointer-events: none;
    cursor: wait;
}

.auth-choice-btns {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 8px;
}
.auth-choice-btn {
    flex: 1;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.22s ease;
    text-align: center;
    border: 1.5px solid #c5d8e6;
    background: var(--white);
    color: var(--text-navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.auth-choice-btn:hover {
    border-color: var(--border-blue);
    background: #f8fafc;
}
.auth-choice-btn--primary {
    background: var(--blue-btn-grad);
    color: var(--white);
    border: none;
    box-shadow: 0 2px 8px rgba(26,82,120,0.08);
}
.auth-choice-btn--primary:hover {
    background: var(--blue-header);
    border: none;
    transform: translateY(-1.5px);
    box-shadow: 0 4px 12px rgba(26,82,120,0.15);
}
@media (max-width: 480px) {
    .auth-choice-btns {
        flex-direction: column;
        gap: 10px;
    }
    .auth-choice-btn {
        width: 100%;
    }
}

.auth-step { display: none; }
.auth-step.is-active { display: block; }
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding: 0;
    border: none;
    background: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
}
.auth-back:hover { color: var(--text-navy); }
.auth-switch {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 14px;
}
.auth-switch button {
    border: none;
    background: none;
    color: var(--text-navy);
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-size: inherit;
}
.auth-otp-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.45;
}
.auth-otp-hint strong { color: var(--text-navy); font-weight: 600; }
.auth-otp-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}
.auth-otp-row input {
    width: 44px;
    height: 52px;
    margin-bottom: 0;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0;
    padding: 0;
}
.auth-resend {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: -6px;
    margin-bottom: 14px;
}
.auth-resend button {
    border: none;
    background: none;
    color: var(--text-navy);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}
.auth-resend button:disabled { opacity: 0.5; cursor: not-allowed; text-decoration: none; }

@media (min-width: 921px) {
    .navbar__actions { display: flex; }
    .nav-call { display: inline-flex; }
}

.nav-menu__auth--mobile { display: none; }

@media (max-width: 920px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--white);
        padding: 12px;
        border-top: 1px solid #e8edf2;
        box-shadow: 0 6px 20px rgba(26,82,120,0.12);
        z-index: 210;
    }
    .nav-menu.open { display: flex; }
    .nav-menu > li { width: 100%; }
    .nav-menu > li > a {
        width: 100%;
        text-align: left;
        padding: 12px 14px;
    }
    .nav-menu__auth--mobile {
        display: block;
        width: 100%;
        margin-top: 4px;
        padding-top: 12px;
        border-top: 1px solid #e8edf2;
    }
    .nav-menu__auth-row {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .nav-menu__auth-form { margin: 0; width: 100%; }
    .nav-menu__auth-btn {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px 14px;
        font-size: 14px;
        border-radius: var(--radius-sm, 8px);
        box-sizing: border-box;
    }
    .nav-menu__auth-call {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        background: var(--blue-btn-grad, linear-gradient(180deg, #256992 0%, #1a5278 100%));
        color: #fff;
        font-weight: 600;
        text-decoration: none;
    }
    .navbar { position: relative; }
    .nav-toggle { display: flex; align-items: center; justify-content: center; }
}
