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

body.scroll-enabled {
  overflow: auto;
}

/* === КОНВЕРТ (БЕЗ ИЗМЕНЕНИЙ) === */

.envelope-container {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100vh;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.envelope-container.opened {
  transform: translateY(-100%);
  pointer-events: none;
}

.envelope {
  position: absolute;
  bottom: 60px;
  width: 340px;
  height: 230px;
  background: #fff5e6;
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(145deg, #e8d5b7, #d4b896);
  border-radius: 10px 10px 0 0;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-origin: top;
  z-index: 3;
}

.envelope-container.opened .envelope-flap {
  height: 115px;
  transform: rotateX(180deg);
}

.envelope-body {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  z-index: 1;
  background-size: cover;
  background-position: center;
}

.invitation-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  background: white;
  border-radius: 10px;
  padding: 30px 25px;
  text-align: center;
  transform: translate(-50%, -50%) scale(0);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 4;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
}

.envelope-container.opened .invitation-card {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.invitation-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  color: #567958;
  letter-spacing: 4px;
  font-weight: 500;
}

.invitation-card h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 700;
  margin: 15px 0;
  letter-spacing: 2px;
}

.invitation-card .open-btn {
  background: #567958;
  color: white;
  border: none;
  padding: 12px 35px;
  margin-top: 25px;
  border-radius: 30px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.open-hint {
  /*position: absolute;*/
  /*top: 70px;*/
  /*width: fit-content;*/
  /*left: 50%;*/
  /*transform: translateX(-50%);*/
  text-align: center;
  color: #ffffff;
  /*font-family: 'Montserrat', sans-serif;*/
  /*font-size: 14px;*/
  /*z-index: 10000;*/
  /*animation: pulses 1.5s infinite;*/
}

/* === МУЗЫКА === */

.music-controls {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 9999;
  display: none;
}

.music-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #567958;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  font-size: 22px;
  transition: all 0.3s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* === ОСНОВНОЙ КОНТЕНТ - НОВЫЙ СТИЛЬ === */

#main-content {
  opacity: 0;
  transition: opacity 0.5s ease;
}

#main-content.visible {
  opacity: 1;
}

/* Вертикальные заголовки */

.section-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.section-heading-left {
  flex: 0 0 180px;
  position: relative;
}

.section-heading-left .vertical-title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: 'Playfair Display', serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #1a1a1a;
  /*text-transform: uppercase;*/
  line-height: 1.2;
  border-left: 4px solid #567958;
  padding-left: 15px;
  margin-top: 20px;
}

.section-content-right {
  flex: 1;
  min-width: 260px;
}

@media (max-width: 768px) {
  .section-wrapper {
    flex-direction: column;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .section-heading-left {
    flex: auto;
  }
}

@media (max-width: 768px) {
  .section-heading-left .vertical-title {
    writing-mode: horizontal-tb;
    transform: none;
    border-left: none;
    border-bottom: 4px solid #567958;
    padding-left: 0;
    padding-bottom: 10px;
    display: inline-block;
    font-size: 28px;
  }
}

/* Hero секция (сплит-экран) */

.hero-split {
  min-height: 100vh;
  display: flex;
  
}

@media (min-width: 992px) {
  .hero-image {
    flex: 1.2;
    background: url('../../assets/img/andreyandirina.png') top/contain no-repeat;
    min-height: 400px;
  }
}

@media (max-width: 991px) {
  .hero-image {
    flex: 1.2;
    background: url(../../assets/img/andanirina.png) top/contain no-repeat;
    min-height: 400px;
  }
}

.hero-content {
  flex: 1;
  /*background: #fff;*/
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 30px;
}

.hero-inner {
  max-width: 550px;
}

.couple-names {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(42px, 7vw, 90px);
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 2px;
}

.divider {
  width: 70px;
  height: 2px;
  background: #567958;
  margin: 20px auto;
}

@media (max-width: 992px) {
  .hero-split {
    flex-direction: column;
  }
}

@media (max-width: 992px) {
  .hero-image {
    flex: auto;
    height: 50vh;
  }
}

/* Общие стили */

@media (min-width: 992px) {
  .section-title {
    font-family: 'Circe Rounded', serif;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 2px;
  }
}

@media (max-width: 991px) {
  .section-title {
    font-family: 'Circe Rounded', serif;
    font-size: 26px;
    font-weight: 700;
    /*letter-spacing: 2px;*/
  }
}

/* Карточки тайминга */

.timing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 9px;
  margin-top: 20px;
  grid-template: 1fr 1fr / 1fr 1fr;
}

