/* Globale Einstellungen */
html {
    scroll-behavior: smooth;
    user-select: none;
}
 
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
}
 
/* Header und Navigation */
header {
    background: #333333EE;
    color: #fff;
    padding: 10px 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1001;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
 
nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
}
 
nav ul li {
    margin: 0 15px;
}
 
nav ul li a {
    color: #fff;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background 0.3s, color 0.3s;
}
 
nav ul li a:hover {
    background: #fff;
    color: #333;
}
 
/* Hero-Section */
.hero-section {
    height: 100vh;
    background-size: cover;
    margin: 0;
    padding: 0;
    max-width: none;
    background: url('../img/hero-bg.jpg') no-repeat center center/cover;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
 
.hero-section h1, .hero-section p {
    animation: fadeInUp 1s ease-out;
}
 
/* Allgemeine Stile für die Sektionen */
section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: auto;
}
 
section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5em;
}
 
section p, section h3 { text-align: center; }

 
/* Dienstleistungskarten */
.card {
    background: #fff;
    padding: 20px;
    margin: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    transition: transform 0.3s;
    animation: fadeInUp 0.5s ease-out;
}
 
.card:hover {
    transform: translateY(-10px);
}
 
.card:nth-child(2) {
    animation-delay: 0.2s;
}
 
.card:nth-child(3) {
    animation-delay: 0.4s;
}
 
/* Kontaktformular */
form {
/*display: none;*/
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: auto;
}
 
form input, form textarea {
    padding: 12px;
    margin: 12px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    transition: border 0.3s;
}
 
form input:focus, form textarea:focus {
    outline: none;
    border-color: #333;
}
 
form button {
    padding: 12px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s;
}
 
form button:hover {
    background: #555;
}
 
/* Positioniere das Kontaktformular relativ */
/*Sperre*/
#contact {
    position: relative;
}
 
/* Overlay */
/*Sperre*/
#overlay {
display: none; /* Standardmäßig nicht sichtbar */
    position: absolute;
    top: -10px;
    left: -10px;
    width: calc(100% + 20px); /* 20px breiter als das Formular */
    height: calc(100% + 20px); /* 20px höher als das Formular */
    background-color: rgba(0, 0, 0, 0.5); /* Transparentes Schwarz */
    /*display: flex;*/
    justify-content: center;
    align-items: center;
    z-index: 10; /* Höher als das Formular */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
 
/*Sperre*/
.overlay-content {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}
 
/*Sperre*/
.overlay-content p {
    margin: 0;
    color: #fff;
}

/* Stile für die Fehlermeldungen */
input.error-message, textarea.error-message {
    position: absolute; /* Fixiert die Position der Fehlermeldung relativ zum Eingabefeld */
    left: -200px; /* Positioniert die Fehlermeldung links neben dem Eingabefeld */
    color: red; /* Textfarbe für die Fehlermeldung */
    font-size: 0.9em; /* Kleinere Schriftgröße */
    width: 180px; /* Festlegen der Breite der Fehlermeldung */
}

.form-group {
    position: relative; /* Stellt sicher, dass das Eingabefeld und die Fehlermeldung relativ zueinander positioniert sind */
}

 
/* Scroll-to-Top-Button */
#back-to-top-btn {
    position: fixed;
    bottom: 43px;
    right: 50%;
    transform: translateX(50%);
    width: 41px;
    height: 41px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
    z-index: 999;
}
 
#back-to-top-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}
 
/* === Footer: rechtsbündige Legal-Links === */
footer {
  background: #333;
  color: #fff;
}
footer .footer-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
footer .footer-copy{
  margin: 0;
}
footer .footer-legal{
  margin-left: auto;
  display: inline-flex;
  gap: 12px;
  font-size: 0.95rem;
}
footer .footer-legal a{
  color: #fff;
  text-decoration: none;
  opacity: 0.9;
}
footer .footer-legal a:hover,
footer .footer-legal a:focus{
  text-decoration: underline;
  opacity: 1;
}
@media (max-width: 640px){
  footer .footer-inner{
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  footer .footer-legal{
    align-self: flex-end; /* bleibt rechtsbündig */
  }
}

 
/* Hamburger-Symbol */
.hamburger {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

.about-profile {
  display: grid;
  grid-template-columns: 220px 1fr; /* Platz für Bild links + Text rechts */
  gap: 40px; /* Abstand zwischen Bild und Text */
  align-items: center;
  padding: 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,.08);
  text-align: left;
  max-width: 900px; /* Begrenzte Breite für Lesbarkeit */
  margin: 0 auto;
}

.profile-avatar {
  display: block;
  width: 200px;
  height: 200px;
  border-radius: 50%;       /* Kreisform */
  object-fit: cover;        /* Kein Verzerren, füllt den Kreis */
  object-position: center;  /* zentriert das Gesicht */
  border: 3px solid #eee;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.mini-profile h3 {
  margin: 0 0 6px 0;
  font-size: 1.4rem;
  font-weight: 700;
}

.mini-profile .subtitle {
  margin: 0 0 12px 0;
  font-size: 0.95rem;
  color: #666;
}

.mini-list {
  margin: 0 0 16px 0;
  padding-left: 18px;
}

.mini-cta {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 8px;
  background: #333;
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  transition: transform .15s ease, background .2s ease;
}
.mini-cta:hover {
  background: #555;
  transform: translateY(-1px);
}

@media (max-width: 720px) {
  .about-profile {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }
  .profile-avatar {
    margin: 0 auto;
    width: 160px;
    height: 160px;
  }
}
 
/* Mobile Navigation */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
        position: relative;
        justify-content: center;
        z-index: 1002;
    }
 
    header {
        border-radius: 0 0 10px 10px;
        width: 90%;
        left: 5%;
    }
 
    nav ul {
        display: none;
        flex-direction: column;
        background-color: rgba(51, 51, 51, 0.05);
        width: 100%;
        position: relative;
        top: 10px;
        left: 0;
        padding: 0;
    }
 
    nav ul.open {
        display: flex;
    }
 
    nav ul li {
        margin: 0;
        text-align: center;
        padding: 15px 0;
        border-bottom: 1px solid #fff;
        border-radius: 0 0 10px 10px;
    }
}
 
/* Keyframes für FadeInUp-Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
 
/* Animation für das Hamburger-Menü */
.hamburger i {
    transition: transform 0.3s ease;
}
 
.hamburger.active i {
    transform: rotate(90deg); /* Das "X"-Symbol durch Rotation */
}

/* ===== Projekt-Modal ===== */
.project-modal {
  position: fixed;
  inset: 0;
  display: none;               /* via JS -> block */
  z-index: 1000;
}

