@font-face {
    font-family: 'Anastasia Script';
    src: url('assets/fonts/anastasia_script.ttf') format('truetype'),
         url('assets/fonts/anastasia_script.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f4f4f4;
}

.app-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/img/IMG_9761.PNG');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.scroll-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 2;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scroll-container::-webkit-scrollbar {
    display: none;
}

.mute-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    backdrop-filter: blur(5px);
    color: #444;
    transition: all 0.3s ease;
}

.mute-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.05);
}

.mute-btn svg {
    width: 22px;
    height: 22px;
}

.page {
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 60px 20px;
    box-sizing: border-box;
    position: relative;
}

.program-page, .dresscode-page, .wishes-page, .location-page, .rsvp-page {
    min-height: auto;
    padding-top: 0;
    padding-bottom: 20px;
}

.start-page {
    background: transparent;
}

.next-page {
    background: transparent;
    min-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.subtitle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-align: center;
    color: #333;
    text-transform: uppercase;
    margin-top: 50px;
}

.names-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    position: relative;
    height: 200px;
}

.name {
    font-family: 'Anastasia Script', 'Great Vibes', cursive;
    font-size: 80px;
    color: #2b2b2b;
    line-height: 0.6;
}

.name-denis {
    transform: translateX(-40px);
}

.name-sofia {
    transform: translateX(40px);
    margin-top: 30px;
}

.date {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 3px;
    text-align: center;
    color: #333;
    margin-bottom: 50px;
}

.message-card {
    position: relative;
    width: 100%;
    max-width: 350px;
    height: 100%;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 70px 15px;
    box-sizing: border-box;
    text-align: center;
    background-image: url('assets/img/frame_transparent.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

.message-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 24px;
    letter-spacing: 1.5px;
    color: #222;
    margin: -15px 0 40px 0;
    padding: 0 10px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

.message-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 16px; /* Увеличили для читаемости */
    line-height: 1.6; /* Уменьшили интервал, так как шрифт компактнее */
    color: #2b2b2b;
    margin: 0 0 25px 0;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

.message-text:last-child {
    margin-bottom: 0;
}

/* --- ПРОГРАММА ВЕЧЕРА --- */

.program-page {
    background: transparent;
    padding: 0 15px 40px 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.program-card {
    position: relative;
    width: 100%;
    max-width: 350px;
    background-color: transparent;
    border-radius: 30px;
    padding: 60px 20px 40px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(80, 80, 80, 0.4);
    margin-top: 60px;
}

.wax-seal {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    /* transparent background now handled directly in the image */
}

.program-timing-bg {
    font-family: 'Great Vibes', cursive;
    font-size: 65px;
    color: rgba(0, 0, 0, 0.04);
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    pointer-events: none;
    white-space: nowrap;
}

.program-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 26px;
    letter-spacing: 2px;
    color: #222;
    margin: 0 0 25px 0;
    position: relative;
    z-index: 2;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255,255,255,0.8);
}

.program-intro {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 8px rgba(255,255,255,0.8);
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 35px;
    width: 100%;
    position: relative;
    z-index: 2;
    padding-left: 20px;
}

.timeline-item {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 10px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 25px;
    height: 1px;
    background-color: #888;
}

.timeline-time {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 24px;
    color: #a87b7b;
    width: 70px;
    text-align: left;
    position: relative;
    text-shadow: 0 0 5px rgba(255,255,255,0.8);
}

.timeline-desc {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 13px;
    color: #222;
    letter-spacing: 1.5px;
    padding-left: 10px;
    line-height: 1.4;
    text-transform: uppercase;
    text-shadow: 0 0 5px rgba(255,255,255,0.8);
}

/* --- ДРЕСС-КОД --- */
.dresscode-page {
    background: transparent;
    padding: 0 15px 40px 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.color-palette {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 15px;
    justify-items: center;
    margin-top: 10px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    padding: 0 10px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.color-circle {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    box-shadow: 0 5px 12px rgba(0,0,0,0.2);
}

.dresscode-card {
    border: none;
    background-color: transparent;
    padding-top: 80px;
}

.rose-img {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%) rotate(-75deg);
    width: 60px;
    height: auto;
    z-index: 3;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.15));
}

.dresscode-card .program-title {
    margin-bottom: 40px;
}

.dresscode-bg {
    top: 90px;
    font-size: 65px;
}

/* --- ПОЖЕЛАНИЯ --- */

.wishes-page {
    background: transparent;
    padding: 0 15px 40px 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.flower-emblem {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    z-index: 3;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1));
}

.wishes-bg {
    top: 70px;
    font-size: 65px;
}

.wish-item {
    margin-bottom: 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.wish-item:last-child {
    margin-bottom: 0;
}

.wish-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 15px;
    color: #4a403a;
}

