/**
 * satello Flex Sections Edition additions.
 *
 * This file deliberately overrides only structural and configurable behavior
 * introduced in version 2.0. Existing heading sizes and the visual language of
 * the Logo Edition remain untouched.
 */

/* --------------------------------------------------------------------------
   Typography and overflow isolation
   -------------------------------------------------------------------------- */
body.satello-standalone-page {
  overflow-x: clip;
}

.satello-lp {
  min-width: 0;
  overflow: visible;
  font-family: var(--sat-body-font, Arial, Helvetica, sans-serif);
  font-size: var(--sat-body-size, 16px);
}

.satello-lp button,
.satello-lp input,
.satello-lp textarea,
.satello-lp select {
  font-family: var(--sat-body-font, Arial, Helvetica, sans-serif);
}

.satello-lp h1,
.satello-lp h2,
.satello-lp h3,
.satello-lp h4,
.satello-lp h5,
.satello-lp h6,
.satello-footer h2 {
  font-family: var(--sat-heading-font, "Quicksand", Arial, sans-serif);
}

/* Uniform reading size across the actual content copy. Labels, navigation,
   prices and buttons intentionally retain their compact display sizes. */
.satello-lead,
.satello-lead p,
.satello-section-heading p,
.satello-section-heading > div,
.satello-section-heading > div p,
.satello-benefit p,
.satello-feature-card__description,
.satello-feature-card__details li,
.satello-security__intro p,
.satello-security-card p,
.satello-audience-card p,
.satello-step p,
.satello-pricing__note p,
.satello-implementation__content > div,
.satello-implementation__content > div p,
.satello-final-cta p,
.satello-content-page__content,
.satello-content-page__content p,
.satello-content-page__content li {
  font-size: var(--sat-body-size, 16px) !important;
  line-height: 1.68;
}

/* --------------------------------------------------------------------------
   Mobile navigation: solid drawer, own backdrop and reliable stacking
   -------------------------------------------------------------------------- */
.satello-header {
  z-index: 100000;
}

.satello-navigation__mobile-cta,
.satello-menu-backdrop {
  display: none;
}

.satello-menu-backdrop {
  position: fixed;
  z-index: 99998;
  inset: var(--sat-menu-top, 72px) 0 0;
  border: 0;
  background: rgba(2, 27, 53, 0.58);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(4px);
  transition: opacity 0.22s ease;
}

@media (max-width: 980px) {
  .satello-header,
  .satello-header.is-scrolled {
    border-bottom-color: var(--sat-border);
    background: #fff;
    box-shadow: 0 10px 34px rgba(4, 36, 73, 0.11);
    backdrop-filter: none;
  }

  .satello-header__inner {
    position: relative;
    z-index: 100003;
  }

  .satello-nav-toggle {
    position: relative;
    z-index: 100004;
  }

  .satello-navigation {
    position: fixed;
    z-index: 100002;
    top: var(--sat-menu-top, 72px) !important;
    right: 0;
    bottom: auto;
    left: 0;
    display: flex;
    max-height: calc(100dvh - var(--sat-menu-top, 72px));
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    margin: 0;
    padding: 14px max(24px, calc((100vw - var(--sat-container)) / 2 + 24px)) 26px;
    border-top: 1px solid var(--sat-border);
    border-bottom: 1px solid var(--sat-border);
    background: #fff;
    box-shadow: 0 24px 52px rgba(2, 27, 53, 0.2);
    opacity: 0;
    overflow-y: auto;
    pointer-events: none;
    transform: translateY(-16px);
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }

  .satello-navigation.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: none;
    visibility: visible;
    transition-delay: 0s;
  }

  .satello-navigation a:not(.satello-button) {
    display: block;
    padding: 15px 2px;
    border-bottom: 1px solid var(--sat-border);
    color: var(--sat-text);
    font-size: 1rem;
    font-weight: 700;
  }

  .satello-navigation a::after {
    display: none;
  }

  .satello-navigation__mobile-cta {
    display: inline-flex;
    width: 100%;
    margin-top: 18px;
  }

  .satello-menu-backdrop {
    display: block;
  }

  html.satello-menu-open .satello-menu-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  html.satello-menu-open,
  html.satello-menu-open body {
    overflow: hidden;
    overscroll-behavior: contain;
  }
}

