* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: #e9e6e1;
  color: #1e1e1e;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
}

.card {
  width: 100%;
  max-width: 560px;
  background: #fff;
  padding: 50px 40px 60px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  border-radius: 4px;
}

.header { text-align: center; margin-bottom: 50px; }

.greeting {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #8a8a8a;
  margin-bottom: 14px;
}

.title { font-size: 26px; font-weight: 700; line-height: 1.3; }

.moments { margin-bottom: 50px; }

.section-title {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 1px;
  margin-bottom: 20px;
}


 /* Контейнер карусели: стрелки по бокам, дорожка посередине */
.carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Дорожка, которая скроллится горизонтально */
.carousel-track {
  flex: 1;
  display: flex;
  gap: 10px;
  overflow-x: auto;              /* ← без этого не будет прокрутки */
  scroll-snap-type: x mandatory; /* ← прилипание к слайду */
  scroll-behavior: smooth;       /* ← плавная прокрутка */
  padding-bottom: 6px;
  scrollbar-width: none;         /* прячем скроллбар в Firefox */
  -ms-overflow-style: none;      /* прячем в IE/Edge */
}

/* Прячем скроллбар в Chrome / Safari */
.carousel-track::-webkit-scrollbar {
  display: none;
}

/* Один слайд = 1/3 ширины дорожки (3 фото в ряд) */
/* Слайд: рамка, внутри которой лежит фото */
.carousel-slide {
  flex: 0 0 calc((100% - 20px) / 3);   /* 3 фото в ряд */
  scroll-snap-align: start;
  background: #f0f0f0;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  /* высота теперь фиксированная — фото будет вписываться в неё */
  height: 200px;
}

/* Фото: вписывается целиком, НЕ обрезается */
.carousel-slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;   /* ← ключевое: вписываем без обрезки */
  display: block;
}


/* Кнопки-стрелки */
.carousel-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 20px;
  color: #333;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background: #1e1e1e;
  color: #fff;
  transform: scale(1.08);
}

/* Точки */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d0d0d0;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.2s;
}

.dot.active {
  background: #1e1e1e;
  transform: scale(1.3);
}

/* На телефоне — 2 фото в ряд */
@media (max-width: 520px) {
  .carousel-slide {
    flex: 0 0 calc((100% - 10px) / 2);
  }
}

.letter { font-size: 14px; line-height: 1.75; color: #2a2a2a; }
.letter p + p { margin-top: 26px; }

.signature {
  text-align: center;
  font-style: italic;
  margin-top: 40px !important;
  color: #4a4a4a;
}

.signature .heart {
  display: inline-block;
  color: #e63946;
  font-size: 1.4em;
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.2); }
  50% { transform: scale(1); }
  75% { transform: scale(1.15); }
}

@media (max-width: 520px) {
  .card { padding: 36px 22px 46px; }
  .title { font-size: 22px; }
  .carousel-slide { flex: 0 0 calc((100% - 10px) / 2); }
  .letter { font-size: 13.5px; }
}