/*
Theme Name: Samuel Zeidler Portfolio
Author: Samuel Zeidler
Description: Modernes Darkmode-Portfolio für Game Design – Farb-Schema, Layouts & Effekte
Version: 2.0
*/

:root {
  --background: #090614;
  --surface: #180f28;
  --text: #f0f0f0;
  --accent: #bb86fc;
  --accent-hover: #d0a5ff;
}

html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
}

/* Headings & Typography */
h1, h2, h3, h4, h5, h6,
.wp-block-heading {
  color: var(--accent);
  margin-top: 0;
  font-weight: 700;
}

p, .wp-block-paragraph {
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* Main Structure & Sticky Footer */
main, .site-main {
  flex: 1;
  padding: 2rem;
  box-sizing: border-box;
}

/* Header & Navigation */
header {
  position: static;
  padding: 1rem 2rem;
  background-color: rgba(20, 13, 34, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(187, 134, 252, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

/* Header Logo & Site Title */
.header-logo-group {
  display: flex;
  align-items: center;
}

.header-logo {
  height: 80px;
  max-height: 80px;
  width: auto;
  max-width: 80px;
  object-fit: contain;
  margin-right: 1rem;
  display: block;
}

.header-site-title {
  margin: 0;
  font-size: 2rem;
}

.header-site-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.25s ease;
}

.header-site-title a:hover {
  color: var(--accent);
}

nav a {
  margin-right: 1.5rem;
  font-size: 1rem;
  color: var(--accent);
  text-decoration: none;
}

nav a:last-child {
  margin-right: 0;
}

nav a:hover {
  color: var(--accent-hover);
}

/* Header Right (Nav + Language Switcher) */
.header-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.lang-switch-wrapper {
  display: inline-flex;
  align-items: center;
}

/* Bilingual Language Switch Pill Button */
.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 76px;
  height: 34px;
  padding: 3px 6px;
  background: rgba(15, 10, 28, 0.75);
  border: 1px solid rgba(187, 134, 252, 0.35);
  border-radius: 999px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
  user-select: none;
  box-sizing: border-box;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4), 0 0 10px rgba(187, 134, 252, 0.1);
}

.lang-switch:hover {
  border-color: rgba(187, 134, 252, 0.7);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4), 0 0 14px rgba(187, 134, 252, 0.35);
  transform: translateY(-1px);
}

.lang-switch:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(3, 218, 198, 0.5);
}

/* Sliding active pill indicator */
.lang-switch .lang-pill {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 32px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, #bb86fc 0%, #7c4dff 100%);
  box-shadow: 0 0 10px rgba(187, 134, 252, 0.6);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.28s ease, box-shadow 0.28s ease;
  z-index: 1;
}

/* When in German mode (data-lang="de"), slide pill to the right */
.lang-switch[data-lang="de"] .lang-pill,
html[data-lang="de"] .lang-switch .lang-pill {
  transform: translateX(36px);
  background: linear-gradient(135deg, #03dac6 0%, #018786 100%);
  box-shadow: 0 0 10px rgba(3, 218, 198, 0.6);
}

/* Language text labels (EN & DE) */
.lang-switch .lang-text {
  position: relative;
  z-index: 2;
  width: 32px;
  text-align: center;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

/* Default / English active text */
.lang-switch[data-lang="en"] .lang-en,
html[data-lang="en"] .lang-switch .lang-en {
  color: #ffffff;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

/* German active text */
.lang-switch[data-lang="de"] .lang-de,
html[data-lang="de"] .lang-switch .lang-de {
  color: #121212;
  text-shadow: none;
}


/* Page Containers */
.page-home,
.homepage {
  max-width: 1000px;
  margin: 0 auto;
  padding: 4rem 2rem;
  box-sizing: border-box;
}

.page-aboutme,
.about-me-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  box-sizing: border-box;
  min-height: 80vh;
}

.page-projekte,
.projekte-page {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  box-sizing: border-box;
}

.page-kontakt,
.kontakt-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  text-align: center;
  box-sizing: border-box;
}

.page-impressum,
.impressum-page,
.page-datenschutz,
.datenschutz-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  box-sizing: border-box;
}

