* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 16px;
  background-color: #1a1a2e;
  color: #eee;
  line-height: 1.5;
}

.page-header {
  text-align: center;
  padding: 20px;
  background: #16213e;
  border-bottom: 1px solid #0f3460;
}
.page-header__title {
  font-size: 2rem;
  margin-bottom: 15px;
}
.page-header__image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.main-nav {
  margin: 15px 0;
}
.main-nav__link {
  display: inline-block;
  background-color: #e94560;
  color: white;
  text-decoration: none;
  padding: 10px 25px;
  border-radius: 40px;
  font-weight: bold;
  transition: background-color 0.2s, transform 0.1s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.main-nav__link:hover {
  background-color: rgb(224.4519230769, 26.5480769231, 59.1298076923);
  transform: scale(1.02);
}
.main-nav__link:active {
  transform: scale(0.98);
}

.trains {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.trains__title {
  font-size: 1.8rem;
  margin-bottom: 30px;
  text-align: center;
  color: #e94560;
}
.trains__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.train-card {
  background: #16213e;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.train-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}
.train-card--sale {
  border: 2px solid #f39c12;
  background: rgb(17.9928571429, 26.9892857143, 50.7071428571);
}
.train-card__image {
  width: 100%;
  height: 200px;
  -o-object-fit: cover;
     object-fit: cover;
  display: block;
}
.train-card__title {
  font-size: 1.5rem;
  margin: 15px 20px 10px;
  color: #eee;
}
.train-card__description {
  padding: 0 20px;
  margin-bottom: 20px;
  color: #aaa;
  font-size: 0.9rem;
  max-height: 300px;
  overflow-y: auto;
  position: relative;
}
.train-card__description p {
  margin-bottom: 10px;
}
.train-card__description::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(to top, #16213e, transparent);
  pointer-events: none;
}
.train-card__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  padding: 10px 20px 20px;
  border-top: 1px solid #0f3460;
}
.train-card__price--sale {
  background: rgb(28.6785714286, 43.0178571429, 80.8214285714);
}
.train-card__price-value {
  font-size: 1.4rem;
  font-weight: bold;
  color: #fff;
}
.train-card__price-old {
  font-size: 1.1rem;
  color: #aaa;
  text-decoration: line-through;
}
.train-card__price-new {
  font-size: 1.4rem;
  font-weight: bold;
  color: #f39c12;
}
.train-card__price-discount {
  background-color: #f39c12;
  color: #000;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: bold;
}
.train-card__buy {
  display: block;
  width: calc(100% - 40px);
  margin: 0 20px 20px;
  padding: 12px;
  background-color: #e94560;
  border: none;
  border-radius: 40px;
  color: white;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}
.train-card__buy:hover {
  background-color: rgb(224.4519230769, 26.5480769231, 59.1298076923);
  transform: scale(1.02);
}
.train-card__buy:active {
  transform: scale(0.98);
}
.train-card__buy--sale {
  background-color: #f39c12;
  color: #000;
}
.train-card__buy--sale:hover {
  background-color: rgb(199.8795180723, 126.5060240964, 10.1204819277);
}

.contacts {
  padding: 20px;
  background: #16213e;
  margin-top: 40px;
  text-align: center;
}
.contacts__title {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #e94560;
}
.contacts__info {
  font-style: normal;
  line-height: 1.6;
  font-size: 1rem;
}

.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #e94560;
  border: none;
  color: white;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  display: none;
  z-index: 1000;
  transition: opacity 0.2s, transform 0.2s;
}
.scroll-to-top:hover {
  background-color: rgb(224.4519230769, 26.5480769231, 59.1298076923);
  transform: scale(1.1);
}
.scroll-to-top--visible {
  display: block;
}

@media (max-width: 768px) {
  .trains {
    padding: 15px;
  }
  .trains__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .train-card__image {
    height: 180px;
  }
  .train-card__title {
    font-size: 1.3rem;
  }
  .train-card__description {
    max-height: 150px;
    font-size: 0.85rem;
  }
  .train-card__price {
    flex-direction: column;
    align-items: flex-start;
  }
  .contacts__info {
    font-size: 0.9rem;
  }
  .scroll-to-top {
    width: 40px;
    height: 40px;
    font-size: 22px;
    bottom: 20px;
    right: 20px;
    opacity: 0.7;
  }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .trains__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}/*# sourceMappingURL=styles.css.map */