@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Great+Vibes&display=swap');

/* Подключение шрифтов */
@font-face {
  font-family: 'Miami Nueva';
  src: url('fonts/miamanueva.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Ekaterina Velikaya Two';
  src: url('fonts/ekaterinavelikayatwo.woff2') format('woff2'),
       url('fonts/ekaterinavelikayatwo.woff') format('woff'),
       url('fonts/ekaterinavelikayatwo.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nicolettascript';
  src: url('fonts/Nicoletta-script.woff2') format('woff2'),
       url('fonts/Nicoletta-script.woff') format('woff'),
       url('fonts/Nicoletta-script.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --cream: #FAF8F5;
  --champagne: #F5E6D3;
  --sandy: #E8D5B7;
  --sandy-dark: #C9B896;
  --text-primary: #3D3D3D;
  --text-secondary: #7A7A7A;
  --text-light: #999999;
  --white: #FFFFFF;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --border: 1px solid rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

/* ФОНОВОЕ ИЗОБРАЖЕНИЕ — ИСПРАВЛЕНО ДЛЯ IPHONE */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-image: url('bg.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: scroll;  /* fixed заменён на scroll — исправляет проблему на iPhone */
  opacity: 0.5;
  z-index: -1;
  pointer-events: none;
}

/* Дополнительные стили для стабильности на iOS */
html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: transparent;
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}

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

/* ДЕКОРАТИВНЫЙ УГОЛОК */
.fon-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 360px;
  height: 360px;
  overflow: hidden;
  background: url('fon_top_pk.png') no-repeat;
  background-size: 560px;
  background-position: -60px -60px;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%), linear-gradient(to left, transparent 10%, black 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, black 50%, transparent 100%), linear-gradient(to left, transparent 10%, black 100%);
  mask-composite: intersect;
}

@media (max-width: 600px) {
  .fon-top {
    width: 200px;
    height: 200px;
    background-size: 320px;
    background-position: calc(100% + 40px) -40px;
  }
}

@media (max-width: 600px) {
  .fon-top {
    width: 200px;
    height: 200px;
    background-size: 360px;
  }
}

/* КОНТЕЙНЕР */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* HERO БЛОК */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  background: transparent;
  position: relative;
}

.hero__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

  .hero__names {
    padding: 0 10px;
}

.hero__name-daria {
  font-family: 'Ekaterina Velikaya Two', 'Great Vibes', cursive;
  font-size: 100px;
  font-weight: normal;
  color: var(--text-primary);
  display: inline-block;
}

.hero__name-alexander {
  font-family: 'Ekaterina Velikaya Two', 'Great Vibes', cursive;
  font-size: 85px;
  font-weight: normal;
  color: var(--text-primary);
  display: inline-block;
  margin-top: 20px;
}

.hero__ampersand {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: -10px 0;
  text-align: center;
  padding: 0;
  width: 100%;
}

.hero__ampersand-symbol {
  font-family: 'Nicolettascript', cursive;
  font-size: 180px;
  line-height: 1;
  font-weight: 400;
  color: #b2691d;
  opacity: 0.7;
  display: inline-block;
  margin: 0;
  text-align: center;
  transform: scale(1);
  letter-spacing: 0;
}

.hero__subtitle {
  font-size: 21px;
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 2.5px;
  margin-bottom: 24px;
  margin-top: 80px;
}

.hero__date {
  font-family: 'Great Vibes', 'Ekaterina Velikaya Two', cursive;
  font-size: 30px;
  font-weight: 400;
  color: #b2691d;
  letter-spacing: 1px;
  opacity: 0.85;
}

/* СТРЕЛКА ПРОКРУТКИ */
.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: bounce 2s infinite;
  cursor: pointer;
}

.scroll-hint__text {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.scroll-hint__arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--sandy-dark);
  border-bottom: 2px solid var(--sandy-dark);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.scroll-hint:hover .scroll-hint__arrow {
  transform: rotate(45deg) translateY(4px);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
  40% { transform: translateY(-10px) translateX(-50%); }
  60% { transform: translateY(-5px) translateX(-50%); }
}

/* СЕКЦИИ */
.section {
  padding: 80px 0;
  background-color: transparent;
  position: relative;
}

.section--alt {
  background-color: transparent;
}

.section__title {
  font-size: 28px;
  font-weight: 300;
  text-align: center;
  color: #b2691d;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
  width: 100%;
}

.section__title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background-color: #b2691d;
}

