/* Подключаем шрифты */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@600&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

/* Базовые настройки и жесткая блокировка ширины */
:root {
    --bg-color: #FDF6F5; 
    --text-color: #333333; 
    --accent-color: #D4A3A3; 
}

html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    max-width: 100%;
    overflow-x: hidden; /* Жестко запрещаем вылезать за края */
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Playfair Display', serif;
}

* {
    box-sizing: border-box;
}

/* ========================================= */
/* --- 1. ПЕРВЫЙ ЭКРАН (HERO) --- */
/* ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    text-align: center;
}

h1 {
    font-size: 2.2rem; /* Сделали крупнее */
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 30px;
}

.script-font {
    font-family: 'Dancing Script', cursive;
    font-size: 3.5rem; /* Очень крупный акцент */
    color: var(--accent-color);
    display: block;
    margin-top: -5px;
    line-height: 1.1;
    word-wrap: break-word; /* Чтобы длинные слова переносились */
}

.image-wrapper {
    position: relative;
    width: 90%; 
    max-width: 320px; 
    margin: 0 auto;
}

.main-photo {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.foreground-flowers {
    position: absolute;
    bottom: -53px; 
    right: 0px;  
    width: 110%; /* Цветы станут покрупнее */
    z-index: 2;    
    pointer-events: none; 
}

@media (min-width: 768px) {
    /* ... твои другие стили для ПК ... */

    /* Исправляем цветы для большого экрана */
    .foreground-flowers {
        width: 110%; /* Делаем их визуально меньше относительно большой фотки */
        bottom: -86px; /* Чуть сдвигаем вниз */
        right: 0px;  /* Выдвигаем правее за край рамки */
    }
}

.subtitle {
    font-size: 1.3rem; /* Читаемый текст под фото */
    font-style: italic;
    line-height: 1.5;
    margin-top: 40px;
    color: #555;
}

/* ========================================= */
/* --- 2. ВТОРОЙ ЭКРАН (КОЛЛАЖ) --- */
/* ========================================= */
.wishes-collage {
    padding: 80px 20px;
    background-color: #FCEBEB; 
    width: 100%;
}

.collage-container {
    display: flex;
    flex-direction: column;
    gap: 70px; /* Отступы между блоками */
}

.collage-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
}

/* Рамки-полароиды для телефона */
.collage-item .img-wrapper {
    background: #ffffff;
    padding: 12px 12px 40px 12px; /* Толстый низ */
    border-radius: 4px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    width: 90%; /* Широкие карточки */
    max-width: 350px;
}

.item-her .img-wrapper {
    padding-bottom: 50px; /* Для её фото низ еще толще */
}

.collage-item .img-wrapper img {
    width: 100%;
    display: block;
    border-radius: 2px;
}

.collage-item .text-wrapper p {
    font-size: 1.4rem; /* Крупный текст */
    color: #444;
    line-height: 1.4;
    padding: 0 10px;
}

.small-script {
    font-size: 3.5rem; /* Огромные красивые надписи */
    color: var(--accent-color);
    margin-bottom: 0;
    display: block;
}

/* ========================================= */
/* --- 3. ТРЕТИЙ ЭКРАН (КАРТЫ) --- */
/* ========================================= */
.scattered-cards {
    padding: 80px 20px 100px; 
    text-align: center;
}

.scattered-cards h2 {
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 60px;
}

.scattered-cards h2 .script-font {
    font-size: 3rem; /* Немного уменьшили, чтобы влезло в экран */
}

/* Стол для карт */
.cards-table {
    position: relative; 
    width: 100%;
    max-width: 380px;
    height: 550px; /* Высота стола, чтобы карты поместились */
    margin: 0 auto;
}

/* Сами карты */
.card {
    position: absolute; 
    width: 45%; /* Каждая карта занимает почти половину ширины */
    background: #ffffff;
    padding: 10px 10px 35px 10px; 
    border-radius: 4px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.card img {
    width: 100%;
    display: block;
}

/* Точные координаты для телефона */
.card-1 { top: 0; left: 2%; transform: rotate(-10deg); z-index: 1; }
.card-2 { top: 50px; right: 2%; transform: rotate(14deg); z-index: 2; }
.card-3 { top: 250px; left: 5%; transform: rotate(-6deg); z-index: 3; }
.card-4 { top: 300px; right: 5%; transform: rotate(10deg); z-index: 4; }

/* ========================================= */
/* --- АНИМАЦИИ --- */
/* ========================================= */
.animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}
.delay-1 { transition-delay: 0.3s; }
.delay-2 { transition-delay: 0.6s; }
.animate.visible { opacity: 1; transform: translateY(0); }

/* ========================================= */
/* --- ПК ВЕРСИЯ (Адаптация) --- */
/* ========================================= */
@media (min-width: 768px) {
    h1 { font-size: 3.5rem; }
    .script-font { font-size: 5rem; }
    .image-wrapper { max-width: 500px; }
    
    .collage-container { max-width: 1000px; margin: 0 auto; }
    .collage-item { flex-direction: row; text-align: left; gap: 50px; justify-content: center; }
    .item-sushi { justify-content: flex-start; }
    .item-bun { flex-direction: row-reverse; text-align: right; justify-content: flex-end; }
    .item-weeknd { flex-direction: column; text-align: center; }
    .item-her { margin: 40px 0; }
    
    .collage-item .img-wrapper { max-width: 320px; }
    .item-sushi .img-wrapper { transform: rotate(-4deg); }
    .item-bun .img-wrapper { transform: rotate(5deg); }
    .item-her .img-wrapper { transform: rotate(-2deg); max-width: 400px; }
    .item-weeknd .img-wrapper { transform: rotate(3deg); }

    .cards-table { max-width: 800px; height: 650px; }
    .card { width: 260px; padding-bottom: 50px; }
    .card-1 { top: 20px; left: 5%; transform: rotate(-15deg); }
    .card-2 { top: 60px; right: 5%; transform: rotate(18deg); }
    .card-3 { top: 300px; left: 15%; transform: rotate(-7deg); }
    .card-4 { top: 340px; right: 15%; transform: rotate(12deg); }
}