:root {
    --header-height: 97px;
    --footer-height: 133px;
    --body-topbar-height: 58px;

    --page-bg: #ffffff;
    --header-bg: #ffffff;
    --footer-bg: #013591;
    --body-topbar-bg: #013591;

    --header-border: rgba(0, 0, 0, 0.08);
    --footer-border: rgba(0, 0, 0, 0.12);
    --body-topbar-border: rgba(0, 0, 0, 0.12);

    --page-padding-x: 24px;

    --logo-width: auto;
    --logo-height: 51px;

    --body-menu-color: #ffffff;
    --body-menu-hover: #fff2b8;

    --footer-menu-color: #ffffff;
    --footer-menu-hover: #fff2b8;

    --menu-separator: rgba(235, 235, 235, 0.75);
    --menu-font-size: 15px;
    --menu-letter-spacing: 0.04em;
    --menu-gap: 0;
    --menu-separator-height: 22px;
    --menu-separator-width: 3px;
    --menu-link-padding-x: 16px;

    --search-width: 420px;
    --search-height: 42px;
    --search-radius: 8px;

    --search-bg: rgba(255, 255, 255, 0.52);
    --search-border: rgba(0, 0, 0, 0.18);
    --search-border-focus: rgba(128, 128, 128, 0.95);
    --search-text: #202020;
    --search-placeholder: rgba(0, 0, 0, 0.45);

    --search-button-bg: #8f8f8f;
    --search-button-bg-hover: #777777;
    --search-button-text: #ffffff;

    --section-gap: 72px;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--page-bg);
    color: #202020;
    font-family: Arial, Helvetica, sans-serif;
}

/* HEADER */

.site-header {
    width: 100%;
    min-height: var(--header-height);
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    flex: 0 0 auto;
    position: relative;
    z-index: 20;
}

.site-header__inner {
    width: 100%;
    min-height: var(--header-height);
    padding: 0 var(--page-padding-x);
    display: flex;
    align-items: center;
    gap: 34px;
}

.site-header__brand {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    text-decoration: none;
}

.site-header__logo {
    display: block;
    width: var(--logo-width);
    height: var(--logo-height);
    object-fit: contain;
    object-position: left center;
}

/* HEADER SEARCH / ACTIONS */

.site-header__search-area {
    flex: 1 1 auto;
    max-width: var(--search-width);
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
}

.site-search {
    width: 100%;
    max-width: var(--search-width);
    height: var(--search-height);
    display: flex;
    align-items: center;
    margin-left: auto;
}

.site-header__search-area .site-search {
    width: 100%;
    max-width: none;
    margin-left: 0;
}

.site-search__input {
    width: 100%;
    height: 100%;
    border: 1px solid var(--search-border);
    border-right: 0;
    border-radius: var(--search-radius) 0 0 var(--search-radius);
    background: var(--search-bg);
    color: var(--search-text);
    padding: 0 16px;
    font-size: 15px;
    outline: none;
}

.site-search__input::placeholder {
    color: var(--search-placeholder);
}

.site-search__input:focus {
    border-color: var(--search-border-focus);
    background: rgba(255, 255, 255, 0.72);
}

.site-search__input:focus+.site-search__button {
    border-color: var(--search-border-focus);
}

.site-search__button {
    height: 100%;
    border: 1px solid var(--search-button-bg);
    border-radius: 0 var(--search-radius) var(--search-radius) 0;
    background: var(--search-button-bg);
    color: var(--search-button-text);
    padding: 0 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 160ms ease, border-color 160ms ease;
}

.site-search__button:hover {
    background: var(--search-button-bg-hover);
    border-color: var(--search-button-bg-hover);
}

.site-header__action-links {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 1px;
}

/* HEADER LOGIN BUTTON */

.site-header__login-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    border: 0;
    background: transparent;
    color: #013591;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    letter-spacing: 0.02em;
    cursor: pointer;
    padding: 0;
    transition:
        color 160ms ease,
        transform 160ms ease;
}

.site-header__login-button:hover {
    color: #001f5c;
    transform: translateY(-1px);
    text-decoration: underline;
}

/* HEADER JOIN BUTTON + TOOLTIP */

.site-header__join-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 14px;
    border-radius: 999px;
    background: #013591;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 18px rgba(1, 53, 145, 0.20);
    transition:
        background 160ms ease,
        color 160ms ease,
        transform 160ms ease,
        box-shadow 160ms ease;
}