@media (max-width: 782px) {
  .admin-bar .satello-header {
    top: 46px;
  }
}

/* --------------------------------------------------------------------------
   Hero media modes
   -------------------------------------------------------------------------- */
.satello-hero__visual--complete {
  display: flex;
  min-height: 440px;
  align-items: center;
  justify-content: center;
}

.satello-hero__visual--complete .satello-hero__phone {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  max-width: 760px;
  max-height: 640px;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 26px 54px rgba(4, 36, 73, 0.16));
  transform: none;
}

@media (max-width: 980px) {
  .satello-hero__visual--complete {
    width: min(760px, 100%);
    min-height: 320px;
    margin: 0 auto;
  }

  .satello-hero__visual--complete .satello-hero__phone {
    max-height: 560px;
  }
}

@media (max-width: 600px) {
  .satello-hero__visual--complete {
    min-height: 230px;
  }

  .satello-hero__visual--complete .satello-hero__phone {
    max-height: 430px;
  }
}

/* --------------------------------------------------------------------------
   Security section: 50/50 copy + 2 x 2 cards on desktop
   -------------------------------------------------------------------------- */
.satello-security__grid {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(44px, 6vw, 84px);
}

.satello-security__intro {
  max-width: 620px;
  grid-column: auto;
}

.satello-security__cards {
  display: grid;
  align-items: stretch;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.satello-security-card {
  min-width: 0;
  min-height: 100%;
}

@media (max-width: 980px) {
  .satello-security__grid {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .satello-security__intro {
    max-width: 760px;
  }

  .satello-security__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

/* --------------------------------------------------------------------------
   Flexible Divi insertion points
   -------------------------------------------------------------------------- */
.satello-divi-slot {
  position: relative;
  z-index: 1;
  width: 100%;
  background: #fff;
}

.satello-divi-slot:empty {
  display: none;
}

.satello-divi-slot__content {
  width: 100%;
}

.satello-divi-slot .et_pb_section,
.satello-divi-slot .et-l .et_pb_section,
.satello-divi-slot .wp-block-divi-global-layout {
  margin-top: 0;
  margin-bottom: 0;
}

/* Utility class for own Divi sections. The same image is copied into the media
   library on installation, but this class remains stable across domains. */
.satello-gradient-background,
.satello-lp .satello-gradient-background {
  background-image: url("../img/satello-section-gradient.png") !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: cover !important;
}

/* --------------------------------------------------------------------------
   Supporting pages (Impressum, Datenschutz, Nutzungsbedingungen)
   -------------------------------------------------------------------------- */
.satello-content-page__main {
  min-height: 68vh;
  padding-top: 80px;
  background: #fff;
}

.satello-content-page__hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(82px, 9vw, 132px) 0 clamp(58px, 7vw, 96px);
  background:
    radial-gradient(circle at 78% 18%, color-mix(in srgb, var(--sat-accent), transparent 72%), transparent 31%),
    radial-gradient(circle at 9% 42%, color-mix(in srgb, var(--sat-primary), transparent 91%), transparent 33%),
    linear-gradient(120deg, #fff 10%, var(--sat-surface) 100%);
}

.satello-content-page__hero::after {
  position: absolute;
  z-index: -1;
  right: -110px;
  bottom: -190px;
  width: 430px;
  height: 430px;
  border: 1px solid color-mix(in srgb, var(--sat-accent), transparent 65%);
  border-radius: 50%;
  box-shadow: 0 0 0 72px color-mix(in srgb, var(--sat-accent), transparent 94%);
  content: "";
}

.satello-content-page__hero h1 {
  margin-bottom: 0;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
}

.satello-content-page__intro {
  max-width: 760px;
  margin-top: 22px;
  color: var(--sat-muted);
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  line-height: 1.72;
}

.satello-content-page__intro p {
  margin-bottom: 0;
}

.satello-content-page__content {
  min-height: 340px;
  padding: clamp(64px, 7vw, 108px) 0;
  color: var(--sat-text);
}

/* Plain WordPress editor content gets a readable column. Divi sections retain
   their own full-width structure. */
.satello-content-page__content > :where(p, h2, h3, h4, h5, h6, ul, ol, blockquote, table, figure, form, .wp-block-group:not(.alignfull):not(.alignwide)) {
  width: min(calc(100% - 48px), 920px);
  margin-right: auto;
  margin-left: auto;
}

.satello-content-page__content > h2,
.satello-content-page__content > h3,
.satello-content-page__content > h4 {
  margin-top: 1.5em;
}

.satello-content-page__content > :first-child {
  margin-top: 0;
}

.satello-content-page__content > :last-child {
  margin-bottom: 0;
}

.satello-content-page__content > .et-l,
.satello-content-page__content > .et_pb_section,
.satello-content-page__content > .wp-block-divi-global-layout,
.satello-content-page__content > .alignfull {
  width: 100%;
  max-width: none;
  margin-right: 0;
  margin-left: 0;
}

.satello-content-page__content:empty::before {
  display: block;
  width: min(calc(100% - 48px), 920px);
  margin: 0 auto;
  padding: 34px;
  border: 1px dashed var(--sat-border-strong);
  border-radius: var(--sat-radius);
  background: var(--sat-surface);
  color: var(--sat-muted);
  content: "Diese Seite ist vorbereitet und kann mit Divi oder dem WordPress-Editor befüllt werden.";
  text-align: center;
}

.satello-not-found {
  position: relative;
  display: grid;
  min-height: min(720px, 82vh);
  padding: clamp(120px, 15vw, 180px) 0 clamp(84px, 12vw, 140px);
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 18%, color-mix(in srgb, var(--sat-accent), transparent 82%), transparent 23%),
    linear-gradient(145deg, var(--sat-surface), #fff 70%);
  place-items: center;
}

.satello-not-found__content {
  position: relative;
  z-index: 1;
  max-width: 860px;
  text-align: center;
}

.satello-not-found__code {
  margin: 0 0 -20px;
  color: color-mix(in srgb, var(--sat-primary), transparent 94%);
  font-family: var(--sat-heading-font, "Quicksand", Arial, sans-serif);
  font-size: clamp(8rem, 22vw, 16rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.9;
  user-select: none;
}

.satello-not-found h1 {
  max-width: 760px;
  margin: 14px auto 22px;
  color: var(--sat-text);
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 1.06;
}

.satello-not-found__content > p:not(.satello-not-found__code) {
  max-width: 660px;
  margin: 0 auto;
  color: var(--sat-muted);
  font-size: var(--sat-body-size, 16px);
  line-height: 1.75;
}

.satello-not-found__actions {
  justify-content: center;
  margin-top: 34px;
}

.satello-not-found__orbit {
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--sat-accent), transparent 68%);
  border-radius: 50%;
  pointer-events: none;
}

.satello-not-found__orbit--one {
  top: -190px;
  right: -140px;
  width: 540px;
  height: 540px;
  box-shadow: 0 0 0 58px color-mix(in srgb, var(--sat-accent), transparent 94%);
}

.satello-not-found__orbit--two {
  bottom: -250px;
  left: -210px;
  width: 550px;
  height: 550px;
  border-color: color-mix(in srgb, var(--sat-primary), transparent 84%);
}

@media (max-width: 980px) {
  .satello-content-page__main {
    padding-top: 72px;
  }
}

@media (max-width: 782px) {
  body.admin-bar .satello-content-page__main {
    padding-top: 72px;
  }
}

@media (max-width: 600px) {
  .satello-content-page__content > :where(p, h2, h3, h4, h5, h6, ul, ol, blockquote, table, figure, form, .wp-block-group:not(.alignfull):not(.alignwide)) {
    width: min(calc(100% - 32px), 920px);
  }
}
