body {
    font-family: 'Poppins', sans-serif;
    background-color: #FDFBF8;
    color: #5C5C5C;
    cursor: none;
    overflow-x: hidden;
}

.body-no-scroll {
    overflow: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif;
}

.anketa-title {
    text-align: center;
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    width: 100%;
    margin: 0 auto;
}

#image-opener {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

/* iOS fix для object-fit */
.ios-img-fix {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    font-family: 'object-fit: cover;'; /* для поддержки старых браузеров */
}

/* Дополнительный фикс для iOS */
@supports (-webkit-touch-callout: none) {
    .h-screen {
        height: -webkit-fill-available;
    }
    
    .ios-img-fix {
        /* Убеждаемся что изображение покрывает всю область */
        min-height: 100%;
        min-width: 100%;
    }
}

.hero-bg {
    background-image: url('assets/main_content_start_photo.jpeg');
    background-size: cover;
    background-position: center;
    animation: kenburns 20s ease-out infinite;
}

.section-title {
    font-size: 3rem;
    font-weight: 400;
    color: #C7A19A;
    text-align: center;
    margin-bottom: 2rem;
}

.btn-primary {
    background-color: #C7A19A;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background-color: #C57D75;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #E5E7EB;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #C7A19A;
    box-shadow: 0 0 0 3px rgba(168, 139, 106, 0.2);
}


/* custom main wrapper replacing Tailwind container */
.main-custom {
    width: 100%;
    padding: 0px;
}

/* inner content wrapper to simulate container max-width */
.content-wrapper {
    max-width: 1000px; /* adjust as needed or match Tailwind container values */
    margin-left: auto;
    margin-right: auto;
}


/* hide main content until opener is dismissed */
#main-content-wrapper {
    opacity: 0;
    transition: opacity 1s ease;
}

#dop-block {
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: 10%;
    top: 60%;
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#photo-button {
    background: none;
    border: none;
    cursor: pointer;
    width: 90vw; /* Обязательно укажите ширину */
    height: 20vh; /* Обязательно укажите высоту */
    background-image: url('assets/photoshop/konvert.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    /* Убираем лишнее правило для #photo-button img, так как его нет */
}

#dop-text {
    margin-top: 20px;
    text-align: center;
    font-size: 0.85em;
}

/* Удаляем этот селектор, так как внутри кнопки нет img */
/* #photo-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 3;
} */

/* Animations */
/* countdown numbers use Times New Roman */
#countdown-timer,
#countdown-timer div,
#countdown-timer span {
    font-family: "Times New Roman", Times, serif;
}

@keyframes kenburns {
    0% {
        transform: scale(1.05) translate(0, 0);
    }

    50% {
        transform: scale(1) translate(-1%, 1%);
    }

    100% {
        transform: scale(1.05) translate(0, 0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-on-scroll {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: scale(1);
}

/* Applying cascade delays */
#couple .animate-on-scroll:nth-child(2) {
    transition-delay: 200ms;
}

#events .card:nth-child(1) {
    transition-delay: 100ms;
}

#events .card:nth-child(2) {
    transition-delay: 200ms;
}

#events .card:nth-child(3) {
    transition-delay: 300ms;
}

/* Gallery Styles */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    font-size: 1.25rem;
    font-family: 'Playfair Display', serif;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    border: 2px solid #C7A19A;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s, transform 0.1s linear;
    z-index: 10002;
}

.custom-cursor.hovered {
    width: 40px;
    height: 40px;
    background-color: rgba(168, 139, 106, 0.2);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    opacity: 1;
    pointer-events: auto;
}

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    user-select: none;
}

.lightbox-close {
    top: 20px;
    right: 30px;
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

/* Music Player */
#music-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #C7A19A;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    cursor: pointer;
}






