/* =========================================================
   Konnektiva GmbH – Basis-Stylesheet
   ========================================================= */

:root {
    /* Konnektiva Markenfarben */
    --color-primary: #0000ff;
    --color-primary-light: #3d3dff;
    --color-primary-dark: #0000cc;
    --color-accent: #0000ff;

    /* Helles Grundlayout */
    --color-bg: #eef2f5;
    --color-bg-alt: #e4e9ed;
    --color-surface: #ffffff;
    --color-border: #d5dbe0;

    --color-text: #1a1a1f;
    --color-muted: #5b5b66;
    --color-heading: #000000;

    /* Für Elemente, die weiterhin über Bild/Video liegen (Header, Mobile-Nav) */
    --color-dark: #08080a;

    /* Höhe der sitewide Sticky-Navigation */
    --nav-h: 70px;

    --radius: 8px;
    --radius-lg: 28px;
    --max-width: 1140px;
    --font-base: "Montserrat", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-base);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
}

main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

body.nav-open { overflow: hidden; }

/* Startseite: komplett dunkler Hintergrund (--color-dark), Header/Hero/Footer
   sind es bereits, hier zusätzlich der Bereich dazwischen. */
body.page-home { background: var(--color-dark); }

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

a { color: var(--color-primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

h1, h2, h3, h4 { line-height: 1.25; color: var(--color-heading); margin: 0 0 1rem; font-weight: 700; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border-radius: 999px;
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: var(--color-primary-dark); text-decoration: none; }
.btn-accent { background: var(--color-accent); }
.btn-accent:hover { background: var(--color-primary-dark); }
.btn-outline { background: transparent; border: 2px solid var(--color-primary); color: var(--color-primary-light); }
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.btn-white { background: #ffffff; color: #000000; }
.btn-white:hover { background: #e6e6e6; text-decoration: none; }

/* ---------- Header (sitewide, sticky) ----------
   Wichtig: .site-header ist ein Flex-Kind von <body> (display:flex; flex-direction:column).
   Ohne flex-shrink:0 wird es von den Flex-Berechnungen zusammengestaucht, obwohl eine
   explizite height gesetzt ist (deshalb war die Nav-Höhe zuvor nicht wirksam) – daher hier
   flex: 0 0 var(--nav-h) statt nur height, exakt wie main/.site-footer bereits geschützt sind.
------------------------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    flex: 0 0 var(--nav-h);
    flex-shrink: 0;
    height: var(--nav-h);
    min-height: var(--nav-h);
    max-height: var(--nav-h);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--color-dark);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    width: 100%;
}
.header-inner .nav-row { flex: 1; min-width: 0; flex-wrap: nowrap; }

/* ---------- Hero (Startseite): dunkler Nav-Block + Video, zusammen max. 100vh ---------- */
.home-hero-wrap {
    flex-shrink: 0;
    height: calc(100vh - var(--nav-h));
    height: calc(100svh - var(--nav-h));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--color-dark);
}

.home-nav-block {
    flex: 0 0 auto;
    min-height: 30vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--color-dark);
    color: #ffffff;
    padding: 2rem 0;
}

/* ---------- Navigation (Logo + Bracket-Links) – sitewide wiederverwendet ---------- */
.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.nav-logo:hover { text-decoration: none; }
.nav-logo svg { height: 20px; width: auto; display: block; }

.nav-links {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-width: 0;
    flex-shrink: 1;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2.25rem;
    margin: 0;
    padding: 0;
    font-family: var(--font-base);
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    flex-wrap: nowrap;
}
.nav-links a {
    display: inline-block;
    color: #ffffff;
    text-decoration: none;
    border-bottom: none;
    transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a.active { text-decoration: none; color: var(--color-primary-light); }

/* Pill-Button (Desktop rechts aussen, mobil neben dem Hamburger; ersetzt den vorherigen "Anfrage"-Button) */
.nav-cta {
    display: inline-block;
    background: var(--color-primary);
    color: #ffffff;
    font-family: var(--font-base);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.nav-cta:hover { background: var(--color-primary-dark); text-decoration: none; }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
    z-index: 210;
    flex-shrink: 0;
}
.nav-toggle span {
    width: 24px;
    height: 2px;
    background: #ffffff;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Mobile Fullscreen Navigation (gleiches Design wie Desktop-Nav) ---------- */
.mobile-nav {
    position: fixed;
    inset: 0;
    background: var(--color-dark);
    z-index: 190;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding-top: calc(var(--nav-h) + 2.5rem);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.mobile-nav.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.mobile-nav ul {
    list-style: none;
    margin: 0 0 0 1.5rem;
    padding: 0 1.5rem;
    border-left: 3px solid var(--color-primary);
    text-align: left;
}
.mobile-nav li { margin: 1.4rem 0; }
.mobile-nav a {
    display: inline-block;
    font-family: var(--font-base);
    font-weight: 500;
    color: #d4d4d8;
    font-size: 1.65rem;
    text-decoration: none;
    border-bottom: none;
    transition: color 0.2s ease;
}
.mobile-nav a.active,
.mobile-nav a:hover { color: #ffffff; text-decoration: none; border-bottom: none; }

.home-hero-text {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
    flex-wrap: wrap;
}
.home-hero-title {
    font-family: var(--font-base);
    font-weight: 800;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.18;
    letter-spacing: -0.01em;
    margin: 0;
    max-width: 620px;
    color: #ffffff;
}
.home-hero-copy {
    font-family: "Space Mono", monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
    max-width: 300px;
    margin: 0.4rem 0 0;
}

.home-hero-video-wrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
.home-hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------- Page-Hero (Unterseiten, 40vh, Bild) ---------- */
.page-hero {
    position: relative;
    height: 40vh;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    background-color: var(--color-dark);
    background-size: cover;
    background-position: center;
}
.page-hero-inner { width: 100%; }
.page-hero h1 { color: #fff; margin-bottom: 0.5rem; }
.page-hero p { color: #e6e6ee; max-width: 640px; margin-left: auto; margin-right: auto; }
.page-hero a { color: #fff; }

/* ---------- Sections ---------- */
section { padding: 4rem 0; }
section.alt { background: var(--color-bg-alt); }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--color-bg);
    border: 1.5px solid #000000;
    border-radius: 22px;
    padding: 1.75rem;
    transition: background 0.15s ease;
}
.card:hover { background: var(--color-surface); }
.card h3 { margin-top: 0; font-size: 1.3rem; }

/* ---------- Support-Seite ---------- */
.support-grid { grid-template-columns: repeat(2, 1fr); }
.support-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1.5rem;
}
@media (max-width: 700px) {
    .support-grid { grid-template-columns: 1fr; }
}

/* ---------- Projekte-Übersicht ---------- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem 1.5rem;
}
.project-card { text-decoration: none; color: inherit; display: block; }
.project-card:hover { text-decoration: none; }
.project-card:hover .project-thumb { filter: blur(6px) brightness(0.85); }
.project-card:hover .project-thumb-arrow { opacity: 1; transform: scale(1); }

.project-thumb-wrap {
    position: relative;
    border-radius: 8px;
    aspect-ratio: 1 / 1;
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.project-thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.25s ease;
}
.project-thumb-arrow {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 2;
}
.project-thumb-arrow svg { width: 22px; height: 22px; color: #000000; }

.project-label {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
    color: #000000;
    margin-bottom: 0.25rem;
}
.project-tagline {
    color: var(--color-muted);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
}

@media (max-width: 700px) {
    .project-grid { grid-template-columns: 1fr; }
}

/* ---------- Hauptangebote – Karten im Pricing-Stil (Farben invertiert) ---------- */
.hauptangebote { background: var(--color-bg); }
/* Auf der Startseite dunkel statt hell (Angebot-Übersichtsseite bleibt hell) */
.hauptangebote.home-hauptangebote { background: var(--color-dark); }

.hauptangebote-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}
.hauptangebote-item {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.5rem;
    padding: 2.25rem;
    min-height: 400px;
    background: var(--color-bg);
    border: 1.5px solid #000000;
    border-radius: 22px;
    color: #000000;
    transition: background 0.15s ease, color 0.15s ease;
}
.hauptangebote-item:hover { text-decoration: none; background: var(--color-surface); }

.hauptangebote-shape {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 52px;
    height: 52px;
    opacity: 0.95;
}

.hauptangebote-top { display: flex; flex-direction: column; gap: 0.75rem; padding-right: 3rem; }
.hauptangebote-title {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1;
    margin: 0;
    color: #000000;
}
.hauptangebote-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.hauptangebote-features li {
    font-size: 0.9rem;
    color: #4a4a52;
}

.hauptangebote-btn {
    display: block;
    text-align: center;
    padding: 0.75rem 1rem;
    border: 1.5px solid #000000;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #000000;
    transition: background 0.15s ease, color 0.15s ease;
}
.hauptangebote-item:hover .hauptangebote-btn { background: #000000; color: #ffffff; }

/* Startseite: Kästen schwarz mit weissem Rahmen statt hell mit schwarzem Rahmen
   (Angebot-Übersichtsseite verwendet dieselbe Komponente und bleibt hell) */
.home-hauptangebote .hauptangebote-item {
    background: var(--color-dark);
    border-color: #ffffff;
    color: #ffffff;
}
.home-hauptangebote .hauptangebote-item:hover { background: #1a1a1f; }
.home-hauptangebote .hauptangebote-title { color: #ffffff; }
.home-hauptangebote .hauptangebote-features li { color: rgba(255, 255, 255, 0.65); }
.home-hauptangebote .hauptangebote-btn { border-color: #ffffff; color: #ffffff; }
.home-hauptangebote .hauptangebote-item:hover .hauptangebote-btn { background: #ffffff; color: #000000; }

@media (max-width: 900px) {
    .hauptangebote-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .hauptangebote-grid { grid-template-columns: 1fr; }
    .hauptangebote-item { min-height: auto; }
}

/* ---------- Kontakt ---------- */
.kontakt-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}
.kontakt-form form { max-width: none; }
.kontakt-aside h2:first-child { margin-top: 0; }

@media (max-width: 800px) {
    .kontakt-grid { grid-template-columns: 1fr; }
    .kontakt-aside { order: -1; }
}

/* ---------- Google Maps (Kontakt) ---------- */
.map-embed {
    border-radius: 22px;
    overflow: hidden;
    border: 1.5px solid #000000;
}
.map-embed iframe { display: block; filter: invert(90%) hue-rotate(180deg) brightness(0.95) contrast(0.9); }

/* ---------- FAQ ---------- */
.faq { background: var(--color-bg); }
.faq h2 { text-align: center; margin-bottom: 2.5rem; }
.faq-list {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.faq-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.1rem 1.4rem;
}
.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    color: #000000;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--color-muted);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin: 0.9rem 0 0; color: var(--color-muted); }

/* ---------- CTA (Startseite) ---------- */
.cta-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem;
}
.cta-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.cta-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    z-index: 1;
}
.cta-content { position: relative; z-index: 2; }
.cta-content h2 {
    color: #fff;
    font-size: 2rem;
    max-width: 620px;
    margin: 0 auto 1.5rem;
}

/* ---------- Forms ---------- */
form { max-width: 640px; }
.form-group { margin-bottom: 1.25rem; }
label { display: block; font-weight: 600; margin-bottom: 0.4rem; color: var(--color-heading); }
input, textarea, select {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    background: var(--color-surface);
    color: var(--color-text);
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--color-primary-light);
}
textarea { resize: vertical; min-height: 140px; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--color-dark);
    color: #ffffff;
    margin-top: 3rem;
    border-top: 4px solid var(--color-primary);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    align-items: stretch;
    gap: 2.5rem;
    padding: 4.5rem 0 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.footer-logo-img { height: 32px; width: auto; display: block; }

.footer-col {
    display: flex;
    flex-direction: column;
}
.footer-col h4 {
    color: #ffffff;
    text-transform: uppercase;
    font-size: calc(0.8rem + 4pt);
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-bottom: 1.25rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col address { font-style: normal; line-height: 1.7; color: #ffffff; }

.footer-link {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.footer-link:hover { color: var(--color-primary-light); text-decoration: underline; }

.link-arrow {
    display: inline-block;
    width: 0.75em;
    height: 0.75em;
    vertical-align: -0.05em;
    margin-left: 0.15em;
    color: currentColor;
}

.footer-extra { margin-top: auto; padding-top: 2rem; }

.footer-social {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #ffffff;
}
.footer-social a:hover { color: var(--color-primary-light); }
.footer-social svg { width: 20px; height: 20px; fill: currentColor; }

.footer-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin: 0;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem 0;
    font-size: 0.85rem;
    color: #ffffff;
}

.hosttech { display: inline-flex; align-items: center; flex-shrink: 0; }
.hosttech img { display: block; }

@media (max-width: 900px) {
    .footer-inner { grid-template-columns: repeat(2, 1fr); padding: 3.5rem 1.25rem 2.5rem; gap: 2rem; }
    .footer-logo { grid-column: 1 / -1; margin-bottom: 0.5rem; }
}
@media (max-width: 560px) {
    .footer-inner { grid-template-columns: 1fr; padding: 3rem 1.25rem 2rem; gap: 2.25rem; }
    .footer-logo-img { height: 28px; }
    .footer-col h4 { margin-bottom: 1rem; }
    .footer-extra { padding-top: 1.5rem; }
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.25rem;
        padding: 1.75rem 0;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }

    .home-nav-block { min-height: auto; padding: 1.5rem 0 2rem; }
    .home-hero-text { flex-direction: column; gap: 1rem; }
    .home-hero-copy { max-width: none; }

    /* Hintergrund-Animation auf Mobile nicht interaktiv (Touch verursacht Bildstörungen) */
    #heroAnim { pointer-events: none; }

    .cta-content h2 { font-size: 1.5rem; }
}

/* ---------- Desktop-Nav: grösser dimensioniert (Referenz: watosoft.ch) ---------- */
@media (min-width: 801px) {
    :root { --nav-h: 96px; }
    .nav-logo svg { height: 30px; }
    .nav-links ul { font-size: 1.05rem; gap: 2.5rem; }
    .nav-cta { font-size: 1rem; padding: 0.85rem 1.85rem; }
}