.project-modal[aria-hidden="false"] { display: block; }

.project-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(2px);
}

.project-modal__dialog {
  position: relative;
  max-width: min(1100px, 92vw);
  height: min(85vh, 900px);
  margin: 6vh auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0,0,0,.25);
  overflow: hidden;
}

.project-modal__close {
  position: absolute;
  top: 10px; right: 12px;
  width: 36px; height: 36px;
  border: none; border-radius: 50%;
  background: rgba(0,0,0,.65);
  color: #fff; cursor: pointer;
  display: grid; place-items: center;
}
.project-modal__close:hover { background: rgba(0,0,0,.8); }

/* Klicks auf das X-Icon gehen an den Button weiter */
.project-modal__close i { pointer-events: none; }

.project-modal__grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  height: 100%;
}

.project-modal__nav {
  background: #f6f6f6;
  border-right: 1px solid #e8e8e8;
  padding: 18px 14px;
  overflow: auto;
}

/* Modal-Navigation sicher vertikal (überschreibt globale nav-Regeln) */
.project-modal__nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px;
}
.project-modal__nav li { display: block !important; }
.project-modal__nav a {
  display: block;
  color: #333;
  text-decoration: none;
  border-radius: 8px;
  padding: 8px 10px;
}
.project-modal__nav a:hover { background: #eaeaea; }

.project-modal__content {
  padding: 22px 26px;
  overflow: auto;
}
.project-modal__content h3 { margin-top: 0; }

/* Galerie/Platzhalter-Bilder */
.img-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 14px 0 8px;
}
.pm-img {
  width: 100%; height: auto; border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.img-placeholder {
  width: 100%; aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: linear-gradient(135deg, #9be, #58a);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* Responsive */
@media (max-width: 900px) {
  .project-modal__grid { grid-template-columns: 1fr; }
  .project-modal__nav { display: none; }
}

/* ==== Inline-Chat im Miniprofil ==== */
.mini-chat-inline { margin-top: 18px; max-width: 520px; }

.mini-chat-inline__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.mini-chat-inline__form input {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font: inherit;
}
.mini-chat-inline__form button {
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  background: #333;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.mini-chat-inline__log {
  margin-bottom: 10px;           /* Abstand nach unten zum Eingabefeld */
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,.06);
  max-height: 320px;
  overflow: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Chat-Bubbles */
.mini-chat-msg {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 12px;
  line-height: 1.45;
  font-size: 0.95rem;
}
.mini-chat-msg--user { align-self: flex-end; background: #e9f0ff; }
.mini-chat-msg--bot  { align-self: flex-start; background: #f4f4f4; }

.mini-chat-inline__hint {
  margin: 6px 0 12px;            /* oberer/unterer Abstand angepasst */
  font-size: 12px;
  color: #666;
}

/* --- FINAL OVERRIDES: Modal-Überschrift + erster Überblick-Absatz links --- */
.project-modal__content h3#project-modal-title { 
  text-align: left !important; 
}

.project-modal__content #pm-intro > p { 
  text-align: left !important; 
  margin-top: 8px;
}

/* --- Modal-Overrides: globale Section-Zentrierung im Modal aufheben --- */
/* Modal-Sections: globale 60px-Vertikalpaddings neutralisieren */
.project-modal__content section {
  max-width: 100%;
  margin: 0;                 /* statt margin:auto */
  padding: 0;                /* <— wichtig: top + bottom auf 0 setzen */
}


/* Falls die globale Regel 'section p, section h3 { text-align:center }' greift: */
.project-modal__content #pm-intro p,
.project-modal__content #pm-details p {
  text-align: left;
}

/* Nur Schlagschatten für bessere Lesbarkeit im Hero */
.hero-section h1,
.hero-section h2,
.hero-section h3,
.hero-section p {
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.4),   /* Hauptschatten */
    0 1px 2px rgba(0, 0, 0, 0.3);   /* feiner Zusatz */
}

/* About-Layout: Heading über beide Spalten, darunter Avatar | Content */
.about-profile {
  display: grid;
  grid-template-columns: 220px 1fr;   /* Avatar | Inhalt (wie bei dir) */
  grid-template-rows: auto 1fr;       /* Zeile 1: Heading, Zeile 2: Rest */
  grid-template-areas:
    "heading heading"
    "avatar  content";
  gap: 40px;                           /* behält deinen Abstand bei */
  align-items: start;                  /* Avatar & Content oben starten */
}

/* Bereiche zuweisen */
.about-heading  { grid-area: heading; text-align: center; }
.profile-avatar { grid-area: avatar;  justify-self: start; align-self: start; }
.mini-profile   { grid-area: content; }

/* Typografie der neuen Überschriftenzeile */
.about-heading h3 {
  margin: 0 0 6px;
  font-size: 1.8rem;
  font-weight: 700;
}
.about-heading .subtitle {
  margin: 0;
  color: #666;
}

/* Responsive unter 720px: alles untereinander */
@media (max-width: 720px) {
  .about-profile {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "heading"
      "avatar"
      "content";
    gap: 20px;
    text-align: center; /* darf hier bleiben: nur das Grid, nicht der Content-Text */
  }
  .profile-avatar { margin: 0 auto; }
  /* Content rechts weiterhin linksbündig – optional so lassen */
  .mini-profile { text-align: left; }
}

/* === Admin Login Card (CMS) === */
.nav-login { cursor: pointer; }

/* Login-Karte */
.login-card {
    background: #333333EE; /* exakt gleiche Farbe/Transparenz wie Navbar */
    border-radius: 10px;
    padding: 12px 16px; /* weniger vertikal, kompakter */
    width: 250px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Input-Felder */
.login-card input[type="text"],
.login-card input[type="password"] {
    width: 100%;
    padding: 6px 8px; /* weniger Höhe */
    margin-bottom: 8px; /* kompakter Abstand */
    background: #555555CC; /* etwas heller & transparent */
    border: 1px solid #777777;
    border-radius: 6px;
    color: #fff;
}

/* Placeholder-Farbe */
.login-card input::placeholder {
    color: #ddd;
}

/* Anmelden-Button */
.login-card button {
    width: 100%;
    padding: 6px 8px; /* kleiner */
    background-color: #000;
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.login-card button:hover {
    background-color: #222;
}

/* Hinweistext */
.login-card p {
    font-size: 0.85em;
    margin-top: 6px;
    color: #ddd;
}


/* Card-Inhalt: auf ~1/3 schrumpfen */
.login-card-inner {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0,0,0,.15);
  width: min(92vw, 240px);   /* deutlich kleiner */
  padding: 12px;
  border: 1px solid rgba(0,0,0,.06);
  animation: loginSlideDown .15s ease-out;
}

.login-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid #eee;
}

.login-card-header h3 { margin: 0; font-size: 1rem; }

.login-close {
  background: transparent; border: 0; font-size: 1.25rem; line-height: 1; cursor: pointer;
}

#loginForm { padding: 14px; display: grid; gap: 10px; }
#loginForm label { display: grid; gap: 6px; font-size: .9rem; }

#loginForm { padding: 0; display: grid; gap: 8px; }
#loginForm label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; }
#loginForm input[type="text"],
#loginForm input[type="password"],
#loginForm input[name="username"],
#loginForm input[name="password"] {
  border: 1px solid #ddd; border-radius: 6px; padding: 6px; font-size: .9rem;
}
.login-submit {
  border: 0; border-radius: 8px; padding: 8px 10px; cursor: pointer;
  background: #111; color: #fff; font-weight: 600;
}
.login-note { font-size: .75rem; color: #666; text-align: center; }

/* Mobile: Button bleibt sichtbar, mit kräftigerem Schatten */
@media (max-width: 768px) {
  .login-trigger { right: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
}


/* === Fester Login-Trigger oben rechts === */
/* === Fester Login-Trigger oben rechts (zentriert zur Navbar) === */
.login-trigger {
  position: fixed;
  right: 16px;
  z-index: 10010;
  padding: 6px 12px;
  border: 0;
  border-radius: 9999px;
  background: rgba(17,17,17,0.85);
  color: #fff;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
  backdrop-filter: saturate(140%) blur(2px);
}
.login-trigger:focus { outline: 2px solid #000; outline-offset: 2px; }

@keyframes loginSlideDown {
  from { transform: translateY(-8px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@media (max-width: 768px) {
  .login-trigger {
    top: 10px;
    right: 10px;
    padding: 8px 12px;
    font-weight: 700;
    /* noch etwas stärker absetzen */
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
  }
}

/* === LOGIN · FINAL COMPACT OVERRIDES === */

/* Karte rechts minimal eingerückt, Position bleibt fix (scrollt NICHT mit) */
#loginCard[hidden] { display: none; }
.login-card {
  position: fixed;
  /* top setzt das JS exakt auf Navbar-Unterkante */
  right: calc(env(safe-area-inset-right, 0) + 8px); /* 8px weg von der Scrollbar */
  z-index: 10000;
}

/* Deutlich kompakter: ~2/3 Breite, ~1/2 Höhe durch weniger Padding/kleinere Elemente */
.login-card-inner {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0,0,0,.14);
  width: min(92vw, 180px);      /* vorher größer → jetzt schlank */
  padding: 8px;                 /* kompakter Innenabstand */
  border: 1px solid rgba(0,0,0,.06);
}

/* Falls irgendwo noch Header/X-Stile existieren → vollständig ausblenden */
.login-card-header, .login-close { display: none !important; }

/* Form kompakt halten */
#loginForm { display: grid; gap: 6px; padding: 0; }
#loginForm label { font-size: .82rem; font-weight: 600; line-height: 1.15; }
#loginForm input[type="text"],
#loginForm input[type="password"],
#loginForm input[name="username"],
#loginForm input[name="password"] {
  height: 32px;                 /* kleiner als vorher */
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: .9rem;
  box-sizing: border-box;
}
.login-submit {
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;            /* kleinerer Button */
  background: #111; color: #fff;
  font-weight: 700; cursor: pointer;
}
.login-note { font-size: .74rem; color: #666; text-align: center; }

/* Login-Trigger (Button) kannst du so lassen; optional gleiche Einrückung: */
.login-trigger { right: calc(env(safe-area-inset-right, 0) + 8px); }

/* === LOGIN · FINAL OVERRIDES === */

/* Button oben rechts bleibt fixed; die exakte top-Position setzt JS */
.login-trigger { right: 10px; z-index: 10010; }

/* Karte rechts minimal eingerückt (nicht an Scrollbar stoßen) */
#loginCard[hidden] { display: none; }
.login-card {
  position: fixed;
  right: 10px;
  z-index: 10000;
  /* top setzt JS exakt an die Navbar-Unterkante */
}

/* Kleine, luftige Karte */
.login-card-inner {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0,0,0,.14);
  width: min(92vw, 180px);   /* ~2/3 der früheren Breite */
  padding: 10px;             /* genug Luft, nicht gequetscht */
  border: 1px solid rgba(0,0,0,.06);
}

/* Labels klar sichtbar */
.login-label {
  display: block;
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.2;
  color: #333;
  margin-top: 4px;
}

/* Kompakte Inputs */
#loginForm { display: grid; gap: 8px; padding: 0; }
#loginForm input[type="text"],
#loginForm input[type="password"],
#loginForm input[name="username"],
#loginForm input[name="password"] {
  height: 32px;
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: .9rem;
  box-sizing: border-box;
}

/* Kleinerer, nicht gequetschter Submit-Button */
.login-submit {
  margin-top: 4px;
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;     /* kleiner als vorher */
  background: #111; color: #fff;
  font-weight: 700; cursor: pointer;
}
.login-note { font-size: .76rem; color: #666; text-align: center; }

/* === LOGIN · FINAL CLEAN OVERRIDES (nur für #loginForm) === */

/* Karte rechts leicht eingerückt (nicht an Scrollbar anschneiden) */
.login-card { right: 10px; }

/* Kompaktere Karte – Breite klein, Polster schlank */
.login-card-inner {
  width: min(92vw, 180px);
  padding: 8px 10px;                 /* schlankes Padding */
}

/* Labels: klar, aber nicht riesig */
#loginForm .login-label {
  display: block;
  margin: 2px 0 3px;                 /* wenig vertikaler Abstand */
  font-size: 0.82rem;
  font-weight: 600;
  color: #333;
}

/* Inputs: globale Margins/Paddings überschreiben → kompakt */
#loginForm input[type="text"],
#loginForm input[type="password"],
#loginForm input[name="username"],
#loginForm input[name="password"] {
  margin: 0 0 6px;                   /* statt global 12px */
  height: 30px;                      /* niedriger */
  padding: 4px 8px;                  /* schmaler */
  font-size: 0.9rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-sizing: border-box;
}

/* Submit-Button: kleiner, nicht gequetscht */
#loginForm .login-submit {
  margin-top: 2px;
  padding: 5px 10px;                 /* kleiner als global 12px */
  font-size: 0.95rem;
  border-radius: 8px;
}

/* Hinweis-Text komprimieren */
#loginForm .login-note {
  margin-top: 6px;
  font-size: 0.75rem;
  line-height: 1.2;
}

