body {
  font-family: "Cormorant Garamond", serif;
  margin: 0;
  padding: 0;
  background-color: #f8f8f8;
  position: relative;
  z-index: 0;
  overflow-x: hidden;
}

a {
  color: #a87b7b;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

h1 {
  margin-top: 2vh;
  font-size: 3.5vh;
  color: #4e3838;
  text-align: center;
}

h2 {
  margin-top: 2vh;
  font-size: 3vh;
  color: #4e3838;
}

p {
  text-align: center;
  color: #6c4e4e;
  font-size: 2.5vh;
}

label {
  text-align: left;
  color: #6c4e4e;
  margin: 2vh;
}

button{
  font-family: "Cormorant Garamond", serif;
}

/*Плавное появление изображений после загрузки*/
img {
  opacity: 0;
  transition: opacity 0.5s;
}
img.loaded {
  opacity: 1;
}

#details img {
  transform: rotate(50deg);
  width: 15%;
  height: auto;
  display: block;
  margin: 0 auto;
}


/*Плавное появление секций при скролле*/
section {
  max-width: 90vh;
  margin: auto;
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
section.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
/*Плавное появление секций при скролле*/


/*Сепаратор между секциями*/
section + section::before {
  content: "";
  display: block;
  width: 25%;
  height: .3vh;
  background: rgba(168, 123, 123, 0.3); /* полупрозрачный */
  margin: 10vh auto; /* сверху и снизу по 100px и по центру */
  border-radius: 1px;
}
/*Сепаратор между секциями*/

/* Опенер */
#opener {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, #f9f5f2, #ffe4e1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 1s ease, visibility 1s;
  overflow: hidden;
  cursor: pointer; /* чтобы намекнуть на интерактив */
}

.opener-text {
  position: absolute;
  top: 20vh;
  font-family: 'Betmo', serif;
  font-size: 5vh;
  color: #4e3838;
}
#opener.hidden {
  opacity: 0;
  visibility: hidden;
}

#opener.disabled {
  pointer-events: none;
  opacity: 0.5; /* Визуальный намёк, что элемент недоступен */
}

.opener-content {
  position: relative;
  width: 50%; /* Размер контейнера */
  height: 50%;
  rotate: 5deg;
  animation: pulseAndShake 4s infinite ease-in-out;
}

#envelope,
#seal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none; /* чтобы клик шёл на контейнер */
}

#seal {
  animation: pulseAndShake 4s infinite ease-in-out;
  z-index: 2; /* Печать сверху */
  pointer-events: auto; /* чтобы на неё тоже можно было нажать */
}

@keyframes pulseAndShake {
  0% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.1) rotate(-5deg); }
  50% { transform: scale(1) rotate(5deg); }
  75% { transform: scale(1.1) rotate(-5deg); }
  100% { transform: scale(1) rotate(0deg); }
}
/*Опенер*/

/*Хэдер*/
header {
  text-align: center;
  height: 100vh; /* весь экран */
  width: 100%;
  position: relative; /* добавим для позиционирования картинки */
  overflow: hidden;    /* чтобы картинка не выходила за границы */
  justify-content: center;
  align-items: center;
  display: flex;
  flex-direction: column;
  padding: 0;

}
header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 20vh; /* высота эффекта */
background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(248, 248, 248, 1));
  z-index: 1;
}
header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../img/header-bg.jpg');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.4;
  z-index: 0;
}
header > * {
  position: relative;
  z-index: 1;
}

.wedding-info {
  font-family: 'Betmo', serif;
  color: #4e3838;
  display: flex;
  flex-direction: column;
  gap: 10vh;
  font-size: 7vh;
}

.wedding-names {
  line-height: 7vh;
}

.wedding-day, .wedding-date {
  font-size: 5vh;
  letter-spacing: 1rem;
}


/*Хэдер*/

/*Стрелка в хэдере*/
.scroll-down {
  position: absolute;
  bottom: 10vh;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  opacity: 0.7;
  cursor: pointer;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wedding-invite{

}

.arrow{
   width: 5vh;
   height: 5vh;
   border-left: .2vh solid #4e3838;
   border-bottom: .2vh solid #4e3838;
   transform: rotate(-45deg);
 }
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(10px);
  }
  60% {
    transform: translateX(-50%) translateY(5px);
  }
}
.scroll-down:hover {
  opacity: 1;
}
/*Стрелка в хэдере*/


