/* ===========================================
   Common – Nav / Footer / Shared Components
   Industrial Minimal
   =========================================== */

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

.main-nav {
    background: var(--white);
    border-bottom: var(--border-heavy);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 56px;
}

.main-nav.scrolled {
    background: var(--white);
}

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

.logo { display: flex; align-items: center; }

.logo-image {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

.logo img {
    height: 26px;
    width: auto;
}

.logo-brand {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--black);
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-links a {
    color: var(--g600);
    text-decoration: none;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.7rem;
    padding: 0 18px;
    height: 56px;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-left: var(--border-light);
    transition: color var(--transition), background-color var(--transition);
    position: relative;
}

.nav-links a:last-child {
    border-right: var(--border-light);
}

.nav-links a:hover {
    color: var(--black);
    background: var(--g50);
}

.nav-links a.active {
    color: var(--black);
    background: var(--g50);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--black);
}

.nav-right {
    display: flex;
    align-items: center;
}

/* Language switch – keep class names for language.js */
.language-switch {
    position: relative;
}

.language-switch::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 8px;
    background: transparent;
    z-index: 999;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--g600);
    text-decoration: none;
    font-family: var(--font-mono);
    font-weight: 700;
    padding: 5px 12px;
    border: var(--border);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    transition: all var(--transition);
    background: transparent;
    text-transform: uppercase;
}

.dropdown-trigger i.fa-globe { display: none; }
.dropdown-trigger i.fa-chevron-down { font-size: 8px; }

.dropdown-trigger:hover {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

.dropdown-content {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: var(--white);
    border: var(--border-heavy);
    min-width: 120px;
    z-index: 1000;
    overflow: hidden;
    transition: all 0.12s ease;
}

.language-switch:hover .dropdown-content,
.language-switch.show .dropdown-content {
    opacity: 1;
    visibility: visible;
}

.dropdown-content a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    color: var(--g600);
    text-decoration: none;
    border-bottom: var(--border-light);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all var(--transition);
}

.dropdown-content a:last-child { border-bottom: none; }

.dropdown-content a:hover {
    background: var(--g50);
    color: var(--black);
}

.dropdown-content a.active {
    color: var(--black);
    background: var(--g100);
}

.lang-text { font-weight: 700; }
.lang-code { opacity: 0.5; font-size: 0.6rem; }

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

.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    position: relative;
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--black);
    margin: 5px 0;
    transition: transform 0.2s, opacity 0.2s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
    .mobile-menu-toggle { display: block; }

    .nav-links {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: var(--border-heavy);
        flex-direction: column;
        gap: 0;
    }

    .nav-links.active { display: flex; }

    .nav-links a {
        padding: 14px 20px;
        height: auto;
        border-bottom: var(--border-light);
        border-left: none;
        border-right: none;
        font-size: 0.75rem;
    }

    .nav-links a:last-child { border-right: none; border-bottom: none; }

    .nav-container { padding: 0 var(--space-md); }
}

/* ---------- MAIN OFFSET ---------- */

main {
    margin-top: 56px;
}

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

footer {
    background: var(--black);
    color: var(--white);
    border-top: var(--border-heavy);
}

.footer-container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 48px 48px 48px 0;
    border-right: 1px solid rgba(255,255,255,0.12);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.footer-logo img {
    height: 22px;
    width: auto;
    filter: brightness(0) invert(1) opacity(0.7);
}

.footer-logo-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.footer-description {
    font-size: 0.8rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.45);
    max-width: 280px;
}

.footer-group {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 48px 32px;
    border-right: 1px solid rgba(255,255,255,0.12);
}

.footer-group:last-child { border-right: none; }

.footer-group-title {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--g400);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 20px;
}

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

.footer-links-list li a {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color var(--transition);
    font-family: var(--font-body);
}

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

.footer-contact-item {
    font-size: 0.8rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.55);
}

.footer-contact-item strong {
    display: block;
    margin-bottom: 2px;
    font-size: 0.6rem;
    font-family: var(--font-mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--g400);
    font-weight: 700;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-icp {
    width: 100%;
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 4px;
}

.footer-icp a {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #ffffff;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-icp a:hover {
    color: rgba(255,255,255,0.7);
    text-decoration: underline;
}

.footer-copyright {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.04em;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 0;
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,0.15);
    border-left: none;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    transition: all var(--transition);
    font-size: 0.75rem;
}

.footer-social-link:first-child { border-left: 1px solid rgba(255,255,255,0.15); }

.footer-social-link:hover {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
}

/* Footer responsive */
@media (max-width: 1024px) {
    .footer-main { grid-template-columns: 1fr 1fr; }
    .footer-brand {
        grid-column: 1 / -1;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.12);
        padding: 40px 0;
    }
}

@media (max-width: 768px) {
    .footer-container { padding: 0 var(--space-md); }
    .footer-main { grid-template-columns: 1fr; }
    .footer-group {
        padding: 24px 0;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.12);
    }
    .footer-bottom {
        flex-direction: column;
        gap: 14px;
        text-align: center;
        padding: 20px 0;
    }
}

/* ---------- UTILITY ---------- */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
