/* ============================================
   FARBSYSTEM – LOGO-HARMONISIERT
   ============================================ */

:root {
    --primary: #2ad2c9;
    --secondary: #3a7bd5;
    --accent-light: #5fa8ff;

    --danger: #ff4d4d;

    --dark-bg: #0e0e0e;
    --dark-bg-soft: #161616;
    --dark-bg-elevated: #1d1d1d;

    --card-bg: rgba(0, 0, 0, 0.55);

    --card-bg-hover: rgba(0, 0, 0, 0.70);
    --card-text: #e5e5e5;

    --border: #d9e2ec;
    --text-dark: #1f2d3d;
}

/* ============================================
   GLOBAL
   ============================================ */

html {
    background: var(--dark-bg);
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--dark-bg); /* Body bleibt dunkel */
    color: #e5e5e5;
    line-height: 1.6;
}

h1, h2 {
    color: var(--primary);
    letter-spacing: 0.5px;
    hyphens: auto;
}

h3 {
    color: var(--secondary);
    hyphens: auto;
}

.highlight {
    color: var(--primary);
}

.page-container {
    max-width: 1200px;
    margin: 2rem auto 3rem;
    padding: 0 1.5rem;
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */

header {
    background: var(--dark-bg-soft);
    color: white;
    padding: 20px;
    border-bottom: 1px solid #222;
    position: relative;
    z-index: 1;
}

.logo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

@media (max-width: 768px) {
    .logo img { height: 38px; }
    nav a {
        display: block;
        margin: 10px 0;
    }
    header { text-align: center; }
}

nav a {
    color: white;
    margin-right: 15px;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}

nav a:hover {
    color: var(--accent-light);
}
/* ============================================
   MEGA-MENÜ
   ============================================ */

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 4px;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--primary);
}

/* Wrapper */
.mega-wrapper {
    position: static;
}

.mega-trigger {
    background: none;
    border: none;
    color: white;
    font-weight: bold;
    padding: 8px 4px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.mega-trigger:hover {
    color: var(--primary);
}

/* Mega-Menü Panel */


.mega-menu {
    position: fixed;
    top: 80px;

    /* statt zentriert → an Trigger ausrichten */
    left: 0;

    /* aber optisch zentrieren */
    transform: none;

    width: 100%;
    max-width: 1200px;
    margin-left: calc(50% - 600px); /* 600px = max-width/2 */

    background: rgba(0,0,0,0.88);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;

    padding: 2rem;

    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;

    overflow: visible;
    z-index: 99999;
}

.mega-menu.open {
    display: grid;
}
.mega-wrapper:hover .mega-menu {
    display: grid;
}


/* Spalten */
.mega-col h4 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.mega-col a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    color: #e5e5e5;
    transition: color 0.2s ease, transform 0.2s ease;
}

.mega-col a:hover {
    color: var(--accent-light);
    transform: translateX(4px);
}

.mega-col svg {
    width: 22px;
    height: 22px;
}

/* Hover öffnen */
.mega-wrapper:hover .mega-menu {
    display: grid;
}

/* ============================================
   HERO-BEREICH + ANIMATION
   ============================================ */

.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding: 2rem;

    /* >>> HERO wie die Kacheln, aber mit Verlauf <<< */
    background: linear-gradient(
        rgba(0,0,0,0.65),
        rgba(0,0,0,0.45)
    );
    backdrop-filter: blur(6px);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.45);

    opacity: 0;
    transform: translateY(18px);
    animation: heroFadeIn 0.8s ease-out forwards;

    position: relative;
    z-index: auto;
}


.hero-left,
.hero-logo {
    opacity: 0;
    transform: translateY(12px);
}

.hero-left {
    max-width: 800px;
    animation: heroLeftIn 0.9s ease-out forwards;
    animation-delay: 0.15s;
}

.hero-sub {
    font-size: 1.2rem;
    color: #cccccc;
    margin-bottom: 1.5rem;
}

.hero-logo {
    max-width: 480px;
    width: 100%;
    animation: heroLogoIn 1s ease-out forwards;
    animation-delay: 0.3s;
}

/* Keyframes */
@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes heroLeftIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes heroLogoIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   CARDS / KACHELN
   ============================================ */

.category-card,
.card {
    background-color: var(--card-bg);
    color: var(--card-text);
    padding: 2rem;
    border-radius: 10px;
    border-top: 4px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    backdrop-filter: blur(6px);
    margin-bottom: 20px;
    opacity: 0;
    /* KEIN transform hier */
    animation: cardFadeIn 0.6s ease forwards;
    transition: top 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
    position: relative;
    z-index: 1;
}

/* WICHTIG: Links als Block, sonst greifen top/hover schlecht */
.category-card {
    display: block;
}

/* Einzel-Hover: nur diese Kachel leicht anheben */
.category-card:hover {
    background-color: var(--card-bg-hover);
    top: -4px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    border-top-color: var(--secondary);
}

