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

@font-face {
    font-family: 'GoodTime';
    /* Проверь, чтобы путь совпадал с тем, куда ты положил файл! format('truetype') */
    src: url('/static/fonts/GoodTime.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'MonAmour';
    src: url('/static/fonts/MonAmour.ttf') format('truetype');
    /* или .ttf / truetype */
    font-weight: normal;
    font-style: normal;
}

/* === SCROLL SNAP (ПОБЛОЧНАЯ ПРОКРУТКА) === */
html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    /* Включаем прилипание по вертикали */
    height: 100vh;
    overflow-y: scroll;
}

body {
    height: 100%;
    /* overflow-x: hidden; уже есть */
}

/* Настраиваем все секции */
section,
.hero,
footer {
    /* Каждая секция занимает минимум экран */
    min-height: 100vh;

    /* Центрируем контент внутри секции */
    display: flex;
    flex-direction: column;
    justify-content: center;

    /* Точка прилипания - начало секции */
    scroll-snap-align: start;

    position: relative;
    padding: 2rem 1rem;
    /* Отступы */
}

/* Исключение для футера (он может быть маленьким) */
footer {
    min-height: auto;
    scroll-snap-align: end;
    padding: 3rem;
}

/* === АНИМАЦИЯ ПОЯВЛЕНИЯ БЛОКОВ (REVEAL) === */
.reveal-section {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease-out;
}

.reveal-section.active {
    opacity: 1;
    transform: translateY(0);
}

@font-face {
    font-family: 'Monplesir_Script';
    src: url('../fonts/MonplesirScript.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --primary: #4A148C;
    --primary-light: #7c43bd;
    --secondary: #1A237E;
    --gold: #e8b923;
    --gold-light: #F4C430;
    --bg-light: #F5F5F7;
    --bg-white: #FFFFFF;
    --text-dark: #1a1a1a;
    --text-grey: #555555;

    /* ШРИФТЫ */
    --font-names: 'GoodTime', sans-serif;
    --font-script: 'Pinyon Script', cursive;
    --font-massive: 'GoodTime', sans-serif;
    /*'Forum', serif;*/
    --font-head: 'Forum', serif;
    --font-body: 'Montserrat', sans-serif;
}

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

body {
    background-color: var(--bg-light);
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--secondary);
}

/* ================= PRELOADER ================= */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Глубокий, но чистый фон */
    background: radial-gradient(circle at center, #1a0b2e 0%, #050505 100%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 1s ease-in-out;
}

#preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* ЗВЕЗДЫ (Оставляем, они добавляют атмосферу) */
.stars-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px white;
    opacity: 0;
    will-change: opacity;
    /* GPU Optimization */
    animation: twinkle 3s infinite ease-in-out;
}