.timing-card {
  background: #f8fef5;
  border-radius: 24px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border: 1px solid rgba(178, 0, 0, 0.1);
}

.timing-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: #567958;
}

.timing-time {
  font-family: 'Cormorant Garamond', serif;
  font-size: 38px;
  font-weight: 700;
  color: #567958;
}

.timing-card h5 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  margin: 15px 0 8px;
  font-size: 18px;
}

.timing-card p {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  color: #888;
  margin: 0;
}

/* Кнопки */

.btn-custom {
  border: 2px solid #567958;
  background: transparent;
  padding: 12px 32px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1px;
  display: inline-block;
  color: #567958;
  transition: all 0.3s;
  text-decoration: none;
  cursor: pointer;
}

.btn-custom:hover {
  background: #567958;
  color: white;
  border-color: #567958;
}

/* Календарь */

.wedding-calendar {
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  padding: 25px;
  max-width: 400px;
  margin: 0 auto;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-weight: 600;
}

.calendar-month {
  font-size: 22px;
  color: #567958;
  font-family: 'Circe Rounded', serif;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 600;
  color: #999;
  margin-bottom: 10px;
  font-size: 13px;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-day {
  text-align: center;
  padding: 10px 0;
  font-weight: 500;
  border-radius: 50%;
  transition: 0.2s;
  cursor: default;
  font-size: 14px;
}

.calendar-day.wedding-day {
  background: url("../../assets/img/circles.png")white center / contain no-repeat;
  padding: 10px;
  /*color: white;*/
  /*box-shadow: 0 0 0 3px rgba(178, 0, 0, 0.2);*/
  font-weight: bold;
  transform: scale(1.05);
}

.calendar-day.other-month {
  color: #ddd;
}

/* Карта */

.yandex-map-rounded {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  height: 350px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: #567958;
}

.yandex-map-rounded iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Dress code карточки */

.dress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 25px;
}

@media (max-width: 991px) {
  .dress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 25px;
    grid-template: 1fr 1fr / 1fr 1fr;
  }
}

.dress-card {
  background: #fefaf5;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s;
  text-align: center;
  padding: 30px 20px;
}

.dress-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.dress-icon {
  font-size: 48px;
  color: #567958;
  margin-bottom: 15px;
}

.dress-card span {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: #333;
}

/* Таймер */

.countdown-wrapper {
  background: #1a1a1a;
  border-radius: 30px;
  padding: 40px 30px;
  text-align: center;
}

.countdown-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  /*gap: 30px;*/
  margin-top: 30px;
}

.countdown-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  /*letter-spacing: 2px;*/
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.7);
}

/* Форма */

.rsvp-form {
  background: rgba(255,255,255,0.8);
  padding: 40px;
  border-radius: 28px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

.form-control-modern {
  border: 1px solid #e8e0d5;
  border-radius: 20px;
  padding: 14px 24px;
  transition: all 0.2s;
  font-family: 'Montserrat', sans-serif;
}

.form-control-modern:focus {
  border-color: #b20000;
  box-shadow: 0 0 0 3px rgba(178, 0, 0, 0.1);
  outline: none;
}

.btn-submit {
  /*background: #b20000;*/
  border: none;
  padding: 14px 30px;
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 1px;
  color: white;
  transition: 0.3s;
  width: 100%;
  font-family: 'Montserrat', sans-serif;
}

.btn-submit:hover {
  background: #567958;
  color: var(--bs-warning-border-subtle);
  transform: translateY(-2px);
}

/* Анимации */

.animate-on-scroll, .zoom-in {
  opacity: 1;
  transform: translateY(35px);
  transition: all 0.7s ease;
}

.animate-on-scroll.visible, .zoom-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.zoom-in {
  transform: scale(0.95);
}

.zoom-in.visible {
  transform: scale(1);
}

.bg-light-custom {
  background: #faf8f4;
}

/* Адаптивность */

@media (max-width: 576px) {
  .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

@media (max-width: 576px) {
  .timing-grid {
    /*grid-template-columns: 1fr;*/
    /*gap: 15px;*/
  }
}

@media (max-width: 576px) {
  .rsvp-form {
    padding: 15px;
  }
}

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

.bounce {
  animation: bounce 1.5s infinite;
}

@media (max-width: 576px) {
  #envelopeContainer {
    background: url(../../assets/img/271ddc9dad03913f903d5353eb7db003.png) right / cover no-repeat;
  }
}

@media (min-width: 577px) {
  #envelopeContainer {
    background: url(../../assets/img/271ddc9dad03913f903d5353eb7db003.png) top / cover no-repeat;
  }
}

