/* Подключение шрифта Garamond */
@font-face {
  font-family: "Garamond";
  src: url("fonts/Garamond/Garamond - Garamond - Regular.ttf")
    format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Garamond";
  src: url("fonts/Garamond/Garamond-Bold - Garamond - Bold.ttf")
    format("truetype");
  font-weight: bold;
  font-style: normal;
}

/* Подключение шрифта Ceremonious One */
@font-face {
  font-family: "Ceremonious One";
  src: url("fonts/Ceremonious One/ceremoniousone.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

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

body {
  font-family: "Cormorant Garamond", "Georgia", serif;
  background: #f5f5f0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 0;
  -webkit-overflow-scrolling: touch;
  overflow-x: hidden;
}

/* Стили для первой страницы - ограничение высоты до 100vh с небольшой прокруткой для Safari */
html.first-page,
body.first-page {
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
}

body.first-page {
  align-items: flex-start;
  padding-top: 0;
}

body.first-page .invitation-container {
  min-height: calc(100vh + 150px);
  width: 100%;
}

body.first-page .invitation-card {
  min-height: calc(100vh + 150px);
}

body.first-page .invitation-content {
  min-height: calc(100vh + 150px);
}

.invitation-container {
  width: 100%;
  position: relative;
}

.invitation-card {
  position: relative;
  width: 100%;
  min-height: calc(100vh + 200px);
  background: #f7f2eb;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.background-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 1;
  z-index: 1;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.invitation-content {
  position: relative;
  z-index: 2;

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #0a1342;
  min-height: calc(100vh + 200px);
}

/* Заголовок WEDDING DAY */
.wedding-day {
  margin-top: 80px;
  font-size: 18px;
  font-weight: bold;
  line-height: auto;
  letter-spacing: 1.5px;
  color: #0a1342;
  font-family: "Cormorant Garamond", "Georgia", serif;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeInDownFallback 0.8s ease-out 6s forwards;
}

.invitation-content.animations-ready .wedding-day {
  animation: fadeInDown 0.8s ease-out 0.2s forwards !important;
}

/* Дата */
.wedding-date {
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
  letter-spacing: 1.2px;
  margin-bottom: 25px;
  color: #0a1342;
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum", "tnum";
  white-space: nowrap;
  display: inline-block;
  vertical-align: baseline;
  text-rendering: optimizeLegibility;
  opacity: 0;
  transform: translateY(-15px);
  animation: fadeInDownFallback 0.8s ease-out 6s forwards;
}

.invitation-content.animations-ready .wedding-date {
  animation: fadeInDown 0.8s ease-out 0.4s forwards !important;
}

/* Имена */
.names {
  font-weight: 400;
  color: #0a1342;
  font-family: "Luxurious Script", cursive;
  white-space: nowrap;
  font-family: Luxurious Script;
  font-weight: 400;
  font-size: 70px;
  text-transform: capitalize;
  line-height: 1;
  position: relative;
  z-index: 3;
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  animation: fadeInScaleFallback 1s ease-out 6s forwards;
}

.invitation-content.animations-ready .names {
  animation: fadeInScale 1s ease-out 0.6s forwards !important;
}

/* Корона */
.crown-decoration {
  margin: 15px 0 25px;
  width: 120px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.crown-svg {
  width: 100%;
  height: 100%;
}

/* Герб */
.coat-of-arms {
  top: -10px;
  width: 210px;
  height: 310px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
  opacity: 0;
  animation: coatOfArmsAppearFallback 1.5s ease-out 6s forwards;
}

.invitation-content.animations-ready .coat-of-arms {
  animation: coatOfArmsAppear 1.5s ease-out 0.8s forwards !important;
}

.coat-of-arms-img {
  width: 100%;
  height: 100%;
  object-fit: contain;

  transform-origin: center center;
}

/* Анимация появления герба - главный акцент */
@keyframes coatOfArmsAppear {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.85);
  }
  60% {
    opacity: 0.9;
    transform: translateY(-5px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Дополнительная анимация легкого свечения для герба */
@keyframes coatOfArmsGlow {
  0%,
  100% {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  }
  50% {
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.4));
  }
}

.coat-of-arms.animated .coat-of-arms-img {
  animation: coatOfArmsGlow 4s ease-in-out infinite;
}

/* Латинская фраза */
.latin-phrase {
  font-size: 20px;
  font-style: italic;
  margin: 20px auto 35px;
  color: #0a1342;
  font-family: "Cormorant Garamond", "Georgia", serif;
  letter-spacing: 1px;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUpFallback 0.8s ease-out 6s forwards;
}

.invitation-content.animations-ready .latin-phrase {
  animation: fadeInUp 0.8s ease-out 1s forwards !important;
}

/* Текст приглашения на русской странице */
.invitation-text {
  font-size: 19px;
  color: #0a1342;
  font-family: "Cormorant Garamond", "Georgia", serif;
  text-align: center;
  margin-top: 38px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUpFallback 0.8s ease-out 6s forwards;
  line-height: 0.8;
  font-variant: small-caps;
  font-weight: 700;
  letter-spacing: 0.1px;
}

.invitation-text .text-line-1 {
  white-space: nowrap;
  display: inline-block;
}

.invitation-content.animations-ready .invitation-text {
  animation: fadeInUp 0.8s ease-out 0.5s forwards !important;
}

/* Название места */
.location-name {
  font-size: 65px;
  font-weight: 400;
  color: #0a1342;
  font-family: "Luxurious Script", cursive;
  text-align: center;
  margin: 20px auto 0px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUpFallback 0.8s ease-out 6s forwards;
}

.invitation-content.animations-ready .location-name {
  animation: fadeInUp 0.8s ease-out 1.5s forwards !important;
}

/* Ссылка на расположение */
.view-location {
  top: -24px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 19px 68px;
  background-image: url("assets/details.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 60px;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUpFallback 0.8s ease-out 6s forwards;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Эффект пульсации при наведении */
@keyframes locationPulse {
  0%,
  100% {
    box-shadow: 0 4px 12px rgba(10, 19, 66, 0.15);
  }
  50% {
    box-shadow: 0 6px 20px rgba(10, 19, 66, 0.25);
  }
}

.view-location:hover {
  transform: translateY(-2px) scale(1.05);
  filter: brightness(1.1);
  opacity: 1;
  animation: locationPulse 2s ease-in-out infinite;
}

.view-location:active {
  transform: translateY(0) scale(0.98);
  filter: brightness(0.95);
  transition: all 0.1s ease;
  animation: none;
}

.view-location:visited,
.view-location:active,
.view-location:link {
  color: inherit;
  text-decoration: none;
}

.invitation-content.animations-ready .view-location {
  animation: fadeInUp 0.8s ease-out 1.8s forwards !important;
}

/* Улучшенные hover эффекты после завершения анимации */
.invitation-content.animations-ready .view-location:hover {
  transform: translateY(-2px) scale(1.05) !important;
}

.invitation-content.animations-ready .view-location:active {
  transform: translateY(0) scale(0.98) !important;
}

.location-text {
  position: relative;
  z-index: 2;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
  color: #0a1342;
  font-family: "Cormorant Garamond", "Georgia", serif;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-location:hover .location-text {
  color: #0d1a52;
  letter-spacing: 1.5px;
  transform: translateY(-1px);
}

.view-location:active .location-text {
  transform: translateY(0);
  color: #0a1342;
}

/* Приветствие */
.greeting {
  margin-bottom: 35px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUpFallback 0.8s ease-out 6s forwards;
}

.invitation-content.animations-ready .greeting {
  animation: fadeInUp 0.8s ease-out 1.2s forwards !important;
}

.dear {
  font-size: 64px;
  font-weight: 400;
  line-height: 50px;
  text-align: right;
  color: #0a1342;
  font-family: "Luxurious Script", cursive;
  margin-top: 30px;
}

.family-friends {
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #0a1342;
  font-family: "Cormorant Garamond", serif;
  text-transform: uppercase;
}

/* Выбор языка */
.language-selector {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUpFallback 0.8s ease-out 6s forwards;
}

.invitation-content.animations-ready .language-selector {
  animation: fadeInUp 0.8s ease-out 1.5s forwards !important;
}

.select-language-text {
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  color: #0a1342;
  font-family: "Cormorant Garamond", "Georgia", serif;
  text-transform: uppercase;
}

.flags-container {
  position: relative;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

/* Стрелка на каждом флаге через псевдоэлемент */
.flag-btn::after {
  content: "▼";
  position: absolute;
  font-size: 8px;
  color: #0a1342;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* По умолчанию стрелка видна только на итальянском флаге */
.flag-btn-italian::after {
  opacity: 1;
}

/* При hover на любой флаг - стрелка появляется на нём */
.flag-btn:hover::after {
  opacity: 1;
}

/* При hover на контейнер, но не на итальянский флаг - скрываем стрелку на итальянском */
.flags-container:hover .flag-btn-italian:not(:hover)::after {
  opacity: 0;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-3px);
  }
}

/* Общие анимации */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Fallback анимации на случай, если JavaScript не сработает */
@keyframes fadeInDownFallback {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUpFallback {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScaleFallback {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes coatOfArmsAppearFallback {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.85);
  }
  60% {
    opacity: 0.9;
    transform: translateY(-5px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.flag-btn {
  position: relative;
  background: none;
  border: none;
  text-decoration: none;
  cursor: pointer;
  padding: 5px;
  transition: all 0.3s ease;
  width: 70px;
  height: 70px;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: scale(0.8);
  animation: fadeInScaleFallback 0.6s ease-out 6s forwards;
}

.invitation-content.animations-ready .flag-btn {
  animation: none !important;
}

.invitation-content.animations-ready .flag-btn:nth-child(1) {
  animation: fadeInScale 0.6s ease-out 1.8s forwards !important;
}

.invitation-content.animations-ready .flag-btn:nth-child(2) {
  animation: fadeInScale 0.6s ease-out 1.9s forwards !important;
}

.invitation-content.animations-ready .flag-btn:nth-child(3) {
  animation: fadeInScale 0.6s ease-out 2s forwards !important;
}

.flag-btn:hover {
  transform: scale(1.1);
}

.flag-btn.active {
  transform: scale(1.15);
}

.flag-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  pointer-events: none;
}

/* Эффект рваной бумаги */
.torn-edge {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(232, 227, 216, 0.3) 50%,
    #ffffff 100%
  );
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><path d="M0,0 Q25,10 50,5 T100,0 L100,20 L0,20 Z" fill="black"/></svg>');
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
  z-index: 3;
}

/* Адаптивность */
/* Мобильные устройства - сохраняем ограниченную ширину как на десктопе */
@media (max-width: 767px) {
  body {
    padding: 0;
  }

  .invitation-container {
    max-width: 390px;
    width: 100%;
  }

  .invitation-card {
    border-radius: 8px;
    min-height: calc(100vh + 200px);
  }

  .invitation-content {
    min-height: calc(100vh + 200px);
  }

  .event-details {
    padding: 0 20px;
    min-height: 150px;
  }

  .event-date-number {
    font-size: 72px;
  }

  .event-date-month {
    font-size: 55px;
  }

  .dress-code-image {
    max-width: 100%;
    height: auto;
  }

  .dress-code-note,
  .event-description {
    font-size: 14px;
  }

  .main-date-number {
    font-size: 72px;
  }

  .main-date-month {
    font-size: 55px;
  }
}

/* Адаптация для экранов 321-389px - сохраняем ограниченную ширину */
@media (min-width: 321px) and (max-width: 389px) {
  .invitation-container {
    max-width: 390px;
  }

  .invitation-card {
    border-radius: 8px;
  }
}

/* Адаптация для экранов 390-400px - как на десктопе, без изменений */
@media (min-width: 390px) and (max-width: 400px) {
  .invitation-container {
    max-width: 390px;
  }

  .invitation-card {
    border-radius: 8px;
  }
}

/* Адаптация для экранов 401-430px - увеличиваем ширину контейнера (iPhone Pro Max) */
@media (min-width: 401px) and (max-width: 430px) {
  .invitation-container {
    max-width: 430px;
  }

  .invitation-card {
    border-radius: 8px;
  }

  .event-date-time {
    margin-top: 40px;
  }

  .dress-code-circles-section {
    gap: 67px !important;
  }
}

/* Адаптация для экранов 431-450px - небольшие корректировки */
@media (min-width: 431px) and (max-width: 450px) {
  .invitation-container {
    max-width: 390px;
  }

  /* Небольшие корректировки размеров для лучшего отображения */
  .names {
    font-size: 70px;
  }

  .location-name {
    font-size: 60px;
  }

  .event-date-number {
    font-size: 85px;
  }

  .event-date-month {
    font-size: 65px;
  }

  .main-date-number {
    font-size: 85px;
  }

  .main-date-month {
    font-size: 65px;
  }
}

/* Планшеты и компьютеры - ограниченная ширина */
@media (min-width: 768px) {
  .invitation-container {
    max-width: 390px;
  }

  .invitation-card {
    border-radius: 8px;
  }
}

@media (max-height: 900px) {
}

/* Информация о событии */
.event-details {
  position: relative;
  width: 100%;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 200px;
  opacity: 0;
  transform: translateY(20px);
  /* Убираем fallback анимацию для элементов с scroll-animate - они управляются через IntersectionObserver */
}

.invitation-content.animations-ready .event-details {
  animation: fadeInUp 0.8s ease-out 2s forwards !important;
}

/* Дата и время события */
.event-date-time {
  align-self: flex-end;
  text-align: right;
  margin-bottom: auto;
  margin-right: 20px;
}

.event-date {
  text-align: right;
  line-height: 50px;
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: flex-end;
  margin-top: 30px;
  gap: 8px;
  margin-bottom: 15px;
}

.event-date-number {
  font-family: "Ceremonious One", serif;
  font-weight: 400;
  font-style: normal;
  font-size: 96px;

  letter-spacing: 0%;
  text-align: right;
  text-transform: lowercase;
  color: #9d988d;
}

.event-date-month {
  font-family: "Ceremonious One", serif;
  font-weight: 400;
  font-style: normal;
  font-size: 73px;

  letter-spacing: 0%;
  text-align: right;
  text-transform: lowercase;
  color: #9d988d;
}

.event-time {
  font-family: "Garamond", serif;
  font-weight: 500;
  font-style: normal;
  font-size: 18px;
  line-height: 100%;
  letter-spacing: 0.06em;
  text-align: right;
  text-transform: uppercase;
  color: #9d988d;
}

.event-type {
  font-family: "Garamond", serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 100%;
  letter-spacing: 0.06em;
  text-align: right;
  text-transform: uppercase;
  color: #9d988d;
}

/* Дресс-код */
.dress-code {
  align-self: flex-start;
  margin-top: auto;
  margin-left: -20px;
  width: calc(100% + 50px);
  height: 60px;
}

.dress-code-image {
  position: relative;
  width: auto;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  top: -10px;
}

/* Блок с основным изображением дресс-кода */
.dress-code-image-block {
  width: calc(100% + 60px);
  margin-left: -30px;
  margin-right: -30px;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: translateY(20px);
  /* Убираем fallback анимацию для элементов с scroll-animate */
}

.dress-code-image-block-1 {
  top: -10px;
  position: relative;
}

.invitation-content.animations-ready .dress-code-image-block {
  animation: fadeInUp 0.8s ease-out 2.1s forwards !important;
}

.dress-code-main-image {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Дополнительная информация о дресс-коде и основном дне */
.additional-info {
  top: -5px;
  position: relative;
  width: 100%;
  padding: 0 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(20px);
  /* Убираем fallback анимацию для элементов с scroll-animate */
}

.invitation-content.animations-ready .additional-info {
  animation: fadeInUp 0.8s ease-out 2.2s forwards !important;
}

/* Текст о дресс-коде */
.dress-code-note {
  text-align: center;
  margin-bottom: 12px;
  color: #9d988d;
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  width: 100%;
  letter-spacing: 0.11em;

  text-transform: uppercase;
}

.note-line-1,
.note-line-2,
.note-line-3,
.note-line-4 {
  text-transform: uppercase;
}

/* Текст о мероприятии */
.event-description {
  text-align: center;

  color: #9d988d;
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

/* Разделительная линия */
.separator-line {
  width: 1px;
  height: 60px;
  background-color: #d0d0d0;
  margin: 15px auto;
  align-self: center;
}

/* Основной день свадьбы */
.main-wedding-day {
  width: 100%;
  text-align: center;
}

.main-date {
  text-align: center;
  line-height: 100%;
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 30px;
}

.main-date-number {
  font-family: "Ceremonious One", serif;
  font-weight: 400;
  font-style: normal;
  font-size: 96px;
  letter-spacing: 0%;
  text-align: center;
  text-transform: lowercase;
  color: #9d988d;
}

.main-date-month {
  font-family: "Ceremonious One", serif;
  font-weight: 400;
  font-style: normal;
  font-size: 73px;
  letter-spacing: 0%;
  text-align: center;
  text-transform: lowercase;
  color: #9d988d;
}

.main-wedding-day-text {
  font-family: "Garamond", serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 100%;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  color: #9d988d;
}

/* Секция дресс-кода с описанием */
.dress-code-section {
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  /* Убираем fallback анимацию для элементов с scroll-animate */
}

.invitation-content.animations-ready .dress-code-section {
  animation: fadeInUp 0.8s ease-out 2.4s forwards !important;
}

.dress-code-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
}

.dress-code-title-image {
  width: auto;
  height: auto;
  max-width: 200px;
  object-fit: contain;
}

.dress-code-ring {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.dress-code-description {
  text-align: center;
  color: #9d988d;
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

/* Изображение тайминга */
.timing-image-block {
  width: 100%;
  margin-top: 18px;
  margin-left: -30px;
  margin-right: -30px;
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: translateY(20px);
  /* Убираем fallback анимацию для элементов с scroll-animate */
}

.invitation-content.animations-ready .timing-image-block {
  animation: fadeInUp 0.8s ease-out 2.6s forwards !important;
}

.timing-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Информация о морской вечеринке */
.sea-party-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  opacity: 0;
  transform: translateY(20px);
  /* Убираем fallback анимацию для элементов с scroll-animate */
}

.invitation-content.animations-ready .sea-party-info {
  animation: fadeInUp 0.8s ease-out 2.8s forwards !important;
}

.transfer-note {
  top: -10px;
  position: relative;
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #9d988d;
  line-height: 1.4;
  text-align: center;
  align-self: center;
  padding: 0 20px;
}

.sea-party-separator {
  margin-top: 5px;
  width: 1px;
  height: 60px;
  background-color: #d0d0d0;
  align-self: center;
}

.sea-party-date {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 15px;
  margin-left: 20px;
  top: -3px;
  padding: 0 30px;
}

.sea-party-date-number {
  font-family: "Ceremonious One", serif;
  font-weight: 400;
  font-style: normal;
  font-size: 96px;
  line-height: 30px;
  letter-spacing: 0%;
  text-align: center;
  text-transform: lowercase;
  color: #9d988d;
}

.sea-party-date-month {
  font-family: "Ceremonious One", serif;
  font-weight: 400;
  font-style: normal;
  font-size: 73px;

  letter-spacing: 0%;
  text-align: center;
  text-transform: lowercase;
  color: #9d988d;
  line-height: 30px;
}

.sea-party-time {
  font-family: "Garamond", serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 100%;
  letter-spacing: 0.06em;
  text-align: left;
  color: #9d988d;
  margin-top: 15px;
  padding: 0 23px;
}

.sea-party-title {
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #9d988d;
  margin-bottom: 10px;
  text-align: left;

  padding: 0 24px;
}

.sea-party-note {
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #9d988d;
  line-height: 1.4;
  text-align: left;
  align-self: center;

  padding: 0 24px;
}

/* Секция с кружками и дресс-кодом */
.dress-code-circles-section {
  display: flex;
  align-items: center;
  gap: 20px;

  margin: 0 auto;
  align-self: flex-start;
}

.color-circles {
  display: flex;
  gap: 10px;
  align-items: center;
}

.dress-code-title-image {
  width: auto;
  height: auto;
  max-width: 200px;
  object-fit: contain;
}

/* Секция Детали */
.details-section {
  top: -10px;
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translateY(20px);
  /* Убираем fallback анимацию для элементов с scroll-animate */
}

.invitation-content.animations-ready .details-section {
  animation: fadeInUp 0.8s ease-out 3s forwards !important;
}

.details-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 1;
  z-index: 1;
  pointer-events: none;
}

.details-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 330px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Заголовок Детали */
.details-header {
  margin-top: 50px;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 5px;
}

.details-title-image {
  width: auto;
  height: auto;
  max-width: 200px;
  object-fit: contain;
}

/* Вводный текст */
.details-intro {
  text-align: center;
  color: #0a1342;
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro-line-1,
.intro-line-2,
.intro-line-3,
.intro-line-4,
.intro-line-5 {
  margin: 0;
  padding: 0;
}

/* Декоративный разделитель */
.details-decorative-divider {
  width: 100%;
  display: flex;
  justify-content: center;
}

.details-divider-image {
  top: -12px;
  position: relative;
  width: auto;
  max-width: 330px;
  height: auto;
  object-fit: contain;
}

/* Текст о визах */
.details-visa-text {
  top: -13px;
  position: relative;
  text-align: center;
  color: #0a1342;
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.visa-line-1,
.visa-line-2 {
  margin: 0;
  padding: 0;
}

/* Призыв к заполнению анкеты */
.details-form-invitation {
  text-align: center;
  color: #0a1342;
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-invite-line-1,
.form-invite-line-2 {
  margin: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Декоративный разделитель 2 */
.details-decorative-divider-2 {
  width: 100%;
  display: flex;
  justify-content: center;
}

.details-anketa-image {
  width: auto;
  max-width: 330px;
  height: auto;
  object-fit: contain;
}

/* Форма анкеты */
.details-form {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.form-question {
  width: 100%;
  max-width: 290px;
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
  margin: 0 auto;
  margin-bottom: 5px;
}

.form-question-label {
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 12px;
  font-weight: 700;
  color: #0a1342;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}

.form-question-text {
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 12px;
  font-weight: 700;
  color: #0a1342;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
  margin: 0;
  text-align: center;
}

.form-question-subtext {
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 9px;
  font-weight: 600;
  color: #0a1342;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.3;
  margin: 0;
  text-align: left;
}

.form-input {
  width: 100%;
  padding: 7px 4px;
  background-color: rgba(6, 6, 6, 0);
  border: none;
  border-bottom: 1px solid #0a1342;
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 9px;
  font-weight: 600;
  color: #0a1342;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.3s ease;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-variant-position: normal;
  line-height: 1;
  vertical-align: baseline;
}

.form-input * {
  font-size: inherit;
  vertical-align: baseline;
  line-height: 1;
}

.form-input::placeholder {
  color: #9d988d;
  opacity: 0.7;
}

.form-input:focus {
  outline: none;
  border-color: #0a1342;
  background-color: rgba(255, 255, 255, 0);
}

/* Декоративный разделитель 3 */
.details-decorative-divider-3 {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 5px 0 16px;
}

.details-anketa2-image {
  width: auto;
  max-width: 330px;
  height: auto;
  object-fit: contain;
}

/* Финальный текст */
.details-final-text {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
}

.final-text-content {
  position: relative;
  text-align: center;
  color: #0a1342;
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 700;
  text-transform: uppercase;
  background-image: url("assets/details-vertical.png");
  background-size: 130%;
  background-position: center;
  background-repeat: no-repeat;
  padding: 10px 0 20px 0;
  width: 100%;
  max-width: 330px;
}

.final-text-line-1,
.final-text-line-2,
.final-text-line-3,
.final-text-line-4 {
  margin: 0;
  padding: 0;
  line-height: 13px;
  font-feature-settings: "lnum", "tnum";
}

/* Финальная секция с приветствием */
.details-closing-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 30px;
  margin-bottom: 40px;
}

.closing-greeting {
  font-family: "Ceremonious One", serif;
  font-weight: 400;
  font-style: normal;
  font-size: 40px;
  line-height: 100%;
  letter-spacing: 0%;
  text-align: center;
  color: #0a1342;
  margin-bottom: 17px;
  width: 100%;
}

.closing-coat-of-arms {
  width: 170px;

  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
}

.closing-coat-of-arms-img {
  width: 50%;
  height: 100%;
  object-fit: contain;
}

.closing-motto {
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 16px;
  font-weight: 600;
  font-style: italic;
  color: #0a1342;
  text-align: center;
  letter-spacing: 0.1em;
  margin-bottom: 30px;
}

.closing-signature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 100%;
  max-width: 330px;
}

.signature-line-1 {
  font-family: "Ceremonious One", serif;
  font-weight: 400;
  font-style: normal;
  font-size: 40px;
  line-height: 100%;
  letter-spacing: 0%;

  color: #0a1342;
  width: 100%;
}

.signature-line-2 {
  top: -17px;
  position: relative;
  font-family: "Garamond", serif;
  font-weight: 500;
  font-style: normal;
  font-size: 21px;
  line-height: 117%;
  letter-spacing: 6%;
  text-align: center;
  text-transform: uppercase;
  color: #0a1342;
}

/* Адаптивность для секции Детали */
@media (max-width: 767px) {
  .details-section {
    padding: 40px 0;
  }

  .details-content {
    padding: 0 20px;
  }

  .details-title-image {
    max-width: 160px;
  }

  .details-intro,
  .details-visa-text,
  .details-form-invitation {
    font-size: 12px;
  }

  .form-question-text {
    font-size: 11px;
  }

  .form-input {
    font-size: 10px;
  }

  .final-text-content {
    font-size: 12px;
    padding: 15px;
  }

  .closing-greeting {
    font-size: 35px;
    margin-bottom: 10px;
    text-align: center;
  }

  .closing-coat-of-arms {
    width: 150px;
    margin-bottom: 10px;
  }

  .closing-motto {
    font-size: 14px;
    margin-bottom: 25px;
  }

  .signature-line-1 {
    font-size: 35px;
  }

  .signature-line-2 {
    font-size: 19px;
    text-align: center;
  }

  .final-text-content {
    font-size: 11px;
  }
}

/* Адаптивность для очень маленьких экранов (320px) */
@media (max-width: 350px) {
  body {
    padding: 0;
  }

  .invitation-container {
    max-width: 390px;
    width: 100%;
  }

  .invitation-card {
    border-radius: 8px;
    min-height: calc(100vh + 150px);
  }

  .invitation-content {
    min-height: calc(100vh + 150px);
  }

  /* Заголовки и текст */
  .wedding-day {
    margin-top: 50px;
    font-size: 14px;
    letter-spacing: 1px;
  }

  .wedding-date {
    font-size: 14px;
    margin-bottom: 15px;
    letter-spacing: 0.8px;
  }

  .names {
    font-size: 50px;
    margin-bottom: 10px;
  }

  .coat-of-arms {
    width: 150px;
    height: 220px;
    top: -5px;
  }

  .invitation-text {
    font-size: 15px;
    margin-top: 25px;
    line-height: 0.9;
    padding: 0 10px;
  }

  .location-name {
    font-size: 45px;
    margin: 15px auto 0px;
  }

  .view-location {
    top: -15px;
    padding: 15px 40px;
    min-height: 50px;
  }

  .location-text {
    font-size: 8px;
    letter-spacing: 1px;
  }

  /* Секция события */
  .event-details {
    padding: 0 10px;
    min-height: 120px;
    margin-top: 90px;
  }

  .event-date-time {
    margin-right: 10px;
  }

  .event-date {
    margin-top: 20px;
    margin-bottom: 10px;
    gap: 5px;
  }

  .event-date-number {
    font-size: 55px;
  }

  .event-date-month {
    font-size: 42px;
  }

  .event-time,
  .event-type {
    font-size: 14px;
  }

  .dress-code {
    margin-left: -10px;
    width: calc(100% + 30px);
    height: 50px;
  }

  .dress-code-image {
    max-width: 55%;
    height: auto;
  }

  /* Блоки с изображениями */
  .dress-code-image-block {
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
  }

  .dress-code-main-image {
    max-width: 100%;
    height: auto;
  }

  /* Дополнительная информация */
  .additional-info {
    padding: 0 15px;
    top: -3px;
  }

  .dress-code-note,
  .event-description {
    font-size: 11px;
    line-height: 1.1;
    letter-spacing: 0.08em;
  }

  .separator-line {
    height: 40px;
    margin: 10px auto;
  }

  .main-date {
    gap: 5px;
    margin-bottom: 20px;
  }

  .main-date-number {
    font-size: 55px;
  }

  .main-date-month {
    font-size: 42px;
  }

  .main-wedding-day-text {
    font-size: 14px;
  }

  .dress-code-section {
    padding: 0 10px;
  }

  .dress-code-title-image {
    max-width: 150px;
  }

  .dress-code-ring {
    width: 40px;
    height: 40px;
  }

  .dress-code-description {
    font-size: 10px;
    line-height: 1.1;
    padding: 0 5px;
  }

  /* Тайминг */
  .timing-image-block {
    margin-top: 12px;
    margin-left: -20px;
    margin-right: -20px;
    margin-bottom: 12px;
  }

  /* Морская вечеринка */
  .sea-party-info {
    padding: 0 10px;
  }

  .transfer-note {
    top: -5px;
    font-size: 10px;
    line-height: 1.3;
    padding: 0 15px;
    letter-spacing: 0.08em;
  }

  .sea-party-separator {
    height: 40px;
    margin-top: 3px;
  }

  .sea-party-date {
    margin-left: 15px;
    padding: 0 20px;
    gap: 5px;
    top: -2px;
  }

  .sea-party-date-number {
    font-size: 55px;
    line-height: 25px;
  }

  .sea-party-date-month {
    font-size: 42px;
    line-height: 25px;
  }

  .sea-party-time {
    font-size: 14px;
    padding: 0 25px;
    margin-top: 10px;
  }

  .sea-party-title {
    font-size: 14px;
    padding: 0 25px;
    letter-spacing: 0.08em;
  }

  .sea-party-note {
    font-size: 10px;
    line-height: 1.3;
    max-width: 280px;
    padding: 0 15px;
  }

  /* Секция с кружками */
  .dress-code-circles-section {
    padding: 0 10px;
  }

  .color-circles {
    gap: 8px;
  }

  .color-circle {
    width: 40px;
    height: 40px;
  }

  .circle-ring {
    width: 30px;
    height: 30px;
  }

  /* Секция Детали */
  .details-section {
    padding: 30px 0;
    top: -5px;
  }

  .details-content {
    padding: 0 15px;
    max-width: 100%;
  }

  .details-header {
    margin-top: 30px;
    margin-bottom: 3px;
  }

  .details-title-image {
    max-width: 140px;
  }

  .details-intro,
  .details-visa-text,
  .details-form-invitation {
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: 0.06em;
  }

  .details-decorative-divider {
    margin: 5px 0;
  }

  .details-divider-image {
    top: -8px;
    max-width: 280px;
  }

  .details-visa-text {
    top: -8px;
    margin-bottom: 10px;
  }

  .details-decorative-divider-2 {
    margin: 5px 0;
  }

  .details-anketa-image {
    max-width: 280px;
  }

  .form-question {
    max-width: 260px;
    margin-bottom: 3px;
  }

  .form-question-label {
    font-size: 10px;
  }

  .form-question-text {
    font-size: 10px;
    line-height: 1.3;
  }

  .form-question-subtext {
    font-size: 8px;
    line-height: 1.2;
  }

  .form-input {
    font-size: 8px;
    padding: 5px 3px;
  }

  .details-decorative-divider-3 {
    margin: 3px 0 12px;
  }

  .details-anketa2-image {
    max-width: 280px;
  }

  .details-final-text {
    margin-bottom: 30px;
  }

  .final-text-content {
    font-size: 10px;
    line-height: 1.2;
    padding: 8px 0 15px 0;
    max-width: 280px;
  }

  .final-text-line-1,
  .final-text-line-2,
  .final-text-line-3,
  .final-text-line-4 {
    line-height: 11px;
  }

  /* Финальная секция */
  .details-closing-section {
    margin-top: 20px;
    margin-bottom: 30px;
    padding: 0 10px;
  }

  .closing-greeting {
    font-size: 30px;
    margin-bottom: 12px;
  }

  .closing-coat-of-arms {
    width: 130px;
    margin-bottom: 8px;
  }

  .closing-signature {
    max-width: 280px;
    gap: 3px;
  }

  .signature-line-1 {
    font-size: 30px;
  }

  .signature-line-2 {
    top: -12px;
    font-size: 16px;
  }

  .signature-line-2-span {
    font-size: 35px;
  }
}

.signature-line-2-span {
  font-family: "Ceremonious One", serif;
  font-weight: 400;
  font-style: normal;
  font-size: 45px;
  line-height: 117%;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  color: #0a1342;
}

/* Анимации при прокрутке */
.scroll-animate {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.fade-up {
  transform: translateY(30px);
}

.scroll-animate.fade-down {
  transform: translateY(-30px);
}

.scroll-animate.fade-left {
  transform: translateX(-30px);
}

.scroll-animate.fade-right {
  transform: translateX(30px);
}

.scroll-animate.fade-scale {
  transform: scale(0.9);
}

.scroll-animate.animate {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* Дочерние элементы с scroll-animate внутри родителя с animate тоже становятся видимыми */
.scroll-animate.animate .scroll-animate {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}