/* Damit die globalen 'form' Styles (flex, max-width, margin:auto) NICHT greifen */
#loginForm {
  display: grid !important;
  max-width: none !important;
  margin: 0 !important;
}

/* === LOGIN · PLACEHOLDER, SYMMETRIE & NAVBAR-LOOK === */

/* Karte: dunkel/transluzent wie Navbar, Innenabstände symmetrisch */
.login-card-inner {
  background: rgba(17,17,17,0.85);     /* wie Navbar */
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0,0,0,.25);
  width: min(92vw, 180px);
  padding: 10px 12px;                   /* links = rechts → symmetrisch */
  border: 1px solid rgba(255,255,255,.06);
  backdrop-filter: saturate(140%) blur(2px);
}

/* Inputs kompakt, volle Breite, klarer Kontrast auf dunklem Grund */
#loginForm input[type="text"],
#loginForm input[type="password"],
#loginForm input[name="username"],
#loginForm input[name="password"] {
  display: block;
  width: 100%;
  margin: 0 0 6px;
  height: 32px;
  padding: 6px 10px;                    /* gleicher Innenabstand links/rechts */
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px;
  background: rgba(255,255,255,0.92);
  color: #111;
  box-sizing: border-box;
}

/* Placeholder-Farbe leicht abgetönt (gute Lesbarkeit) */
#loginForm input::placeholder {
  color: rgba(0,0,0,0.6);
}