.s1 {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.s2 {
    top: 70%;
    left: 80%;
    animation-delay: 1s;
}

.s3 {
    top: 40%;
    left: 60%;
    animation-delay: 2s;
}

.s4 {
    top: 80%;
    left: 10%;
    animation-delay: 0.5s;
}

.s5 {
    top: 15%;
    left: 90%;
    animation-delay: 1.5s;
}

.s6 {
    top: 50%;
    left: 50%;
    width: 3px;
    height: 3px;
    box-shadow: 0 0 15px var(--gold);
    animation-delay: 0.8s;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* --- ТЕКСТ (ИСПРАВЛЕНА АНИМАЦИЯ) --- */
.writing-text-container {
    margin-bottom: 50px;
    position: relative;
    z-index: 10;
    /* Фиксируем ширину, чтобы текст не прыгал */
    min-width: 300px;
    text-align: center;
}

.handwriting {
    font-family: 'Monplesir_Script', cursive;
    font-size: 4rem;
    /* Чуть крупнее для эффектности */

    /* Градиент золота */
    background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* Делаем прозрачным, чтобы видеть градиент */

    white-space: nowrap;
    overflow: hidden;
    display: inline-block;
    vertical-align: bottom;

    /* Начальное состояние: ширина 0 */
    width: 0;
    border-right: 2px solid rgba(212, 175, 55, 0.5);
    /* Курсор */

    /* Анимация: 1.5 секунды пишется */
    animation:
        typeWriter 1.5s linear forwards 0.5s,
        /* start at 0.5s */
        cursorBlink 0.5s step-end infinite;

    text-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

@keyframes typeWriter {
    to {
        width: 100%;
        border-right-color: transparent;
    }
}

@keyframes cursorBlink {
    50% {
        border-color: transparent
    }
}

/* --- НОВЫЙ КОНВЕРТ (PNG C ВИБРАЦИЕЙ) --- */
.envelope-container {
    /* Центрируем картинку */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 20px;
    perspective: 1000px;
    /* Добавляет глубины для 3D вращения */
}

.envelope-shimmer {
    will-change: transform;
    /* GPU Optimization */
    /* РАЗМЕРЫ (Важно: подберите высоту, чтобы конверт не сплющился) */
    width: 320px;
    height: 220px;
    /* Стандартная пропорция для конверта */

    /* 1. ЖИВОЙ ЗОЛОТОЙ ФОН (Тот же градиент, что и в тексте) */
    background: linear-gradient(to right,
            #bf953f 0%,
            #fcf6ba 25%,
            #b38728 50%,
            #fbf5b7 75%,
            #aa771c 100%);
    background-size: 200% auto;
    /* Растягиваем для анимации */

    /* 2. МАСКА (Вырезаем форму конверта из золота) */
    -webkit-mask-image: url('/images/envelope.png');
    mask-image: url('/images/envelope.png');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;

    /* 3. ТЕНЬ (Для объема, так как обычная тень обрежется маской) */
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.5));

    /* 4. АНИМАЦИИ (Все вместе) */
    opacity: 0;
    transform: translateY(40px) scale(0.9);

    animation:
        shine 3s linear infinite,
        /* Переливание света (shimmer) */
        pngEnter 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 2s forwards,
        /* Появление */
        envelopeVibe 2.5s ease-in-out 3s infinite;
    /* Вибрация */
}

/* Примечание: Анимации pngEnter, envelopeVibe и shine уже есть в твоем файле,
   дублировать их @keyframes не нужно, они подхватятся автоматически. */

/* Адаптация для мобильных */
@media (max-width: 600px) {
    .envelope-shimmer {
        width: 260px;
        height: 180px;
        /* Уменьшаем пропорционально */
    }
}

/* АНИМАЦИЯ 1: Плавное появление */
@keyframes pngEnter {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* АНИМАЦИЯ 2: Вибрация "Открой меня!" */
@keyframes envelopeVibe {

    0%,
    100% {
        transform: rotate(0deg) scale(1);
    }

    /* Серия быстрых покачиваний и увеличений */
    10% {
        transform: rotate(-3deg) scale(1.05);
    }

    20% {
        transform: rotate(3deg) scale(1.05);
    }

    30% {
        transform: rotate(-3deg) scale(1.05);
    }

    40% {
        transform: rotate(2deg) scale(1.05);
    }

    50% {
        transform: rotate(0deg) scale(1);
    }

    /* Пауза с 50% до 100% */
}

/* Мобильная адаптация */
@media (max-width: 600px) {
    .handwriting {
        font-size: 2.5rem;
    }

    .envelope-png-anim {
        width: 260px;
    }

    /* Чуть меньше на телефоне */
}

/* ================= HERO SECTION ================= */
.hero {
    /* 1. ВЫСОТА: Занимает ровно один экран устройства */
    height: 100vh;
    /* Fallback */
    height: 100svh;
    /* Современный стандарт для мобильных */
    min-height: 600px;
    /* Минимальная высота, чтобы не сплющилось на старых */

    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;

    /* 2. ФОН: Исправляем для мобильных */
    background-image: url('/images/fon_1page.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    /* На ПК оставляем fixed, на мобильном переопределим ниже */
    background-attachment: fixed;
}

/* ЗАТЕМНЕНИЕ */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Градиент для читаемости внизу и по центру */
    background: radial-gradient(circle at center, rgba(15, 12, 41, 0.4) 0%, rgba(15, 12, 41, 0.7) 100%);
    z-index: 1;
}

.noise-texture {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 2;
    mix-blend-mode: overlay;
}

/* СЕТКА */
.hero-grid {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1.4fr 0.6fr;
    width: 90%;
    max-width: 1200px;
    height: 100%;
    align-items: center;
}

/* ЛЕВАЯ ЧАСТЬ */
.hero-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    /* Поднимаем контент чуть выше центра */
    padding-bottom: 40px;
}

/* WELCOME - НАД СЕРДЦЕМ */
.welcome-header {
    font-family: var(--font-script);

    /* 1. ГРАДИЕНТ (Эффект золота) */
    background: linear-gradient(to right,
            #bf953f 0%,
            #fcf6ba 25%,
            #b38728 50%,
            #fbf5b7 75%,
            #aa771c 100%);

    /* 2. ПРИМЕНЕНИЕ К ТЕКСТУ */
    -webkit-background-clip: text;
    background-clip: text;

    /* 3. ПРОЗРАЧНЫЙ ЦВЕТ (Чтобы видно было фон) */
    color: transparent;

    /* 4. РАЗМЕР И НАСТРОЙКИ */
    font-size: 6rem;
    /* Чуть крупнее для красоты */
    text-align: center;
    margin-bottom: -15px;
    z-index: 20;


    /* 5. АНИМАЦИЯ (Блик + Появление) */
    background-size: 200% auto;
    animation: shine 4s linear infinite, fadeInDown 1.5s ease-out;

    /* 6. ТЕНЬ (Через фильтр, т.к. обычная тень конфликтует с gradient text) */
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
}

/* КОМПОЗИЦИЯ СЕРДЦА */
.heart-composition {
    position: relative;
    width: 550px;
    height: 480px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    /* Центрирование */
}

/* СЕРДЦЕ SVG (НОВОЕ, МЯГКОЕ) */
.main-heart-svg {
    position: absolute;
    width: 120%;
    height: 120%;
    fill: none;
    overflow: visible;
    z-index: 1;
    /* УБРАЛИ animation отсюда, она здесь не работала */
}

/* Стилизация пути сердца через CSS для гибкости */
/* Стилизация пути сердца через CSS для гибкости */
/* ОСНОВНОЙ КОНТУР */
.heart-path-styled {
    stroke: url(#luxuryGrad);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 1600;
    stroke-dashoffset: 1600;

    /* Легкая статическая тень */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));

    /* will-change убираем, чтобы избежать багов с обрезкой теней */

    /* ВАЖНО: Объединяем две анимации */
    animation:
        drawHeart 2.5s ease-out forwards,
        luxuryBreathe 6s ease-in-out infinite 2.5s;

    transform-origin: center;
    transform-box: fill-box;
}

/* СЛОЙ СВЕЧЕНИЯ (СИНХРОНИЗИРОВАН) */
.heart-glow {
    stroke: #FFD700;
    stroke-width: 5;
    stroke-linecap: round;
    fill: none;
    opacity: 0;

    /* Мощное свечение через CSS Drop Shadow */
    filter: drop-shadow(0 0 10px #FFD700) drop-shadow(0 0 20px #FFD700);

    /* will-change убираем */

    /* Анимация пульсации СВЕЧЕНИЯ (синхронно с luxuryBreathe) */
    animation: glowPulse 6s ease-in-out infinite 2.5s;

    transform-origin: center;
    transform-box: fill-box;
}

/* Анимация для СВЕЧЕНИЯ */
@keyframes glowPulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.03);
        /* Должно совпадать с luxuryBreathe */
    }
}


