/* ─── COMPONENTS ───────────────────────────────────────────────── */

/* ── Topbar ── */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(11,7,20,.65);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,.10);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
}

.brand {
    display: flex;
    align-items: center;
    min-width: 180px;
}

.brand img {
    height: 38px;
    object-fit: contain;
}

.main-nav {
    display: flex;
    align-items: center;
    align-self: stretch;
    gap: 2px;
}

/* Items stretch to the full topbar height so the pointer can move from a
   trigger into its panel without leaving the hover area. */
.nav-item {
    display: flex;
    align-items: center;
    align-self: stretch;
    padding-block: 12px;
    margin-block: -12px;
}

.nav-link,
.nav-trigger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font: 500 14.5px var(--font-body);
    letter-spacing: 0.01em;
    color: var(--muted-light);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 14px 6px;
    cursor: pointer;
    transition: color 160ms ease, border-color 160ms ease;
}

.nav-link:hover,
.nav-trigger:hover,
.nav-item.open .nav-trigger { color: var(--text-light); }

.nav-link.nav-active,
.nav-trigger.nav-active {
    color: var(--text-light);
    font-weight: 650;
    border-bottom-color: var(--c-cyan);
}

.nav-caret {
    font-size: 10px;
    opacity: .7;
    transition: transform 160ms ease;
}

.nav-item.open .nav-caret { transform: rotate(180deg); }

/* ── Mega panels (Services, About) — full topbar width ── */
.mega-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #120e1d;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 18px 40px rgba(0,0,0,.4);
    visibility: hidden;
    opacity: 0;
    clip-path: inset(0 0 100% 0);
    transition: clip-path 240ms ease, opacity 200ms ease, visibility 0s linear 360ms;
    transition-delay: 120ms, 120ms, 360ms;
}

.nav-item.open > .mega-panel {
    visibility: visible;
    opacity: 1;
    clip-path: inset(0 0 -40px 0);  /* negative bottom keeps the drop shadow visible */
    transition-delay: 0s;
}

@media (hover: hover) {
    .nav-item:hover > .mega-panel {
        visibility: visible;
        opacity: 1;
        clip-path: inset(0 0 -40px 0);
        transition-delay: 0s;
    }
    .nav-item:hover .nav-trigger { color: var(--text-light); }
}

.mega-grid {
    display: grid;
    gap: 32px;
    padding-top: 30px;
    padding-bottom: 34px;
}

.mega-grid-services { grid-template-columns: repeat(4, 1fr) 190px; }
.mega-grid-about    { grid-template-columns: repeat(3, 1fr) 190px; }

.mega-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mega-col a {
    font-size: 14.5px;
    color: rgba(255,255,255,.6);
    transition: color 160ms ease;
}

.mega-col a:hover { color: var(--text-light); }

.mega-col a.mega-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2px;
    font-size: 15px;
    font-weight: 650;
    color: #fff;
}

.mega-col a.mega-heading:hover { color: var(--c-cyan); }

.mega-icon {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: var(--c-cyan);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mega-side {
    padding-left: 28px;
    border-left: 1px solid rgba(255,255,255,.10);
}

.mega-col.mega-side a { color: #fff; font-weight: 650; }
.mega-col.mega-side a.mega-accent { color: var(--c-cyan); }
.mega-col.mega-side a:hover { color: var(--c-cyan); }

.right {
    min-width: 180px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* ── Language switcher ── */
.lang {
    position: relative;
}

.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border-light);
    background: rgba(255,255,255,.06);
    color: var(--text-light);
    font: 500 13.5px var(--font-body);
    padding: 7px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease;
}

.lang-toggle:hover,
.lang.open .lang-toggle {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.24);
}

.lang-caret {
    font-size: 11px;
    transition: transform 160ms ease;
}

.lang.open .lang-caret { transform: rotate(180deg); }

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: rgba(11,7,20,.92);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0,0,0,.35);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px) scaleY(.96);
    transform-origin: top right;
    transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
}

.lang.open .lang-menu {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
    .mega-panel,
    .lang-menu { transition-duration: 0s; }
}

.lang-menu a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--muted-light);
    white-space: nowrap;
    transition: background 160ms ease, color 160ms ease;
}

.lang-menu a:hover {
    background: rgba(255,255,255,.08);
    color: var(--text-light);
}

.lang-menu a.active {
    color: var(--text-light);
    font-weight: 650;
    background: rgba(6,182,212,.14);
    box-shadow: inset 2px 0 0 var(--c-cyan);
}

.lang-code {
    opacity: .6;
    font-weight: 500;
}

/* ── Hamburger ── */
.hamburger {
    display: none;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.07);
    border-radius: 8px;
    padding: 8px 11px;
    cursor: pointer;
    color: var(--text-light);
    font-size: 16px;
}

/* ── Mobile nav ── */
.mobile-nav {
    display: none;
    border-top: 1px solid rgba(255,255,255,.10);
    padding: 10px 0 14px;
}

.mobile-nav a {
    display: block;
    padding: 10px 8px;
    color: var(--muted-light);
    border-radius: 6px;
    font-size: 14px;
    transition: background 160ms ease, color 160ms ease;
}

.mobile-nav a:hover {
    background: rgba(255,255,255,.06);
    color: var(--text-light);
}

.mobile-nav summary {
    display: flex;
    justify-content: space-between;
    padding: 10px 8px;
    color: var(--muted-light);
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    list-style: none;
}

.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav summary::after { content: '▾'; font-size: 11px; transition: transform 160ms ease; }
.mobile-nav details[open] summary::after { transform: rotate(180deg); }
.mobile-nav summary:hover { background: rgba(255,255,255,.06); color: var(--text-light); }
.mobile-nav details a { padding-left: 22px; font-size: 13.5px; }

.mobile-nav a.nav-active,
.mobile-nav summary.nav-active { color: var(--text-light); font-weight: 650; }

.mobile-nav.open { display: block; }

/* ── Footer ── */
.site-footer {
    padding: 56px 0 32px;
    background: #0f1923;
    color: var(--text-light);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: center;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    margin-bottom: 24px;
}

.footer-left { text-align: left; }
.footer-right { text-align: right; }

.footer-mid {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-mid img {
    width: 120px;
    height: auto;
    opacity: 0.85;
}

.footer-left p,
.footer-right div {
    margin: 6px 0;
    color: rgba(255,255,255,.55);
    font-size: 13px;
    line-height: 1.6;
}

.footer-left strong {
    color: rgba(255,255,255,.88);
    font-size: 14px;
}

.social {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 12px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
    transition: background 160ms ease, border-color 160ms ease;
}

.icon-btn:hover {
    background: rgba(6,182,212,.15);
    border-color: rgba(6,182,212,.40);
}

.icon {
    width: 16px;
    height: 16px;
    fill: rgba(255,255,255,.75);
}

.footer-copy {
    color: rgba(255,255,255,.32);
    font-size: 12px;
    text-align: center;
}

/* ── Responsive ── */
@media (max-width: 980px) {
    .main-nav { display: none; }
    .hamburger { display: inline-flex; }
    .brand { min-width: auto; }
    .right { min-width: auto; }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }

    .footer-left,
    .footer-right { text-align: center; }

    .social { justify-content: center; }
}