/* ===============================
   Basis-Styles & Root Variablen
   =============================== */
:root {
  --bg: #FBFBFA;
  --card-bg: #FFFFFF;
  --muted: #6b6b6b;
  --radius: 14px;
  --gap: 20px;
  --max-width: 1100px;
  --shadow: 0 8px 20px rgba(13,20,25,0.06);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #FBFCFB 0%, #FFFFFF 100%);
  color: #14202B;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 40px 18px;
  display: block;
}

/* ===============================
   Kacheln
   =============================== */
.wrap {
  width: 100%;
  max-width: var(--max-width);
  background: var(--card-bg);
  border-radius: calc(var(--radius) + 6px);
  padding: 36px;
  box-shadow: var(--shadow);
  margin: 0 auto;
  position: relative;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.6;
  color: #14202B;
  box-shadow: 0 6px 14px rgba(10,18,20,0.04);
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform .18s ease, box-shadow .18s ease;
  cursor: pointer;
  padding: 20px;
  text-align: center;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(10,18,20,0.08);
}

/* Kachel Farben */
.card[data-accent="1"] { background: linear-gradient(135deg,#E8F5F2,#ffffff); }
.card[data-accent="2"] { background: linear-gradient(135deg,#FFF4E8,#ffffff); }
.card[data-accent="3"] { background: linear-gradient(135deg,#FFECEC,#ffffff); }
.card[data-accent="4"] { background: linear-gradient(135deg,#EAF9F6,#ffffff); }
.card[data-accent="5"] { background: linear-gradient(135deg,#F0F8FF,#ffffff); }
.card[data-accent="6"] { background: linear-gradient(135deg,#FFF8F4,#ffffff); }

.card_title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.card_subtitle,
.card_content {
  margin: 6px 0 0 0;
  color: #14202B;
  font-size: 14px;
}

/* Overlay */
.overlay-global {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.98);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.overlay-global.active {
  opacity: 1;
  pointer-events: auto;
}

.overlay-global .close {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  margin-bottom: 20px;
}

.ec_tile_group_header {
  font-size: 28px;
  margin: 0 0 18px 0;
  letter-spacing: -0.02em;
}

.ec_tile_group_description {
  color: var(--muted);
  margin: 0 0 26px 0;
}

.ec_overlay_title {
  margin-top: 0;
  font-size: 24px;
}

.ec_overlay_text {
  font-size: 16px;
  line-height: 1.6;
  color: #1f2b2a;
}

/* ===============================
   Layout Content + Buttons
   =============================== */
.unit-step-layout {
  display: flex;
  gap: 20px;
}

/* Spezifische Layout-Klassen */
.unit-step-layout.ec-tiles {
  flex-direction: column; /* Kacheln stapeln */
}

.unit-step-layout.ec-freetext {
  flex-direction: row; /* Freitext + Buttons nebeneinander */
  align-items: flex-start;
}

/* Content-Bereich */
.unit-content {
  flex: 5;
  margin: 0;
}

/* Buttons */
.choice-buttons-wrapper,
.nav-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.choice-buttons-wrapper .choice-btn {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding: 1.2rem 1.5rem;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(10, 18, 20, 0.06);
  background: linear-gradient(135deg, #ffffff, #f8fafa);
  justify-content: center;
  align-items: center;
  min-height: 80px;
  transition: all 0.25s ease;
  color: #14202B;
}

/* Hover-Effekt */
.choice-buttons-wrapper .choice-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(10, 18, 20, 0.12);
}

/* Button-Farbvarianten */
.choice-buttons-wrapper .choice-btn:nth-child(1) { background: linear-gradient(135deg, #E8F5F2, #ffffff); }
.choice-buttons-wrapper .choice-btn:nth-child(2) { background: linear-gradient(135deg, #FFF4E8, #ffffff); }
.choice-buttons-wrapper .choice-btn:nth-child(3) { background: linear-gradient(135deg, #FFECEC, #ffffff); }
.choice-buttons-wrapper .choice-btn:nth-child(4) { background: linear-gradient(135deg, #EAF9F6, #ffffff); }
.choice-buttons-wrapper .choice-btn:nth-child(5) { background: linear-gradient(135deg, #F0F8FF, #ffffff); }

/* Weiter-Button */
.nav-buttons {
  margin-top: 20px;
}

.nav-btn {
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background-color: #007BFF;
  color: white;
}

/* ===============================
   Responsive
   =============================== */
@media (max-width: 980px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .wrap {
    padding: 12px;
  }
  .card {
    padding: 16px;
  }
  .unit-step-layout.ec-freetext {
    flex-direction: column;
    gap: 12px;
  }
  .choice-buttons-wrapper .choice-btn,
  .nav-buttons .nav-btn {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }
}