/*Блок Расписание*/
.program__list {
  display: flex;
  flex-direction: column;
  gap: 2vh;
  max-width: 90vh;
  margin: 0 auto;
}

.program__item {
  display: flex;
  align-items: center;
  gap: 3vh;
}

.program__time {
  flex-shrink: 0;
  font-size: 3vh;
  font-weight: bold;
  color: #a87b7b;
}


.program__desc p {
  text-align: left;
}

/*Блок Расписание*/

/*Блок Дресс-код*/
.colors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5vh;

}

.colors img {
  width: 15%;
  height: auto;
  transition: transform 0.3s ease;

}

.colors img:hover {
  transform: scale(1.15);
}


/*Блок Дресс-код*/

/*Блок месторасположение*/
.location-image {
  width: 100%;
  max-width: 800px; /* Максимальная ширина, чтобы не растягивалась */
  height: auto;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.map-container {
  width: 100%;
  max-width: 800px;
  margin: auto;
  border-radius: 10px;
  overflow: hidden;
  /*box-shadow: 0 2px 8px rgba(0,0,0,0.05);*/
}
/*Блок месторасположение*/

/*Блок ТГ форма*/
#rsvp-form {
  max-width: 600px;
  margin: 0 auto;
}
#rsvp-form label {
  display: block;
  font-weight: 500;
  font-size: 2.5vh;
  color: #a87b7b;
}
#rsvp-form label small {
  display: block;
  font-size: 2vh;
  color: #999;
  margin-top: 5px;
}
#rsvp-form input[type="text"],
#rsvp-form select {
  width: 100%;
  border: none;
  border-bottom: 1px solid #a87b7b;
  background: transparent;
  font-size: 3vh;
  outline: none;
  font-family: "Cormorant Garamond", serif;
  color: #a87b7b;

}
#rsvp-form input[type="text"]:focus,
#rsvp-form select:focus {
  border-color: #c4b7a6;
}
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.rsvp-fade-out {
  opacity: 0;
  transition: opacity 2s ease-out;
}
.checkbox-group label {
  display: flex;
  align-items: center;
}
.checkbox-group input[type="checkbox"] {
  margin-right: 6px;
  transform: scale(1.2);
}
#rsvp-form button {
  display: block;
  width: 100%;
  padding: 12px;
  background-color: #a87b7b;
  color: #fff;
  border: none;
  border-radius: 25px;
  font-size: 2.5vh;
  margin-top: 20px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
#rsvp-form button:hover {
  background-color: #c4b7a6;
}

.radio-group {
  display: flex;
  flex-direction: column;
  font-size: 2.5vh;
}
.radio-group label {
  color: #333;
  display: flex;
  align-items: center;
}
.radio-group input[type="radio"] {
  margin-right: 8px;
  transform: scale(1.2);
}
/*Блок ТГ форма*/

/*Плашка спасибо что отправили форму*/
.thank-you-message {
  display: none; /* скрываем блок по умолчанию */
  background: #f8f8f8;
  color: #a87b7b;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  font-size: 18px;
  line-height: 1.5;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  max-width: 600px;
  margin: 20px auto;
  animation: fadeIn 1s ease forwards;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/*Плашка спасибо что отправили форму*/

/*Счетчик*/
#countdown {
  display: flex;
  justify-content: center;
  gap: 0.5vh;
  margin-top: 1vh;
  margin-bottom: 1vh;

}
#countdown div {
  min-width: 10vh;
  text-align: center;
}
#countdown span {
  font-size: 4vh;
  display: block;
}
#countdown small {
  font-size: 2vh;
  color: #666;
}
.countdown span {
  display: inline-block;
  transition: transform 0.3s ease-in-out;
}
.countdown span.animate {
  transform: scale(1.2);
}
#countdown span {
  text-shadow: 0 0 5px rgba(168, 123, 123, 0.5);
}
/*Счетчик*/

/*Футер*/
footer {
  padding: 15vh;
  position: relative;
  background-image: url('../img/Bottom-grass.png');
  opacity: 0.4 ;
  background-repeat: repeat-x;         /* Повтор по горизонтали */
  background-position: bottom center;  /* Прижат к нижнему краю */
  background-size: auto 100%;          /* Сохраняем пропорции по высоте */
}

/*Футер*/
