:root { 
    --bg-pink: #FF85B2; 
    --accent-red: #E30613; 
    --white: #FFFFFF; 
    --dark-text: #333333;
}

/* Общие стили */
* { 
    box-sizing: border-box; 
    scroll-behavior: smooth; 
}

body { 
    font-family: 'Montserrat', sans-serif; 
    background-color: var(--bg-pink); 
    color: var(--white); 
    margin: 0; 
    display: flex;
    overflow-x: hidden;
}

/* Навигация (Десктоп) */
nav { 
    width: 250px; 
    height: 100vh; 
    position: fixed; 
    background: rgba(255, 133, 178, 0.95); 
    padding: 40px 20px; 
    border-right: 2px solid var(--accent-red);
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.nav-logo {
    font-weight: 900;
    font-size: 2em;
    line-height: 0.8;
    color: var(--accent-red);
    margin-bottom: 30px;
}

nav a { 
    text-decoration: none; 
    color: var(--white); 
    padding: 15px 0; 
    font-size: 12px; 
    text-transform: uppercase; 
    font-weight: 700;
    letter-spacing: 2px; 
    transition: 0.3s;
}

nav a:hover { color: var(--accent-red); }

/* Контентная область */
main { 
    margin-left: 250px; 
    width: calc(100% - 250px); 
}

section { 
    padding: 100px 10%; 
    min-height: 100vh; 
    display: flex; 
    flex-direction: column; 
    justify-content: center;
}

/* Стили секций */
.section-alt { background: rgba(255,255,255,0.1); text-align: center; }
.section-pink { background: var(--bg-pink); text-align: center; }
.section-red { background: var(--accent-red); text-align: center; }

/* Типографика */
h1, h2 { 
    color: var(--accent-red); 
    text-transform: uppercase; 
    font-weight: 900; 
    line-height: 0.9;
    margin: 0 0 20px 0;
}

h1 { font-size: 8em; letter-spacing: -5px; }
h2 { font-size: 4em; letter-spacing: -2px; }
.white-text { color: var(--white) !important; }

.sub-text { font-size: 1.2em; font-weight: 300; text-transform: uppercase; letter-spacing: 3px; }
.sub-text.accent { color: var(--accent-red); margin-bottom: 30px; }
.sub-text.large-text { font-size: 1.5em; margin-bottom: 20px; }

.container-narrow { max-width: 800px; margin: 0 auto; line-height: 1.6; }

/* Сетка инфо-блоков */
.info-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 20px; 
    text-align: left; 
    margin-top: 40px; 
}

.info-item { border-left: 3px solid var(--accent-red); padding-left: 20px; }
.small { font-size: 0.9em; }
.italic-note { margin-top: 40px; font-style: italic; opacity: 0.9; }

/* Кнопки */
.btn { 
    display: inline-block; 
    padding: 20px 40px; 
    border: 2px solid var(--white); 
    color: var(--white); 
    text-decoration: none; 
    font-weight: 700; 
    text-transform: uppercase;
    margin-top: 30px;
    transition: 0.3s;
}
.btn:hover { background: var(--white); color: var(--bg-pink); }

/* Линия таймлайна */
.timeline {
    position: relative;
    max-width: 650px;
    margin: 30px auto;
    padding: 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 55px; /* Было 60px — линия уехала левее */
    top: 0;
    width: 2px; 
    height: 100%;
    background: var(--accent-red);
}

.timeline-item {
    display: flex; /* Выстраиваем время и текст в ряд */
    align-items: flex-start;
    margin-bottom: 25px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 60px; /* Было 74px — теперь точка ровно на линии (45мм - 6мм) */
    top: 4px;
    width: 14px; 
    height: 14px;
    background: var(--accent-red);
    border-radius: 50%;
    border: 3px solid white;
    z-index: 2;
}

.time {
    min-width: 50px; /* Было 70px — ужимаем пространство для цифр */
    text-align: right;
    padding-right: 35px; /* Было 25px — придвигаем цифры к линии */
    font-weight: 800;
    color: var(--accent-red);
    font-size: 1.1em;
    line-height: 1.2;
    flex-shrink: 0; /* Чтобы время не сжималось и не переносилось */
}

.event-desc {
    padding-left: 20px; /* Было 25px — чуть плотнее к линии */
    text-align: left;
}

