/* Страница Остеохондроз — стили по макету */

/* Единый градиент от шапки до футера */
body.page-osteohondroz {
  min-height: 100vh;
  background: linear-gradient(to bottom, #132931 0%, #004969 83%, rgba(0, 73, 105, 0) 100%);
  background-color: #132931;
}

/* Hero: картинка поверх градиента (фон только картинка) */
.hero-osteohondroz {
  position: relative;
  min-height: 420px;
  background: transparent;
  display: flex;
  align-items: center;
  padding: 3rem 0;
  overflow: hidden;
}
.hero-osteohondroz__bg {
  position: absolute;
  inset: 0;
  background: url("../images/knee-paint-medicine-anatomy-body-tibia-accident-health-scan-treatment-red-leg-injury-care 1.jpg") center / cover no-repeat;
  z-index: 0;
}
/* Плавный переход нижней части изображения в градиент */
.hero-osteohondroz__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #0A3044 3%, #0A3044 15%, rgba(13, 39, 52, 0) 70%);
  pointer-events: none;
}
.hero-osteohondroz__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
.hero-osteohondroz__content {
  flex: 0 1 55%;
  min-width: 0;
}
.hero-osteohondroz__title {
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 700;
  color: #fff;
  margin: 0 0 1.5rem 0;
  line-height: 1.1;
}
.hero-osteohondroz__title-line1 {
  display: block;
  font-size: clamp(36px, 5vw, 69px);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.hero-osteohondroz__title-line2 {
  display: block;
  font-size: clamp(48px, 12vw, 179px);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.hero-osteohondroz__text {
  font-family: "Rubik", sans-serif;
  font-size: 20px;
  line-height: 1.5;
  color: #32E0FF;
  margin: 0;
  max-width: 100%;
}
.hero-osteohondroz__illus {
  flex: 0 0 40%;
  max-width: 400px;
  display: flex;
  justify-content: flex-end;
}
.hero-osteohondroz__img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Блок белой карточки */
.osteohondroz-block {
  padding: 0 0 4rem;
  margin-top: -2rem;
}
.osteohondroz-card {
  position: relative;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.osteohondroz-card__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #7B7B7B;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.osteohondroz-card__close:hover {
  background: #f0f0f0;
  color: #1E1E1E;
}
.osteohondroz-card__title {
  font-family: "Rubik", sans-serif;
  font-weight: 700;
  font-size: 30px;
  color: #0454BC;
  text-transform: uppercase;
  margin: 0 0 1rem 0;
}
.osteohondroz-card__text {
  font-family: "Rubik", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #7B7B7B;
  margin: 0 0 1rem 0;
}
.osteohondroz-card__text p {
  margin: 0 0 0.75rem 0;
}
.osteohondroz-card__text p:last-child {
  margin-bottom: 0;
}
.osteohondroz-card__text--collapsed {
  max-height: 6em;
  overflow: hidden;
  position: relative;
}
.osteohondroz-card__text--collapsed::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3em;
  background: linear-gradient(transparent, #fff);
  pointer-events: none;
}
.btn-osteohondroz-collapse {
  background: #0454BC;
  color: #fff;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  font-family: "Rubik", sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-osteohondroz-collapse:hover {
  background: #0349a3;
  color: #fff;
}

/* Видео в карточке */
.osteohondroz-video__title {
  font-family: "Rubik", sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: #1E1E1E;
  margin: 0 0 0.75rem 0;
}
.osteohondroz-video {
  margin-bottom: 0.5rem;
}
.osteohondroz-video__link {
  display: block;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #000;
}
.osteohondroz-video__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.osteohondroz-video__link {
  position: relative;
}
.osteohondroz-video__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  background: rgba(4, 84, 188, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.osteohondroz-video__play::after {
  content: "";
  margin-left: 6px;
  border: 16px solid transparent;
  border-left-color: #fff;
  border-right: 0;
  height: 0;
  width: 0;
}
.osteohondroz-video__rutube {
  font-family: "Rubik", sans-serif;
  font-size: 14px;
  color: #0454BC;
  text-decoration: none;
}
.osteohondroz-video__rutube:hover {
  text-decoration: underline;
  color: #0349a3;
}

/* Карусель статей */
.osteohondroz-carousel-block {
  padding: 2rem 0 4rem;
}
.osteohondroz-carousel-block .carousel-inner {
  overflow: hidden;
}
/* Мобильная: один слайд — одна карточка, переключение кнопками */
.osteohondroz-carousel-block .carousel-item {
  width: 100%;
}
.osteohondroz-carousel-block .carousel-item .osteohondroz-articles-row {
  margin: 0;
}
.osteohondroz-carousel-block .carousel-item .col-12 {
  max-width: 100%;
}
/* Десктоп: все 4 карточки в один ряд без слайдера */
@media (min-width: 992px) {
  .osteohondroz-carousel-block .osteohondroz-carousel-inner {
    display: flex !important;
    flex-wrap: nowrap;
    overflow: visible;
    transform: none !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  .osteohondroz-carousel-block .carousel-item {
    flex: 0 0 25% !important;
    width: 25% !important;
    min-width: 200px;
    max-width: 25%;
    display: block !important;
    margin-right: 0;
    box-sizing: border-box;
  }
  .osteohondroz-carousel-block .carousel-item .row {
    display: block;
    width: 100%;
    margin: 0;
  }
  .osteohondroz-carousel-block .carousel-item .col-lg-3 {
    max-width: 100% !important;
    width: 100% !important;
    flex: none;
  }
  .osteohondroz-carousel-block .carousel-item .osteohondroz-article-card {
    width: 100%;
    min-width: 0;
  }
  .osteohondroz-carousel-block .osteohondroz-article-card__title {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  .osteohondroz-carousel-block .osteohondroz-carousel__btn {
    display: none;
  }
}
.osteohondroz-carousel-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}
.osteohondroz-carousel-wrap .container {
  max-width: 1200px;
  padding-left: 1rem;
  padding-right: 1rem;
  flex: 1 1 auto;
  min-width: 0;
}
@media (min-width: 992px) {
  .osteohondroz-carousel-wrap .container {
    min-width: 800px;
  }
  #osteohondrozCarousel {
    width: 100%;
  }
  #osteohondrozCarousel.carousel {
    overflow: visible;
  }
}
.osteohondroz-carousel__btn {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border: none;
  background: #0454BC;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.osteohondroz-carousel__btn:hover {
  background: #0349a3;
  color: #fff;
}
.osteohondroz-article-card {
  background: #D9D9D9;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  padding: 1.25rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.osteohondroz-article-card__title {
  font-family: "Rubik", sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: #1E1E1E;
  text-transform: uppercase;
  margin: 0 0 1rem 0;
}
.osteohondroz-article-card__video {
  display: block;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #000;
  margin-bottom: 0.5rem;
}
.osteohondroz-article-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.osteohondroz-article-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(4, 84, 188, 0.9);
  border-radius: 50%;
}
.osteohondroz-article-card__play::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-40%, -50%);
  border: 12px solid transparent;
  border-left-color: #fff;
  border-right: 0;
  height: 0;
  width: 0;
}
.osteohondroz-article-card__video {
  position: relative;
}
.btn-osteohondroz-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: #0454BC;
  color: #fff;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  font-family: "Rubik", sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  text-decoration: none;
  margin-top: auto;
  align-self: center;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-osteohondroz-more:hover {
  background: #0349a3;
  color: #fff;
}