/* ГРУППА ИМЕН */
.names-group {
    position: relative;
    width: 80%;
    height: 60%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* АМПЕРСАНД (ОГРОМНЫЙ И ПРОЗРАЧНЫЙ ФОН) */
.ampersand-inside {
    position: absolute;
    font-family: var(--font-massive);
    font-size: 18rem;
    /* Большой размер */
    color: rgba(255, 255, 255, 0.1);
    /* Прозрачный белый */
    top: 40%;
    left: 40%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 2;
    line-height: 0;
}

/* ИМЕНА (РУКОПИСНЫЕ КАК НА ФОТО) */
.names-inside {
    position: relative;
    z-index: 10;
    /* Поверх всего */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: -40px;
    /* Поднимаем имена выше */
    transform: translateX(-20px);
    /* Сдвигаем весь блок имен влево по просьбе */
}

.names-inside span {
    font-family: var(--font-names);
    font-style: normal;
    font-weight: normal;
    /* Рукописный шрифт */
    font-size: 5.5rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    white-space: nowrap;
    opacity: 0;
    animation: fadeInUp 1s forwards;
    position: relative;
    line-height: 0.8;
    display: block;
}

/* ВАСИЛИЙ: Сдвигаем влево */
.names-inside span:nth-child(1) {
    animation-delay: 0.5s;
    left: -40px;
}

/* Алена - вправо */
.names-inside span:nth-child(2) {
    animation-delay: 1s;
    left: 40px;
}


/* ПРАВАЯ ЧАСТЬ: ДАТА */
.hero-right {
    display: flex;
    justify-content: flex-end;
    z-index: 10;
}

.date-vertical-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 40px;
    /* Чуть шире поля, чтобы цифрам было свободно */
    gap: 0;

    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 60px;
    border: 1px solid rgba(255, 255, 255, 0.15);

    min-width: 160px;
    /* Чуть шире плашка */
}

.d-num {
    font-family: var(--font-massive);
    font-size: 4.5rem;
    line-height: 0.9;

    /* ГЛАВНОЕ: Сильный сдвиг влево для компенсации наклона шрифта */
    transform: translateX(-12%);

    color: white;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);

    width: 100%;
    text-align: center;

    /* Обнуляем отступы */
    margin: 0;
    padding: 0;
}

.d-heart {
    /* Твои настройки: размер 1.5rem, цвет белый */
    font-size: 1.5rem;
    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 25px;
    /* Компактная высота */

    animation: pulse 1.5s infinite;
    filter: drop-shadow(0 0 5px white);

    /* Сердечки стоят ровно по центру, сдвигать их не нужно,
        они будут визуальным центром, к которому мы подогнали цифры */
    transform: none;
    margin-top: 5px;
    margin-bottom: 5px;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes drawHeart {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes heartFloat {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px rgba(255, 64, 129, 0.5));
    }

    50% {
        transform: scale(1.02);
        filter: drop-shadow(0 0 10px rgba(255, 64, 129, 0.7));
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes luxuryBreathe {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* ================= ОБЩИЕ СЕКЦИИ ================= */
section {
    padding: 4rem 1rem;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-size: 3.8rem;
    font-family: var(--font-massive);
    color: var(--primary);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--gold);
    margin: 10px auto 0;
}

/* === CALENDAR (ОБНОВЛЕННЫЙ) === */
/* 1. Обращение "Дорогие гости" */
.heart-welcome span,
.heart-welcome #guest-greeting {
    font-family: 'MonAmour', sans-serif;
    font-size: 3rem;
    /* Крупно и красиво */
    color: var(--primary);
    line-height: 1.2;
    text-transform: none;
    /* Этот шрифт красив без капса */
}

/* 2. Текст приглашения ("Мы будем счастливы...") */
.invite-text {
    font-family: 'MonAmour', sans-serif;
    font-size: 1.5rem;
    /* Размер для читаемости */
    color: var(--text-grey);
    text-align: center;
    max-width: 650px;
    margin: 0 auto 3rem;
    line-height: 1.4;
}

/* === ОБНОВЛЕННЫЙ КАЛЕНДАРЬ === */
.invitation-section {
    position: relative;
    background-image: url('/images/fon.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    /* УБРАЛ СТРОКУ box-shadow, которая делала фон белесым */
    /* Теперь текстуру фона будет видно четко */
}

.calendar-card {
    /* Фон почти прозрачный (0.1), вся работа за счет размытия */
    background: rgba(255, 255, 255, 0.1);

    /* Сильное размытие */
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(15px);

    padding: 2.5rem;
    border-radius: 30px;

    /* Тень для объема */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);

    /* Тонкая белая рамка для эффекта стекла */
    border: 1px solid rgba(255, 255, 255, 0.4);

    max-width: 450px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;

    /* Исправление бага с исчезновением скруглений в Safari */

}

/* Месяц (ИЮНЬ 2026) */
.cal-month {
    font-family: 'MonAmour', sans-serif;
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

/* Дни недели (ПН, ВТ...) */
.cal-head {
    font-family: 'MonAmour', sans-serif;
    /* Тоже меняем для стиля */
    font-size: 1.1rem;
    color: var(--gold);
    font-weight: normal;
    margin-bottom: 15px;
}

/* Цифры */
.cal-day {
    position: relative;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;

    /* Применяем MonAmour к цифрам */
    font-family: 'MonAmour', sans-serif;
    font-size: 1.6rem;
    /* Цифры этим шрифтом должны быть крупнее */

    color: black;
    z-index: 1;
}

.cal-day.mute {
    color: #878787;
}

/* 26 число */
.cal-day.special {
    color: white;
    font-size: 1.8rem;
    /* Акцентная дата еще крупнее */
}

/* Сердце под датой оставляем как было */
.heart-pulse {
    position: absolute;
    top: 72%;
    left: 53%;
    /* Базовое положение по центру */
    transform: translate(-50%, -50%);

    /* ВАЖНО: Сбрасываем влияние шрифта MonAmour, чтобы иконка встала ровно */
    font-family: sans-serif;
    line-height: 1;

    /* НОВЫЙ РАЗМЕР: Делаем больше, чтобы цифра 26 влезала комфортно */
    font-size: 3.6rem;

    /* Цвет */
    color: rgba(220, 20, 60, 0.75);

    z-index: -1;
    /* Ставим ЗА цифру */

    /* Применяем исправленную анимацию */
    animation: heartBeatFix 2s infinite ease-in-out;

    /* Центровка самой иконки внутри контейнера */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ИСПРАВЛЕННАЯ АНИМАЦИЯ (Включает центровку) */
@keyframes heartBeatFix {
    0% {
        /* Всегда сохраняем центровку translate(-50%, -50%) */
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0.7;
    }

    50% {
        /* Пульсация чуть сильнее (1.15) */
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0.7;
    }
}

/* TIMELINE */
.timeline {
    position: relative;
    margin: 3rem 0;
    text-align: left;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--gold), var(--primary));
    transform: translateX(-50%);
}

.tl-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
}

