/*
  Theme Umschalten – Seitenstyles
  Ziel-Pfad im Projekt: webdesign-lernen/theme-umschalten/theme-umschalten.css
  Verwendet ausschliesslich var(--token, Fallback) statt eigener :root-Definitionen,
  damit die echten Design-Tokens aus style.css / webdesign.css nicht ueberschrieben werden.
*/

.tu-subhead {
  margin-top: 2rem;
}

.kt-hero {
  overflow: hidden;
}

.tu-hero-image {
  position: absolute;
  right: 6vw;
  bottom: 0;
  z-index: 0;
  width: min(38vw, 520px);
  height: auto;
  border-radius: 50%;
  opacity: 0.9;
  object-fit: cover;
}

.kt-hero > *:not(.tu-hero-image) {
  position: relative;
  z-index: 1;
}

/* ---------- Code-Bloecke ---------- */

.tu-code-block {
  margin: 0.75rem 0 2rem;
}

.tu-code-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.4rem;
}

.tu-copy {
  border: 1px solid var(--red, #4c7300);
  background: var(--white, #fff);
  color: var(--red, #4c7300);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  flex: 0 0 auto;
}

.tu-copy:hover {
  background: var(--red, #4c7300);
  color: var(--white, #fff);
}

.tu-copy.is-copied {
  background: var(--red-deep, #3f6100);
  border-color: var(--red-deep, #3f6100);
  color: var(--white, #fff);
}

.tu-code-block pre {
  margin: 0;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: var(--black-soft);
  overflow-x: auto;
}

.tu-code-block code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.85rem;
  line-height: 1.55;
  color: #e7efe0;
  white-space: pre;
}

/* ---------- Unterschiede-Liste ---------- */

.tu-diff-list {
  margin: 0 0 1.5rem;
  padding-left: 1.3rem;
  color: var(--mist);
}

.tu-diff-list li {
  margin-bottom: 0.6rem;
  line-height: 1.6;
}

.tu-diff-list li:last-child {
  margin-bottom: 0;
}

.tu-diff-list code {
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.1);
  color: var(--glow);
  padding: 0.05em 0.35em;
  border-radius: 4px;
}

.contact-inner a {
  color: var(--glow);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-inner a:hover,
.contact-inner a:focus-visible {
  color: var(--white);
}

/* ---------- Live-Demo ---------- */

.tu-demo {
  max-width: 720px;
  margin: 1.5rem auto 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px -30px rgba(0, 0, 0, 0.35);
}

.tu-demo-bar {
  padding: 0.75rem 1rem;
  background: var(--white, #fff);
  border-bottom: 1px solid rgba(12, 12, 12, 0.16);
  text-align: right;
}

.tu-demo-toggle {
  border: 1px solid var(--red, #4c7300);
  background: var(--white, #fff);
  color: var(--red, #4c7300);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
}

.tu-demo-toggle:hover {
  background: var(--red, #4c7300);
  color: var(--white, #fff);
}

.tu-demo-nav {
  position: relative;
  padding: 0.85rem 1.25rem;
  background: var(--gray-light, #efefef);
  font-size: 0.85rem;
  color: var(--black, #0c0c0c);
  border-bottom: 1px solid rgba(12, 12, 12, 0.16);
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.tu-demo--dark .tu-demo-nav {
  background: var(--black-soft, #161616);
  color: var(--mist, #f2f9e4);
  border-bottom-color: rgba(255, 255, 255, 0.18);
}

.tu-demo-content {
  padding: 1.5rem 1.25rem;
  background: #ffffff;
  color: #111111;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.tu-demo-content h3 {
  margin-top: 0;
}

.tu-demo-image {
  display: block;
  float: right;
  width: 150px;
  height: 150px;
  margin: 0 0 1rem 1.25rem;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.tu-demo-note {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-mid);
}

.tu-demo--dark .tu-demo-content {
  background: #121212;
  color: #eeeeee;
}

.tu-demo--dark .tu-demo-content .tu-demo-note {
  color: #a9b3a3;
}

.tu-demo--dark .tu-demo-image {
  transform: scaleX(-1);
}

.wdp-faq-out {
  hyphens: auto;
  overflow-wrap: break-word;
}

@media (max-width: 900px) {
  .tu-hero-image {
    position: relative;
    right: auto;
    bottom: auto;
    display: block;
    width: min(72vw, 360px);
    margin: 2rem auto -2rem;
  }
}
