/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #f4f7fb;
  --color-bg-alt: #ffffff;
  --color-surface: #ffffff;
  --color-surface-alt: #eef2f7;
  --color-accent: #1a6b4a;
  --color-accent-light: #238f63;
  --color-accent-soft: #e8f5ef;
  --color-gold: #b8860b;
  --color-gold-light: #d4a017;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 1200px;
  --header-height: 64px;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 1px 4px rgba(15, 23, 42, 0.06);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

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

ul,
ol {
  padding-left: 1.5rem;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.logo span {
  color: var(--color-accent);
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
}

.site-nav a {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--color-accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: transform 0.3s;
}

/* ===== Hero intro ===== */
.hero--intro {
  padding: 2.5rem 1.25rem 2rem;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}

.hero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero__badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero--intro h1 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.hero__lead {
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  max-width: 72ch;
}

/* ===== Widget ===== */
.widget-section {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  z-index: 50;
  touch-action: pan-y;
}

.widget-section__inner {
  max-width: 100%;
  overflow: hidden;
}

#casino-widget-iframe {
  width: 100%;
  max-width: 100%;
  border: none;
  display: block;
  overflow: hidden;
  min-height: 600px;
  height: 600px;
}

/* ===== Layout ===== */
.page-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  flex: 1;
  width: 100%;
}

.page-layout--single {
  grid-template-columns: 1fr;
  max-width: 860px;
}

/* ===== TOC ===== */
.toc {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  align-self: start;
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - var(--header-height) - 3rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.toc__title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.toc ol {
  list-style: none;
  padding: 0;
}

.toc li {
  margin-bottom: 0.3rem;
}

.toc a {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  padding: 0.3rem 0;
  line-height: 1.4;
  border-left: 2px solid transparent;
  padding-left: 0.5rem;
  transition: color 0.2s, border-color 0.2s;
}

.toc a:hover,
.toc a.is-active {
  color: var(--color-accent);
  border-left-color: var(--color-accent);
}

/* ===== Content ===== */
.content section {
  margin-bottom: 2.5rem;
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.content h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.content h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-text);
  letter-spacing: -0.01em;
  padding-left: 0.875rem;
  border-left: 3px solid var(--color-accent);
}

.content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--color-accent);
}

.content p {
  margin-bottom: 1rem;
  color: var(--color-text);
}

.content ul,
.content ol {
  margin-bottom: 1rem;
}

.content li {
  margin-bottom: 0.35rem;
}

.content li::marker {
  color: var(--color-accent);
}

/* ===== Author badge ===== */
.author-badge {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.author-badge__photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--color-accent-soft);
}

.author-badge__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 0.15rem;
}

.author-badge__name {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.35rem;
}

.author-badge__bio {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* ===== Tables ===== */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.25rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  max-width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 480px;
}

thead {
  background: var(--color-accent-soft);
}

th,
td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  font-weight: 600;
  color: var(--color-accent);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--color-surface-alt);
}

/* ===== FAQ ===== */
.faq-list {
  list-style: none;
  padding: 0;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: var(--color-surface);
}

.faq-item summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--color-text);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--color-accent);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item__answer {
  padding: 0 1.25rem 1rem;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 0.75rem;
  line-height: 1.6;
}

.footer-contacts h3,
.footer-form h3 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.footer-contacts p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}

.footer-form label {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.footer-form input,
.footer-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color 0.2s;
}

.footer-form input:focus,
.footer-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.footer-form textarea {
  resize: vertical;
  min-height: 80px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.5rem;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}

.btn:hover {
  background: var(--color-accent-light);
  color: #fff;
}

.form-message {
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: none;
}

.form-message.is-visible {
  display: block;
}

.form-message--success {
  color: var(--color-accent);
}

.form-message--error {
  color: #dc2626;
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: 1rem 1.25rem;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.footer-disclaimer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem 1.5rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  text-align: center;
}

/* ===== Cookie banner ===== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.1);
  padding: 1.25rem;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-banner__text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  flex: 1;
  min-width: 200px;
}

.cookie-banner__actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn--outline {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.btn--outline:hover {
  background: var(--color-surface-alt);
  color: var(--color-text);
}

/* ===== Impresszum ===== */
.impresszum-grid {
  display: grid;
  gap: 2rem;
}

.info-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.info-block h2 {
  font-size: 1.125rem;
  color: var(--color-accent);
  margin-bottom: 1rem;
  padding-left: 0;
  border-left: none;
}

.info-table {
  width: 100%;
  font-size: 0.9rem;
  min-width: 0;
}

.info-table td {
  padding: 0.5rem 0.75rem 0.5rem 0;
  vertical-align: top;
  border-bottom: 1px solid var(--color-border);
}

.info-table td:first-child {
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
  width: 40%;
}

.info-table tr:last-child td {
  border-bottom: none;
}

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  aspect-ratio: 4 / 3;
  max-width: 100%;
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ===== 404 ===== */
.error-page {
  text-align: center;
  padding: 4rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.error-page__code {
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 800;
  color: var(--color-accent-soft);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-page h1 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  margin-bottom: 1rem;
}

.error-page p {
  color: var(--color-text-muted);
  max-width: 40ch;
  margin-bottom: 2rem;
}

/* ===== Mobile widget scroll trap ===== */
@media (max-width: 768px) {
  .site-header {
    position: relative;
    z-index: 10;
  }

  .site-header.is-hidden-mobile {
    position: absolute;
    visibility: hidden;
    pointer-events: none;
  }

  .widget-section {
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: var(--shadow);
  }

  .widget-section.is-locked {
    touch-action: none;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    gap: 0;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav li {
    border-bottom: 1px solid var(--color-border);
  }

  .site-nav li:last-child {
    border-bottom: none;
  }

  .site-nav a {
    display: block;
    padding: 0.75rem 0;
  }

  .page-layout {
    grid-template-columns: 1fr;
    padding-top: 1.5rem;
  }

  .toc {
    position: static;
    max-height: none;
    margin-bottom: 1rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .author-badge {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .cookie-banner__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-banner__actions {
    width: 100%;
  }

  .cookie-banner__actions .btn {
    flex: 1;
  }

  table {
    min-width: 320px;
    font-size: 0.8125rem;
  }

  th,
  td {
    padding: 0.5rem 0.65rem;
  }

  .info-table td:first-child {
    white-space: normal;
    width: 35%;
  }
}

@media (max-width: 480px) {
  .hero--intro {
    padding: 1.75rem 1rem 1.5rem;
  }

  .page-layout {
    padding: 1.25rem 1rem 3rem;
  }

  #casino-widget-iframe {
    min-height: 500px;
    height: 500px;
  }
}