/* модальное окно в начале */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(252, 251, 247);
    font-family: "Times New Roman", Times, serif;

    /* Исправляем центрирование */
    display: flex;
    align-items: center; /* Центрирование по вертикали */
    justify-content: center; /* Центрирование по горизонтали */
    margin: 0; /* Убираем возможные отступы */
    padding: 0; /* Убираем возможные отступы */
    box-sizing: border-box; /* Учитываем padding в размерах */
    
    /* Добавляем безопасные отступы для модального окна */
    overflow-y: auto; /* Добавляем скролл если контент не помещается */
}

/* Важно: изначально модальное окно скрыто */
.modal {
    display: none;
}

.modal.show {
    display: flex; /* Показываем с правильным центрированием */
}

.modal-content {
    background-color: rgb(252, 251, 247);
    padding: 20px 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: modalFadeIn 0.3s ease;
    
    /* Добавляем отступы для маленьких экранов */
    margin: 20px auto; /* Добавляем отступы сверху и снизу */
    max-height: calc(100vh - 40px); /* Ограничиваем высоту с учетом отступов */
    overflow-y: auto; /* Добавляем скролл внутри контента если нужно */
    border-radius: 20px; /* Добавляем скругление для красоты */
    
    /* Добавляем тень для объема (опционально) */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content p {
    margin: 10px 0;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
}

.modal-content .big-text {
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 15px 0;
    color: #000;
}

.qr-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.qr-placeholder {
    width: 220px;
    height: 220px;
    background-color: #f5f5f5;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #999;
    
    /* Добавляем для лучшего отображения изображения */
    overflow: hidden;
}

.qr-placeholder img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    
    /* Добавляем для правильного масштабирования */
    object-fit: contain;
}

/* Стили для кнопки закрытия (опционально) */
.modal-close {
    position: fixed; /* Меняем с absolute на fixed */
    top: 30px;
    right: 40px;
    color: #333;
    font-size: 50px;
    cursor: pointer;
    font-weight: 300;
    line-height: 1;
    z-index: 10000;
    
    /* Добавляем для лучшего позиционирования */
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #666;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 15px 20px;
        margin: 15px auto;
    }
    
    .qr-placeholder {
        width: 180px;
        height: 180px;
    }
    
    .modal-close {
        top: 15px;
        right: 20px;
        font-size: 40px;
    }
    
    .modal-content .big-text {
        font-size: 1rem;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 380px) {
    .modal-content {
        padding: 10px 15px;
    }
    
    .qr-placeholder {
        width: 150px;
        height: 150px;
    }
}




/*для кнопки*/
#openFormBtn {
    /* Прозрачный фон */
    background: transparent;
    font-family: "Times New Roman", Times, serif;
    
    /* Черные края */
    border: 1px solid #000000;
    
    /* Закругленные углы */
    border-radius: 12px;
    
    /* Убираем тень */
    box-shadow: none;
    
    /* Текст */
    color: #000000;
    font-size: 18px;
    /*font-weight: 600;*/
    padding: 14px 32px;
    
    /* Курсор */
    cursor: pointer;
    
    /* Убираем стандартный фон кнопки */
    outline: none;
    
    /* Отключаем все анимации и переходы */
    transition: none;
    animation: none;
}
/* Убираем все эффекты при наведении */
#openFormBtn:hover {
    background: transparent;
    border: 1px solid #000000;
    transform: none;
}
/* Убираем все эффекты при нажатии */
#openFormBtn:active {
    transform: none;
}
/* Убираем псевдоэлементы */
#openFormBtn::before {
    display: none;
}
/* Для лучшей видимости текста на разных фонах */
/* .transparent-btn {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}*/


















    /* Затемненный фон */
    .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    
    /* Центрирование */
    display: flex;
    justify-content: center;
    align-items: center;
    
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    
    /* Добавляем отступы для безопасности */
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay.active {
    visibility: visible;
    opacity: 1;
    /* Убираем дублирующийся display */
}

#guestForm {
    margin-top: 10%
}

