/* ==========================================================================
   flagman7.de – site stylesheet
   ========================================================================== */

:root {
  --content-width: 1140px;
  --bg: #0c0a18;
  --bg-alt: #120f24;
  --surface: #1a1533;
  --surface-2: #221c42;
  --border: rgba(255, 255, 255, 0.09);
  --text: #f2f0fb;
  --text-muted: #b6b1d1;
  --primary: #4f8cff;
  --primary-2: #9b5cf6;
  --primary-contrast: #ffffff;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

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

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 9px 18px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
}

.btn:hover,
.btn:focus {
  text-decoration: none;
  opacity: 0.92;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: var(--primary-contrast);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--text);
}

.btn-cta {
  font-size: 1rem;
  padding: 12px 26px;
  margin-top: 16px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.logo {
  order: 1;
  flex: 0 0 auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.logo img {
  height: 32px;
  width: 32px;
  border-radius: 8px;
}

.logo-text {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: #ffffff;
  white-space: nowrap;
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.burger {
  order: 3;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  border-radius: 6px;
}

.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.header-actions {
  order: 2;
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
}

.header-actions .btn {
  padding: 8px 12px;
  font-size: 0.82rem;
}

@media (max-width: 480px) {
  .header-inner {
    gap: 6px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .logo {
    gap: 5px;
  }

  .logo img {
    height: 26px;
    width: 26px;
    border-radius: 6px;
  }

  .logo-text {
    font-size: 0.85rem;
  }

  .header-actions {
    gap: 5px;
  }

  .header-actions .btn {
    padding: 6px 8px;
    font-size: 0.68rem;
  }

  .burger {
    width: 26px;
    height: 26px;
    gap: 4px;
  }

  .burger span {
    width: 16px;
  }
}

.site-nav {
  order: 4;
  flex-basis: 100%;
  display: none;
}

.nav-toggle:checked ~ .site-nav {
  display: block;
}

.site-nav ul {
  list-style: none;
  margin: 6px 0 0;
  padding: 6px 0 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.site-nav a {
  display: block;
  padding: 10px 4px;
  color: var(--text);
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--primary);
  text-decoration: none;
}

@media (min-width: 860px) {
  .burger,
  .nav-toggle {
    display: none;
  }

  .header-inner {
    flex-wrap: nowrap;
  }

  .logo {
    margin-right: 0;
  }

  .logo img {
    height: 38px;
    width: 38px;
  }

  .logo-text {
    font-size: 1.35rem;
  }

  .site-nav {
    display: block !important;
    order: 2;
    flex-basis: auto;
    flex: 1 1 auto;
  }

  .site-nav ul {
    flex-direction: row;
    justify-content: center;
    border-top: none;
    margin: 0;
    padding: 0;
    gap: 8px;
  }

  .site-nav a {
    padding: 8px 12px;
    border-radius: 999px;
  }

  .site-nav a:hover,
  .site-nav a:focus {
    background: var(--surface);
    text-decoration: none;
  }

  .header-actions {
    order: 3;
  }

  .header-actions .btn {
    padding: 9px 18px;
    font-size: 0.9rem;
  }
}

/* --------------------------------------------------------------------------
   Breadcrumbs
   -------------------------------------------------------------------------- */

.breadcrumbs {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 10px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 4px;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 4px;
  color: var(--text-muted);
  opacity: 0.6;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover,
.breadcrumbs a:focus {
  color: var(--primary);
}

.breadcrumbs [aria-current="page"] {
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  background: var(--bg);
}

.hero-inner {
  padding-top: 20px;
  padding-bottom: 20px;
}

.hero-media {
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}

.hero-media img {
  width: 100%;
  height: auto;
}

.hero-content {
  padding: 18px 4px 4px;
}

.hero-content h1 {
  margin: 0 0 10px;
  font-size: 1.5rem;
  line-height: 1.25;
}

.hero-content p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

@media (min-width: 700px) {
  .hero-wrap {
    position: relative;
  }

  .hero-content {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 46%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3% 4%;
    color: #ffffff;
  }

  .hero-content p {
    color: rgba(255, 255, 255, 0.82);
  }

  .hero-content h1 {
    font-size: 1.9rem;
  }
}

@media (min-width: 1024px) {
  .hero-content h1 {
    font-size: 2.3rem;
  }

  .hero-content p {
    font-size: 1.05rem;
  }
}

/* --------------------------------------------------------------------------
   Main content
   -------------------------------------------------------------------------- */

main {
  padding: 28px 0 40px;
}

article h1 {
  font-size: 1.6rem;
  line-height: 1.3;
}

article h2 {
  font-size: 1.3rem;
  margin-top: 2em;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

article h3 {
  font-size: 1.1rem;
}

article p,
article li,
article dd {
  color: var(--text-muted);
}

article strong {
  color: var(--text);
}

article ul,
article ol {
  padding-left: 1.2em;
}

article dl dt {
  color: var(--text);
  font-weight: 600;
  margin-top: 12px;
}

article section {
  margin-bottom: 4px;
}

aside {
  margin-top: 32px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   TOC accordion (details/summary)
   -------------------------------------------------------------------------- */

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 20px 0 28px;
  padding: 4px 16px;
}

.toc summary {
  cursor: pointer;
  padding: 12px 4px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.toc summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--primary);
  margin-left: 12px;
}

.toc[open] summary::after {
  content: "\2212";
}

.toc ol,
.toc ul {
  margin: 0;
  padding: 4px 0 14px 1.2em;
}

.toc li {
  padding: 3px 0;
}

/* generic FAQ-style details */
article > section details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  padding: 4px 16px;
}

article > section details summary {
  cursor: pointer;
  padding: 12px 4px;
  color: var(--text);
  list-style: none;
}

article > section details summary::-webkit-details-marker {
  display: none;
}

article > section details summary::after {
  content: "+";
  float: right;
  color: var(--primary);
}

article > section details[open] summary::after {
  content: "\2212";
}

/* --------------------------------------------------------------------------
   Responsive table (no horizontal scroll on mobile)
   -------------------------------------------------------------------------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

th,
td {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  vertical-align: top;
}

thead {
  background: var(--surface);
}

@media (max-width: 640px) {
  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

  table {
    border: none;
  }

  tr {
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
  }

  td {
    border: none;
    border-bottom: 1px solid var(--border);
    padding-left: 46%;
    position: relative;
  }

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

  td::before {
    content: attr(data-label);
    position: absolute;
    left: 12px;
    top: 10px;
    width: 40%;
    font-weight: 600;
    color: var(--text);
  }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 28px 0 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.footer-nav ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.footer-nav a {
  color: var(--text-muted);
}

.footer-nav a:hover,
.footer-nav a:focus {
  color: var(--primary);
}

.footer-title {
  color: var(--text);
  font-weight: 600;
  margin: 0 0 4px;
}

.footer-notice {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  line-height: 1.5;
}

.footer-bottom {
  margin-top: 14px;
  opacity: 0.8;
}

@media (min-width: 700px) {
  .footer-grid {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}