.site-header__join-link:hover {
    background: #001f5c;
    color: #ffffff;
    transform: translateY(-1px);
    text-decoration: none;
    box-shadow: 0 11px 24px rgba(1, 53, 145, 0.28);
}

.site-header__join-link::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    width: 320px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #ffffff;
    color: #013591;
    border: 1px solid rgba(1, 53, 145, 0.22);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition:
        opacity 160ms ease,
        visibility 160ms ease,
        transform 160ms ease;
    pointer-events: none;
    z-index: 50;
}

.site-header__join-link::before {
    content: "";
    position: absolute;
    right: 24px;
    top: calc(100% + 6px);
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-left: 1px solid rgba(1, 53, 145, 0.22);
    border-top: 1px solid rgba(1, 53, 145, 0.22);
    transform: rotate(45deg);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 160ms ease,
        visibility 160ms ease;
    pointer-events: none;
    z-index: 49;
}

.site-header__join-link:hover::after,
.site-header__join-link:hover::before {
    opacity: 1;
    visibility: visible;
}

.site-header__join-link:hover::after {
    transform: translateY(0);
}

/* MAIN */

.site-main {
    width: 100%;
    flex: 1 0 auto;
    display: block;
}

/* BODY TOPBAR */

.body-topbar {
    width: 100%;
    min-height: var(--body-topbar-height);
    background: var(--body-topbar-bg);
    border-bottom: 1px solid var(--body-topbar-border);
    display: block;
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 0;
    overflow: visible;
}

.body-topbar__inner {
    width: 100%;
    min-height: var(--body-topbar-height);
    padding: 0 var(--page-padding-x);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-search--topbar {
    flex: 0 1 var(--search-width);
    max-width: var(--search-width);
    height: 38px;
    margin-left: auto;
}

.site-search--topbar .site-search__input {
    background: rgba(255, 255, 255, 0.92);
}

.site-search--topbar .site-search__input:focus {
    background: #ffffff;
}

.body-topbar__nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--menu-gap);
}

.body-topbar__link {
    position: relative;
    display: flex;
    align-items: center;
    min-height: var(--body-topbar-height);
    padding: 0 var(--menu-link-padding-x);
    color: var(--body-menu-color);
    text-decoration: none;
    font-size: var(--menu-font-size);
    font-weight: 700;
    letter-spacing: var(--menu-letter-spacing);
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
    transition: color 160ms ease, text-shadow 160ms ease;
}

.body-topbar__link:hover {
    color: var(--body-menu-hover);
    text-shadow: 0 0 10px rgba(255, 242, 184, 0.28);
}

.body-topbar__link+.body-topbar__link::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: var(--menu-separator-width);
    height: var(--menu-separator-height);
    background: var(--menu-separator);
    transform: translateY(-50%);
    border-radius: 999px;
}

/* FAMILY HERO IMAGE */

.family-hero {
    width: 100%;
    height: auto;
    display: block;
    overflow: hidden;
    background: #000;
    position: relative;
    z-index: 0;
    margin: 0;
    padding: 0;
}

.family-hero__image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: initial;
    object-position: center;
}

/* CONTENT */

.site-content {
    width: 100%;
    min-height: 500px;
    padding: 46px var(--page-padding-x) 70px;
}

/* VALUES SECTION */

.values-section {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

.values-section+.values-section {
    margin-top: var(--section-gap);
}

.values-title {
    margin: 0 0 34px;
    color: #202020;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.1;
    text-align: left;
    text-decoration: none;
}

/* SETCARD GRID */

.setcard-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
    justify-content: center;
    gap: 28px;
}

/* SETCARD */

.setcard {
    position: relative;
    width: 100%;
    background: #f3f3f3;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.16);
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        border-color 180ms ease;
}

.setcard:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 0, 0, 0.22);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.22);
}

.setcard__hitbox {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: block;
    cursor: pointer;
}

.setcard__image-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 260px;
    background: #d8d8d8;
    overflow: hidden;
}

.setcard__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.setcard__body {
    position: relative;
    z-index: 1;
    padding: 18px 16px 20px;
    text-align: center;
}

.setcard__text {
    margin: 0;
    color: #202020;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.45;
    text-decoration: none;
}

/* FOOTER */

.site-footer {
    width: 100%;
    min-height: var(--footer-height);
    background: var(--footer-bg);
    border-top: 1px solid var(--footer-border);
    flex: 0 0 auto;
}

