/* Основные стили */
:root {
    --primary-color: #d4a373;
    --secondary-color: #f0c9a3;
    --text-color: #f8f8f8;
    --light-text: #e0e0e0;
    --dark-bg: rgba(26, 26, 46, 0.95);
    --gold-gradient: linear-gradient(135deg, #f0c9a3, #d4a373);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #0a0a1a;
    overflow-x: hidden;
}

/* Фоновые элементы */
.cosmic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    overflow: hidden;
}

.content-wrapper {
    position: relative;
    z-index: 1;
}

/* Общие стили секций */
section {
    position: relative;
    z-index: 1;
    padding: 80px 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
    opacity: 0;
    transform: translateY(20px);
    background-color: var(--dark-bg);
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

section::before,
section::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 163, 115, 0.4), transparent);
}

section::before {
    top: 0;
}

section::after {
    bottom: 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Стили для конкретных секций */
/* Стили для героя */
/* Главный баннер */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  isolation: isolate;
  cursor: pointer;
}

.hero-background {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('./images/IMG_3940.jpg') center/cover no-repeat;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(26, 26, 46, 0.7));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 90%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.hero-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.hero-content p {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.countdown {
  font-size: 2rem;
  letter-spacing: 2px;
  font-weight: bold;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 15px 30px;
  border-radius: 10px;
  display: inline-block;
  color: #fff;
  border: 1px solid rgba(212, 163, 115, 0.3);
}

.click-hint {
  position: absolute;
  bottom: 30px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 10px 20px;
  border-radius: 20px;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  z-index: 3;
  animation: bounce 2s infinite;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.show-text .hero-content {
  opacity: 1;
}

.show-text .click-hint {
  display: none;
}

.invitation-fullscreen {
    background-color: transparent;
    height: 100vh;
    padding: 0;
}
.program-section {
    background-color: rgba(26, 26, 46, 0);
}
.location {
    background-color: rgba(26, 26, 46, 0);
}
.gifts-section {
    background-color: rgba(26, 26, 46, 0);
    text-align: center;
}
.guest-form {
    background-color: rgba(26, 26, 46, 0);
}
.contacts {
    background-color: rgba(26, 26, 46, 0);
}
.map-section {
    padding: 0 !important;
    background: transparent !important;
}
html.block-scroll,
body.block-scroll {
  overflow: hidden;
  height: 100%;
  touch-action: none; /* предотвращает скролл на iOS */
}

.invitation-container {
  min-height: 100vh; /* Занимает всю высоту экрана */
  padding: 80px 0; /* Большие отступы сверху и снизу */
}

.invitation-text-content {
  padding: 0 100px; /* Увеличиваем боковые отступы */
}

.invitation-poem {
  margin-bottom: 80px; /* Увеличиваем отступ перед подписью */
  font-size: 2rem; /* Чуть увеличим размер шрифта */
  line-height: 1.8; /* Больший межстрочный интервал */
}

.invitation-poem p {
  margin-bottom: 25px; /* Увеличиваем отступ между строками */
}

@media (max-width: 768px) {
  .invitation-container {
    display: flex;
    flex-direction: column-reverse; 
  }

  .invitation-photo {
    width: 100%;
    height: auto;
    padding: 10px 20px;
  }

  .invitation-photo img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .invitation-text-content {
    padding: 30px 20px;
    text-align: center;
  }
}

/* Стили для блока пожеланий */
.gifts-content {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--light-text);
}
.gifts-content p {
    margin-bottom: 20px;
}
.gift-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    animation: pulse 2s infinite;
}

/* Стили для приглашения */
.invitation-container {
    display: flex;
    width: 100%;
    height: 100%;
    max-width: 1800px;
    margin: 0 auto;
}
.invitation-photo {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.invitation-photo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  width: auto;
  height: auto;
  transition: transform 1s ease;
}

.invitation-container:hover .invitation-photo img {
    transform: scale(1.03);
}
.invitation-text-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 80px;
    animation: fadeInRight 1s ease-out;
    position: relative;
    z-index: 2;
}
.invitation-text-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 40px;
    position: relative;
}
.invitation-text-content h2::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 100px;
    height: 3px;
    background: var(--gold-gradient);
    border-radius: 3px;
}
.invitation-poem {
    font-size: 1.8rem;
    line-height: 1.6;
    margin-bottom: 60px;
    color: var(--light-text);
}
.invitation-poem p {
    margin-bottom: 15px;
    position: relative;
    padding-left: 20px;
}
.invitation-poem p::before {
  content: none; /* отключаем у всех */
}

.invitation-poem p:first-of-type::before {
  content: "❦";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary-color);
  font-size: 1.8rem;
}
.invitation-signature {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: right;
    animation: fadeInUp 1s ease-out 0.3s forwards;
}

/* Стили для таймлайна */
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}
.section-title::after {
    content: "";
    display: block;
    width: 100px;
    height: 3px;
    background: var(--gold-gradient);
    margin: 20px auto 0;
    border-radius: 3px;
}
.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}
.timeline-container::before {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--gold-gradient);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 10px;
}
.timeline-item {
    position: relative;
    margin-bottom: 50px;
    display: flex;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}