.tl-time {
    width: 45%;
    text-align: right;
    padding-right: 20px;
    font-size: 1.5rem;
    color: var(--primary);
    font-family: var(--font-massive);
}

.tl-content {
    width: 45%;
    padding-left: 20px;
}

.tl-dot {
    position: absolute;
    left: 50%;
    width: 16px;
    height: 16px;
    background: var(--gold);
    border: 3px solid var(--bg-white);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* === TIMELINE (MODERN LUXURY) === */
.timeline-section {
    background: #fdfbf7;
    /* Цвет дорогой бумаги */
    position: relative;
    overflow: hidden;
}

/* Контейнер для сетки */
.timeline-vertical {
    display: flex;
    flex-direction: column;
    position: relative;
    max-width: 800px;
    /* Ограничиваем ширину, чтобы не разлеталось */
    margin: 4rem auto 0;
    padding-bottom: 2rem;
}

/* Золотая вертикальная линия по центру */
.timeline-vertical::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    /* Строго по центру */
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--gold), transparent);
    transform: translateX(-50%);
    z-index: 0;
}

/* БЛОК СОБЫТИЯ (GRID) */
.tl-row {
    display: grid;
    /* 1. Время (45%) | 2. Иконка (10%) | 3. Текст (45%) */
    grid-template-columns: 1fr 80px 1fr;
    align-items: center;
    margin-bottom: 50px;
    /* Отступ между событиями */
    position: relative;
    z-index: 1;
}

/* 1. ВРЕМЯ (СЛЕВА) */
.tl-time-col {
    text-align: right;
    padding-right: 30px;
}

.tl-time-text {
    font-family: var(--font-head);
    /* Forum (Красивый с засечками) */
    font-size: 2.2rem;
    /* Крупно */
    font-weight: 700;
    /* Жирно */
    color: var(--primary);
    letter-spacing: 1px;
    /* Тень для объема */
    text-shadow: 2px 2px 0px rgba(212, 175, 55, 0.1);
}

/* 2. ИКОНКА (ЦЕНТР) */
.tl-icon-col {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.tl-icon-circle {
    width: 60px;
    height: 60px;
    background: #fff;
    border: 1px solid var(--gold);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Эффект при наведении на строку */
.tl-row:hover .tl-icon-circle {
    transform: scale(1.15);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.6);
    background: var(--gold);
    border-color: transparent;
}

.tl-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    /* Делаем иконку золотой */
    filter: invert(76%) sepia(35%) saturate(836%) hue-rotate(2deg) brightness(89%) contrast(85%);
    transition: filter 0.3s;
}

.tl-row:hover .tl-img {
    /* При наведении иконка становится белой */
    filter: brightness(0) invert(1);
}

/* 3. ТЕКСТ (СПРАВА) */
.tl-text-col {
    text-align: left;
    padding-left: 30px;
}

.tl-title-text {
    font-family: 'Monplesir_Script', cursive;
    /* Новый шрифт пользователя */
    font-size: 2.5rem;
    /* Подбираем размер для нового скрипта */
    color: var(--secondary);
    font-weight: normal;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 5px;
    line-height: 1.1;
}

.tl-desc-text {
    font-family: 'Forum', serif;
    /* Элегантный засечный шрифт вместо обычного */
    font-size: 1.15rem;
    color: var(--text-dark);
    font-weight: 400;
    letter-spacing: 0.5px;
    /* Чуть воздуха */
    opacity: 0.8;
}

