body {
    overflow-x: initial !important;
    background-color: #000;
}

.container {
    background: #001;
    min-height: 200vh;
}

.sequence-wrapper {
    position: relative;
    height: 100vh;
}

.next-section {
    width: 100%;
    height: 150vh;
    background: transparent;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 2rem;
    padding: 6vh 6vw;
    position: relative;
    z-index: 30;
}

/* .next-visual-slot {
    width: min(46vw, 760px);
    height: min(72vh, 760px);
    border: 2px solid #1f75cb;
    border-radius: 4px;
    justify-self: center;
    align-self: center;
    pointer-events: none;
} */

.next-copy {
    justify-self: start;
    max-width: min(42vw, 760px);
    position: sticky;
    top: 50vh;
    transform: translateY(-50%);
    align-self: center;
}

#nextSection .next-copy h2 {
    margin-top: 0;
    color: var(--wp--preset--color--ast-orange,#F5A145);
    font-size: 70px;
    line-height: 120%;
    margin-bottom: 8px;
}

#nextSection .next-copy h3 {
    color: var(--wp--preset--color--ast-orange,#F5A145);
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 19px;
    line-height: 120%;
    margin-top: 0;
}

#nextSectionTwo .next-copy h2 {
    margin-top: 0;
    color: var(--wp--preset--color--ast-orange,#F5A145);
    font-size: 44px;
    line-height: 100%;
    margin-bottom: 8px;
}

#nextSectionTwo .next-copy h3 {
    color: var(--wp--preset--color--ast-orange,#F5A145);
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 14px;
    line-height: 142%;
    margin-top: 0;
    order: -1;
}

.next-copy p {
    color: hsla(0, 0%, 100%, 1);
    /* font-size: clamp(16px, 1.45vw, 26px); */
    font-size: 16px;
    line-height: 1.45;
    font-weight: 400;
    line-height: 142%;
}

.next-copy ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.next-copy ul li {
    padding-left: 32px;
    margin: 14px 0;
    position: relative;
}

.next-copy ul li:before {
    content: '';
    width: 20px;
    height: 20px;
    /* background-color: var(--wp--preset--color--ast-orange,#F5A145); */
    background-image: url("/wp-content/themes/spacemobile-2025/assets/images/checkmark.svg");
    background-size: 20px;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 50%;
    position: absolute;
    left: 0;
    top: 4px;
}

#nextSectionTwo {
    height: 150vh;
}

#nextSectionTwo .next-copy {
    position: sticky;
    top: 50vh;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
}

.final-network-section {
    width: 100%;
    min-height: 150vh;
    position: relative;
    z-index: 32;
    display: grid;
    justify-items: center;
    align-items: end;
    padding: 6vh 6vw 6vh;
    text-align: center;
}

/* Копи: desktop — sticky към долния край; .post-next-three-cover (z 40) покрива отгоре */
#nextSectionThree.final-network-section {
    align-items: end;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
}

#nextSectionThree .final-network-copy {
    position: -webkit-sticky;
    position: sticky;
    top: auto;
    bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
    z-index: 0;
    align-self: end;
    max-width: min(980px, 86vw);
    width: 100%;
    box-sizing: border-box;
}

/* .post-next-three-cover {
    position: relative;
    z-index: 40;
    min-height: 200vh;
    background: #000;
} */

.final-network-copy h2 {
    color: var(--wp--preset--color--ast-orange,#F5A145);
    font-size: clamp(36px, 5.2vw, 80px);
    line-height: 1.05;
    margin-bottom: 18px;
}

.final-network-copy p {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(18px, 1.6vw, 28px);
    line-height: 1.45;
}

.globe-section {
    position: relative;
    height: 800vh; /* свободен скрол докато globe е sticky */
    background: #000011;
}

#globeViz {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    background: #000;
    overflow: hidden;
    pointer-events: none;
}

.globe-story-panel {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    pointer-events: none;
    z-index: 20;
}

.globe-story-card {
    width: min(500px, 88vw);
    margin-left: 6vw;
    pointer-events: auto;
    color: #fff;
}

.globe-story-content {
    position: relative;
    min-height: 260px;
}

.globe-tabs {
    display: flex;
    gap: 32px;
    padding-bottom: 8px;
    position: relative;
}

.globe-tabs:after {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 1);
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
}

.globe-tab {
    background: transparent;
    border: 0;
    color: hsla(0, 0%, 58%, 1);
    font-size: 16px;
    font-family: "Geist", sans-serif;
    font-weight: semibold;
    line-height: 1.1;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
    border-bottom: 1px solid;
    padding-bottom: 8px;
    margin-bottom: -8px;
    border-bottom-color: transparent;
    z-index: 2;
}