.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}
.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border: 4px solid #1a1a2e;
    border-radius: 50%;
    left: 50%;
    transform: translateX(-50%);
    top: 30px;
    box-shadow: 0 0 0 4px rgba(212, 163, 115, 0.3);
    z-index: 2;
}
.timeline-content {
    width: calc(50% - 40px);
    position: relative;
    background: rgba(40, 40, 70, 0.7);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(212, 163, 115, 0.2);
}
.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    background: rgba(50, 50, 80, 0.8);
}
.timeline-time {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}
.timeline-details h3 {
    font-size: 1.5rem;
    margin: 0 0 10px 0;
    color: #fff;
}
.timeline-description {
    font-size: 1.1rem;
    color: var(--light-text);
    line-height: 1.5;
    margin: 0;
}
.timeline-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--gold-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}
.timeline-content:hover .timeline-icon {
    transform: scale(1.1);
}

/* Стили для локации */
.location-container {
    text-align: center;
}
.image-wrapper {
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin: 30px 0;
    position: relative;
}
.image-wrapper::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(26, 26, 46, 0.3);
    z-index: 1;
}
.location-container img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}
.image-wrapper:hover img {
    transform: scale(1.03);
}
.info-section {
    margin-top: 20px;
}
.time-section {
    display: inline-block;
    padding: 10px 25px;
    background: var(--gold-gradient);
    color: white;
    border-radius: 30px;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Стили для карты */
#map {
    width: 100%;
    height: 400px;
    border-radius: 0;
    overflow: hidden;
    margin: 0;
    background: rgba(26, 26, 46, 0.9);
}

/* Стили для формы */
.guest-form h2 {
    margin-bottom: 20px;
}
.deadline {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 40px;
    color: var(--light-text);
}
.form-group {
    margin-bottom: 30px;
    animation: fadeInUp 0.5s ease-out;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--light-text);
}
.form-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(212, 163, 115, 0.3);
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    background-color: rgba(40, 40, 70, 0.7);
    transition: border-color 0.3s ease;
    color: var(--text-color);
}
.form-group input[type="text"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(212, 163, 115, 0.2);
    background: rgba(50, 50, 80, 0.8);
}
.radio-group, .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: rgba(40, 40, 70, 0.7);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(212, 163, 115, 0.2);
}
.radio-group label, .checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: color 0.3s ease;
    color: var(--light-text);
}
.radio-group label:hover, .checkbox-group label:hover {
    color: var(--primary-color);
}
.cta-button {
    background: var(--gold-gradient);
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    width: 100%;
    margin-top: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.cta-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20px;
    height: 200%;
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(25deg);
    transition: all 0.5s;
}
.cta-button:hover::after {
    left: 120%;
}
.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Стили для контактов */
.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* Стили для футера */
footer {
    text-align: center;
    padding: 20px;
    background-color: rgba(20, 20, 35, 0.95);
    color: white;
}

/* Анимации */
@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 fadeInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-15px);}
    60% {transform: translateY(-7px);}
}
@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Звездная анимация */
.star {
    position: absolute;
    background-color: #ffffff;
    border-radius: 50%;
    animation: twinkle var(--duration, 3s) infinite var(--delay, 0s);
    z-index: -1;
}

/* Адаптивность */
@media (max-width: 768px) {
    
    .hero-content h1 {
        font-size: 3rem;
    }
    .hero-content p {
        font-size: 1.5rem;
    }
    .countdown {
        font-size: 1.5rem;
    }
    .invitation-container {
        flex-direction: column;
    }
    .invitation-photo {
        height: 50vh;
    }
    .invitation-photo::before {
        background: linear-gradient(to bottom, rgba(26, 26, 46, 0.8), transparent 70%);
    }
    .invitation-text-content {
        padding: 60px 30px;
    }
    .invitation-text-content h2 {
        font-size: 2.5rem;
    }
    .invitation-poem {
        font-size: 1.3rem;
    }
    .section-title {
        font-size: 2.5rem;
    }
    .timeline-container::before {
        left: 40px;
    }
    .timeline-content {
        width: calc(100% - 100px);
        margin-left: 80px !important;
        text-align: left !important;
    }
    .timeline-icon {
        left: -80px !important;
    }
    .contact-buttons {
        flex-direction: column;
    }
    .invitation-text-content h2::after {
        left: 50%;
        transform: translateX(-50%);
    }
}
@media (max-width: 480px) {
    .section-title {
        font-size: 2rem;
    }
    .timeline-content {
        padding: 20px;
    }
    .timeline-time {
        font-size: 1.3rem;
    }
    .timeline-details h3 {
        font-size: 1.3rem;
    }
    .timeline-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    .invitation-text-content {
        padding: 40px 20px;
    }
    .gifts-content {
        font-size: 1.1rem;
    }
    .time-section {
        font-size: 0.9rem;
        padding: 8px 20px;
    }
}