/* Kleinerer, nicht gequetschter Button */
#loginForm .login-submit {
  margin-top: 4px;
  padding: 6px 10px;                    /* kleiner als vorher */
  font-size: 0.95rem;
  border: 0;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
}

/* Hinweis kompakt */
#loginForm .login-note {
  margin-top: 6px;
  font-size: .75rem;
  line-height: 1.2;
  color: rgba(255,255,255,0.85);
}

/* Karte minimal von der Scrollbar weg, Button optional mitnehmen */
.login-card { right: 10px; }
.login-trigger { right: 10px; }

/* === Login-Karte direkt anpassen === */
.login-card {
  background: #333333EE;       /* exakt gleiche Farbe/Transparenz wie Navbar */
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;          /* symmetrischer Abstand */
  box-shadow: 0 8px 18px rgba(0,0,0,.25);
  backdrop-filter: saturate(140%) blur(2px);
}

/* Eingabefelder: leicht heller & transparent statt Weiß */
.login-card input[type="text"],
.login-card input[type="password"] {
  width: 100%;
  height: 28px;
  padding: 5px 10px;
  margin: 4px 0;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,0.15);  /* hell & transluzent */
  color: #fff;
}

.login-card input::placeholder {
  color: rgba(255,255,255,0.85);
}

/* Anmeldebutton */
.login-card button {
  padding: 5px 10px;
  font-size: 0.9rem;
  border: 0;
  border-radius: 8px;
  width: 100%;
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* === LOGIN · FINAL (ein Panel, exakt wie Navbar) === */

/* Karte selbst (einzige Fläche) */
#loginCard[hidden] { display: none; }
.login-card {
  position: fixed;
  right: 12px;                         /* minimal von der Scrollbar weg */
  z-index: 10000;
  background: #333333EE;               /* EXAKT wie dein Header */
  color: #fff;
  width: min(92vw, 180px);             /* schlank */
  padding: 8px 12px;                   /* symmetrische Innenabstände */
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0,0,0,.25);
  backdrop-filter: saturate(140%) blur(2px);
}

/* Nur zur Sicherheit: falls irgendwo noch .login-card-inner im DOM wäre → wirkungslos machen */
.login-card-inner { display: contents !important; padding: 0 !important; background: transparent !important; box-shadow: none !important; border: 0 !important; width: auto !important; }

/* Kompaktes Formular (keine globalen Form-Margins) */
#loginForm { display: grid !important; gap: 6px; margin: 0 !important; max-width: none !important; }

/* Eingabefelder: leicht heller & transparent (NICHT weiß) */
#loginForm input[type="text"],
#loginForm input[type="password"],
#loginForm input[name="username"],
#loginForm input[name="password"] {
  width: 100%;
  height: 28px;                        /* niedriger → Karte wirkt kürzer */
  margin: 0;
  padding: 5px 10px;                   /* links = rechts → mittig */
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,0.15);  /* hell & halbtransparent */
  color: #fff;
}

#loginForm input::placeholder { color: rgba(255,255,255,0.85); }

/* Anmelden-Button: kleiner, nicht gequetscht */
#loginForm .login-submit {
  padding: 5px 10px;
  font-size: 0.9rem;
  border: 0;
  border-radius: 8px;
  width: 100%;
  background: #000000D9;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* Hinweis kompakt */
#loginForm .login-note {
  margin-top: 4px;
  font-size: .74rem;
  line-height: 1.2;
  color: rgba(255,255,255,0.9);
}
.login-trigger { right: 12px; }  /* fluchtet dann mit .login-card */

/* === LOGIN · kompakte Felder + integrierte Fehlermeldungen (keine Browser-Bubbles) === */

/* Wrapper um jedes Feld: Grundlage für Error-Layout */
#loginForm .login-field {
  display: grid;
  gap: 4px;               /* kleiner vertikaler Abstand */
}

/* Inputs bleiben kompakt & transluzent (dein dunkles Panel bleibt) */
#loginForm .login-field > input {
  width: 100%;
  height: 28px;
  margin: 0;
  padding: 5px 10px;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,0.15);  /* leicht heller & transparent */
  color: #fff;
}
#loginForm .login-field > input::placeholder {
  color: rgba(255,255,255,0.85);
}

/* Kleine, integrierte Fehlermeldung – kein Überlappen */
#loginForm .login-error {
  display: none;
  font-size: .72rem;
  line-height: 1.25;
  color: #ffe2e2;                 /* dezent auf dunklem Grund */
  background: rgba(0,0,0,0.35);
  padding: 2px 6px;
  border-radius: 6px;
}

/* Sichtbar + rote Kante, wenn invalid */
#loginForm .login-field.invalid > input {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 2px rgba(255,107,107,.22);
}
#loginForm .login-field.invalid > .login-error {
  display: block;
}

/* Kompakter Submit-Button (kleiner als bisher) */
#loginForm .login-submit {
  padding: 5px 10px;
  font-size: .9rem;
  border: 0;
  border-radius: 8px;
  width: 100%;
  background: #000000D9;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* Hinweistext schlank */
#loginForm .login-note {
  margin-top: 4px;
  font-size: .74rem;
  line-height: 1.2;
  color: rgba(255,255,255,0.9);
}

/* ===== Legal Pages (Impressum / Datenschutz) ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; } /* falls noch nicht vorhanden */