.globe-tab:hover,
.globe-tab.active {
    color: var(--wp--preset--color--ast-orange,#F5A145);
}

.globe-tab.active {
    border-bottom-color: var(--wp--preset--color--ast-orange,#F5A145);
}

.globe-story-body {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(12px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 1s ease, transform 1s ease, visibility 0s linear 1s;
}

.globe-story-body.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: opacity 1s ease, transform 1s ease, visibility 0s linear 0s;
}

.globe-story-body h3 {
    color: var(--wp--preset--color--ast-orange,#F5A145);
    font-size: 28px;
    margin-bottom: 8px;
    margin-top: 40px;
    line-height: 120%;
}

.globe-story-body p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    line-height: 142%;
    max-width: 46ch;
}

#main {
    position: relative;
}

#main:before {
    content: '';
    width: 100vw;
    height: 150vh;
    /* background: #000011; */
    background: linear-gradient(to bottom, transparent 0px, #000 70px),linear-gradient(to top, #000 0px, transparent 30px);
    position: absolute;
    left: 50%;
    top: -50px;
    transform: translateX(-50%);

}

.footer-nav {
    position: relative;
    z-index: 10;
    background: #000 !important;
  }
  
  .last-static-section:before {
    content: '';
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 81.74%, #000 100%), linear-gradient(0deg, rgba(0, 0, 0, 0.49), rgba(0, 0, 0, 0.49));
    width: 100%;
    height: 100%;
    left: 0;
    position: absolute;
  }

  @media (max-width: 768px) {
    #main:before {
        height: 300vh;
    }
    .final-network-copy {
      opacity: 0;
    }

    /* Мобилно: обратното — sticky към горната част; следващата секция пак го покрива */
    #nextSectionThree.final-network-section {
        align-items: start;
        padding-top: max(0.5rem, env(safe-area-inset-top, 0px));
        padding-bottom: 6vh;
    }

    #nextSectionThree .final-network-copy {
        opacity: 1;
        position: -webkit-sticky;
        position: sticky;
        top: max(50px, env(safe-area-inset-top, 0px));
        bottom: auto;
        align-self: start;
        padding: 0 4vw max(0.5rem, env(safe-area-inset-bottom, 0px));
    }

    #globeViz {
        background: transparent;
    }

    #globeViz > div {
        top: 20vh;
    }

    .globe-tabs::after {
        display: none;
    }
      .next-section {
          width: calc(100vw - 28px);
          grid-template-columns: 1fr;
          gap: 1rem;
          padding: 4vh 0;
          margin: 0 auto;
      }

      .next-copy {
          max-width: 100%;
          justify-self: stretch;
          top: 80px !important;
          transform: translateY(0) !important;
      }

      .next-copy:before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100vw;
        height: 120%;
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.34) 28%,
            rgba(0, 0, 0, 0.34) 72%,
            rgba(0, 0, 0, 0) 100%
        );
        z-index: -1;
      }

      #nextSection .next-copy h2 {
        font-size: 50px;
      }

      .globe-story-panel {
        top: 66px;
          align-items: flex-start;
          padding: calc(env(safe-area-inset-top, 0px) + 6px) 10px 0;
      }

      .globe-story-card {
          width: 100%;
          margin-left: 0;
          max-width: none;
          padding: 0;
          border-radius: 0;
          background: transparent;
      }

      .globe-tabs {
          display: flex;
          flex-wrap: nowrap;
          gap: 3px;
          overflow-x: auto;
          -webkit-overflow-scrolling: touch;
          scrollbar-width: none;
          border-bottom: 0;
          padding: 8px 6px 10px;
          margin-bottom: 0;
          border-radius: 14px;
          background: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.22));
          backdrop-filter: blur(8px);
      }

      .globe-tabs::-webkit-scrollbar {
          display: none;
      }

      .globe-tab {
          flex: 0 0 auto;
          margin-bottom: 0;
          padding: 7px;
          border: 1px solid rgba(255, 255, 255, 0.26);
          border-radius: 10px;
          background: rgba(4, 10, 24, 0.56);
          font-size: 11px;
          line-height: 1;
          white-space: nowrap;
      }

      .globe-tab.active {
          border-color: #f0a654;
          background: rgba(240, 166, 84, 0.22);
      }

      .globe-story-content {
          min-height: 0;
          position: static;
          padding: 12px;
          border-radius: 12px;
          background: linear-gradient(to bottom, rgba(0, 0, 0, 0.52) 50%, rgba(0, 0, 0, 0) 100%);
      }

      .globe-story-body {
          position: static;
          inset: auto;
          display: none;
          transform: none;
          transition: none;
      }

      .globe-story-body.active {
          display: block;
      }

      .globe-story-body h3 {
          font-size: 24px;
          margin-top: 0;
      }

      .globe-story-body p {
          font-size: 14px;
          line-height: 1.45;
          max-width: 100%;
      }
  }