/* ===== Базовые сбросы и переменные (итальянская палитра) ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-cream: #fff9f0;      /* сливочный фон */
    --color-rose: #f9e0df;        /* нежно-розовый */
    --color-yellow: #fff3d1;      /* светло-жёлтый */
    --color-sky: #cfe7f5;         /* небесно-голубой */
    --color-lemon: #f7e05e;       /* лимонный акцент */
    --color-terra: #d98c5f;       /* терракота (акцент) */
    --color-pine: #6b8c5c;        /* оливково-зелёный */
    --color-text: #4a4a4a;        /* тёмно-серый */
    --font-main: 'Roboto', sans-serif;
    --font-accent: 'Caveat', cursive;
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background-color: var(--color-cream);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 0;
}

h1, h2, h3 {
    font-weight: normal;
}

.section-title {
    font-family: var(--font-accent);
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-pine);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}
.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 2px;
    background: var(--color-lemon);
    margin: 0.5rem auto 0;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 1rem;
    text-align: center;
}
.btn--primary {
    background-color: var(--color-terra);
    color: white;
    border-color: var(--color-terra);
}
.btn--primary:hover {
    background-color: #c07a4f;
}
.btn--outline {
    background-color: transparent;
    color: var(--color-pine);
    border-color: var(--color-pine);
}
.btn--outline:hover {
    background-color: var(--color-pine);
    color: white;
}
.btn--telegram {
    background-color: #2aabee;
    color: white;
    border-color: #2aabee;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.btn--telegram:hover {
    background-color: #1f8bc2;
}

/* Листья (лимоны) */
.leaves-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}
.leaf {
    position: absolute;
    width: 40px;
    height: 40px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="%23f7e05e" opacity="0.4"><path d="M50,10 Q70,20 80,40 Q90,60 70,80 Q50,90 30,70 Q20,50 30,30 Q40,15 50,10 Z"/></svg>') no-repeat center/contain;
    animation: fall linear infinite;
}
@keyframes fall {
    0% { transform: translateY(-100px) rotate(0deg); opacity: 0.6; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(255,243,209,0.8), rgba(207,231,245,0.8));
    background-size: cover, auto;
    position: relative;
    padding: 2rem 1rem;
}
.hero__title {
    font-family: var(--font-accent);
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--color-pine);
}
.hero__date {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 2px;
    color: var(--color-terra);
    margin-bottom: 1rem;
}
.hero__subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    color: var(--color-text);
}

/* Тайминг (новый фон: белый с лёгким оттенком) */
.timeline {
    background: linear-gradient(145deg, #ffffff, #faf7f0);
    padding: 2rem 0;
}
.timeline__grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}
.timeline__item {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    border-bottom: 1px dashed var(--color-lemon);
    padding-bottom: 0.8rem;
}
.timeline__time {
    font-family: var(--font-accent);
    font-size: 1.8rem;
    color: var(--color-terra);
    min-width: 100px;
}
.timeline__desc {
    font-size: 1.2rem;
}

/* Место встречи */
.venue {
    background-color: white;
    padding: 2rem 0;
}
.venue__card {
    background: var(--color-yellow);
    border-radius: 30px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}
.venue__name {
    font-family: var(--font-accent);
    font-size: 2rem;
    color: var(--color-pine);
}

/* Календарь */
.calendar {
    max-width: 350px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    text-align: center;
}
.calendar-month {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-pine);
    margin-bottom: 1rem;
}
.calendar-weekdays, .calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}
.calendar-weekdays div {
    font-weight: bold;
    color: var(--color-terra);
}
.calendar-day {
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
}
.calendar-day.selected {
    background-color: var(--color-lemon);
    color: #333;
    font-weight: bold;
}
.calendar-day.empty {
    background: none;
}

/* Пожелания (новый фон) */
.wishes {
    background-color: #fff8e7;  /* очень светлый жёлто-кремовый */
    color: var(--color-text);
    padding: 2rem 0;
}
.wishes .section-title {
    color: var(--color-pine);
}
.wishes .section-title::after {
    background: var(--color-lemon);
}
.wishes__subtitle {
    font-size: 1.3rem;
    margin: 1.5rem 0 1rem;
    color: var(--color-terra);
    font-weight: 500;
}
.wishes__list {
    list-style: none;
    margin-top: 1rem;
}
.wishes__list li {
    padding: 0.5rem 0 0.5rem 0;
    position: relative;
    font-size: 1.1rem;
}

/* Дресс-код */
.dresscode {
    background: white;
    padding: 2rem 0;
}
.dresscode__intro {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}
.dresscode__colors {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}
.color-dot {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--color-linen);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.dresscode__note {
    text-align: center;
    font-style: italic;
    color: var(--color-terra);
    margin-bottom: 2rem;
}