.event-desc h4 {
    margin: 0;
    font-size: 1.1em;
    padding-left: 5px;
    color: var(--dark-text);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.event-desc p {
    margin: 3px 0 0;
    font-size: 0.9em;
    color: #fdfdfd;
}

.gifts-block {
    margin: 10px auto 0;
    padding: 5px;
    border-radius: 25px;
    /* Светло-серый/розоватый фон, чтобы выделить блок на белом фоне секции */
    background: rgb(250, 158, 192); 
    border: 1px solid #eee;
    max-width: 700px;
}

.gifts-block h3 {
    color: var(--accent-red);
    margin-bottom: 5px;
}

.gifts-block .dark-title {
    color: var(--accent-red) !important; /* Заголовок красный */
    margin-bottom: 5px;
    margin-top: 5px;
    font-size: 1.5em;
}
.gifts-block .dark-text {
    color: #000000 !important; /* Темно-серый текст, который отлично читается */
    line-height: 1.6;
    font-size: 1.05em;
    margin: 0;
}

@media (max-width: 768px) {
    .timeline {
        padding-left: 10px; /* Было 30px. Прижимаем весь блок к левому краю */
        margin-left: 5px;   /* Минимальный отступ от края экрана */
    }
}

.timeline-container { 
    display: flex; 
    flex-direction: column;
    align-items: center;
    gap: 15px; 
    margin-top: 20px;
    width: 100%; /* Занимаем всю ширину */
    padding: 0 20px; /* Тот самый отступ слева и справа, чтобы карточки не липли к краям */
}
.event-card { 
    background: var(--white); 
    border: 3px solid var(--accent-red); 
    border-radius: 15px; 
    width: 350px; 
    overflow: hidden; 
    color: var(--dark-text); 
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.event-card.highlight { 
    transform: none;
    transform-origin: top; /* Масштабирование будет идти от верхнего края, а не от центра */
    margin-top: 0 !important; }

.event-date { background: var(--accent-red); color: white; padding: 15px; font-weight: bold; }
.event-content { padding: 25px; text-align: left; }
.event-content h3 { color: var(--accent-red); margin-top: 0; }
.map-link { color: var(--accent-red); text-decoration: none; font-weight: bold; display: block; margin-top: 15px; }

/* Слайдер */
.slider-container { 
    position: relative; margin: 40px auto; overflow: hidden; 
    border: 5px solid var(--white); border-radius: 10px;
    transition: width 0.4s ease; /* Добавим плавность изменения ширины */
    width: auto; /* Позволяем скрипту управлять шириной */
    max-width: 100%;
    touch-action: pan-y; /* Позволяет скроллить страницу вверх-вниз, но берет на себя горизонтальные движения */
    user-select: none;   /* Запрещает выделение картинок при долгом нажатии */
    -webkit-user-drag: none;
}
.slider { display: flex; transition: transform 0.5s ease-in-out; }
.slider img { width: 100%; height: 600px; flex: 0 0 100%; object-fit: contain;
            pointer-events: none; /* Чтобы браузер не думал, что мы хотим "перетащить" картинку как файл */ }

.prev, .next, .loc-prev, .loc-next {
    position: absolute; 
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8); /* Белый полупрозрачный фон */
    color: var(--accent-red); /* Твой фирменный красный */
    border: none; 
    width: 50px; 
    height: 50px; 
    border-radius: 50%; 
    cursor: pointer; 
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

/* Контакты */
.contacts-grid { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }
.contact-person { background: rgba(255,255,255,0.1); padding: 30px; border-radius: 20px; min-width: 280px; }
.contact-links { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.contact-item { 
    color: white; text-decoration: none; padding: 10px; border: 1px solid rgba(255,255,255,0.3); border-radius: 10px; transition: 0.3s;
}
.contact-item:hover { background: white; color: var(--accent-red); }

/* Мобильная версия */
.menu-toggle {
    display: none; position: fixed; top: 15px; left: 15px; background: var(--accent-red);
    color: white; padding: 10px 15px; border-radius: 5px; z-index: 2000; cursor: pointer;
}

@media (min-width: 769px) {
    .event-card.highlight {
        /* Высота кнопки + её отступ. Примерно 85px. 
           Это поднимет кнопку вверх, а карточки визуально выровняет */
        margin-top: 85px; 
    }
    
    .registry-spoiler {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    nav {
        transform: translateY(-100%); width: 100%; height: auto; border-right: none;
        border-bottom: 2px solid var(--accent-red); transition: 0.4s; padding-top: 60px;
    }
    nav.active { transform: translateY(0); }
    main { margin-left: 0; width: 100%; }
    
    h1 { font-size: 3.5em; letter-spacing: -2px; }
    h2 { font-size: 2.5em; }
    section { padding: 60px 20px; }
    
    .info-grid { grid-template-columns: 1fr; }
    #registryBtn,
    .event-card { 
    background: var(--white); 
    border: 3px solid var(--accent-red); 
    border-radius: 15px; 
    width: 100%;;           
    max-width: 100%;         /* Чтобы не вылезало на маленьких экранах */
    overflow: hidden; 
    color: var(--dark-text); 
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}
    .slider img { height: auto; max-height: 70vh; }
    .event-card.highlight { 
    transform: scale(1.02); /* Легкий акцент, без фанатизма */
    margin-top: 10px;       /* Небольшой отступ от верхнего блока */
}
}

/* Служебные классы */
.hidden-card { display: none; animation: fadeIn 0.5s; }
.dashed-box { border: 1px dashed white; padding: 15px; border-radius: 10px; margin-top: 20px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Кнопка в блоке */
.btn-location {
    background: none;
    border: 2px solid var(--accent-red);
    color: var(--accent-red);
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    margin-top: 15px;
    width: 100%;
    font-family: 'Montserrat', sans-serif;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0; top: 0;
    width: 100%; 
    height: 100vh; /* Строго на всю высоту экрана */
    background-color: rgba(0,0,0,0.95);
    align-items: center;     /* Центр по вертикали */
    justify-content: center;   /* Центр по горизонтали */
}

.modal-content {
    position: relative;
    width: 100%; /* На весь экран */
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden; /* Обрезаем всё, что выходит за границы */
}

.location-slider {
    display: flex;
    width: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}
.loc-slide {
    /* Эти три строки гарантируют, что в кадре только одно фото */
    min-width: 100%; 
    width: 100%;
    flex-shrink: 0; 
    
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px; /* Небольшой зазор между фото при прокрутке */
    box-sizing: border-box;
}

.loc-slide img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    /* Убираем любые помехи для касаний */
    pointer-events: none; 
    -webkit-user-drag: none;
}

/* Кнопки управления в модалке */
.close-modal {
    position: absolute;
    top: 10px; right: 20px;
    color: white; font-size: 50px;
    cursor: pointer; z-index: 3010;
    padding: 10px;
}


.prev:hover, .next:hover, .loc-prev:hover, .loc-next:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

/* Позиционирование для основного слайдера */
.prev { left: 15px; }
.next { right: 15px; }

/* Позиционирование для модалки (чуть ближе к краям) */
.loc-prev { left: 10px; }
.loc-next { right: 10px; }



/* Кнопка "Государственная регистрация" */
#registryBtn {
    background: var(--accent-red); /* Тот самый красный */
    border: none;
    color: var(--white);
    padding: 20px 30px;
    border-radius: 15px; /* Обтекаемые края как у карточек */
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0;
    margin: 0 auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 380px;
    max-width: 100%;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15); /* Мягкая тень для объема */
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

#registryBtn:hover {
    transform: translateY(-3px); /* Эффект нажатия */
    box-shadow: 0 15px 25px rgba(0,0,0,0.2);
    filter: brightness(1.1); /* Слегка подсвечивается */
}

#registryBtn:active {
    transform: translateY(0);
}

/* Настройка скрытой карточки, чтобы она плавно появлялась */
.hidden-card {
    display: none; 
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease;
    margin-bottom: 30px;
}

/* Класс, который будет добавляться через JS */
.hidden-card.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Адаптивность для мобилок */
@media (max-width: 768px) {
    .prev, .next, .loc-prev, .loc-next {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    .prev { left: 5px; }
    .next { right: 5px; }
    #registryBtn {
        width: 100%; /* На мобилке на всю ширину */
        font-size: 1em;
        padding: 18px 20px;
    }
.timeline::before {
    content: '';
    position: absolute;
    left: 45px; /* Было 60px. Сдвигаем линию левее */
    top: 0;
    width: 2px; height: 100%;
    background: var(--accent-red);
}
    
}

@media (max-width: 480px) {
    /* Сдвигаем всё влево, чтобы освободить место */
    .timeline {
        margin-left: 0 !important;
        padding-left: 10px !important;
    }

    .timeline::before { 
        left: 45px !important; /* Линия почти у самого края */
    }

    .timeline-item::before { 
        left: 39px !important; /* Точка ровно на линии (45 - 6) */
    }

    .time { 
        min-width: 40px !important; /* Максимально узкое поле для времени */
        padding-right: 24px !important; 
        font-size: 0.8em; 
        text-align: right;
    }

    .event-desc { 
        padding-left: 15px !important; 
    }

    .event-desc h4 {
        font-size: 1em;
        padding-left: 0;
    }
}