/* ══════════════════════════════════════════════════════════════
   CETA Elektromechanik — Shared Stylesheet
   Used across all pages: nav, footer, reveal, design tokens.
   Page-specific styles remain inline on each page.
   ══════════════════════════════════════════════════════════════ */

/* Self-hosted Inter — GDPR-safe (no Google Fonts CDN, no third-country
   data transfer). Single variable font file supports weights 100-900. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/assets/fonts/Inter.var.woff2') format('woff2-variations'),
         url('/assets/fonts/Inter.var.woff2') format('woff2');
}

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

html,
body {
    overflow-x: hidden;
    scroll-behavior: smooth;
    scroll-padding-top: 64px;
}

body {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    background: #fff;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* ── Design tokens (identical to homepage) ── */
:root {
    --red: #3A3A3A;
    --red-h: #2B2B2B;
    --red-soft: rgba(58, 58, 58, .1);
    --red-mid: rgba(58, 58, 58, .2);
    --dark: #1a1a1a;
    --mid: #444;
    --gray: #6e6e6e;
    --lgray: #999;
    --border: #e8e8e8;
    --border-soft: #eee;
    --bg: #f5f5f3;
    --bg2: #fafaf8;
    --r: 10px;
    --shadow: 0 4px 24px rgba(0, 0, 0, .08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, .12);
}

::selection {
    background: var(--dark);
    color: #fff
}

a {
    color: inherit
}

img {
    max-width: 100%;
    display: block
}

/* Simple section divider */
.slat-divider {
    height: 1px;
    background: var(--border);
    margin: 0;
}

.slat-divider.slat-thin {
    background: var(--border-soft);
}

/* ═══════ NAV (identical to homepage) ═══════ */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4%;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .07)
}

.n-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 100%;
    padding: 14px 0
}

.n-logo img {
    height: 100%;
    width: auto;
    display: block
}

.n-links {
    display: flex;
    gap: 2rem;
    list-style: none
}

.n-links a {
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #444;
    text-decoration: none;
    transition: color .2s;
    position: relative;
    padding-bottom: 2px
}

.n-links a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--red);
    transition: width .25s
}

.n-links a:hover::after {
    width: 100%
}

.n-links a:hover {
    color: var(--red)
}

/* Dropdown */
.n-links .n-item {
    position: relative
}

.n-links .n-item > a {
    display: inline-flex;
    align-items: center;
    gap: .35rem
}

.n-links .n-item > a svg {
    width: 9px;
    height: 9px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .25s
}

.n-links .n-item:hover > a svg {
    transform: rotate(180deg)
}

.n-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    left: -16px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .08);
    border-radius: 8px;
    padding: .6rem 0;
    min-width: 220px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
    z-index: 201
}

.n-links .n-item:hover > .n-dropdown,
.n-links .n-item:focus-within > .n-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0)
}

.n-dropdown::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px
}

.n-dropdown a {
    display: block;
    padding: .55rem 1.2rem;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: none;
    color: var(--mid)
}

.n-dropdown a::after {
    display: none
}

.n-dropdown a:hover {
    color: var(--red);
    background: var(--bg2)
}

.mob-sub {
    padding-left: 1.2rem !important;
    font-size: .78rem !important;
    font-weight: 600 !important;
    letter-spacing: .03em !important;
    text-transform: none !important;
    color: var(--gray) !important
}

.n-right {
    display: flex;
    align-items: center;
    gap: .8rem
}

.n-lang {
    position: relative;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .1em;
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    color: #777;
    transition: all .2s
}

.n-lang:hover {
    border-color: var(--red);
    color: var(--red)
}

.n-lang a,
.n-lang span {
    color: inherit;
    text-decoration: none;
}

.n-lang .on {
    color: var(--dark);
    font-weight: 800;
}

.n-lang a:hover {
    color: var(--red);
}

/* Desktop default (≥1051px): hide the mobile dropdown trigger entirely, render the
   language list as plain inline text. The mobile rules in the @media block below
   flip both. The desktop-hide uses !important so cached pages, accessibility tools,
   or zoom edge cases can't accidentally reveal the button next to the inline list. */
