/* =========================================================
   FLUID BLUE UI – LAYOUTS
   ========================================================= */

:root {
  --viewport-height: 100dvh;
}

/* Global Transitions */
body,
.site-header,
.site-footer,
.sidebar,
.site-main,
.card,
.btn,
input,
textarea,
select {
  transition:
    background-color 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

@media (min-width: 900px) {
  :root {
    --viewport-height: 100vh;
  }
}

/* 2) App-Shell */
.app-shell {
  min-height: var(--viewport-height);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* 3) Header + Footer (TRANSPARENT STYLE) */
.site-header,
.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: var(--space-3) var(--space-4);

  /* KOMPLETT TRANSPARENT */
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;

  /* Text-Schatten für Lesbarkeit vor dem Bild */
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.9),
    0 0 2px rgba(255, 255, 255, 1);

  color: oklch(20% 0 0); /* Dunkles Grau für Kontrast */
  z-index: 10;
}

.site-footer {
  font-size: var(--font-size-smaller);
  /* Footer braucht eventuell einen kleinen Abstand nach oben, da kein Border mehr da ist */
  margin-top: var(--space-4);
}

.site-footer a {
  color: oklch(20% 0 0);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.35s ease;
}
.site-footer a:hover {
  color: var(--color-primary);
  text-decoration: underline;
  text-shadow: none; /* Beim Hover keinen Schatten mehr, wenn Farbe knallt */
}

.header-left,
.footer-left {
  text-align: left;
}
.header-center,
.footer-center {
  text-align: center;
}
.header-right,
.footer-right {
  text-align: right;
}

.header-left {
  cursor: pointer;
  font-weight: 700; /* Etwas fetter für bessere Lesbarkeit */
  color: oklch(10% 0 0); /* Fast Schwarz */
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.header-left img {
  width: 32px;
  height: auto;
  filter: drop-shadow(0 0 5px white); /* Logo auch abheben */
}
.header-left:hover {
  color: var(--color-primary-dark);
  box-shadow: 0 4px 12px var(--color-primary-soft);
  transform: translateY(-1px);
}

/* 4) Main-Content */
.site-main {
  padding: var(--space-4);
}

hr {
  border: 0.01em solid var(--border);
  opacity: 0.5;
}

/* 5) Layout mit Sidebar */
.app-shell > .layout-with-sidebar {
  grid-row: 2 / 3;
  min-height: 0;
  display: grid;
}

/* Desktop */
@media (min-width: 900px) {
  .layout-with-sidebar {
    grid-template-columns: 260px 1fr;
  }

  .sidebar {
    /* KOMPLETT TRANSPARENT */
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;

    padding: var(--space-4);
    overflow-y: auto;
    height: 100%;

    /* Text-Schatten auch für Sidebar Links */
    text-shadow:
      0 0 10px rgba(255, 255, 255, 0.9),
      0 0 2px rgba(255, 255, 255, 1);
  }

  /* Spezielle Link-Styles für transparente Sidebar, damit sie sichtbar sind */
  .sidebar a {
    color: oklch(15% 0 0); /* Sehr dunkel */
    font-weight: 600;
  }

  .sidebar h3 {
    color: oklch(10% 0 0);
    text-shadow: 0 0 12px white;
  }

  .layout-with-sidebar > .site-main {
    padding: var(--space-4) var(--space-5);
    min-height: 0;
    overflow-y: auto;
  }
}

/* Mobile */
@media (max-width: 899px) {
  .layout-with-sidebar {
    grid-template-rows: auto 1fr;
    grid-template-columns: 1fr;
  }

  .sidebar {
    /* Transparent Mobile */
    background: transparent !important;
    backdrop-filter: none !important;
    border: none !important;

    padding: var(--space-3);
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;

    /* Schatten für Mobile Links */
    text-shadow: 0 0 8px white;
  }
}

@media (min-width: 1024px) {
  body {
    max-width: 100%;
    margin: auto;
  }
  .site-main {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
  }
}
