/* KEYBOSS – Neues, schlankes Theme (statisch, kein Framework) */

:root {
  --kb-yellow: #fbbb0b;
  --kb-green: #9dbf26;
  --kb-black: #16171a;
  --kb-dark: #23252b;
  --kb-gray: #6b7280;
  --kb-light: #f6f7f9;
  --kb-red: #e0374b;
  --kb-white: #ffffff;
  --kb-radius: 10px;
  --kb-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  --kb-max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--kb-dark);
  background: var(--kb-white);
  line-height: 1.55;
}

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

a {
  color: inherit;
}

.container {
  max-width: var(--kb-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: var(--kb-black);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
  max-width: 820px;
  padding-left: 0;
  padding-right: 0;
}

@media (max-width: 900px) {
  .site-header .container {
    max-width: var(--kb-max);
    padding-left: 24px;
    padding-right: 24px;
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo img {
  height: 36px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--kb-white);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 10px 12px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: var(--kb-white);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-family: inherit;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.nav-dropdown-trigger:hover,
.nav-dropdown-trigger:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.nav-dropdown-trigger .caret {
  font-size: 10px;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--kb-white);
  border-radius: 8px;
  box-shadow: var(--kb-shadow);
  padding: 8px;
  min-width: 190px;
  display: none;
  z-index: 200;
}

.nav-dropdown-menu.open {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 12px;
  color: var(--kb-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  text-transform: none;
  letter-spacing: normal;
  border-radius: 6px;
}

.nav-dropdown-menu a:hover {
  background: var(--kb-light);
}

@media (max-width: 860px) {
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    display: none;
    padding-left: 12px;
  }
  .nav-dropdown-menu.open {
    display: block;
  }
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--kb-white);
  border-radius: 6px;
  color: var(--kb-white);
  font-size: 20px;
  padding: 6px 10px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }
  .main-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--kb-black);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 16px;
    display: none;
  }
  .main-nav.open {
    display: flex;
  }
  .main-nav a {
    padding: 12px 8px;
  }
}

