/* Main page smoothing layer: softer transitions, less harsh black/white jumps */

.hero {
  background: linear-gradient(
    180deg,
    rgba(14, 24, 36, 0.72) 22%,
    rgba(21, 34, 49, 0.78) 56%,
    rgba(30, 47, 66, 0.88) 100%
  ) !important;
}

.hero__title,
.hero__text {
  text-shadow: 0 4px 18px rgba(6, 20, 33, 0.38);
}

.about-company,
.our-services,
.why-us,
.news,
.train-form__container,
.rails-form__container,
.laboratory {
  position: relative;
}

.our-services__item,
.why-us__item,
.news__item,
.train-form__service-btn,
.dropdown-main,
.rails-form__input,
.rails-form__btn {
  transition: background-color 0.26s ease, border-color 0.26s ease, box-shadow 0.26s ease, color 0.26s ease;
}

/* Remove abrupt pure black surfaces */
.rails-form__input {
  background-color: rgba(23, 34, 47, 0.78) !important;
  border-color: rgba(218, 232, 245, 0.44) !important;
}

.dropdown-main {
  background: linear-gradient(180deg, rgba(18, 27, 38, 0.94), rgba(27, 39, 54, 0.94)) !important;
  border: 1px solid rgba(190, 213, 235, 0.26);
}

.dropdown-menu {
  background: linear-gradient(180deg, rgba(14, 23, 34, 0.96), rgba(22, 34, 49, 0.94)) !important;
  border: 1px solid rgba(184, 208, 231, 0.20);
}

.train-form__service-btn,
.rails-form__btn {
  box-shadow: 0 10px 22px rgba(8, 23, 38, 0.22);
}

.our-services__item {
  box-shadow: 0 8px 18px rgba(9, 30, 51, 0.14);
}

.why-us__item {
  border-color: rgba(214, 229, 244, 0.52);
}

.news__item {
  box-shadow: 0 10px 24px rgba(9, 28, 46, 0.16);
}

@media (max-width: 1024px) {
  .hero {
    background: linear-gradient(
      180deg,
      rgba(14, 24, 36, 0.66) 30%,
      rgba(23, 37, 53, 0.78) 66%,
      rgba(33, 51, 71, 0.88) 100%
    ) !important;
  }
}

/* Feedback trigger button on hero - glass style */
.hero__btn[data-src="/src/partials/modals/form-modal.html"] {
  border: 1px solid rgba(207, 230, 251, 0.44) !important;
  background: linear-gradient(180deg, rgba(232, 246, 255, 0.24), rgba(214, 233, 249, 0.18)) !important;
  color: #f7fcff !important;
  text-shadow: 0 3px 10px rgba(8, 24, 40, 0.35);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  box-shadow: 0 12px 26px rgba(9, 24, 39, 0.28);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

.hero__btn[data-src="/src/partials/modals/form-modal.html"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(9, 24, 39, 0.32);
  background: linear-gradient(180deg, rgba(240, 250, 255, 0.30), rgba(218, 237, 252, 0.24)) !important;
}

/* Hero scaling fix (single-source, non-overlap) */
@media (min-width: 769px) {
  .hero {
    padding-left: clamp(16px, 2.8vw, 48px) !important;
    padding-right: clamp(16px, 2.8vw, 48px) !important;
    height: min(92vh, 980px) !important;
  }

  .hero__title {
    font-size: clamp(34px, 3.2vw, 58px) !important;
    line-height: 1.08 !important;
    margin-top: 0 !important;
    margin-bottom: clamp(16px, 2vw, 34px) !important;
    max-width: min(92vw, 1500px) !important;
    text-align: left !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
  }

  .hero__text {
    font-size: clamp(16px, 1.35vw, 28px) !important;
    line-height: 1.3 !important;
    max-width: min(92vw, 1500px) !important;
    text-align: left !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
  }
}