.nav-pills {
  --bs-nav-pills-border-radius: 30px;
  --bs-nav-pills-link-active-color: #fff;
  --bs-nav-pills-link-active-bg: #567958;
}

.nav {
  --bs-nav-link-padding-x: 1rem;
  --bs-nav-link-padding-y: 0.5rem;
  --bs-nav-link-color: var(--bs-nav-pills-link-active-bg);
  --bs-nav-link-hover-color: var(--bs-nav-pills-link-active-bg);
  --bs-nav-link-disabled-color: var(--bs-secondary-color);
  display: flex;
  flex-wrap: wrap;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}

.dress-image {
  border-radius: 16px;
  border: solid 2px #ffffff;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: url("../../assets/img/271ddc9dad03913f903d5353eb7db003.png") center/cover no-repeat fixed;
  margin: 0;
  min-height: 100vh;
}

@media (min-width: 992px) {
    body {
      font-family: 'Montserrat', sans-serif;
      background: url("../../assets/img/271ddc9dad03913f903d5353eb7db003.png") center/cover no-repeat fixed;
      margin: 0;
      min-height: 100vh;
    }
}

@media (max-width: 991px) {
  body {
      font-family: 'Montserrat', sans-serif;
      background: url("../../assets/img/271ddc9dad03913f903d5353eb7db003.png") right/cover no-repeat fixed;
      margin: 0;
      min-height: 100vh;
    }
}

/* Плавающие блоки поверх фона */

.container {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: floatBlocks 4s ease-in-out infinite;
  margin: 30px auto;
  padding: 30px 10px 30px 10px;
}

@keyframes floatBlocks {
  0%, 100% {
  }
  50% {
  }
}

@media (min-width: 992px) {
  .w-color {
    width: 70px;
    height: 70px;
  }
}

@media (max-width: 768px) {
  .w-color {
    width: 60px;
    height: 60px;
  }
}

@media (min-width: 801px) {
  .w-color {
    width: 80px;
    height: 80px;
  }
}

.guest-item {
  transition: all 0.3s ease;
  position: relative;
}

.guest-item:first-child .btn-remove-guest {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-add-guest:hover {
  transform: scale(1.05);
}

.btn-remove-guest:hover {
  color: #b20000 !important;
}

.event-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #567958;
}

/* === ИСПРАВЛЕНИЕ ГОРИЗОНТАЛЬНОЙ ПРОКРУТКИ === */

body {
  overflow-x: hidden;
  max-width: 100%;
}

#envelopeContainer {
  overflow-x: hidden;
  max-width: 100%;
  max-height: 100vh;
}

/* Исправление для изображения внутри конверта */

/* Убираем переполнение у контейнеров */

.container {
  overflow-x: hidden;
  padding-left: 15px !important;
  padding-right: 15px !important;
}

/* Адаптация тайминга на мобильных */