/* Gruppen-Hover: alle Kacheln deutlicher anheben */
.privat-link-wrapper:hover .category-card {
    background-color: var(--card-bg-hover);
    top: -8px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.35);
    border-top-color: var(--secondary);
}

.privat-link-wrapper {
    display: block;
}


/* Fade-In */
@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   KACHEL-LAYOUT
   ============================================ */

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0 40px;
    position: relative;
    z-index: 1;
}
.category-grid-single {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0 40px;
    position: relative;
    z-index: 1;
}
/* ============================================
   BILDER-KACHELN (neutral, ohne Hover, ohne Border)
   ============================================ */

.image-card {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    border: none !important;          /* Farbstreifen entfernen */
    border-top: none !important;
    box-shadow: none !important;      /* Schatten entfernen */
    background-color: transparent !important;

    padding: 0 !important;            /* Innenabstand entfernen */
    min-height: 220px;                /* gleiche Höhe wie Kacheln */
    border-radius: 10px;

    pointer-events: none;             /* NICHT klickbar */
    cursor: default;

    transition: none !important;      /* keine Hover-Animation */
    top: 0 !important;                /* kein Anheben */
}
.image-card img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* GANZES Bild sichtbar */
    display: block;
}
.image-card .zz-copyright {
    font-size: 11px;
    color: #000 !important;
    margin-top: 4px;
}

/* Nur für Kacheln, die das Bild vollständig anzeigen sollen */
.image-contain {
    background-size: contain;     /* Bild vollständig sichtbar */
    background-position: center;  /* zentriert */
    background-repeat: no-repeat; /* kein Kacheln */
}

/* Hover komplett neutralisieren */
.image-card:hover {
    background-color: transparent !important;
    box-shadow: none !important;
    top: 0 !important;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.2s ease, transform 0.15s ease;
}

.btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background: var(--dark-bg-soft);
    padding: 2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #222;
    color: #ccc;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

/* ============================================
   VOLLSEITEN-HINTERGRUND MIT PIXEL-ZERFALL
   ============================================ */

#bg-slideshow {
    position: fixed;
    inset: 0;
    overflow: hidden;
}

#bg-slideshow::before,
#bg-slideshow::after {
    content: "";
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#bg-slideshow::before {
    opacity: 1;
    background-image: var(--img-before);
    z-index: 2; /* WICHTIG */
}

#bg-slideshow::after {
    opacity: 1;
    background-image: var(--img-after);
    z-index: 1; /* WICHTIG */
}

/* Pixel-Zerfall */
#bg-slideshow.pixel-zerfall::before {
    animation: pixelDisintegrate 2.2s forwards ease-out;
}

/* Pixel-Zerfall Keyframes */
@keyframes pixelDisintegrate {
    0% {
        opacity: 1;
        clip-path: inset(0 0 0 0);
        filter: blur(0px);
    }
    20% {
        clip-path: inset(5% 0 0 0);
        filter: blur(1px);
    }
    40% {
        clip-path: inset(15% 0 0 0);
        filter: blur(2px);
    }
    60% {
        clip-path: inset(35% 0 0 0);
        opacity: 0.7;
        filter: blur(3px);
    }
    80% {
        clip-path: inset(60% 0 0 0);
        opacity: 0.4;
        filter: blur(5px);
    }
    100% {
        clip-path: inset(100% 0 0 0);
        opacity: 0;
        filter: blur(8px);
    }
}

/* ============================================
   MOBILE NAVIGATION
   ============================================ */

.mobile-burger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 22px;
    z-index: 200;
}

.mobile-burger span {
    width: 28px;
    height: 3px;
    background: white;
    border-radius: 3px;
}

/* Slide-In Menü */
.mobile-menu {
    position: fixed;
    inset: 0 0 0 auto;
    width: 280px;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(8px);
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 300;
    padding: 1.5rem;
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.mobile-menu-header h3 {
    color: var(--primary);
    margin: 0;
}

#closeMenu {
    background: none;
    border: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
}

/* Mobile Links */
.mobile-nav a {
    display: block;
    padding: 10px 0;
    color: #e5e5e5;
    text-decoration: none;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mobile-nav a:hover {
    color: var(--primary);
}

/* Akkordeon */
.mobile-accordion {
    margin: 1rem 0;
}

.accordion-trigger {
    width: 100%;
    background: none;
    border: none;
    color: white;
    text-align: left;
    padding: 10px 0;
    font-size: 1.1rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.accordion-content {
    display: none;
    padding-left: 10px;
}

.accordion-content a {
    padding: 8px 0;
    font-size: 1rem;
}

/* Mobile Breakpoint */
@media (max-width: 900px) {
    .main-nav {
        display: none;
    }
    .mobile-burger {
        display: flex;
    }
}

/* ============================================
   EMISSION KACHELN
   ============================================ */
.emission-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    transform: translateY(10px);
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}
@keyframes fadeInUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
.emission-card {
    background: rgba(0,0,0,0.6);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Bild + Text nach rechts */
    text-align: right; /* Text ebenfalls rechtsbündig */
}

.emission-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.emission-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.emission-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}