.n-lang-trigger { display: none !important; }
.n-lang-list { display: inline; }
.n-lang-sep { margin: 0 .35em; color: #bbb; font-weight: 400; }

.n-cta {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    background: #0071e3;
    color: #fff;
    padding: 8px 18px;
    border-radius: 5px;
    transition: background .2s, transform .2s;
    box-shadow: 0 2px 12px rgba(74, 111, 165, .3)
}

.n-cta:hover {
    background: #3e6ae1;
    transform: translateY(-1px)
}

.hbtn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none
}

.hbtn span {
    display: block;
    width: 21px;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transition: transform .3s ease, opacity .3s ease;
    transform-origin: center
}

.hbtn.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg)
}

.hbtn.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0)
}

.hbtn.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg)
}

.mob-menu {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 199;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1.2rem 4%;
    flex-direction: column;
    gap: .9rem;
    box-shadow: var(--shadow)
}

.mob-menu.open {
    display: flex
}

.mob-menu a {
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--dark);
    text-decoration: none
}

/* ── Shared section heading classes (identical to homepage) ── */
.sec-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #607D8B;
    margin-bottom: .7rem
}

.sec-eyebrow::before {
    content: "";
    width: 18px;
    height: 2px;
    background: #607D8B;
    border-radius: 2px
}

.sec-title {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-size: clamp(1.7rem, 3.2vw, 2.6rem);
    font-weight: 900;
    color: var(--dark);
    letter-spacing: -.01em;
    line-height: 1.1;
    margin-bottom: .8rem
}

.sec-title mark {
    background: none;
    color: inherit;
    font-weight: 900
}

.sec-sub {
    font-size: .92rem;
    color: var(--gray);
    max-width: 480px;
    line-height: 1.72
}

/* ═══════ LAYOUT ═══════ */
main {
    margin-top: 64px;
}

.wrap {
    max-width: 1260px;
    margin: 0 auto;
}

/* ═══════ BREADCRUMB ═══════ */
.crumb {
    padding: 22px 0 0;
    font-size: .72rem;
    letter-spacing: .04em;
    color: var(--lgray);
}

.crumb a {
    color: var(--gray);
    text-decoration: none;
    transition: color .2s;
}

.crumb a:hover {
    color: var(--red)
}

.crumb span[aria-current] {
    color: var(--dark);
    font-weight: 600
}


/* ═══════ FOOTER (identical to homepage) ═══════ */
body > footer {
    background: var(--bg2);
    padding: 68px 5% 32px;
    color: var(--dark);
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1
}

.ft-inner {
    max-width: 1260px;
    margin: 0 auto
}

.ft-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.4fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border)
}

.ft-tag {
    font-size: .82rem;
    font-weight: 400;
    color: var(--gray);
    line-height: 1.7;
    max-width: 260px;
    margin-bottom: 1.8rem
}

.ft-social {
    display: flex;
    gap: .5rem
}

.ft-social a {
    width: 36px;
    height: 36px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: #fff;
    display: grid;
    place-items: center;
    color: var(--gray);
    transition: all .2s;
    text-decoration: none
}

.ft-social a:hover {
    border-color: var(--red);
    color: var(--red)
}

.ft-social svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8
}

.ft-col-label {
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 1.1rem
}

.ft-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .6rem
}

.ft-links a {
    font-size: .82rem;
    font-weight: 500;
    color: var(--gray);
    text-decoration: none;
    transition: color .2s
}

.ft-links a:hover {
    color: var(--red)
}

.ft-contact-row {
    display: flex;
    gap: .65rem;
    font-size: .82rem;
    font-weight: 500;
    color: var(--gray);
    margin-bottom: .65rem;
    line-height: 1.5;
    align-items: flex-start
}

.ft-contact-row svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: var(--red);
    stroke-width: 1.8;
    flex-shrink: 0;
    margin-top: 3px
}

.ft-contact-row a {
    color: inherit;
    text-decoration: none;
    transition: color .2s
}

.ft-contact-row a:hover {
    color: var(--red)
}

.ft-bottom {
    padding-top: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .8rem
}

.ft-copy {
    font-size: .72rem;
    font-weight: 500;
    color: var(--lgray)
}

.ft-legal-links {
    display: flex;
    gap: 1.3rem
}

.ft-legal-links a {
    font-size: .72rem;
    color: var(--lgray);
    text-decoration: none;
    transition: color .2s
}

.ft-legal-links a:hover {
    color: var(--red)
}

.ft-lang {
    display: flex;
    gap: .35rem
}

.ft-lang button {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--gray);
    padding: 3px 9px;
    border-radius: 4px;
    cursor: pointer;
    transition: all .2s
}