/* HERO SECTION */
.hero {
  text-align: center;
  padding: 4rem 1rem 3rem;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1,
.hero .hero-title {
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 span,
.hero .hero-title span {
  color: var(--text);
  font-weight: bold;
}

.hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 1rem auto 1.5rem;
  line-height: 1.6;
}

.cta-button,
.wp-block-button.cta-button .wp-block-button__link {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  margin-top: 1rem;
  background-color: var(--accent);
  color: #000 !important;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  transition: background 0.3s ease, transform 0.2s ease;
  cursor: pointer;
}

.cta-button:hover,
.wp-block-button.cta-button .wp-block-button__link:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

/* PROJECT GRID & CARDS */
.project-grid,
.projekt-grid,
.wp-block-group.projekt-grid,
.wp-block-group.project-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 2rem !important;
  justify-content: center !important;
  align-items: stretch !important;
  margin-top: 2rem;
  max-width: 1200px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.projekt-grid .projekt-card,
.project-grid .projekt-card,
.projekt-card {
  flex: 1 1 350px !important;
  max-width: 480px !important;
  min-width: 280px !important;
  width: auto !important;
  background-color: var(--surface);
  color: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box !important;
  text-align: left;
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
}

.projekt-card > .wp-block-group__inner-container {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
}

.projekt-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(187, 134, 252, 0.3);
}

.projekt-card h3 {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.projekt-card p,
.projekt-card .wp-block-paragraph {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0;
  flex-grow: 1;
}

.more-link {
  display: inline-block;
  margin: 2rem auto 0;
  text-align: center;
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--accent);
  transition: color 0.3s ease;
}

.more-link:hover {
  color: var(--accent-hover);
}

/* SLIDER */
.slider,
.projekt-card .slider {
  width: 100% !important;
  height: 280px !important;
  max-height: 280px !important;
  position: relative !important;
  overflow: hidden !important;
  border-radius: 8px !important;
  margin-bottom: 1.25rem !important;
  background-color: #0d0d0d !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.slide,
.projekt-card .slide {
  display: none;
  width: 100% !important;
  height: 100% !important;
  max-height: 280px !important;
  object-fit: contain !important;
  object-position: center center !important;
  border-radius: 6px;
}

.slide.active,
.projekt-card .slide.active {
  display: block !important;
}

.slider {
  cursor: zoom-in;
  transition: outline 0.2s ease;
}

.slider:hover {
  outline: 1px solid rgba(187, 134, 252, 0.4);
}

.slider button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.65);
  border: none;
  color: white;
  font-size: 1.5rem;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  border-radius: 6px;
  z-index: 2;
  transition: background 0.2s ease, transform 0.2s ease;
}

.slider button:hover {
  background: rgba(187, 134, 252, 0.85);
  color: #000;
}

.slider .prev { left: 8px; }
.slider .next { right: 8px; }

/* LIGHTBOX MODAL (GROSSANSICHT) */
.slider-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.slider-lightbox.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: lightboxZoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxZoomIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox-img-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 80vh;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.8), 0 0 15px rgba(187, 134, 252, 0.25);
  user-select: none;
}

.lightbox-counter {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 1rem;
  background: rgba(30, 30, 30, 0.8);
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  border: 1px solid rgba(187, 134, 252, 0.3);
  letter-spacing: 1px;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: rgba(30, 30, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  z-index: 1000000;
}

.lightbox-close:hover {
  background-color: var(--accent);
  color: #121212;
  border-color: var(--accent);
  transform: scale(1.1);
}

.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(25, 25, 25, 0.8);
  border: 1px solid rgba(187, 134, 252, 0.35);
  color: var(--text);
  font-size: 2.2rem;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  z-index: 1000000;
  user-select: none;
}