.legal-hero { padding: 72px 0 24px; }
.legal-hero .container { text-align: center; }
.legal-hero h1 { margin: 0; font-size: clamp(32px,4.5vw,48px); line-height: 1.2; }

.legal-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0,0,0,.12);
  padding: 28px 28px 32px;
  margin: 8px auto 64px;
}
.legal-card h2 { margin-top: 24px; }
.legal-card h3 { margin-top: 18px; }
.legal-card p, .legal-card li { color: #222; }

/* Link-Stil: keine Linie im Normalzustand, nur bei Hover */
.legal-card a,
.legal-card a:visited {
  color: #111;
  text-decoration: none;   /* <-- Linie aus */
  opacity: .92;
}
.legal-card a:hover,
.legal-card a:focus {
  text-decoration: underline;   /* <-- Linie nur auf Hover/Focus */
  opacity: 1;
}

@media (max-width: 640px){
  .legal-card { padding: 22px; }
}

/* ===== Footer: Desktop (Grid 3 Spalten) ===== */
footer { background: #333; color: #fff; }
footer .footer-inner{
  max-width: 1200px; margin: 0 auto; padding: 10px 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* links | mitte | rechts */
  align-items: center;
  column-gap: 12px;
}

.footer-left { justify-self: start; }
.footer-copy { margin: 0; text-align: center; }
.footer-legal { justify-self: end; display: inline-flex; gap: 12px; font-size: .95rem; }

footer a { color: #fff; text-decoration: none; opacity: .9; }
footer a:hover, footer a:focus { text-decoration: underline; opacity: 1; }

/* ===== Mobile-Stack: Reihenfolge = Copy → Impressum → Datenschutz → Login ===== */
@media (max-width: 640px){
  footer .footer-inner{
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  }
  .footer-copy{ order: 1; }
  .footer-legal{ order: 2; display: block; }           /* Legal einzeln untereinander */
  .footer-legal .sep{ display: none; }                 /* Punkt ausblenden */
  .footer-legal .footer-impressum,
  .footer-legal .footer-dse{ display: block; margin: 0; }
  .footer-left{ order: 4; }                             /* Login zuletzt */
}

/* ===== Login-Card unten links über dem Footer ===== */
/* Nur Positionierung – übernimmt NICHT das Aussehen deiner Card */
.login-card--bottom-left {
  position: fixed;
  left: 16px;
  bottom: 72px;  /* Abstand über dem Footer */
  z-index: 2000;
  width: min(420px, calc(100vw - 32px));
  max-height: min(80vh, 640px);
  overflow: auto;
}

.login-card[hidden]{ display: none !important; }

/* ===== Legal Pages: Linkstil (ohne Unterstreichung; nur Hover) ===== */
.legal-card a, .legal-card a:visited{
  color: #111; text-decoration: none; opacity: .92;
}
.legal-card a:hover, .legal-card a:focus{
  text-decoration: underline; opacity: 1;
}

/* Exakte Grundposition unten-links; Optik bleibt deine eigene */
.login-card--bottom-left {
  position: fixed;
  left: 8px;                               /* näher an den Rand */
  z-index: 2000;
  width: min(150px);   /* ~halbe Breite / kompakter */
  max-height: min(80vh, 640px);
  overflow: auto;
  /* kein bottom hier – das setzt JS abhängig von der Footer-Höhe */
}

/* Footer-Layout: links | mitte | rechts, bis an die Ränder */
footer {
  background: #333;
  color: #fff;
  width: 100%;
}

footer .footer-inner {
  /* WICHTIG: keine max-width / kein zentrieren */
  max-width: none;
  margin: 0;
  width: 100%;

  /* Layout */
  display: grid;
  grid-template-columns: auto 1fr auto; /* links | mitte | rechts */
  align-items: center;

  /* Wenige Pixel Abstand zum Viewportrand */
  padding: 10px 8px;
  box-sizing: border-box;
}

.footer-left  { justify-self: start; }
.footer-copy  { justify-self: center; margin: 0; text-align: center; }
.footer-legal { justify-self: end; display: inline-flex; gap: 12px; }

footer a { color:#fff; text-decoration:none; opacity:.9; }
footer a:hover, footer a:focus { text-decoration: underline; opacity:1; }

/* Mobile: untereinander (Copy → Impressum → Datenschutz → Admin) */
@media (max-width: 640px) {
  footer .footer-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .footer-copy { order: 1; }
  .footer-legal { order: 2; display: block; }
  .footer-legal .sep { display: none; }
  .footer-left { order: 4; }
}

/* Sticky-Footer nur für kurze Legal-Seiten */
.legal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.legal-page footer {
  margin-top: auto;       /* Footer rutscht an den unteren Rand */
}

/* macht den Body zur Bezugsfläche für absolute Positionen */
body { position: relative; }

/* Login-Card unten links – jetzt absolut (nicht fixed) */
.login-card--bottom-left {
  position: absolute;   /* vorher: fixed */
  left: 8px;
  z-index: 2000;
  width: min(150px, 33vw);  /* deine kompakte Breite */
  max-height: min(80vh, 640px);
  overflow: auto;
  /* KEIN bottom hier – wir setzen 'top' per JS relativ zum Footer */
}

/* Footer: mobile gestapelt UND zentriert */
@media (max-width: 640px){
  footer .footer-inner{
    display: flex;
    flex-direction: column;
    align-items: center;     /* zentriert */
    text-align: center;      /* zentriert */
    gap: 6px;
    padding: 10px 8px;
    left: auto; right: auto; width: 100%; margin: 0; /* kein Breakout */
  }
  .footer-copy  { order: 1; margin: 0; }
  .footer-legal { order: 2; display: flex; gap: 12px; justify-content: center; }
  .footer-left  { order: 3; }
}

/* --- Footer: Mobile wirklich alles zentrieren (nur <= 640px) --- */
@media (max-width: 640px) {
  footer .footer-inner{
    display: flex;
    flex-direction: column;
    align-items: center;   /* Elemente im Container zentrieren */
    text-align: center;    /* mehrzeilige Texte zentrieren */
    gap: 6px;
  }

  /* Linke Spalte (Admin) mittig */
  footer .footer-left{
    display:flex;
    justify-content:center;
    width:100%;
    margin:0;
  }

  /* Copy mittig */
  footer .footer-copy{
    margin: 0;
    width: 100%;
  }

  /* Legal-Gruppe explizit mittig ausrichten – überschreibt evtl. Desktop margin-left:auto */
  footer .footer-legal{
    display: flex;
    justify-content: center;   /* mittig */
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0;                 /* falls Desktop margin-left:auto gesetzt war */
  }

  /* Links selbst bleiben inline, aber zentrierbar */
  footer .footer-legal a{
    display: inline-block;
  }
}

@media (max-width: 640px){
  #loginCard { display: none !important; }
}

/* === Subpage Login (login.html) – eigenständig & sicher === */

/* Karte schmaler wie Projektkarten, sauber zentriert */
.legal-card--login{
  max-width: 520px;              /* Breite der Karte (symmetrisch) */
  margin-left: auto;
  margin-right: auto;
}

/* Überschrift zentriert und kompakt */
.legal-card--login > h2{
  text-align: center;
  margin: 0 0 16px;
}

/* Formular: Grid statt globale Form-Styles, kein Auto-Margin */
#pageLoginForm{
  display: grid;
  gap: 12px;                     /* Abstand zwischen den Feldern */
  margin: 0;                     /* überschreibt globales form { margin:auto } */
  max-width: none;
}

/* Ein Feld = Input + (reservierte) Fehlermeldung */
#pageLoginForm .login-field{
  display: grid;
  gap: 4px;                      /* Input ↔ Error dichter zusammen */
}

/* Inputs: gleiche Breite wie Button, kompakt & ohne globale 12px-Margins */
#pageLoginForm input[type="text"],
#pageLoginForm input[type="password"]{
  width: 100%;
  height: 36px;
  margin: 0;                     /* wichtig: überschreibt globales form input margin */
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-sizing: border-box;
}

/* Fehlermeldung reserviert Platz → Karte „springt“ bei Fehlern nicht */
#pageLoginForm .login-error{
  min-height: 1.1em;             /* Platzhalterzeile */
  font-size: .85rem;
  color: #b00020;
}

