/* ===========================================================
   COMMON — navigation, language switch, footer
   =========================================================== */

/* ---------- NAV ---------- */

.main-nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    height: var(--nav-h);
    background: rgba(242, 237, 226, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.nav-container {
    width: 100%;
    max-width: var(--max-w);
    height: 100%;
    margin-inline: auto;
    padding-inline: var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-mark {
    width: 30px;
    height: auto;
}

.brand-name {
    font-family: var(--font-display);
    font-size: 1.16rem;
    line-height: 1;
    color: var(--hull);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

.nav-links a {
    position: relative;
    display: flex;
    align-items: center;
    height: var(--nav-h);
    padding: 0 13px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--muted);
    transition: color var(--fast);
    white-space: nowrap;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 13px;
    right: 13px;
    bottom: 16px;
    height: 1px;
    background: var(--signal);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--fast);
}

.nav-links a:hover {
    color: var(--hull);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

.nav-links a.active {
    color: var(--hull);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* language */

.language-switch {
    position: relative;
}

.dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 0;
    font-family: var(--font-latin);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--muted);
    transition: color var(--fast);
}

.dropdown-trigger i.fa-globe {
    font-size: 0.7rem;
}

.dropdown-trigger i.fa-chevron-down {
    font-size: 0.5rem;
}

.dropdown-trigger:hover {
    color: var(--hull);
}

.dropdown-content {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 132px;
    padding: 4px;
    background: var(--bone-bright);
    border: 1px solid var(--line-strong);
    box-shadow: 8px 8px 0 rgba(12, 42, 45, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity var(--fast), transform var(--fast), visibility var(--fast);
    z-index: 1001;
}

.language-switch:hover .dropdown-content,
.language-switch.show .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-switch::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
}

.dropdown-content a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 10px;
    font-size: 0.72rem;
    color: var(--muted);
    transition: background var(--fast), color var(--fast);
}

.dropdown-content a:hover,
.dropdown-content a.active {
    background: var(--dune);
    color: var(--hull);
}

.lang-code {
    font-family: var(--font-latin);
    font-size: 0.58rem;
    color: var(--muted);
    opacity: 0.7;
}

/* nav cta */

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: var(--signal);
    color: var(--hull-deep);
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1;
    transition: background var(--fast), color var(--fast);
}

.nav-cta i {
    font-size: 0.6rem;
    transition: transform var(--fast);
}

.nav-cta:hover {
    background: var(--hull);
    color: var(--bone);
}

.nav-cta:hover i {
    transform: translate(2px, -2px);
}

/* mobile toggle */

.mobile-menu-toggle {
    display: none;
    width: 38px;
    height: 38px;
    padding: 8px;
    border: 1px solid var(--line-strong);
}

.mobile-menu-toggle span {
    display: block;
    width: 20px;
    height: 1.5px;
    margin: 4px auto;
    background: var(--hull);
    transition: transform var(--fast), opacity var(--fast);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(5.5px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-5.5px) rotate(-45deg);
}

main {
    margin-top: var(--nav-h);
}

@media (max-width: 1120px) {
    .nav-links a {
        padding-inline: 9px;
        font-size: 0.78rem;
    }

    .nav-links a::after {
        left: 9px;
        right: 9px;
    }
}

@media (max-width: 980px) {
    .nav-cta {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        background: var(--bone);
        border-bottom: 1px solid var(--line-strong);
        max-height: 0;
        overflow: hidden;
        visibility: hidden;
        transition: max-height 0.4s var(--ease), visibility 0.4s;
    }

    .nav-links.active {
        max-height: calc(100vh - var(--nav-h));
        min-height: calc(100vh - var(--nav-h));
        overflow-y: auto;
        visibility: visible;
        padding-bottom: 24px;
    }

    .nav-links a {
        height: auto;
        padding: 16px var(--gutter);
        border-top: 1px solid var(--line);
        font-size: 0.92rem;
    }

    .nav-links a::after {
        left: var(--gutter);
        right: auto;
        bottom: 12px;
        width: 24px;
    }
}

@media (max-width: 520px) {
    .brand-name {
        font-size: 1rem;
    }

    .brand-mark {
        width: 26px;
    }

    .dropdown-trigger span {
        display: none;
    }

    .dropdown-trigger i.fa-globe {
        font-size: 0.9rem;
    }

    .dropdown-trigger i.fa-chevron-down {
        display: none;
    }

    .dropdown-content {
        right: -40px;
    }
}

/* ---------- FOOTER ---------- */

footer {
    background: var(--hull);
    color: var(--bone);
}

.footer-shell {
    padding-inline: var(--gutter);
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--gutter);
    padding-block: clamp(56px, 8vw, 96px) clamp(48px, 6vw, 72px);
    border-bottom: 1px solid var(--line-light);
}

.footer-brand {
    grid-column: 1 / 6;
}

.footer-brandline {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.footer-brandline img {
    width: 38px;
    height: auto;
}

.footer-brandline span {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.2vw, 1.9rem);
    line-height: 1;
    color: var(--bone);
}

.footer-desc {
    max-width: 34ch;
    margin-top: 22px;
    color: rgba(242, 237, 226, 0.5);
    font-size: 0.88rem;
    line-height: 1.9;
}

.footer-coords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin-top: 32px;
    font-family: var(--font-latin);
    font-size: 0.62rem;
    letter-spacing: 0.07em;
    color: rgba(242, 237, 226, 0.3);
}

.footer-coords span:first-child::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 8px;
    background: var(--signal);
    vertical-align: 1px;
}

.footer-groups {
    grid-column: 6 / 13;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gutter);
}

.footer-group-title {
    font-family: var(--font-latin);
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: rgba(242, 237, 226, 0.36);
    margin-bottom: 18px;
}

.footer-links-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links-list a {
    font-size: 0.86rem;
    color: rgba(242, 237, 226, 0.72);
    transition: color var(--fast);
}

.footer-links-list a:hover {
    color: var(--signal);
}

.footer-contact-item {
    font-size: 0.82rem;
    line-height: 1.6;
    color: rgba(242, 237, 226, 0.62);
}

.footer-contact-item strong {
    display: block;
    margin-bottom: 2px;
    font-family: var(--font-latin);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: rgba(242, 237, 226, 0.32);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-block: 22px;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    font-family: var(--font-latin);
    font-size: 0.66rem;
    letter-spacing: 0.03em;
    color: rgba(242, 237, 226, 0.32);
}

.footer-legal a {
    color: rgba(242, 237, 226, 0.42);
    transition: color var(--fast);
}

.footer-legal a:hover {
    color: var(--bone);
}

.footer-social {
    display: flex;
    gap: 6px;
}

.footer-social-link {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(242, 237, 226, 0.16);
    color: rgba(242, 237, 226, 0.5);
    font-size: 0.72rem;
    transition: background var(--fast), color var(--fast), border-color var(--fast);
}

.footer-social-link:hover {
    background: var(--signal);
    border-color: var(--signal);
    color: var(--hull-deep);
}

@media (max-width: 900px) {
    .footer-brand {
        grid-column: 1 / 13;
    }

    .footer-groups {
        grid-column: 1 / 13;
        margin-top: 12px;
    }
}

@media (max-width: 640px) {
    .footer-groups {
        grid-template-columns: 1fr 1fr;
        gap: 32px var(--gutter);
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }
}