/* === МОБИЛЬНАЯ ВЕРСИЯ === */
@media (max-width: 900px) {

    /* ОТКЛЮЧАЕМ Fixed фон на телефоне (иначе он зумится и ломается) */
    .hero {
        background-attachment: scroll;
        padding-top: 60px;
        /* Компенсация адресной строки */
    }

    /* СЕТКА: Всё в одну колонку, компактно */
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding-bottom: 2rem;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
        /* Равномерно распределяем по высоте */
    }

    .hero-left {
        gap: 5px;
        margin-top: 0;
        padding-bottom: 0;
        flex: 1;
        /* Занимает свободное место */
        display: flex;
        justify-content: center;
    }

    /* 1. ЗАГОЛОВОК WELCOME (Уменьшаем размер) */
    .welcome-header {
        font-family: var(--font-script);
        text-align: center;
        margin-bottom: -10px;
        z-index: 20;
        position: relative;
        line-height: 1.1;

        /* БЫЛО 6rem -> СТАЛО 3.5rem (Аккуратно влезает в экран) */
        font-size: 3.5rem;

        /* Золотой эффект (сохраняем) */
        background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        background-size: 200% auto;
        animation: shine 4s linear infinite, fadeInDown 1.5s ease-out;
        filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
    }

    /* 2. СЕРДЦЕ (Уменьшаем) */
    .heart-composition {
        width: 280px;
        /* Было 320px */
        height: 260px;
        /* Было 300px */
        margin-top: 10px;
    }

    /* Амперсанд внутри */
    .ampersand-inside {
        font-size: 10rem;
        /* Было 15rem */
        color: rgba(255, 255, 255, 0.15);
    }

    /* Имена внутри */
    .names-inside {
        margin-top: -30px;
    }

    .names-inside span {
        font-size: 4rem;
        /* Было 5.5rem -> делаем читаемее */
        line-height: 0.9;
    }

    .names-inside span:nth-child(1) {
        left: -30px;
    }

    .names-inside span:nth-child(2) {
        left: 30px;
    }

    /* 3. ДАТА (Компактная плашка внизу) */
    .hero-right {
        justify-content: center;
        padding-right: 0;
        margin-top: 0;
        margin-bottom: 40px;
        /* Отступ от низа экрана (под мышку) */
    }

    .date-vertical-box {
        flex-direction: row;
        align-items: center;
        padding: 9px 25px;
        /* Компактнее */
        gap: 8px;
        min-width: auto;
        border-radius: 50px;

        /* Дополнительный блеск плашке */
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.25);
    }

    .d-num {
        font-size: 2rem;
        /* Было 2.8rem */
        line-height: 1;
        margin: 0;
        transform: translateY(2px);
        /* Микро-коррекция центровки */
    }

    .d-heart {
        font-size: 1rem;
        margin: 0 5px;
        transform: none;
    }

    /* Скрываем мышку на телефоне, она там мешает */
    .scroll-indicator {
        display: none;
    }

    /* Корректировка таблиц и прочего для мобилки (оставляем как было) */
    .admin-container {
        padding: 10px;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
        border-radius: 8px;
        overflow: hidden;
        background: #fff;
    }

    td {
        position: relative;
        padding-left: 50%;
        text-align: right;
        border: none;
        border-bottom: 1px solid #eee;
    }

    td:before {
        position: absolute;
        top: 12px;
        left: 10px;
        width: 45%;
        text-align: left;
        font-weight: bold;
        content: attr(data-label);
    }
}

/* === LOCATION SECTION === */
.location-section {
    position: relative;
    background: url('/images/hotel.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    /* Эффект параллакса */
    padding: 6rem 1rem;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 1024px) {
    .location-section {
        background-attachment: scroll !important;
    }
}

/* Темная подложка (Overlay) */
.location-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 0;
}