.site-footer__inner {
    width: 100%;
    min-height: var(--footer-height);
    padding: 0 var(--page-padding-x);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-footer__copy {
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    white-space: nowrap;
}

/* FOOTER MENU */

.site-nav {
    display: flex;
    align-items: center;
    gap: var(--menu-gap);
}

.site-nav__link {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 32px;
    padding: 0 var(--menu-link-padding-x);
    color: var(--footer-menu-color);
    text-decoration: none;
    font-size: var(--menu-font-size);
    font-weight: 700;
    letter-spacing: var(--menu-letter-spacing);
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
    transition: color 160ms ease, text-shadow 160ms ease;
}

.site-nav__link:hover {
    color: var(--footer-menu-hover);
    text-shadow: 0 0 10px rgba(255, 242, 184, 0.28);
}

.site-nav__link+.site-nav__link::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: var(--menu-separator-width);
    height: var(--menu-separator-height);
    background: var(--menu-separator);
    transform: translateY(-50%);
    border-radius: 999px;
}

.site-nav--footer {
    flex: 0 1 auto;
}

/* NEWS MORE LINK */

.news-more {
    width: 100%;
    margin-top: 22px;
    text-align: left;
}

.news-more__link {
    display: inline-flex;
    align-items: center;
    color: #013591;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 160ms ease, transform 160ms ease;
}

.news-more__link:hover {
    color: #001f5c;
    transform: translateX(4px);
    text-decoration: underline;
}

/* LOGIN POPUP */

body.login-popup-active {
    overflow: hidden;
}

.login-popup {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: none;
}

.login-popup.is-open {
    display: block;
}

.login-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(5px);
}

.login-popup__box {
    position: absolute;
    left: 50%;
    top: 50%;
    width: calc(100% - 40px);
    max-width: 460px;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 16px;
    padding: 38px 36px 34px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.login-popup__close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(1, 53, 145, 0.08);
    color: #013591;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease;
}

.login-popup__close:hover {
    background: #013591;
    color: #ffffff;
}

.login-popup__title {
    margin: 0 0 12px;
    color: #013591;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.1;
}

.login-popup__text {
    margin: 0 0 26px;
    color: #444444;
    font-size: 16px;
    line-height: 1.5;
}

.login-popup__errors {
    margin: 0 0 22px;
    display: grid;
    gap: 8px;
}

.login-popup__error {
    padding: 12px 14px;
    border-left: 5px solid #b00020;
    background: rgba(176, 0, 32, 0.08);
    color: #8a0018;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.4;
}

.login-popup__form {
    width: 100%;
    display: grid;
    gap: 18px;
}

.login-popup__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-popup__label {
    color: #202020;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
}

.login-popup__input {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: #202020;
    padding: 0 14px;
    font-size: 15px;
    font-weight: 500;
    outline: none;
    transition:
        border-color 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease;
}

.login-popup__input:focus {
    border-color: #013591;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(1, 53, 145, 0.12);
}

.login-popup__submit {
    width: 100%;
    min-height: 48px;
    margin-top: 4px;
    border: 0;
    border-radius: 8px;
    background: #013591;
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(1, 53, 145, 0.24);
    transition:
        background 160ms ease,
        transform 160ms ease,
        box-shadow 160ms ease;
}

.login-popup__submit:hover {
    background: #001f5c;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(1, 53, 145, 0.30);
}

.login-popup__register {
    margin-top: 24px;
    color: #444444;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

.login-popup__register-link {
    color: #013591;
    font-weight: 900;
    text-decoration: none;
}

.login-popup__register-link:hover {
    color: #001f5c;
    text-decoration: underline;
}

/* RESPONSIVE */

@media (max-width: 720px) {
    .site-header__inner {
        min-height: auto;
        padding-top: 18px;
        padding-bottom: 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .site-header__search-area {
        width: 100%;
        max-width: none;
        margin-left: 0;
    }

    .site-header__action-links {
        justify-content: flex-start;
    }

    .site-header__join-link::after {
        left: 0;
        right: auto;
        width: min(320px, calc(100vw - 48px));
    }

    .site-header__join-link::before {
        left: 24px;
        right: auto;
    }

    .body-topbar__nav {
        width: 100%;
        justify-content: center;
    }

    .site-footer__inner {
        padding-top: 28px;
        padding-bottom: 28px;
        flex-direction: column;
        justify-content: center;
    }

    .site-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 520px) {
    .login-popup__box {
        padding: 34px 24px 30px;
    }

    .login-popup__title {
        font-size: 26px;
    }
}