@media (max-width: 576px) {
  .timing-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

@media (max-width: 576px) {
  .timing-card {
    padding: 20px 12px;
  }
}

@media (max-width: 576px) {
  .timing-time {
    font-size: 28px;
  }
}

/* Уменьшаем отступы у секций */

@media (max-width: 576px) {
  section.py-5 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
}

/* Адаптация цветовых кругов */

@media (max-width: 576px) {
  .d-flex.justify-content-center.align-items-center.pb-2 {
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 576px) {
  .w-color {
    width: 45px !important;
    height: 45px !important;
    margin-left: 0 !important;
  }
}

/* Форма на мобильных */

@media (max-width: 576px) {
  .rsvp-form {
    padding: 20px 15px;
  }
}

@media (max-width: 576px) {
  .guest-item .row {
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  .guest-item .col-md-5, .guest-item .col-md-2 {
    width: 100%;
    margin-bottom: 10px;
  }
}

@media (max-width: 576px) {
  .guest-item .col-md-2.text-end {
    text-align: left !important;
  }
}

/* Календарь */

@media (max-width: 576px) {
  .wedding-calendar {
    padding: 15px;
  }
}

@media (max-width: 576px) {
  .calendar-day {
    padding: 6px 0;
    font-size: 12px;
  }
}

/* Dress code сетка */

@media (max-width: 576px) {
  .dress-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

/* Конверт на мобильных */

@media (max-width: 576px) {
  .envelope {
    width: 280px;
    height: 200px;
    bottom: 80px;
  }
}

@media (max-width: 576px) {
  .invitation-card {
    width: 260px;
    padding: 20px 15px;
  }
}

@media (max-width: 576px) {
  .invitation-card h1 {
    font-size: 24px;
  }
}

@media (max-width: 576px) {
  .open-hint {
    /*bottom: 60px;*/
    font-size: 12px;
  }
}

/* Музыкальные кнопки */

@media (max-width: 576px) {
  .music-controls {
    bottom: 15px;
    right: 15px;
  }
}

@media (max-width: 576px) {
  .music-btn {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }
}

/* Карта */

@media (max-width: 576px) {
  .yandex-map-rounded {
    height: 250px;
  }
}

/* Таймер */

@media (max-width: 576px) {
  .countdown-number .fs-1 {
    font-size: 1.75rem !important;
  }
}

@media (max-width: 576px) {
  .countdown-grid {
    /*gap: 5px;*/
  }
}

/* Для очень маленьких экранов (до 380px) */

@media (max-width: 380px) {
  .timing-grid {
    /*grid-template-columns: 1fr;*/
  }
}

@media (max-width: 380px) {
  .dress-grid {
    /*grid-template-columns: 1fr;*/
  }
}

@media (max-width: 380px) {
  .envelope {
    width: 260px;
    height: 180px;
  }
}

@media (max-width: 380px) {
  .invitation-card {
    width: 240px;
  }
}

/* === ПОКАЗ БЛОКА ТОЛЬКО ПРИ ВКЛЮЧЕННОЙ МУЗЫКЕ === */

.music-text-block {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.music-text-block.hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  display: none;
}

.music-text-block.visible {
  opacity: 1;
  transform: scale(1);
  display: block;
}

.countdown-flip {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 30px;
}

.flip-card {
  background: #2c3e50;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  min-width: 100px;
}

.flip-top, .flip-bottom {
  background: #34495e;
  padding: 20px;
  text-align: center;
}

.flip-top {
  border-bottom: 2px solid #2c3e50;
}

.flip-digit {
  font-size: 48px;
  font-weight: bold;
  color: #fff;
  font-family: monospace;
  text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.flip-label {
  background: #567958;
  padding: 10px;
  text-align: center;
  color: white;
  font-weight: bold;
  letter-spacing: 1px;
}

/* === КРАСИВЫЙ BOOTSTRAP ТАЙМЕР === */

.countdown-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.countdown-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 20px;
  padding: 25px 15px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(86, 121, 88, 0.2);
  position: relative;
  overflow: hidden;
}

.countdown-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #567958, var(--bs-primary));
}

.countdown-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(86, 121, 88, 0.2) !important;
}

.countdown-value {
  font-size: 48px;
  font-weight: 800;
  font-family: 'Circe Rounded', sans-serif;
  color: #567958;
  line-height: 1.2;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.05);
}

.countdown-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #6c757d;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.countdown-progress {
  height: 4px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-days, .progress-bar-hours, .progress-bar-minutes, .progress-bar-seconds {
  height: 100%;
  background: linear-gradient(90deg, #567958, var(--bs-primary));
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

/* Анимация пульсации для секунд */

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

.countdown-card:last-child .countdown-value {
  animation: pulse 1s ease infinite;
  color: var(--bs-primary);
}

/* Адаптация для мобильных */

@media (max-width: 768px) {
  .countdown-value {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  .countdown-label {
    font-size: 11px;
  }
}

@media (max-width: 768px) {
  .countdown-card {
    padding: 20px 10px;
  }
}

@media (max-width: 576px) {
  .countdown-value {
    font-size: 28px;
  }
}

@media (max-width: 576px) {
  .countdown-label {
    font-size: 10px;
    letter-spacing: 1px;
  }
}

@media (max-width: 576px) {
  .countdown-container {
    padding: 10px;
  }
}

/* Альтернативный стиль с иконками */

.countdown-card i {
  font-size: 28px;
  color: #567958;
  margin-bottom: 10px;
  display: block;
}