.wish-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 2px;
    color: #bca495;
    margin: 0 0 15px 0;
    text-transform: uppercase;
}

.wish-item .message-text {
    font-size: 15px;
    font-weight: 400;
}

/* --- МЕСТО ВСТРЕЧИ --- */

.location-page {
    background: transparent;
    padding: 0 15px 40px 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.location-bg {
    top: 75px;
    font-size: 65px;
}


.location-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 500;
    color: #222;
    margin: 0;
    text-align: center;
    position: relative;
    z-index: 2;
}

.location-img {
    width: 100%;
    max-width: 280px;
    height: auto;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.map-btn {
    display: inline-block;
    padding: 12px 45px;
    border: 1px solid #4a403a;
    border-radius: 25px;
    background: transparent;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 2px;
    color: #4a403a;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    margin-bottom: 20px;
}

.map-btn:hover {
    background: rgba(74, 64, 58, 0.1);
}

/* --- АНКЕТА ГОСТЯ --- */
.rsvp-page {
    background: transparent;
    padding: 0 15px 60px 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.rsvp-card {
    border: none;
    background-color: transparent;
}

.rsvp-intro {
    margin-bottom: 40px;
    font-size: 16px;
    text-align: center;
}

.rsvp-form {
    width: 100%;
    text-align: left;
    position: relative;
    z-index: 2;
}

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

.form-label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    margin-bottom: 15px;
    line-height: 1.5;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #444;
    cursor: pointer;
    position: relative;
    padding-left: 35px;
}

.radio-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-custom {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: transparent;
    border: 1.5px solid #444;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.radio-label input:checked ~ .radio-custom::after {
    content: "";
    position: absolute;
    display: block;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #444;
}

.form-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid #444;
    background: transparent;
    padding: 5px 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    color: #222;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    border-bottom-color: #828873;
}

.submit-btn {
    width: 100%;
    padding: 15px 0;
    margin-top: 15px;
    background: transparent;
    border: 1px solid #444;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 2px;
    color: #444;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: rgba(68, 68, 68, 0.1);
}

/* --- CUSTOM DROPDOWN --- */
.custom-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-header {
    border-bottom: 1px solid #444;
    padding: 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #444;
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s;
}

.custom-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(68, 68, 68, 0.2);
    border-top: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 10;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.custom-dropdown.open .dropdown-list {
    max-height: 250px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #444;
    cursor: pointer;
    position: relative;
    padding: 10px 15px;
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: rgba(68, 68, 68, 0.05);
}

.checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-custom {
    position: relative;
    height: 18px;
    width: 18px;
    background-color: transparent;
    border: 1.5px solid #444;
    border-radius: 4px;
    margin-right: 12px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-label input:checked ~ .checkbox-custom::after {
    content: "";
    position: absolute;
    display: block;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: #444;
}

/* --- АДАПТАЦИЯ ПОД ТЕЛЕФОН --- */
@media (max-width: 420px) {
    body {
        background-color: #fff;
        align-items: stretch;
    }

    .app-container {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        box-shadow: none;
    }

    .subtitle {
        margin-top: 30px;
        font-size: 10px;
        letter-spacing: 1.2px;
    }

    .name {
        font-size: 68px;
    }

    .name-denis {
        transform: translateX(-28px);
    }

    .name-sofia {
        transform: translateX(28px);
        margin-top: 24px;
    }

    .message-card {
        padding: 60px 10px 55px 10px;
        min-height: 0;
    }

    .message-title {
        font-size: 22px;
        margin: -10px 0 32px 0;
    }

    .message-text {
        font-size: 15px;
    }

    .program-card {
        margin-top: 45px;
        padding: 55px 16px 35px 16px;
    }

    .program-title {
        font-size: 24px;
    }

    .program-timing-bg,
    .dresscode-bg,
    .wishes-bg,
    .location-bg {
        font-size: 55px;
        top: 60px;
    }

    .timeline {
        gap: 25px;
        padding-left: 14px;
    }

    .timeline-time {
        font-size: 20px;
        width: 62px;
    }

    .timeline-desc {
        font-size: 12px;
        letter-spacing: 1.2px;
    }

    .carousel-scroll {
        padding-left: 20px;
        padding-right: 20px;
    }

    .carousel-img {
        flex: 0 0 210px;
        height: 280px;
    }

    .carousel-btn {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

    .map-btn {
        font-size: 14px;
        padding: 12px 38px;
    }
}

/* На touch-устройствах hover почти нет — поэтому показываем стрелки сразу */
@media (hover: none) {
    .carousel-btn {
        opacity: 1;
    }

    .carousel-wrapper:hover .carousel-btn {
        opacity: 1;
    }
}