/* Klarer Fehlerzustand */
#pageLoginForm .login-field.invalid > input{
  border-color: #ff6b6b;
  box-shadow: 0 0 0 2px rgba(255,107,107,.22);
}

/* Button: gleiche Breite wie Inputs */
#pageLoginForm .login-submit{
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-weight: 700;
}

/* Hinweistext: bewusst etwas mehr Abstand unter dem Button */
#pageLoginForm .login-note{
  text-align: center;
  margin-top: 12px;
  color: #666;
  font-size: .9rem;
}

/* Mobile-only: "Kontakt aufnehmen" Button mittig ausrichten */
@media (max-width: 720px){
  .about-profile .mini-cta{
    display: block;         /* eigener Block, damit margin:auto greift */
    width: max-content;     /* nicht volle Breite – nur so breit wie der Text */
    margin: 10px auto 0;    /* zentriert horizontal, kleiner Abstand nach oben */
  }
}

/* === Inline-Chat: Input + Senden-Button exakt gleich hoch === */
.mini-chat-inline__form{
  align-items: stretch; /* Grid-Items füllen die Zeile gleichmäßig */
}

.mini-chat-inline__form input#miniChatInput,
.mini-chat-inline__form button[type="submit"]{
  height: 44px;          /* Zielhöhe */
  box-sizing: border-box;/* Höhe INKL. Padding/Border -> kein Aufblähen mehr */
}

/* Button: vertikal nicht per Padding vergrößern, nur horizontal */
.mini-chat-inline__form button[type="submit"]{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;       /* nur horizontal, Höhe kommt von 44px */
}

/* === Inline-Chat: Input & "Senden" exakt in einer Linie === */
#miniChatForm{
  display: grid;
  grid-template-columns: 1fr max-content;
  column-gap: 10px;
  align-items: center;            /* vertikal auf gleiche Linie */
}

#miniChatForm #miniChatInput,
#miniChatForm button[type="submit"]{
  height: 44px;
  box-sizing: border-box;         /* Höhe inkl. Padding/Border */
  margin: 0;
}

/* Input füllt sauber die linke Spalte */
#miniChatForm #miniChatInput{
  display: block;
  width: 100%;
  line-height: normal;            /* verhindert optischen Versatz */
  padding: 10px 12px;             /* behalte deine Optik */
  border: 1px solid #ddd;
  border-radius: 10px;
  font: inherit;
}

/* Button ohne vertikale Padding-Beiträge, perfekt zentriert */
#miniChatForm button[type="submit"]{
  display: inline-grid;
  place-items: center;            /* Text exakt mittig */
  padding: 0 16px;                /* nur horizontal */
  border: none;
  border-radius: 10px;
  background: #333;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

/* Mobile-only: Projektkarten-Animation/Hover deaktivieren */
@media (max-width: 720px){
  .project-card{
    animation: none !important;     /* stoppt das initiale FadeInUp */
    transition: none !important;     /* keine weichen Übergänge */
  }
  .project-card:hover{
    transform: none !important;      /* kein Anheben bei Hover */
  }
}

/* Optional: Dialog-Fokus ohne sichtbaren Ring */
.project-modal__dialog:focus { outline: none; }

/* Desktop: linke Modal-Navigation zeigt dekoratives Titelbild */
@media (min-width: 900px){
  #project-modal .project-modal__nav{
    position: relative;
    background-size: cover;        /* füllt den Bereich ohne Verzerrung (ggf. Zuschnitt) */
    background-position: center;   /* „Ausschnitt“, zentriert */
    background-repeat: no-repeat;
    color: #fff;
  }
  @media (min-width: 900px){
  #project-modal .project-modal__nav::before{
    content: none; /* Overlay im Modal deaktiviert */
  }
}

  /* Inhalt über der Blende halten */
  #project-modal .project-modal__nav nav,
  #project-modal .project-modal__nav ul,
  #project-modal .project-modal__nav li{
    position: relative; z-index: 1;
  }
  #project-modal .project-modal__nav a{
    color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.3);
  }
}

#project-modal .project-modal__nav a {
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7); /* ähnlich Hero */
}

/* ===== Modal: Titelbild nicht abdunkeln ===== */
@media (min-width: 900px){
  #project-modal .project-modal__nav::before{
    content: none !important;
    background: none !important;
  }
}
/* Lesbarkeit der Links links im Modal */
#project-modal .project-modal__nav a{
  text-shadow: 0 1px 3px rgba(0,0,0,.7);
}

/* ===== Galerie (nur im Modal) ===== */
#project-modal .project-gallery { margin: 1rem 0 2rem; }

#project-modal .project-gallery__stage {
  position: relative; width: 100%; max-height: 440px;
  overflow: hidden; border-radius: 12px;
}
#project-modal .project-gallery__stage img {
  width: 100%; height: auto; object-fit: cover; display: block;
}

/* Bilderquelle: nur Datenbasis fürs JS */
#project-modal .project-gallery__images { display: none; }

#project-modal .project-gallery__thumbnails {
  display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: .6rem;
}
#project-modal .project-gallery__thumbnails img{
  width: 64px; height: 40px; object-fit: cover; border-radius: 6px;
  cursor: pointer; opacity: .65; transition: opacity .2s, transform .2s;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