/* Карусель (оставляем без изменений) */
.carousel-container { max-width: 900px; margin: 2rem auto 0; position: relative; }
.carousel { position: relative; overflow: hidden; border-radius: 20px; background: rgba(0,0,0,0.05); }
.carousel-track { display: flex; transition: transform 0.5s ease-in-out; gap: 15px; padding: 10px 0; }
.carousel-slide { flex: 0 0 auto; width: 280px; max-width: 70vw; }
.carousel-slide img { width: 100%; height: 350px; object-fit: cover; border-radius: 16px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
@media (max-width: 768px) { .carousel-slide img { height: 250px; } .carousel-slide { width: 260px; } }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.8); border: none; font-size: 2rem; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.prev { left: 10px; }
.next { right: 10px; }
.carousel-indicators { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1rem; }
.indicator { width: 10px; height: 10px; border-radius: 50%; background-color: #ccc; cursor: pointer; }
.indicator.active { background-color: var(--color-terra); }

/* RSVP */
.rsvp {
    background-color: var(--color-yellow);
    padding: 2rem 0;
}
.rsvp__form {
    background: white;
    padding: 2rem;
    border-radius: 30px;
    max-width: 600px;
    margin: 0 auto;
}
.form-group { margin-bottom: 1.8rem; }
.form-label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--color-pine); }
.form-input { width: 100%; padding: 0.8rem 1rem; border: 2px solid #ddd; border-radius: 40px; font-size: 1rem; }
.radio-group, .checkbox-group { display: flex; flex-direction: column; gap: 0.8rem; }
.radio-label, .checkbox-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.btn--primary { width: 100%; font-size: 1.2rem; margin-top: 0.5rem; }
.form-note { text-align: center; margin-top: 1rem; font-size: 0.9rem; color: #777; }

/* Telegram, таймер, контакты — центрирование */
.telegram, .countdown, .contacts {
    text-align: center;
}
.telegram p, .countdown p, .contacts p {
    margin-bottom: 1rem;
}
.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}
.countdown-item {
    background: white;
    border-radius: 20px;
    padding: 15px;
    min-width: 80px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.05);
}
.countdown-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--color-terra);
    font-family: monospace;
}
.countdown-label {
    font-size: 0.9rem;
    color: var(--color-text);
}

/* Контакты организатора */
.contacts-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    max-width: 200px;
    margin: 0 auto;
    background: var(--color-rose);
    border-radius: 30px;
    padding: 2rem;
}
.contacts-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--color-lemon);
}
.contacts-name {
    font-family: var(--font-accent);
    font-size: 1.8rem;
    color: var(--color-pine);
}
.contacts-role {
    font-size: 1rem;
    color: var(--color-terra);
}
.contacts-phone a, .contacts-email a {
    color: var(--color-pine);
    text-decoration: none;
    border-bottom: 1px dashed;
}

/* Footer */
.footer {
    background-color: var(--color-pine);
    color: white;
    text-align: center;
    padding: 2rem 0;
}
.footer__text {
    font-family: var(--font-accent);
    font-size: 2rem;
}
.footer__decor {
    width: 100px;
    height: 4px;
    background: var(--color-lemon);
    margin: 1rem auto 0;
}

/* Адаптивность */
@media (min-width: 768px) {
    .hero__title { font-size: 5rem; }
    /* .timeline__grid { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 2rem; } */
    /* .timeline__item { flex-direction: column; align-items: center; text-align: center; border-bottom: none; border-right: 1px dashed var(--color-lemon); padding-right: 2rem; margin-right: 2rem; width: auto; } */
    /* .timeline__item:last-child { border-right: none; margin-right: 0; padding-right: 0; }
    .timeline__time { min-width: auto; } */
    .radio-group, .checkbox-group { flex-direction: row; flex-wrap: wrap; }
    .countdown-timer { gap: 30px; }
}
@media (min-width: 1024px) {
    .container { width: 80%; }
}

/* Исправление центрирования заголовков в блоках Telegram, таймера и контактов */
.telegram .section-title,
.countdown .section-title,
.contacts .section-title {
    position: static !important;
    left: auto !important;
    transform: none !important;
    display: block !important;
    text-align: center !important;
    white-space: normal !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

 /* === Контакты жениха и невесты: на широких экранах в ряд === */
.contacts-grid {
    display: flex;
    flex-direction: column;   /* по умолчанию – вертикально (мобильные) */
    gap: 0rem;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .contacts-grid {
        flex-direction: row;    /* горизонтально на планшетах и десктопах */
        flex-wrap: wrap;        /* если не влезают – перенос */
        justify-content: center;
        gap: 0rem;
    }
}

.contacts-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    max-width: 280px;
    width: 100%;
    background: var(--color-rose);
    border-radius: 30px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

@media (min-width: 768px) {
    .contacts-grid {
        gap: 1.5rem;   /* ещё меньше */
    }
}

/* ===== Lightbox для увеличения изображений ===== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.lightbox.active {
    display: flex;
}
.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}
.lightbox-close:hover {
    color: #ccc;
}

/* ===== Навигация внутри lightbox ===== */
.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1001;
}
.lightbox-nav button {
    pointer-events: auto;
    background: rgba(0,0,0,0.6);
    border: none;
    color: white;
    font-size: 3rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 50%;
    margin: 0 20px;
    transition: 0.2s;
}
.lightbox-nav button:hover {
    background: rgba(0,0,0,0.8);
}
.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 1rem;
    background: rgba(0,0,0,0.5);
    display: inline-block;
    width: auto;
    margin: 0 auto;
    padding: 5px 12px;
    border-radius: 20px;
    pointer-events: none;
    z-index: 1001;
}
@media (max-width: 768px) {
    .lightbox-nav button {
        font-size: 2rem;
        margin: 0 10px;
        padding: 0.3rem 0.8rem;
    }
}

/* Стили для кнопки Telegram в контактах (в стиле свадьбы) */
.contacts-tg {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--color-terra);  /* терракотовый вместо синего */
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
    border: none;
}
.contacts-tg:hover {
    background-color: #c07a4f;  /* чуть темнее при наведении */
    transform: scale(1.02);
}