/* Hero */
.hero {
  position: relative;
  color: var(--kb-white);
  background:
    linear-gradient(rgba(10, 10, 12, 0.55), rgba(10, 10, 12, 0.72)),
    linear-gradient(135deg, #2b2d33 0%, #16171a 60%);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero.has-photo {
  background-image:
    linear-gradient(rgba(10, 10, 12, 0.5), rgba(10, 10, 12, 0.72)),
    url("../img/hero.jpg");
  background-position: center top;
  min-height: 88vh;
  display: flex;
  align-items: center;
}

.hero .container {
  position: relative;
  padding: 72px 24px 96px;
  text-align: center;
  width: 100%;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 800;
  margin: 0 auto 16px;
  max-width: 720px;
}

.hero p.lead {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  margin: 0 auto 40px;
}

.hero-card {
  background: var(--kb-white);
  color: var(--kb-dark);
  border-radius: var(--kb-radius);
  box-shadow: var(--kb-shadow);
  padding: 32px;
  max-width: 780px;
  margin: 0 auto;
  text-align: left;
}

.hero-card-top {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.hero-code-row {
  border-top: 1px solid #e4e6eb;
  margin-top: 24px;
  padding-top: 24px;
}

.hero-code-row[hidden] {
  display: none;
}

.hero-code-label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px;
}

.hero-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.hero-card p {
  margin: 0;
  color: var(--kb-gray);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .hero-card-top {
    grid-template-columns: 1fr;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 8px;
  padding: 13px 22px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn:hover {
  filter: brightness(1.06);
}

.btn-green {
  background: #1a9e5c;
  color: var(--kb-white);
}

.btn-red {
  background: var(--kb-red);
  color: var(--kb-white);
}

.btn-yellow {
  background: var(--kb-yellow);
  color: var(--kb-black);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--kb-dark);
  color: var(--kb-dark);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Sections */
section {
  padding: 72px 0;
}

section.alt {
  background: var(--kb-light);
}

h2.section-title {
  font-size: 30px;
  font-weight: 800;
  text-align: center;
  margin: 0 0 48px;
}

.video-frame {
  position: relative;
  max-width: 850px;
  margin: 0 auto 56px;
  border-radius: var(--kb-radius);
  overflow: hidden;
  box-shadow: var(--kb-shadow);
}

.video-frame video {
  width: 100%;
  display: block;
  background: #000;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

@media (max-width: 800px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.step {
  text-align: center;
}

.step .icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(251, 187, 11, 0.15);
  color: var(--kb-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.step h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.step p {
  color: var(--kb-gray);
  font-size: 15px;
  margin: 0;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  border-radius: var(--kb-radius);
  overflow: hidden;
}

@media (max-width: 900px) {
  .tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .tiles {
    grid-template-columns: 1fr;
  }
}

.tile {
  background: var(--kb-yellow);
  padding: 32px 28px;
}

.tile h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.tile p {
  margin: 0;
  font-size: 14px;
  color: rgba(22, 23, 26, 0.75);
}

/* Legal pages */
.page-header {
  background: var(--kb-white);
  color: var(--kb-dark);
  padding: 48px 0 8px;
}

.page-header .container {
  max-width: 820px;
  padding-left: 0;
  padding-right: 0;
}

.page-header h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
}

.content {
  padding: 48px 0 88px;
  max-width: 820px;
  margin: 0 auto;
}

.content h2 {
  font-size: 20px;
  margin: 36px 0 12px;
}

.content h2:first-child {
  margin-top: 0;
}

.content p,
.content li {
  color: #3a3d44;
}

.content ul {
  padding-left: 20px;
}

.vertrieb-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 32px;
}

.vertrieb-map {
  border-radius: var(--kb-radius);
}

@media (max-width: 700px) {
  .vertrieb-intro {
    grid-template-columns: 1fr;
  }
}

/* Dealer accordion */
.accordion-item {
  border: 1px solid #e4e6eb;
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}

.accordion-trigger {
  width: 100%;
  text-align: left;
  background: var(--kb-light);
  border: none;
  padding: 16px 20px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-trigger::after {
  content: "\25BE";
  transition: transform 0.15s ease;
}

.accordion-trigger[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.accordion-panel {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease, padding 0.2s ease;
}

.accordion-panel.open {
  max-height: 800px;
  padding: 18px 20px 22px;
}

.dealer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 32px;
}

@media (max-width: 640px) {
  .dealer-grid {
    grid-template-columns: 1fr;
  }
}

.dealer-card p {
  margin: 2px 0;
  font-size: 14px;
}

.dealer-card p.dealer-name {
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 15px;
}

/* Modal (Aktivieren / Fund melden) */
.kb-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.kb-modal-backdrop.open {
  display: flex;
}

.kb-modal {
  background: var(--kb-white);
  border-radius: var(--kb-radius);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.kb-modal-header {
  background: var(--kb-dark);
  color: var(--kb-white);
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kb-modal-header h3 {
  margin: 0;
  font-size: 17px;
}

.kb-modal-close {
  background: none;
  border: none;
  color: var(--kb-white);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.kb-modal-body {
  padding: 22px;
}

.form-row {
  margin-bottom: 16px;
}

.form-row label {
  display: block;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d7d9de;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

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

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 480px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.consent-row {
  font-size: 13px;
  color: var(--kb-gray);
}

.consent-row label {
  display: block;
  font-weight: 400;
}

.consent-row input[type="checkbox"],
.consent-row input[type="radio"] {
  width: auto;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}

.alert {
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 14px;
}

.alert-info {
  background: #eef1f5;
  color: #33363d;
}

.alert-error {
  background: #fdecee;
  color: #9c1b2e;
}

.alert-success {
  background: #e8f6ee;
  color: #146c3c;
}

.kb-modal-footer {
  padding: 16px 22px 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: kb-spin 0.6s linear infinite;
}

@keyframes kb-spin {
  to {
    transform: rotate(360deg);
  }
}
