
/*
 * JK Unterseiten Final Fix
 * Dieses CSS lädt sehr spät und neutralisiert die fehlerhaften Rahmen/Overlays.
 */

/* Alte problematische Overlays ausschalten */
body .jk-clean-hero::before,
body .jk-clean-hero::after,
body .jk-sub-hero::before,
body .jk-sub-hero::after,
body .wp-block-post-content > .wp-block-group:first-child::before,
body .wp-block-post-content > .wp-block-group:first-child::after,
body .jk-card::before,
body .jk-card::after,
body .jk-feature-card::before,
body .jk-feature-card::after,
body .jk-info-card::before,
body .jk-info-card::after,
body .jk-form-card::before,
body .jk-form-card::after,
body .wp-block-post-content .wp-block-column::before,
body .wp-block-post-content .wp-block-column::after {
  display: none !important;
  content: none !important;
}

/* Grundlook */
body {
  background:
    radial-gradient(circle at 76% 8%, rgba(24,168,255,.16), transparent 34rem),
    radial-gradient(circle at 14% 16%, rgba(109,75,255,.13), transparent 28rem),
    #05070d !important;
  color: #f7f9ff;
}

.wp-site-blocks,
main,
.wp-block-post-content,
.entry-content {
  background: transparent !important;
}

/* Content sauber zentrieren */
.wp-block-post-content {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem 5rem;
}

.wp-block-post-content > * {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

.wp-block-post-content > .alignwide {
  max-width: 1240px;
}

.wp-block-post-content > .alignfull {
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Doppelten kleinen ersten Titel auf Unterseiten ausblenden */
body.page:not(.home) .wp-block-post-content > h1:first-child,
body.page:not(.home) .wp-block-post-content > h2:first-child {
  display: none !important;
}

/* Seitentitel / Hero */
.wp-block-post-title,
.entry-title {
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding: clamp(4.5rem, 8vw, 7rem) 1.25rem 1.2rem !important;
  color: #fff !important;
  font-size: clamp(3.3rem, 7.2vw, 6.4rem) !important;
  line-height: .9 !important;
  letter-spacing: -.06em !important;
  font-weight: 950 !important;
}

/* Erste Textsektion unter Titel */
body.page:not(.home) .wp-block-post-content > p:first-of-type {
  max-width: 820px;
  margin-left: 0;
  margin-right: auto;
  color: #d4dcf2 !important;
  font-size: clamp(1.25rem, 2vw, 2rem);
  line-height: 1.45;
  padding: 1.6rem 2rem;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
  box-shadow: 0 24px 70px rgba(0,0,0,.34);
}

/* Sektionen */
.wp-block-post-content > h2 {
  margin-top: 4rem !important;
  margin-bottom: 1.25rem !important;
  color: #fff !important;
  font-size: clamp(2rem, 4vw, 3.6rem) !important;
  line-height: 1 !important;
  letter-spacing: -.045em !important;
  font-weight: 950 !important;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 2rem;
}

.wp-block-post-content > h3 {
  color: #fff !important;
}

/* Card Raster */
.wp-block-post-content .wp-block-columns {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem !important;
  margin-top: 1.5rem !important;
  margin-bottom: 2.5rem !important;
}

.wp-block-post-content .wp-block-column {
  width: auto !important;
  flex-basis: auto !important;
  min-width: 0 !important;
  padding: 1.65rem !important;
  border-radius: 24px !important;
  border: 1px solid rgba(255,255,255,.15) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.035)) !important;
  box-shadow:
    0 24px 70px rgba(0,0,0,.38),
    inset 0 1px 0 rgba(255,255,255,.08) !important;
  min-height: 170px;
}

.wp-block-post-content .wp-block-column:hover {
  transform: translateY(-2px);
  border-color: rgba(24,168,255,.38) !important;
  transition: .18s ease;
}

.wp-block-post-content .wp-block-column h3,
.wp-block-post-content .wp-block-column h2 {
  margin-top: 0 !important;
  margin-bottom: .8rem !important;
  padding-top: 0 !important;
  border-top: 0 !important;
  font-size: clamp(1.25rem, 2vw, 1.65rem) !important;
  line-height: 1.1 !important;
  color: #fff !important;
}

.wp-block-post-content .wp-block-column p {
  color: #c5cde3 !important;
  line-height: 1.65 !important;
  margin-bottom: 0 !important;
}

/* Ablauf / Listen als Panel */
.wp-block-post-content > ol,
.wp-block-post-content > ul {
  padding: 1.8rem 2rem 1.8rem 3.2rem !important;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
  box-shadow: 0 24px 70px rgba(0,0,0,.34);
  color: #d3dcf3;
}

.wp-block-post-content li {
  margin-bottom: .55rem;
  color: #d3dcf3;
}

/* Buttons */
.wp-block-button__link,
.wp-element-button,
input[type="submit"],
button[type="submit"] {
  background: linear-gradient(135deg, #18a8ff, #6d4bff) !important;
  color: #fff !important;
  border-radius: 999px !important;
  border: 0 !important;
  padding: .95rem 1.55rem !important;
  font-weight: 900 !important;
  text-decoration: none !important;
  box-shadow: 0 18px 44px rgba(24,168,255,.28);
}

.wp-block-button__link:hover,
.wp-element-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 54px rgba(24,168,255,.36);
}

/* Header etwas wie Startseite */
header,
.wp-block-template-part:has(header) {
  background: rgba(3,5,10,.9) !important;
  border-bottom: 1px solid rgba(255,255,255,.09) !important;
  backdrop-filter: blur(18px);
}

/* Kontaktformular */
input:not([type="submit"]),
textarea,
select,
.ff-el-form-control {
  background: rgba(255,255,255,.075) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  border-radius: 14px !important;
  padding: .95rem 1rem !important;
}

label,
.ff-el-input--label label {
  color: #dce6fa !important;
  font-weight: 750 !important;
}

/* Adminbar Abstand nicht zerstören */
body.admin-bar header {
  margin-top: 0;
}

/* Editor Fix */
.editor-styles-wrapper {
  background: #05070d !important;
}

.editor-styles-wrapper .wp-block-column {
  outline: 1px solid rgba(255,255,255,.12);
}

/* Mobile */
@media (max-width: 900px) {
  .wp-block-post-content .wp-block-columns {
    grid-template-columns: 1fr !important;
  }

  .wp-block-post-title,
  .entry-title {
    font-size: clamp(2.8rem, 14vw, 4.6rem) !important;
  }

  body.page:not(.home) .wp-block-post-content > p:first-of-type {
    padding: 1.2rem;
    font-size: 1.15rem;
  }
}