/* БЛОК 2 - ТЕКСТ ПРИГЛАШЕНИЯ */
.invitation-text {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.invitation-text__content {
  font-family: 'Inter', sans-serif;
  font-size: 21px;
  font-weight: 300;
  font-style: normal;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  text-align: center;
  line-height: 1.5;
  max-width: 700px;
  margin: 0 auto;
}

/* БЛОК 3 - ЛОКАЦИЯ */
.venue-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 20px 0;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.venue-card__icon {
  font-size: 32px;
  margin-bottom: 16px;
  display: block;
}

.venue-card__name {
  font-size: 22px;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.venue-card__address {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 24px;
  line-height: 1.6;
}

.venue-card__link {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: #cf7d26;  /* меняем цвет текста */
  background: transparent;
  border: 1px solid #b2691d;  /* меняем цвет рамки */
  border-radius: 30px;
  text-decoration: none;
  transition: var(--transition);
}

.venue-card__link:hover {
  background: #b2691d;  /* фон при наведении */
  color: white;
}

/* БЛОК 5 - ТАЙМИНГ ДНЯ */
.timeline-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  max-width: 500px;
  margin: 0 auto;
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px dashed #d4d4d4;
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-item__time {
  font-size: 18px;
  font-weight: 600;
  color: #8f8f8f;
}

.timeline-item__event {
  font-size: 16px;
  color: var(--text-secondary);
}

/* ТАЙМЕР */
.countdown--event {
  display: flex;
  gap: 16px;
  margin: 48px auto 16px;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex-wrap: wrap;
}

.countdown--event .countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 75px;
  background: transparent;
  padding: 16px 12px;
  border-radius: var(--radius);
  border: 1px solid #d4d4d4;
}

.countdown--event .countdown__number {
  font-size: 32px;
  font-weight: 300;
  color: #b2691d;
  line-height: 1.2;
}

.countdown--event .countdown__label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 8px;
}

.timer-label {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
  font-style: italic;
}

/* Блок 6 - Дресс-код */
.dress-code {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px 0;
  text-align: center;
}

.dress-code__text {
  font-family: 'Inter', sans-serif;
  font-size: 21px;
  font-weight: 300;
  font-style: normal;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  line-height: 1.5;
}

/* Блок 7 - Цветочный фонд */
.flower-fund {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px 0;
  text-align: center;
}

.flower-fund__text {
  font-family: 'Inter', sans-serif;
  font-size: 21px;
  font-weight: 300;
  font-style: normal;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  line-height: 1.5;
}

/* БЛОК 8 - ФОРМА RSVP */
.rsvp-deadline {
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: #b2691d;
  margin-bottom: 8px;
}

.rsvp-deadline__date {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.form-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 20px 0;
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #d4d4d4;
  border-radius: var(--radius);
  outline: none;
  transition: var(--transition);
}

.form-input:focus {
  border-color: #8f8f8f;
  box-shadow: 0 0 0 3px rgba(143, 143, 143, 0.2);
}

.radio-group {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 30px;
  transition: var(--transition);
  border: 1px solid #d4d4d4;
}

.radio-label:hover {
  background: rgba(143, 143, 143, 0.1);
}

.radio-label input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  cursor: pointer;
  accent-color: #8f8f8f;
}

/* Трансфер в форме */
.transfer-section {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #d4d4d4;
}

.transfer-section__text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-style: italic;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-primary);
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 30px;
  transition: var(--transition);
  border: 1px solid #d4d4d4;
}

.checkbox-label:hover {
  background: rgba(143, 143, 143, 0.1);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  cursor: pointer;
  accent-color: #8f8f8f;
}

/* Напитки */
.drink-preferences__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.drink-options--checkbox {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.drink-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 30px;
  border: 1px solid #d4d4d4;
}

.drink-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  cursor: pointer;
  accent-color: #8f8f8f;
}

.drink-option .drink-option__label {
  display: inline-block;
  padding: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: white;
  background: #b2691d;  /* меняем фон кнопки */
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.5px;
  width: 100%;
}

.btn:hover {
  background: #8f5a16;  /* более тёмный оттенок для наведения */
  box-shadow: var(--shadow-hover);
}

.waiting-message {
  text-align: center;
  margin-top: 60px;
  padding: 32px 24px;
}

.waiting-message p {
  font-family: 'Great Vibes', 'Ekaterina Velikaya Two', cursive;
  font-size: 28px;
  font-weight: 400;
  color: #b2691d;
  letter-spacing: 1px;
  opacity: 0.85;
  line-height: 1.4;
}

/* ПОЛЕ ПОЖЕЛАНИЙ */
#wishes-group {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* АДМИН-ПАНЕЛЬ */
.admin-link {
  text-align: center;
  padding: 40px 0 60px;
}