.lightbox-btn:hover {
  background-color: var(--accent);
  color: #121212;
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

@media (max-width: 650px) {
  .lightbox-btn {
    width: 42px;
    height: 42px;
    font-size: 1.6rem;
  }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
  .lightbox-close { top: 14px; right: 14px; width: 40px; height: 40px; font-size: 1.5rem; }
  .lightbox-img { max-width: 95vw; max-height: 75vh; }
}

/* ABOUT ME PAGE (3-COLUMN FLEX) */
.about-me-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.minesweeper-col {
  flex: 0 0 300px;
  min-width: 280px;
}

.aboutme {
  flex: 1;
  min-width: 300px;
  max-width: 800px;
}

.extraside {
  flex: 0 0 300px;
  min-width: 240px;
  background-color: var(--surface);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

/* PROJEKTE PAGE */
.page-projekte,
.projekte-page {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
  box-sizing: border-box;
}

.page-projekte h2,
.page-projekte .wp-block-heading {
  text-align: center;
  margin-top: 0;
  font-size: 2.2rem;
}

.page-projekte p,
.page-projekte .wp-block-paragraph {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 650px;
  color: #ccc;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* KONTAKT PAGE */
.kontakt-wrapper {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.kontakt-link {
  color: var(--accent);
  font-weight: bold;
  font-size: 1.1rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s, color 0.3s;
}

.kontakt-link:hover {
  color: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* FOOTER */
footer {
  position: static;
  padding: 1rem 2rem;
  background-color: rgba(20, 13, 34, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(187, 134, 252, 0.15);
}

.site-footer {
  padding: 2rem;
  background-color: #121212;
  color: var(--text);
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  color: var(--text);
  margin-right: 1rem;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-socials a {
  color: var(--accent);
  margin-left: 0.75rem;
  font-size: 1.4rem;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.2s ease;
  display: inline-block;
}

.footer-socials a:hover {
  color: var(--accent-hover);
  transform: scale(1.1);
}

/* ANIMATED PIXEL ART BACKGROUND */
.pixel-art-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  display: block;
}

/* GUTENBERG EDITOR COMPATIBILITY */
.editor-styles-wrapper {
  background-color: var(--background) !important;
  color: var(--text) !important;
}

.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3 {
  color: var(--accent) !important;
}

.editor-styles-wrapper a {
  color: var(--accent) !important;
}

/* ==========================================================================
   RESPONSIVE & MOBILE PHONE FORMAT STYLES (≤ 900px, ≤ 768px, ≤ 480px, ≤ 360px)
   Coexists seamlessly alongside desktop: desktop styling is 100% untouched,
   while mobile screens adapt with dedicated, touch-optimized ergonomics.
   ========================================================================== */

/* Tablet & Smaller Screens (≤ 900px) */
@media (max-width: 900px) {
  /* About Me: Stack 3 columns gracefully (Bio -> Sidebar Details -> Minesweeper) */
  .about-me-container {
    flex-direction: column !important;
    align-items: center !important;
    gap: 2rem !important;
  }

  .aboutme {
    order: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .extraside {
    order: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .minesweeper-col {
    order: 3 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  #minesweeper {
    margin: 0 auto;
  }
}

/* Smartphone & Small Tablet Format (≤ 768px) */
@media (max-width: 768px) {
  /* Prevent any horizontal screen wobbling/overflow */
  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  main, .site-main {
    padding: 1.5rem 1rem 3rem;
    box-sizing: border-box;
    width: 100%;
  }

  /* Page Containers */
  .page-home,
  .homepage,
  .page-aboutme,
  .about-me-page,
  .page-projekte,
  .projekte-page,
  .page-kontakt,
  .kontakt-page,
  .page-impressum,
  .impressum-page,
  .page-datenschutz,
  .datenschutz-page {
    padding: 1.5rem 0.5rem 3rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Mobile Header Layout (Clean 2-row grid) */
  header {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    grid-template-rows: auto auto !important;
    align-items: center !important;
    gap: 0.75rem 0.5rem !important;
    padding: 0.75rem 1rem !important;
  }

  .header-logo-group {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: flex !important;
    align-items: center !important;
  }

  .header-logo {
    height: 48px !important;
    max-height: 48px !important;
    width: auto !important;
    max-width: 48px !important;
    margin-right: 0.65rem !important;
  }

  .header-site-title {
    font-size: 1.35rem !important;
    line-height: 1.1 !important;
  }

  .header-right {
    display: contents !important; /* Flattens children directly into the header grid */
  }

  .lang-switch-wrapper {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
  }

  .lang-switch {
    width: 68px !important;
    height: 30px !important;
    padding: 2px 4px !important;
  }

  .lang-switch .lang-pill {
    width: 27px !important;
    height: 22px !important;
    top: 3px !important;
    left: 3px !important;
  }

  .lang-switch[data-lang="de"] .lang-pill,
  html[data-lang="de"] .lang-switch .lang-pill {
    transform: translateX(33px) !important;
  }

  .lang-switch .lang-text {
    width: 27px !important;
    font-size: 0.7rem !important;
  }

  /* Mobile Navigation Bar */
  nav {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    width: 100% !important;
    padding-top: 0.5rem !important;
    border-top: 1px solid rgba(187, 134, 252, 0.12) !important;
  }

  nav a {
    margin-right: 0 !important;
    padding: 0.45rem 0.65rem !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    color: var(--accent) !important;
    background: rgba(187, 134, 252, 0.08) !important;
    border: 1px solid rgba(187, 134, 252, 0.2) !important;
    border-radius: 8px !important;
    text-align: center !important;
    flex: 1 1 0 !important;
    white-space: nowrap !important;
    min-height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  nav a:active {
    background: rgba(187, 134, 252, 0.25) !important;
    border-color: var(--accent) !important;
  }

  /* Hero Section */
  .hero {
    padding: 2.25rem 0.5rem 1.75rem !important;
  }

  .hero h1,
  .hero .hero-title {
    font-size: clamp(1.75rem, 7vw, 2.3rem) !important;
    line-height: 1.2 !important;
    margin-bottom: 0.75rem !important;
  }

  .hero p {
    font-size: 1rem !important;
    line-height: 1.55 !important;
    margin: 0.75rem auto 1.25rem !important;
  }

  .cta-button,
  .wp-block-button.cta-button .wp-block-button__link {
    width: 100% !important;
    max-width: 280px !important;
    text-align: center !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.95rem !important;
    box-sizing: border-box !important;
  }

  /* Project Grid & Project Cards */
  .project-grid,
  .projekt-grid,
  .wp-block-group.projekt-grid,
  .wp-block-group.project-grid {
    gap: 1.5rem !important;
    margin-top: 1.5rem !important;
    width: 100% !important;
    padding: 0 !important;
  }

  .projekt-grid .projekt-card,
  .project-grid .projekt-card,
  .projekt-card {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
    padding: 1.25rem 1rem !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
  }

  .slider,
  .projekt-card .slider {
    height: 220px !important;
    max-height: 220px !important;
    margin-bottom: 1rem !important;
    border-radius: 6px !important;
  }

  .slide,
  .projekt-card .slide {
    max-height: 220px !important;
  }

  .slider button {
    padding: 0.45rem 0.75rem !important;
    font-size: 1.3rem !important;
    background: rgba(0, 0, 0, 0.75) !important;
  }

  .slider .prev { left: 4px !important; }
  .slider .next { right: 4px !important; }

  .projekt-card h3 {
    font-size: 1.2rem !important;
    margin-top: 0.4rem !important;
  }

  .projekt-card p,
  .projekt-card .wp-block-paragraph {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  .projekt-card a {
    word-break: break-all !important;
  }

  /* Contact Page */
  .kontakt-wrapper {
    padding: 1rem 0 !important;
  }

  .kontakt-links {
    width: 100% !important;
    gap: 1rem !important;
  }

  .kontakt-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: 0.75rem 1rem !important;
    background: rgba(187, 134, 252, 0.08) !important;
    border: 1px solid rgba(187, 134, 252, 0.25) !important;
    border-radius: 8px !important;
    width: 100% !important;
    max-width: 320px !important;
    box-sizing: border-box !important;
    font-size: 0.95rem !important;
  }

  /* Legal Pages (Impressum & Datenschutz) */
  .page-impressum,
  .impressum-page,
  .page-datenschutz,
  .datenschutz-page {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  .page-impressum h2,
  .page-datenschutz h2 {
    font-size: 1.45rem !important;
  }

  .page-impressum h3,
  .page-datenschutz h3 {
    font-size: 1.15rem !important;
  }

  .page-impressum p,
  .page-datenschutz p,
  .page-impressum li,
  .page-datenschutz li {
    font-size: 0.92rem !important;
    line-height: 1.6 !important;
  }

  /* Footer on Mobile */
  footer {
    padding: 1.5rem 1rem !important;
    text-align: center !important;
  }

  footer > p {
    margin-bottom: 0.75rem !important;
    font-size: 0.85rem !important;
  }

  .footer-content {
    flex-direction: column !important;
    align-items: center !important;
    gap: 1rem !important;
  }

  .footer-links {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.85rem !important;
  }

  .footer-links a {
    margin-right: 0 !important;
    font-size: 0.88rem !important;
  }

  .footer-socials {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 1rem !important;
  }

  .footer-socials a {
    margin-left: 0 !important;
    font-size: 1.45rem !important;
    padding: 0.35rem !important;
  }
}

/* Compact Smartphones (≤ 480px) */
@media (max-width: 480px) {
  .header-logo {
    height: 44px !important;
    max-height: 44px !important;
    max-width: 44px !important;
    margin-right: 0.5rem !important;
  }

  .header-site-title {
    font-size: 1.2rem !important;
  }

  nav a {
    font-size: 0.82rem !important;
    padding: 0.4rem 0.45rem !important;
  }

  .hero h1,
  .hero .hero-title {
    font-size: 1.75rem !important;
  }

  .slider,
  .projekt-card .slider {
    height: 180px !important;
    max-height: 180px !important;
  }

  .slide,
  .projekt-card .slide {
    max-height: 180px !important;
  }

  .lightbox-btn {
    width: 42px !important;
    height: 42px !important;
    font-size: 1.4rem !important;
  }

  .lightbox-prev { left: 6px !important; }
  .lightbox-next { right: 6px !important; }

  .lightbox-close {
    top: 8px !important;
    right: 8px !important;
    width: 42px !important;
    height: 42px !important;
    font-size: 1.5rem !important;
  }

  .lightbox-img {
    max-width: 96vw !important;
    max-height: 65vh !important;
  }
}

/* Very Small Smartphones (≤ 360px) */
@media (max-width: 360px) {
  .header-logo {
    height: 38px !important;
    max-height: 38px !important;
    max-width: 38px !important;
  }

  .header-site-title {
    font-size: 1.1rem !important;
  }

  nav a {
    font-size: 0.75rem !important;
    padding: 0.35rem 0.3rem !important;
  }

  .hero h1,
  .hero .hero-title {
    font-size: 1.5rem !important;
  }
}