/* Мобильная адаптация страницы остеохондроза */
@media (max-width: 991.98px) {
  .hero-osteohondroz {
    min-height: auto;
    padding: 2rem 0;
  }
  .hero-osteohondroz__inner {
    flex-direction: column;
    text-align: center;
    padding: 0 1rem;
  }
  .hero-osteohondroz__content {
    flex: 1 1 auto;
    max-width: 100%;
  }
  .hero-osteohondroz__title-line1 {
    font-size: clamp(28px, 6vw, 69px);
  }
  .hero-osteohondroz__title-line2 {
    font-size: clamp(36px, 10vw, 120px);
    white-space: normal;
    word-break: break-word;
  }
  .hero-osteohondroz__text {
    font-size: 18px;
    padding: 0 0.5rem;
  }
  .hero-osteohondroz__illus {
    order: -1;
    max-width: 280px;
    margin: 0 auto;
  }
  .osteohondroz-block {
    margin-top: -1rem;
    padding: 0 0 2rem;
  }
  .osteohondroz-card {
    margin: 0 1rem;
    padding: 1.25rem;
    border-radius: 20px;
  }
  .osteohondroz-card__title {
    font-size: 20px;
  }
  .osteohondroz-card__text {
    font-size: 15px;
  }
  .btn-osteohondroz-collapse {
    min-height: 44px;
    padding: 0.5rem 1.5rem;
  }
  .osteohondroz-carousel-wrap {
    gap: 0.5rem;
    padding: 0 0.5rem;
  }
  .osteohondroz-carousel-wrap .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .osteohondroz-carousel__btn {
    min-width: 44px;
    min-height: 44px;
    flex-shrink: 0;
  }
  .osteohondroz-article-card {
    padding: 1rem;
  }
  .osteohondroz-article-card__title {
    font-size: 20px;
  }
  .btn-osteohondroz-more {
    min-height: 44px;
    padding: 0.5rem 1.25rem;
  }
}
@media (max-width: 575.98px) {
  .hero-osteohondroz__title-line1 { font-size: 24px; }
  .hero-osteohondroz__title-line2 { font-size: 32px; }
  .hero-osteohondroz__text { font-size: 16px; }
  .osteohondroz-card { margin: 0 0.5rem; padding: 1rem; }
  .osteohondroz-carousel-wrap {
    justify-content: space-between;
  }
  .osteohondroz-carousel__btn {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
}

/* Модальное окно: видео Rutube на сайте */
.osteohondroz-video-modal .modal-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.osteohondroz-video-modal .modal-body .ratio {
  background: #000;
}
.osteohondroz-video-modal iframe {
  border: none;
}
@media (max-width: 575.98px) {
  .osteohondroz-video-modal .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }
}