/* Карточка контента внутри */
.location-content {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 3rem;
    max-width: 900px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.location-title {
    color: var(--gold);
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.location-details {
    margin-bottom: 2rem;
    font-size: 1.2rem;
    line-height: 1.8;
}

.location-details strong {
    font-family: var(--font-head);
    font-size: 2rem;
    color: white;
    display: block;
    margin-bottom: 10px;
}

.loc-sub {
    font-family: var(--font-head);
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.loc-addr {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.map-frame {
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 70, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin: 2rem 0;
}

.map-frame iframe {
    display: block;
    width: 100%;
}

.btn-gold-shine {
    background: linear-gradient(45deg, #b38728, #fcf6ba, #aa771c);
    background-size: 200% auto;
    color: #3e2723;
    font-weight: bold;
    border: none;
    border-radius: 30px;
    padding: 12px 35px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.5s;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
    font-family: var(--font-body);
}

.btn-gold-shine:hover {
    background: linear-gradient(45deg, #fcf6ba, #ffd700, #fcf6ba) !important;
    /* Force bright gold */
    background-size: 200% auto;
    background-position: right center;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.6);
    color: #3e2723 !important;
    /* Force dark brown text */
}

/* === RSVP SECTION === */
.rsvp-section {
    background: url('/images/fon.png') no-repeat center center;
    background-size: cover;
    position: relative;
    padding: 6rem 1rem;
}

.rsvp-intro {
    text-align: center;
    margin-bottom: 2.5rem;
    font-family: 'MonAmour', sans-serif;
    font-size: 1.8rem;
    color: #823ca6;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 2;
}

.rsvp-form-container {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 30px;
    padding: 3rem;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.rsvp-form-container:focus-within {
    box-shadow: 0 25px 70px rgba(212, 175, 55, 0.15);
    transform: translateY(-2px);
}

.rsvp-block {
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s forwards;
    animation-delay: 0.2s;
}

.rsvp-block:nth-child(2) {
    animation-delay: 0.4s;
}

.rsvp-block:nth-child(3) {
    animation-delay: 0.6s;
}

.rsvp-label {
    display: block;
    font-family: var(--font-head);
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 1.2rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* CUSTOM RADIO & CHECKBOX WRAPPERS */
.custom-radio,
.custom-checkbox {
    display: flex;
    /* Ensures alignment */
    align-items: center;
    margin-bottom: 15px;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
    padding: 10px 15px;
    border-radius: 12px;
    background: transparent;
}

.custom-radio:hover,
.custom-checkbox:hover {
    background: rgba(212, 175, 55, 0.08);
}

/* HIDE DEFAULT INPUTS ROBUSTLY */
.custom-radio input,
.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
    appearance: none;
    -webkit-appearance: none;
}

/* RADIO MARK STYLES */
.radio-mark {
    min-width: 24px;
    width: 24px;
    height: 24px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    margin-right: 15px;
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.5);
}

.custom-radio input:checked+.radio-mark {
    background: var(--gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
    border-color: var(--gold);
    transform: scale(1.1);
}

.custom-radio input:checked+.radio-mark::after {
    content: '';
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* CHECKBOX GROUP */
.rsvp-checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* CHECKBOX MARK STYLES */
.checkmark {
    min-width: 24px;
    width: 24px;
    height: 24px;
    border: 2px solid var(--gold);
    border-radius: 6px;
    margin-right: 15px;
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.5);
}

.custom-checkbox input:checked+.checkmark {
    background: var(--gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
    border-color: var(--gold);
    transform: scale(1.1);
}

.custom-checkbox input:checked+.checkmark::after {
    content: '\2713';
    color: white;
    font-size: 16px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: checkAnim 0.3s ease-out;
}

/* DISABLED STATE (Limit Reached) */
.custom-checkbox input:disabled+.checkmark {
    background: #e0e0e0;
    border-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.custom-checkbox input:disabled~span {
    color: #aaa;
    /* Gray out text if possible, though structure might vary */
}

/* Make the whole label unclickable */
.custom-checkbox:has(input:disabled) {
    cursor: not-allowed;
    opacity: 0.7;
}

/* ANIMATIONS */
@keyframes popIn {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }

    80% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes checkAnim {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* TEXTAREA */
#comment {
    width: 100%;
    border: 2px solid rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.6);
    border-radius: 15px;
    padding: 1.2rem;
    font-family: var(--font-body);
    font-size: 1rem;
    resize: vertical;
    min-height: 120px;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.02);
}

#comment:focus {
    outline: none;
    border-color: var(--gold);
    background: white;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
}

/* RESPONSE MESSAGE */
.response-message {
    margin-top: 15px;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    display: none;
    /* Hidden by default */
    opacity: 0;
    transition: all 0.5s ease;
    transform: translateY(10px);
}

.response-message.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.response-message.success {
    background: rgba(46, 125, 50, 0.1);
    color: #2e7d32;
    border: 1px solid rgba(46, 125, 50, 0.2);
}

.response-message.error {
    background: rgba(198, 40, 40, 0.1);
    color: #c62828;
    border: 1px solid rgba(198, 40, 40, 0.2);
}

@media (max-width: 600px) {
    .rsvp-checkbox-group {
        grid-template-columns: 1fr;
    }
}

/* === DRESS CODE SECTION & TIMELINE === */
.dress-code-section,
.timeline-section {
    /* Trendy 2026 Lavender Gradient */
    background: linear-gradient(120deg, #fdfbf7 0%, #f3e5f5 50%, #e1bee7 100%);
    /* Soft, ethereal transition from warm white to gentle lavender */
    background-size: 200% 200%;
    animation: galaxyMove 15s ease infinite;
    /* Subtle movement */
}

@keyframes galaxyMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.dress-intro-text {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    font-size: 1.8rem;
    /* Чуть меньше, так как MonAmour более читаемый */
    color: #823ca6;
    font-family: 'MonAmour', sans-serif;
    line-height: 1.3;
}

.dress-guide-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.guide-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.guide-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(74, 20, 140, 0.1);
    border-color: var(--primary-light);
}

.guide-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.guide-card h3 {
    font-family: var(--font-head);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.guide-card p {
    color: var(--text-grey);
    font-size: 1rem;
}

.ban-box {
    text-align: center;
    background: #fff0f3;
    /* Очень светлый розовый фон для запрета */
    border: 1px dashed #ffcdd2;
    border-radius: 15px;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.ban-title {
    font-family: 'MonAmour', sans-serif;
    color: var(--primary);
    font-size: 2rem;
    font-weight: normal;
    margin-bottom: 0.5rem;
}

.ban-desc {
    font-family: 'MonAmour', sans-serif;
    font-size: 1.6rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #555;
}

.color-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #eee;
    margin: 0 10px;
    display: inline-block;
    position: relative;
    cursor: not-allowed;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.color-circle.c-black {
    background: #000;
}

.color-circle.c-red {
    background: #d32f2f;
}

/* КРЕСТИК НА ЗАПРЕЩЕННЫХ ЦВЕТАХ */
.color-circle.banned::after {
    content: '\f00d';
    /* FontAwesome Cross */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.5rem;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    opacity: 0.8;
}

@media (max-width: 768px) {
    .dress-guide-grid {
        grid-template-columns: 1fr;
    }
}

/* ADMIN UI */
.admin-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-card {
    background: #97979721;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th {
    text-align: left;
    padding: 12px;
    background: var(--primary);
    color: white;
    border-radius: 5px 5px 0 0;
}

td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

tr:hover {
    background: #f9f9f9;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.st-yes {
    background: #e8f5e9;
    color: #2e7d32;
}

.st-no {
    background: #ffebee;
    color: #c62828;
}

.st-wait {
    background: #fff3e0;
    color: #ef6c00;
}

.btn {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
    font-family: var(--font-body);
}

.btn:hover {
    background: var(--secondary);
    opacity: 0.9;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.btn-copy {
    background: var(--gold);
    color: #000;
}

.btn-del {
    background: #e57373;
}


/* ================= MOBILE ================= */
@media (max-width: 900px) {

    /* 1. ОТКЛЮЧАЕМ Fixed фон (иначе он зумится и ломается на iPhone) */
    .hero {
        background-attachment: scroll;
        padding-top: 60px;
        /* Компенсация адресной строки браузера */
        align-items: center;
        /* Строго по центру */
    }

    /* СЕТКА: Всё в одну колонку, компактно */
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 0;
        /* Убираем лишние отступы */
        padding-bottom: 2rem;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* Центруем контент по вертикали */
    }

    .hero-left {
        gap: 5px;
        margin-top: 0;
        padding-bottom: 0;
        flex: 0 1 auto;
        /* Занимает ровно столько места, сколько нужно */
        display: flex;
        justify-content: center;
        width: 100%;
    }

    /* 2. ЗАГОЛОВОК WELCOME (УМЕНЬШАЕМ) */
    .welcome-header {
        font-family: var(--font-script);
        text-align: center;
        margin-bottom: 20px;
        transform: translateY(-20px);

        z-index: 20;
        position: relative;
        line-height: 1.4;
        /* Increased from 1.1 */
        padding-bottom: 10px;
        /* Space for descenders */

        /* БЫЛО 6rem -> СТАЛО 3rem (Чтобы влезло в экран) */
        font-size: 3rem;

        /* Золотой эффект */
        background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        background-size: 200% auto;
        animation: shine 4s linear infinite, fadeInDown 1.5s ease-out;
        filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
    }

    /* 3. СЕРДЦЕ (УМЕНЬШАЕМ, но делаем ШИРЕ по просьбе) */
    .heart-composition {
        width: 340px;
        /* Increased from 280px */
        height: 310px;
        /* Proportional increase */
        margin-top: 5px;
        margin-bottom: 5px;
    }

    /* Амперсанд внутри */
    .ampersand-inside {
        font-size: 12rem;
        /* Slighly bigger to match new heart size */
        color: rgba(255, 255, 255, 0.15);
        margin-top: 20px;
    }

    /* Имена внутри */
    .names-inside {
        margin-top: -25px;
    }

    .names-inside span {
        font-size: 4rem;
        /* Slightly bigger */
        line-height: 0.9;
    }

    .names-inside span:nth-child(1) {
        left: -20px;
    }

    .names-inside span:nth-child(2) {
        left: 20px;
    }

    /* 4. ДАТА (Компактная плашка) */
    .hero-right {
        justify-content: center;
        padding-right: 0;
        margin-top: 10px;
        width: 100%;
        flex: 0 1 auto;
    }

    .date-vertical-box {
        flex-direction: row;
        /* В строку: 26 ♥ 06 ♥ 2026 */
        align-items: center;
        padding: 7px 20px;
        /* Fixed typo 7x -> 7px */
        gap: 8px;
        min-width: auto;
        border-radius: 50px;

        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.25);
    }

    .d-num {
        font-size: 1.8rem;
        /* Компактные цифры */
        line-height: 1;
        margin: 0;
        transform: translateY(1px);
    }

    .d-heart {
        font-size: 0.9rem;
        margin: 0 5px;
        /* Visual fix: Right and Down */
        transform: translate(2px, 2px);
    }

    /* Скрываем мышку на телефоне */
    .scroll-indicator {
        display: none;
    }

    /* ТАБЛИЦЫ АДМИНКИ */
    /* === TIMELINE MOBILE FIX === */
    .timeline-vertical {
        margin-top: 2rem;
        max-width: 100%;
        padding: 0 10px;
    }

    /* Shift line to left */
    .timeline-vertical::before {
        left: 30px;
        transform: none;
    }

    /* Change Grid to Left-Aligned Layout */
    .tl-row {
        grid-template-columns: 60px 1fr;
        grid-template-rows: auto auto;
        grid-template-areas:
            "icon time"
            "icon text";
        gap: 0;
        margin-bottom: 30px;
    }

    .tl-time-col {
        grid-area: time;
        text-align: left;
        padding: 10px 0 0 15px;
        /* Spacing from icon */
        margin-bottom: 5px;
    }

    .tl-icon-col {
        grid-area: icon;
        justify-content: center;
        align-items: flex-start;
        /* Align icon to top */
        padding-top: 5px;
    }

    .tl-icon-circle {
        /* Ensure circle stays centered on the 60px column (30px center) */
        width: 50px;
        /* Slightly smaller for mobile */
        height: 50px;
        background: #fff;
        /* Ensure it covers the line */
    }

    .tl-img {
        width: 24px;
        height: 24px;
    }

    .tl-text-col {
        grid-area: text;
        padding-left: 15px;
        text-align: left;
    }

    .tl-time-text {
        font-size: 1.5rem;
        /* Smaller time */
    }

    .tl-title-text {
        font-size: 2rem;
        /* Readable title */
        line-height: 1.1;
    }

    .tl-desc-text {
        font-size: 1rem;
    }

    .admin-container {
        padding: 10px;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
        border-radius: 8px;
        overflow: hidden;
        background: #fff;
    }

    td {
        position: relative;
        padding-left: 50%;
        text-align: right;
        border: none;
        border-bottom: 1px solid #eee;
    }

    td:before {
        position: absolute;
        top: 12px;
        left: 10px;
        width: 45%;
        text-align: left;
        font-weight: bold;
        content: attr(data-label);
    }
}

/* === CONTACTS & COUNTDOWN === */
.contacts-section {
    padding: 4rem 1rem;
    position: relative;
    /* Optional: subtle background to separate from RSVP */
    background: linear-gradient(to bottom, transparent, rgba(58, 28, 113, 0.2));
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto 3rem;
}

.contact-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.15);
}

/* Removed .contact-icon-top */

.contact-card .contact-name {
    font-family: var(--font-names);
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    /* Attributes of GoodTime usually look better uppercase */
    letter-spacing: 1px;
    padding: 0 10px;
    /* Fix for italic clipping */
    display: inline-block;
    /* Ensure padding works */
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    color: #4a4a4a;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.contact-link i {
    color: var(--gold);
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.contact-link:hover {
    color: var(--primary);
}

.contact-link:hover i {
    transform: scale(1.2);
}

.footer-sign {
    font-family: var(--font-names);
    font-size: 4rem;
    /* Adjusted size for this font */
    color: #823ca6;
    text-align: center;
    margin: 3rem auto;
    line-height: 1.4;
    text-shadow: none;
    padding: 0 20px;
    /* Fix for italic clipping */
    display: table;
    /* Ensures it shrinks to fit content but allows auto margins to center */
}

/* COUNTDOWN */
.countdown-wrapper {
    text-align: center;
    margin-top: 2rem;
}

.count-label {
    font-family: 'Forum', serif;
    color: #888;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.countdown-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.t-val {
    font-family: var(--font-names);
    font-size: 3rem;
    /* GoodTime looks good large */
    color: var(--primary);
    font-weight: normal;
    line-height: 1;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
    /* Added subtle shadow for depth */
}

.t-label {
    font-family: 'Montserrat', sans-serif;
    color: #aaa;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

@media (max-width: 768px) {

    /* CONTACTS STACK */
    .contacts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-card {
        padding: 1.5rem;
    }

    .contact-card .contact-name {
        font-size: 1.5rem;
        /* Smaller for mobile */
    }

    .footer-sign {
        font-size: 2rem;
        /* Adjusted for GoodTime font width */
        margin: 2rem 0;
        line-height: 1.2;
    }

    .countdown-container {
        gap: 0.5rem;
        /* Tighter gap */
    }

    .time-box {
        min-width: 65px;
        /* Ensure 4 fit in a row */
    }

    .t-val {
        font-size: 1.5rem;
        /* Compact numbers */
        text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.1);
    }
}

/* PRINT STYLES (For PDF Export) */
@media print {
    body * {
        visibility: hidden;
    }

    .admin-container,
    .admin-container * {
        visibility: visible;
    }

    .admin-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    /* Hide non-table elements in admin */
    .admin-header,
    .admin-card:nth-child(2),
    /* Create Invite Card */
    .admin-card button,
    .admin-card a,
    .btn {
        display: none !important;
    }

    /* Specific print style for table card */
    .admin-card {
        box-shadow: none;
        border: none;
        padding: 0;
        background: none;
    }

    /* Ensure table prints nicely */
    table {
        width: 100%;
        border-collapse: collapse;
    }

    th,
    td {
        border: 1px solid #ddd;
        padding: 8px;
        color: #000;
        font-size: 10pt;
    }
}

/* ==================== LOGIN SCREEN PROTECTION (IN-FLOW) ==================== */
#login-container {
    padding: 4rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    /* Or #fdfaf6 if you want a separate stripe */
    position: relative;
    z-index: 100;
}

.login-box {
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
}

.login-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(74, 20, 140, 0.15);
}

.login-box h3 {
    font-family: var(--font-head);
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

#inviteInput {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    outline: none;
    transition: all 0.3s ease;
    background: #fff;
}

#inviteInput:focus {
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.login-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-error {
    color: #e74c3c;
    margin-top: 15px;
    font-size: 0.9rem;
    min-height: 20px;
    font-family: var(--font-body);
    transition: opacity 0.3s ease;
}

/* Small variant of the gold button */
.btn-sm {
    padding: 10px 20px !important;
    font-size: 0.9rem !important;
    min-width: auto !important;
}


.login-btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 20, 140, 0.4);
}

/* Calendar Buttons */
.calendar-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.btn-cal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid transparent;
}

.btn-cal:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-google {
    background: #fff;
    color: #4285F4;
    border-color: #4285F4;
}

.btn-google:hover {
    background: #4285F4;
    color: #fff;
}

.btn-yandex {
    background: #fff;
    color: #FC3F1D;
    border-color: #FC3F1D;
}

.btn-yandex:hover {
    background: #FC3F1D;
    color: #fff;
}

.btn-file {
    background: #fff;
    color: #555;
    border-color: #aaa;
}

.btn-file:hover {
    background: #555;
    color: #fff;
    border-color: #555;
}