/* Контейнер формы - теперь будет адаптироваться под размеры экрана */
.form-container {
    background-color: rgb(252, 251, 247);
    width: 100%;
    max-width: 600px; /* Максимальная ширина для больших экранов */
    max-height: calc(100vh - 40px); /* Учитываем отступы */
    overflow-y: auto;
    border-radius: 12px;
    padding: 30px;
    position: relative;
    /*box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);*/
    margin-top: 20;
    /* Анимация появления */
    animation: formFadeIn 0.3s ease;
}
    /* Кнопка закрытия */
    .close-btn {
        position: absolute;
        top: 15px;
        right: 20px;
        font-size: 28px;
        cursor: pointer;
        color: #666;
        background: none;
        border: none;
        padding: 5px 10px;
    }
    .close-btn:hover {
        color: #333;
    }
    /* Заголовок */
    h2 {
        text-align: center;
        margin-bottom: 25px;
        color: #1F2937;
    }
    /* Элементы формы */
    .form-group {
        margin-bottom: 20px;
        font-size: 0.8rem;
    }
    label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        color: #374151;
    }
    input[type="text"] {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid #D1D5DB;
        border-radius: 6px;
        font-size: 16px;
        transition: border-color 0.2s;
    }
    input[type="text"]:focus {
        outline: none;
        border-color: #4F46E5;
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    }
    /* Стили для радио и чекбоксов */
    .radio-group, .checkbox-group {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 5px;
    }
    .radio-item, .checkbox-item {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .radio-item input[type="radio"], 
    .checkbox-item input[type="checkbox"] {
        width: 18px;
        height: 18px;
        cursor: pointer;
    }
    .radio-item label, 
    .checkbox-item label {
        margin-bottom: 0;
        cursor: pointer;
        font-weight: normal;
    }


.submit-btn  {
    /* Прозрачный фон */
    background: transparent;
    font-family: "Times New Roman", Times, serif;
    
    /* Черные края */
    border: 1px solid #000000;
    
    /* Закругленные углы */
    border-radius: 12px;
    
    /* Убираем тень */
    box-shadow: none;
    
    /* Текст */
    color: #000000;
    font-size: 18px;
    /*font-weight: 600;*/
    padding: 14px 32px;
    
    /* Курсор */
    cursor: pointer;
    
    /* Убираем стандартный фон кнопки */
    outline: none;
    
    /* Отключаем все анимации и переходы */
    transition: none;
    animation: none;
}
/* Убираем все эффекты при наведении */
.submit-btn :hover {
    background: transparent;
    border: 1px solid #000000;
    transform: none;
}
/* Убираем все эффекты при нажатии */
.submit-btn :active {
    transform: none;
}
/* Убираем псевдоэлементы */
.submit-btn ::before {
    display: none;
}


    /* Сообщение об ошибке/успехе */
    .form-message {
        text-align: center;
        margin-top: 15px;
        padding: 10px;
        border-radius: 6px;
    }
    .error-message {
        color: #DC2626;
    }
    .error-border {
        border-color: #DC2626 !important;
    }
    hr {
        margin: 20px 0;
        border: none;
        border-top: 1px solid #E5E7EB;
    }
    /* Адаптация для мобильных */
    @media (max-width: 640px) {
        .form-container {
            padding: 20px;
            width: 100vw;
        }
        
        .submit-btn {
            width: 100%;
        }
    }




#image-opener-2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    background-color: rgb(252, 251, 247);
    display: none; /* Скрыт по умолчанию */
    overflow-y: auto; /* Добавляем скролл если контент не помещается */
}

#image-opener-2 .fullscreen-bg {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Исправляем форму */
#image-opener-2 .form-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background-color: rgb(252, 251, 247);
    border-radius: 12px;
    padding: 30px;
    box-sizing: border-box;
}

/* Адаптация для мобильных */
@media (max-width: 640px) {
    #image-opener-2 .form-container {
        padding: 20px;
        width: 100%;
        max-width: 100%;
    }
}