:root {
  --red: #f24e2e;
  --blue: #afbcc1;
  --speed: 60s;
  /* Базовые размеры для десктопа */
  --card-gap: 2vw;
  --postcard-width: 20vw;
  --note-size: 15vw;
}
/* Адаптив под мобилки */
@media (max-width: 768px) {
  :root {
    --card-gap: 4vw;
    --postcard-width: 45vw; /* На мобилке 2 штуки почти в ряд */
    --note-size: 30vw; /* На мобилке 3 штуки почти в ряд */
    --speed: 110s; /* На маленьком экране можно чуть быстрее */
  }
  .header {
    padding: 5vw !important;
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }

  .nav a {
    margin: 0 10px !important;
  }

  .description {
    font-size: 1rem !important;
    padding: 0 5vw;
  }
}

body {
  margin: 0;
  font-family: "Helvetica", sans-serif; /* Подойдет под твой стиль */
  transition: background-color 0.3s ease;
  overflow-x: hidden;
}

body.page-postcards {
  background-color: var(--red);
  color: white;
}
body.page-notes {
  background-color: var(--blue);
  color: white;
}

.header {
  display: flex;
  justify-content: space-between;
  padding: 3vw 5vw;
  font-weight: bold;
  font-size: 1.2rem;
}

.nav a {
  color: white;
  text-decoration: none;
  margin-left: 2.5rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.nav a.active {
  opacity: 1;
  text-decoration: underline;
}

.description {
  text-align: center;
  max-width: 45rem;
  margin: 0 auto 4rem;
  font-size: 1.25rem;
  line-height: 1.4;
  text-transform: lowercase;
}

/* Контейнер строк */
.marquee-row {
  display: flex;
  overflow: hidden;
  margin-bottom: var(--card-gap);
}

.marquee-content {
  display: flex;
  flex-shrink: 0;
  gap: var(--card-gap);
  padding-right: var(--card-gap);
  animation: scroll var(--speed) linear infinite;
}

.marquee-row:hover .marquee-content {
  animation-play-state: paused;
}

.reverse .marquee-content {
  animation-direction: reverse;
}

/* Карточки */
.card {
  background: white;
  flex-shrink: 0;
  border-radius: 4px; /* Легкое скругление для аккуратности */
  overflow: hidden;
}

.page-postcards .card {
  width: var(--postcard-width);
  height: auto;
}

.page-notes .card {
  width: var(--note-size);
  height: var(--note-size);
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}