.admin-link__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: var(--text-light);
  background: transparent;
  border: 1px solid #d4d4d4;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.admin-link__btn:hover {
  color: var(--text-secondary);
  border-color: #8f8f8f;
  background: rgba(143, 143, 143, 0.1);
}

.admin-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(250, 248, 245, 0.97);
  z-index: 1000;
  overflow-y: auto;
  padding: 40px 24px;
}

.admin-overlay.active {
  display: block;
}

.admin-panel {
  max-width: 1400px;
  width: 95%;
  margin: 0 auto;
}

.admin-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid #d4d4d4;
}

.admin-panel__title {
  font-size: 24px;
  font-weight: 300;
  color: var(--text-primary);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.admin-panel__close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-light);
  background: transparent;
  border: 1px solid #d4d4d4;
  border-radius: var(--radius);
  cursor: pointer;
}

.admin-login {
  max-width: 400px;
  margin: 100px auto;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #d4d4d4;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  text-align: center;
}

.admin-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.stat-card {
  flex: 1;
  min-width: 150px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #d4d4d4;
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
}

.stat-card__number {
  font-size: 32px;
  font-weight: 300;
  color: #8f8f8f;
  line-height: 1;
}

.admin-controls {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  align-items: center;
}

.admin-controls__search {
  flex: 2;
  min-width: 250px;
  padding: 12px 18px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #d4d4d4;
  border-radius: 30px;
  outline: none;
}

.admin-btn {
  padding: 12px 24px;
  font-size: 13px;
  font-weight: 500;
  color: white;
  background: #8f8f8f;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  text-transform: uppercase;
}

.admin-btn--danger {
  background: #C62828;
}

.admin-btn--danger:hover {
  background: #B71C1C;
}

.guest-table-wrapper {
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  padding: 20px;
}

.guest-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 1000px;
}

.guest-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #8f8f8f;
  text-transform: uppercase;
  border-bottom: 1px solid #d4d4d4;
}

.guest-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #d4d4d4;
}

.guest-table__delete {
  padding: 6px 12px;
  font-size: 12px;
  color: #C62828;
  background: transparent;
  border: 1px solid #FFCDD2;
  border-radius: 20px;
  cursor: pointer;
}

.footer {
  text-align: center;
  padding: 40px 24px;
  font-size: 12px;
  color: var(--text-light);
  font-weight: 300;
  letter-spacing: 1px;
}

/* АДАПТИВ */
@media (max-width: 768px) {
  .hero__name-daria {
    font-size: 68px;
  }
  .hero__ampersand {
    padding: 0 20px;
  }
  .hero__name-alexander {
    font-size: 56px;
  }
  .hero__ampersand-symbol {
    font-size: 180px;
  }
  .hero__subtitle {
    font-size: 17px;
    margin-top: 60px;
  }
  .hero__date {
    font-size: 24px;
  }
  .section {
    padding: 60px 0;
  }
  .section__title {
    font-size: 22px;
  }
  .countdown--event .countdown__item {
    min-width: 65px;
    padding: 12px 8px;
  }
  .countdown--event .countdown__number {
    font-size: 24px;
  }
  .radio-group {
    flex-direction: column;
    gap: 10px;
  }
  .drink-options--checkbox {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero__ampersand-symbol {
    font-size: 180px;
  }
}


@media (max-width: 480px) {
  .hero__name-daria {
    font-size: 60px;
  }
  .hero__name-alexander {
    font-size: 46px;
    margin-top: 14px;
  }
  .hero__ampersand-symbol {
    font-size: 70px;
    padding-left: 6px;
  }
  .hero__names {
    gap: 0.15em;
  }
  .hero__subtitle {
    font-size: 15px;
    margin-top: 50px;
  }
  .hero__date {
    font-size: 22px;
    letter-spacing: 1px;
  }
  .timeline-item__time {
    font-size: 16px;
  }
  .timeline-item__event {
    font-size: 14px;
  }
  .countdown--event .countdown__item {
    min-width: 55px;
    padding: 10px 6px;
  }
  .countdown--event .countdown__number {
    font-size: 18px;
  }
  .waiting-message {
    font-size: 16px;
  }
}

@media (max-width: 400px) {
  .hero__name-daria {
    font-size: 52px;
  }
  .hero__name-alexander {
    font-size: 40px;
    margin-top: 12px;
  }
  .hero__ampersand-symbol {
    font-size: 60px;
    padding-left: 6px;
  }
}

@media (max-width: 360px) {
  .hero__name-daria {
    font-size: 46px;
  }
  .hero__name-alexander {
    font-size: 36px;
    margin-top: 10px;
  }
  .hero__ampersand-symbol {
    font-size: 52px;
    padding-left: 6px;
  }
}