.ft-lang button.on,
.ft-lang button:hover {
    border-color: var(--red);
    color: var(--red)
}

/* Anchor-style language toggle (used when DE/EN are real links) */
.ft-lang a {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--gray);
    padding: 3px 9px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s;
}

.ft-lang a.on,
.ft-lang a:hover {
    border-color: var(--red);
    color: var(--red);
}


/* ═══════ REVEAL ═══════ */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s cubic-bezier(.2, .8, .2, 1), transform .7s cubic-bezier(.2, .8, .2, 1);
}

.reveal.in {
    opacity: 1;
    transform: none;
}


/* ═══════ SHARED BUTTONS ═══════ */
.btn-fill {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    background: #0071e3;
    color: #fff;
    text-decoration: none;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 14px 26px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background .2s, transform .2s, box-shadow .2s;
    box-shadow: 0 2px 12px rgba(0, 113, 227, .25);
}

.btn-fill:hover {
    background: #3e6ae1;
    transform: translateY(-2px);
}

.btn-fill svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    background: transparent;
    color: var(--dark);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 14px 26px;
    border-radius: 6px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color .2s, color .2s, background .2s, transform .2s;
}

.btn-ghost:hover {
    border-color: var(--dark);
    background: var(--bg2);
    transform: translateY(-2px);
}

.btn-ghost svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ═══════ RESPONSIVE NAV — shared (used by blog + any chrome.php page) ═══════ */
/* ═══════════════════════════════════════════════════════════════════════
   NAV — collapse to hamburger + language dropdown on tablet and below.
   Threshold raised to 1024px so tablets get the compact mobile nav
   (cramped desktop nav with FR/IT labels doesn't fit a tablet width).
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1050px) {
    .n-links { display: none; }
    .hbtn { display: flex; }
    .n-cta { display: none; }

    /* Language: collapse to a dropdown */
    .n-lang {
        border: 1px solid var(--border);
        border-radius: 5px;
        padding: 0;
    }
    .n-lang-trigger {
        display: inline-flex !important;
        align-items: center;
        gap: .3em;
        background: none;
        border: 0;
        padding: 3px 8px;
        font: inherit;
        color: var(--dark);
        font-weight: 800;
        letter-spacing: .1em;
        cursor: pointer;
        line-height: 1.2;
    }
    .n-lang-chev {
        width: 12px; height: 12px;
        fill: none; stroke: currentColor;
        stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
        transition: transform .2s ease;
    }
    .n-lang.open .n-lang-chev { transform: rotate(180deg); }

    .n-lang-list {
        display: none !important;
        position: absolute;
        top: 100%;
        left: -1px;
        right: -1px;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin-top: -1px;
        padding: 0;
        background: #fff;
        border: 1px solid var(--border);
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        border-bottom-left-radius: 5px;
        border-bottom-right-radius: 5px;
        box-shadow: 0 4px 14px rgba(0,0,0,.08);
        z-index: 50;
    }
    .n-lang.open .n-lang-list { display: flex !important; }
    /* Flatten trigger's bottom corners when open so it merges with the panel */
    .n-lang.open {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    .n-lang-list a {
        display: block;
        padding: 3px 8px;
        text-align: center;
        color: #777;
        font-weight: 800;
        letter-spacing: .1em;
        line-height: 1.2;
    }
    .n-lang-list a:hover { background: rgba(255,77,49,.08); color: var(--red); }
    /* Current language is already shown in the trigger — hide its duplicate row */
    .n-lang-list .on { display: none; }
    .n-lang-sep { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   FOOTER — phone-only stacked layout (≤768px).
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .ft-top {
        grid-template-columns: 1fr 1fr;
        gap: 2rem 1.6rem;
    }
    .ft-top > div { text-align: center; }
    .ft-top > div:nth-child(1),
    .ft-top > div:nth-child(4) { grid-column: 1 / -1; }
    .ft-tag {
        margin-left: auto;
        margin-right: auto;
    }
    .ft-social,
    .ft-contact-row { justify-content: center; }
    .ft-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .ft-legal-links { justify-content: center; flex-wrap: wrap; }
}

/* Tablet (769–1050px): footer also benefits from a 2-col grid */
@media (min-width: 769px) and (max-width: 1050px) {
    .ft-top { grid-template-columns: 1fr 1fr; }
}