#project-modal .project-gallery__thumbnails img:hover,
#project-modal .project-gallery__thumbnails img.active{
  opacity: 1; transform: translateY(-1px);
  outline: 2px solid var(--primary-color, #0a7cff); outline-offset: 1px;
}

#project-modal .project-gallery__dots { display: none; text-align:center; margin-top: .6rem; }
#project-modal .project-gallery__dots span{
  display:inline-block; width:10px; height:10px; border-radius:50%;
  background:#cfcfcf; margin:0 4px; cursor:pointer; transition: transform .2s, background .2s;
}
#project-modal .project-gallery__dots span.active{
  background: var(--primary-color, #0a7cff); transform: scale(1.1);
}
@media (max-width: 768px){
  #project-modal .project-gallery__thumbnails{ display:none; }
  #project-modal .project-gallery__dots{ display:block; }
}

/* Modal: vertikale Section-Paddings neutralisieren (nur rechts im Modal) */
#project-modal .project-modal__content > section {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* ===== MODAL LAYER FIX (nur Overlay) ===== */
.project-modal { z-index: 11050 !important; }   /* über 10010 (Login-Trigger) */

.project-modal__backdrop { z-index: 0; }        /* Reihenfolge im Modal eindeutig */
.project-modal__dialog   { z-index: 1; }
.project-modal__close    { z-index: 2; }        /* Button ganz oben */

/* --- Codeblöcke im Projekt-Modal --- */
#project-modal pre,
#project-modal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* Standard: keine Umbrüche, horizontales Scrollen */
#project-modal pre {
  margin: 12px 0;
  padding: 12px 14px;
  background: #0f172a;      /* dezentes Dunkel, optional */
  color: #e5e7eb;           /* optional */
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  max-width: 100%;
  white-space: pre;         /* keine Softwraps */
  overflow-x: auto;         /* eigener horizontaler Scroll */
  overflow-y: hidden;
  tab-size: 2;              /* kompaktere Indents */
}

/* Umschaltbarer Softwrap (siehe JS unten) */
#project-modal pre.is-wrapped {
  white-space: pre-wrap;
  overflow-wrap: anywhere;  /* bricht sehr lange Tokens */
}

/* WICHTIG: Grid-Item darf schrumpfen, sonst erzeugen lange Inhalte Overflows */
#project-modal .project-modal__content { min-width: 0; }

/* Akzentfarbe im Modal an Close-Button anlehnen */
#project-modal { 
  --primary-color: rgba(0,0,0,.65); /* gleiche Farbe wie .project-modal__close */
}

#project-modal .project-gallery__thumbnails img:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 1px;
}

/* === FINAL: Modal Overflow & Code-Handling (iOS-fest) === */
#project-modal .project-modal__content{
  min-width: 0;            /* Grid-Item darf schrumpfen */
  overflow-y: auto;        /* nur vertikal scrollen */
  overflow-x: hidden;      /* horizontales Panning verhindern */
  touch-action: pan-y;     /* Touch: nur vertikal */
  overscroll-behavior-x: contain; /* keine horizontale „Kettenreaktion“ */
}

#project-modal pre{
  max-width: 100%;         /* erzwingt Einpassen in die Spalte */
  overflow-x: auto;        /* eigener horizontaler Scroll nur im Codeblock */
  -webkit-overflow-scrolling: touch;
  white-space: pre;        /* kein Umbruch im Code */
}

#project-modal code{ white-space: inherit; }

/* === Code-Theme (dunkel) + Zeilennummern für das Projekt-Modal === */
#project-modal pre,
#project-modal code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }

#project-modal pre {
  background: #0f172a; color: #e5e7eb; text-shadow: none;
  border-radius: 12px; box-sizing: border-box;
  margin: 0 0 1rem; padding: 12px 14px; line-height: 1.45;
  max-width: 100%;
  overflow-x: auto;            /* horizontaler Scroll nur im Codeblock */
  -webkit-overflow-scrolling: touch;
  white-space: pre;
}
#project-modal code { display: block; white-space: inherit; }

/* — Zeilennummern (angeheftet links) — */
#project-modal pre.code-with-lines { 
  --lnw: 3.2em;
  position: relative; 
  padding-left: calc(var(--lnw) + 14px);  /* Platz für Gutter */
}
#project-modal pre.code-with-lines .line-numbers-rows{
  position: absolute; top: 12px; bottom: 12px; left: 0;
  width: var(--lnw); border-right: 1px solid rgba(255,255,255,.08);
  color: #64748b; text-align: right; pointer-events: none; user-select: none;
}
#project-modal pre.code-with-lines .line-numbers-rows > span{
  display: block; padding: 0 .5em; line-height: 1.45;
}


/* Markierung beim Selektieren */
#project-modal pre::selection, 
#project-modal code::selection { background: rgba(255,255,255,.15); }

/* (Optional) Fokusring für Tastatur: */
#project-modal pre:focus-within { outline: 2px solid rgba(255,255,255,.15); outline-offset: 2px; }

/* === VS Code Dark+ Tokenfarben NUR im Projekt-Modal === */
#project-modal pre,
#project-modal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

#project-modal pre {
  background: #1e1e1e;       /* VS Code Dark+ */
  color: #d4d4d4;
  border-radius: 12px;
  margin: 0 0 1rem;
  padding: 12px 14px;
  line-height: 1.45;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: pre;
  box-sizing: border-box;
}

/* Tokenfarben */
#project-modal .token.comment,
#project-modal .token.prolog,
#project-modal .token.doctype,
#project-modal .token.cdata { color:#6a9955; }

#project-modal .token.punctuation,
#project-modal .token.operator { color:#d4d4d4; }

#project-modal .token.keyword,
#project-modal .token.directive,
#project-modal .token.macro { color:#c586c0; }   /* #include + UE-Makros */

#project-modal .token.string,
#project-modal .token.char { color:#ce9178; }

#project-modal .token.number,
#project-modal .token.boolean { color:#b5cea8; }

#project-modal .token.function { color:#dcdcaa; }
#project-modal .token.class-name { color:#4ec9b0; }
#project-modal .token.namespace { color:#4fc1ff; }

/* Linker Gutter (Zeilennummern) – bleibt wie gehabt */
#project-modal pre.code-with-lines { --lnw: 3.2em; position: relative; padding-left: calc(var(--lnw) + 14px); }
#project-modal pre.code-with-lines .line-numbers-rows{
  position: absolute; inset: 12px auto 12px 0;
  width: var(--lnw);
  border-right: 1px solid rgba(255,255,255,.08);
  color: #858585;
  text-align: right;
  pointer-events: none;
  user-select: none;
}
#project-modal pre.code-with-lines .line-numbers-rows > span{
  display: block; padding: 0 .5em; line-height: 1.45;
}

