/* ==================================================== NDST PAGE STYLES ==================================================== */

/* ========== NDST COVER ========== */
.ndst-cover {
  background-color: var(--color-accent);
  padding: 0;
  position: relative;
  width: 100%;
  background-image: url('/static/images/cover__bg.svg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.ndst-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-accent);
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

.ndst-cover>* {
  position: relative;
  z-index: 1;
}

.ndst-cover-desktop__content {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
}

.ndst-cover-desktop__image-wrapper {
  grid-column: 8 / span 12;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: var(--space-xl);
}

.ndst-cover-desktop__image {
  max-width: 93%;
  height: auto;
}

.ndst-cover-desktop__title {
  margin: 0 0 var(--space-xl);
}

.ndst-cover-desktop__title h1 {
  margin: 0;
  line-height: 120%;
}

.ndst-cover-desktop__text {
  grid-column: 3 / span 5;
  text-align: left;
  padding: 50px 0 50px;
}

.ndst-cover-desktop__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Mobile Cover */
.ndst-cover-mobile {
  display: none;
}

.ndst-cover-mobile__image-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.ndst-cover-mobile__image {
  width: 150px;
  height: auto;
  display: block;
  object-fit: contain;
  padding: var(--space-lg) 0;
}

.ndst-cover-mobile__title {
  position: relative;
  z-index: 2;
  padding: 0 var(--space-lg) var(--space-lg) var(--space-lg);
  width: 100%;
  text-align: center;
}

.ndst-cover-mobile__subtitle {
  padding-bottom: var(--space-xxl);
  text-align: left;
}

/* ========== NDST SECTIONS ========== */
.class__text-block .text:last-child {
  margin: 0;
}

.hypermob,
.beiton,
.gentest,
.ndst-diagnostic {
  padding: var(--section-padding) 0;
}

.ndst-section .list__item::before {
  content: none;
}

/* Beiton specific - narrow layout (columns 3-8) */
.beiton__content {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}

.beiton__content>* {
  grid-column: 3 / span 8;
}

/* -------------------------------------------------------- BEITON -------------------------------------------------------- */
.beiton__test-title {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.beiton__text {
  margin-bottom: var(--space-xxl);
}

.beiton__test-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.beiton__test-item {
  display: flex;
  flex-direction: column;
  border-radius: var(--border-radius);
  overflow: hidden;
  background: var(--color-white);
  box-shadow: var(--shadow);
}

.beiton__test-item-header {
  background: var(--color-primary);
  padding: var(--space-md) var(--space-lg);
}

.beiton__test-item-header h4 {
  color: var(--color-white);
  margin: 0;
  text-align: center;
}

.beiton__test-item-text {
  padding: var(--space-lg) var(--space-lg) 0;
  line-height: 1.5;
}

.beiton__test-image-wrapper {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-lg);
  overflow: hidden;
}

.beiton__test-image {
  max-width: 100%;
  max-height: 260px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.beiton-result__header {
  text-align: center;
  margin: 0 0 var(--space-xl);
}

/* ========== MOBILE STYLES ========== */
@media (max-width: 768px) {
  .ndst-cover {
    background-color: var(--color-accent);
    padding: 0;
    position: relative;
    width: 100%;
    background-image: url('/static/images/cover__bg.svg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
  }

  .ndst-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--color-accent);
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
  }

  .ndst-cover>* {
    position: relative;
    z-index: 1;
  }

  .ndst-cover-desktop {
    display: none;
  }

  .ndst-cover-mobile {
    display: block;
    width: 100%;
    text-align: center;
  }

  .ndst-cover-mobile__image {
    width: 120px;
    padding: var(--space-xl) 0;
  }

  .ndst-cover-mobile__title {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: center;
    padding: 0;
  }

  .ndst-cover-mobile__title h1 {
    font-size: 1.6rem;
    margin-bottom: var(--space-xl);
  }

  .ndst-cover-mobile__subtitle h3 {
    font-size: 1.5rem;
    line-height: 1.2;
  }

  /* Section Headers - Mobile (center aligned) */
  .hypermob__header,
  .beiton__header,
  .gentest__header,
  .ndst-diagnostic__header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
  }

  .hypermob__icon,
  .beiton__icon,
  .gentest__icon,
  .ndst-diagnostic__icon {
    justify-content: center;
  }

  .hypermob__icon img,
  .beiton__icon img,
  .gentest__icon img,
  .ndst-diagnostic__icon img {
    width: 45px;
  }

  /* Section Content - Mobile */
  .hypermob__content,
  .beiton__content,
  .gentest__content,
  .ndst-diagnostic__content {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .hypermob__content>*,
  .beiton__content>*,
  .gentest__content>*,
  .ndst-diagnostic__content>* {
    grid-column: 1 / -1;
  }

  /* Beiton Mobile */
  .beiton__test-list {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .beiton__test-item-header {
    padding: var(--space-sm) var(--space-md);
  }

  .beiton__test-item-text {
    padding: var(--space-md) var(--space-md) 0;
  }

  .beiton__test-image-wrapper {
    padding: var(--space-md);
  }

  .beiton__test-image {
    max-height: 220px;
  }

  .beiton__text {
    margin-bottom: var(--space-xl);
  }
}

/* ========== TABLET STYLES ========== */
@media (min-width: 769px) and (max-width: 1024px) {
  .ndst-cover-desktop__content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .ndst-cover-desktop__image-wrapper {
    grid-column: 1 / -1;
    justify-content: center;
    padding: var(--space-lg) 0;
  }

  .ndst-cover-desktop__text {
    grid-column: 2 / span 10;
    text-align: center;
  }

  /* Beiton Tablet */
  .beiton__content>* {
    grid-column: 3 / span 8;
  }

  .beiton__test-list {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}