/* Modal darf horizontal NICHT pannen – nur der <pre> scrollt */
#project-modal .project-modal__content{ min-width:0; overflow-x:hidden; touch-action: pan-y; }

/* Modal: Textauswahl überall sperren */
#project-modal,
#project-modal * {
  -webkit-user-select: none !important;
  user-select: none !important;
}

/* Code soll nie umbrechen – immer horizontal scrollen */
#project-modal pre {
  white-space: pre !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  -webkit-overflow-scrolling: touch;
}
#project-modal code { white-space: inherit !important; }

/* === PROJECT MODAL – finale Overrides === */

/* 1) Selektion im Modal komplett sperren */
#project-modal,
#project-modal * {
  -webkit-user-select: none !important;
  user-select: none !important;
}

/* 2) Modal darf horizontal nicht pannen – nur <pre> scrollt */
#project-modal .project-modal__content {
  min-width: 0;
  overflow-x: hidden;
  touch-action: pan-y;
}

/* 3) Code-Grundlayout (VS Code Dark+) */
#project-modal pre,
#project-modal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

#project-modal pre {
  margin: 12px 0;
  padding: 12px 14px;
  background: #1e1e1e;            /* VS Code Dark+ */
  color: #d4d4d4;
  border-radius: 12px;
  line-height: 1.45;
  max-width: 100%;
  white-space: pre !important;     /* niemals umbrechen */
  overflow-x: auto !important;     /* horizontal im Codeblock scrollen */
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  tab-size: 2;
}
#project-modal code { display: block; white-space: inherit !important; }

/* 4) Zeilennummern-Gutter */
#project-modal pre.code-with-lines { --lnw: 3.2em; position: relative; padding-left: calc(var(--lnw) + 14px); }
#project-modal pre.code-with-lines .line-numbers-rows{
  position: absolute; top: 12px; bottom: 12px; left: 0;
  width: var(--lnw);
  border-right: 1px solid rgba(255,255,255,0.08); /* korrigierte Alpha */
  color: #858585;
  text-align: right;
  pointer-events: none; user-select: none;
}
#project-modal pre.code-with-lines .line-numbers-rows > span{
  display: block; padding: 0 .5em; line-height: 1.45;
}

/* 5) (Kosmetik) Selections/Fokusring – mit korrekter Alpha */
#project-modal pre::selection,
#project-modal code::selection { background: rgba(255,255,255,0.15); }
#project-modal pre:focus-within { outline: 2px solid rgba(255,255,255,0.15); outline-offset: 2px; }

/* 6) VS Code Dark+ Tokenfarben – nur Beispiele der wichtigsten */
#project-modal .token.comment,
#project-modal .token.prolog,
#project-modal .token.doctype,
#project-modal .token.cdata { color:#6a9955; }
#project-modal .token.punctuation,
#project-modal .token.operator { color:#d4d4d4; }
#project-modal .token.keyword,
#project-modal .token.directive,
#project-modal .token.macro { color:#c586c0; }
#project-modal .token.string,
#project-modal .token.char { color:#ce9178; }
#project-modal .token.number,
#project-modal .token.boolean { color:#b5cea8; }
#project-modal .token.function { color:#dcdcaa; }
#project-modal .token.class-name { color:#4ec9b0; }
#project-modal .token.namespace { color:#4fc1ff; }

#project-modal .token.constant { color: #4fc1ff; } /* dezent hellblau */

/* Bilder nicht ziehbar / kein Touch-Callout (Safari) */
img {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

/* Mobile: etwas höher über dem Footer */
@media (max-width: 640px){
  #back-to-top-btn{ bottom: 93px; }
}

/* Dragging in UI-Elementen unterbinden (Safari/Chromium) */
nav a,
footer .footer-legal a,
#contact-form button,
.project-modal a,
.project-modal button,
.project-modal__close,
#back-to-top-btn,
img,
.mini-cta,
.footer-login
{
  -webkit-user-drag: none;
  -webkit-touch-callout: none; /* iOS: kein Kontextmenü per Long-Press */
}

/* Avatar-Spaltenbreite als Variable (falls noch nicht vorhanden) */
.about-profile { --avatar-col: 220px; }

/* Button an gleicher Stelle lassen, aber horizontal so verschieben,
   dass er unter der zentrierten Überschrift liegt */
.about-profile .mini-cta {
  display: block;
  width: max-content;
  margin: 10px auto 0;               /* zunächst in der Content-Spalte zentrieren */
  transform: translateX(calc(var(--avatar-col) / -2));
  /* Erklärung: die Überschrift zentriert über 2 Spalten.
     Die Mitte der Content-Spalte liegt um (avatar/2) RECHTS vom Gesamtschnitt.
     Daher verschieben wir den zentrierten Button um -(avatar/2) nach links. */
}

/* Auf Mobil (eine Spalte) kein Offset nötig */
@media (max-width: 720px){
  .about-profile .mini-cta { transform: none; }
}

/* Spaltenbreite + Gap als Variablen */
.about-profile { --avatar-col: 220px; --gap: 40px; }

/* Button bleibt in derselben Struktur, wird aber exakt auf die Gesamtmitte geschoben */
.about-profile .mini-cta{
  display: block;
  width: max-content;
  margin: 10px auto 0;
  transform: translateX(calc( (var(--avatar-col) + var(--gap)) / -2 ));
}

/* Mobil (1 Spalte) keine Verschiebung */
@media (max-width: 720px){
  .about-profile .mini-cta{ transform: none; }
}

/* Modal-Text darf überall umbrechen – aber NICHT in <pre>/<code> */
#project-modal .project-modal__content p,
#project-modal .project-modal__content li {
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;            /* normales Deutsch trennen, falls möglich */
}

.allow-select { -webkit-user-select:text !important; user-select:text !important; }

/* Standard: keine Textauswahl im UI (Buttons, Links, Modal, Footer, About-Card) */
@media (pointer: coarse){
  .project-modal, .project-modal *:not(pre):not(code),
  .about-profile, .about-profile *:not(input):not(textarea):not(select),
  .site-footer, .site-footer * ,
  button, a {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }
  /* In Formularfeldern darf man natürlich markieren/tippen */
  input, textarea, select {
    -webkit-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
  }
}

/* Modal-Text darf überall umbrechen – aber NICHT in <pre>/<code> */
#project-modal .project-modal__content p,
#project-modal .project-modal__content li {
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;            /* normales Deutsch trennen, falls möglich */
}
