@font-face {
  font-family: 'Custom-Font';
  src: url(Custom-Font.html) format("woff");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'CzizhFeather';
  src: url(Czizh-Feather_1.woff) format("woff");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'MontserratLight';
  src: url(Montserrat-Light.woff) format("woff");
  font-weight: 300;
  font-style: normal;
}

/* ---------- Общие стили ---------- */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'MontserratLight', Arial, sans-serif;
    background: #fffaf0;
    color: #333;
    line-height: 1.6;
}

section, footer {
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.center {
    text-align: center;
}

/* ---------- Заголовки ---------- */
h1, h2, h3, h4, h5 {
    color: #000;
    font-family: 'CzizhFeather', Arial, sans-serif;
    font-weight: 700;
    line-height: 1.55;
    letter-spacing: 2.5px;
    text-align: center;
    opacity: 0.65;
}

h2 {
    font-size: 42px;
    margin-top: 0;
}

/* ---------- Header ---------- */
header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 100px 20px 20px;
    font-size: 38px;
    font-weight: 700;
    line-height: 1.25;
    color: #000;
    border-style: solid;
    border-color: transparent;
}

.header-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.header-text h1 {
    margin: 0;
    line-height: 1.1;
}

.header-image {
    width: 380px;
    height: auto;
    transition: transform 0.3s ease;
}

.header-left-image {
    transform: translateY(-50px) translateX(-50px);
}

.header-right-image {
    transform: translateY(50px) scale(1.10);
}

/* Показываем desktop только при ширине ≥ 1250px */
.header-desktop {
    display: flex;
}

/* Скрываем mobile по умолчанию */
.header-mobile {
    display: none;
}

.bride-wrapper {
    position: relative;
    display: inline-block;
}

.love-note {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: auto;
    transform: translate(-40%, -55%);
    pointer-events: none;
}

/* ---------- Музыка ---------- */
.music-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.music-btn {
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.music-label {
    font-size: 1.2rem;
    margin-top: 8px;
    pointer-events: none;
    text-align: center;
}

#musicIcon {
    width: 84px;
    height: auto;
}

/* ---------- Календарь (вёрстка вручную) ---------- */
.calendar-html {
    max-width: 440px;
    margin: 0 auto 40px;
    font-family: 'MontserratLight', Arial, sans-serif;
}

.calendar-header {
    text-align: center;
    font-weight: 700;
    font-size: 1.6rem;
    margin-bottom: 16px;
    opacity: 0.75;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    text-align: center;
}

.day-name {
    font-weight: 400;            /* 👈 убрали жирность */
    font-size: 1rem;
    color: #888;
}

.day {
    position: relative;
    font-size: 1.4rem;           /* 👈 увеличили цифры */
    font-weight: 400;
    color: #000;
    padding: 6px 0;
}

.day.empty {
    visibility: hidden;
}

.day.special {
    font-weight: 700;
    position: relative;
}

.day-heart {
    position: absolute;
    top: 50%;
    left: 55%;
    width: 32px;
    height: 32px;
    transform: translate(-50%, -50%);
    opacity: 0.75;
    pointer-events: none;
}

.calendar-image-wrapper {
    position: relative;
    display: inline-block;
    margin: 24px auto 0;
}

.calendar-image {
    max-width: 350px;
    height: auto;
}

.calendar-note {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 48px;
    height: auto;
    pointer-events: none;
}

/* ---------- План дня ---------- */
.timeline {
    position: relative;
    margin: 80px auto 0;
    padding: 100px 0; /* 👈 изменено для правильной высоты */
    list-style: none;
    max-width: 800px;
}

/* Чёрная линия от сердца до сердца */
.timeline::before {
    content: '';
    position: absolute;
    top: 20px;       /* 👈 начало — совпадает с top у сердечек */
    bottom: 20px;    /* 👈 конец — совпадает с последним сердечком */
    left: 50%;
    width: 2px;
    background: #000;
    transform: translateX(-50%);
    z-index: 0;
}

/* Общие стили элементов таймлайна */
.timeline li {
    position: relative;
    width: 50%;
    padding: 20px 30px;
    box-sizing: border-box;
    font-size: 1.2rem;
    font-weight: 400;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 2;
}

/* Левая и правая стороны */
.timeline li:nth-child(odd) {
    left: 0;
    text-align: right;
    align-items: flex-end;
}

.timeline li:nth-child(even) {
    left: 50%;
    text-align: left;
    align-items: flex-start;
}

/* Сердечки */
.timeline li::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 40px;
    height: 40px;
    background-image: url(heart.png);
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 3;
}

.timeline li:nth-child(odd)::before {
    right: -22px;
}

.timeline li:nth-child(even)::before {
    left: -18px;
}

/* Текст */
.timeline-text {
    max-width: 280px;
    word-break: break-word;
    font-size: 1.1rem;
    line-height: 1.5;
}

.timeline-time {
    margin-top: 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
    opacity: 0.6;
    line-height: 1.4;
}

/* ---------- Кнопка "Показать на карте" ---------- */
.map-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    font-size: 1rem;
    font-family: 'MontserratLight', Arial, sans-serif;
    font-weight: 300;
    color: #000;
    background-color: transparent;
    background-image: url(map_border.png);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
    border: none;
    cursor: pointer;
    text-align: center;
    width: 270px;
    height: 63px;
    margin: 0 auto;
    text-decoration: none;
    transition: transform 0.25s ease;
    transform: scale(0.94);
}

.map-button:hover {
    transform: scale(1);
    color: #111;
}

/* ---------- Таймер ---------- */
.countdown-blocks {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    font-family: 'Custom-Font', sans-serif;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-label {
    font-size: 0.85rem;
    margin-top: 4px;
    opacity: 0.75;
    font-style: normal;
    font-family: 'Custom-Font', sans-serif;
}

.countdown-separator {
    font-size: 2rem;
    font-weight: 600;
    opacity: 0.6;
    margin-bottom: 8px;
}

.flip-container {
    perspective: 800px;
    width: 70px;
    height: 50px;
    position: relative;
}

.flip-front,
.flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    font-family: 'Custom-Font', sans-serif;
    font-size: 2rem;
    font-weight: 300;
    color: #000;
    text-align: center;
    border-radius: 14px;
    background: #ececec;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: normal;
    padding: 0;
}

.flip-front {
    z-index: 2;
    transform: rotateX(0deg);
}

.flip-back {
    transform: rotateX(-180deg);
}

footer {
    text-align: center;
    padding: 20px;
}

.footer-photo img {
    max-width: 300px;
    height: auto;
    margin-bottom: 16px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.footer-note {
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.6;
    font-family: 'MontserratLight', Arial, sans-serif;
    color: #000;
    opacity: 0.75;
    margin: 16px auto 8px;
}

.dress-code-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.dress-code-icons img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ---------- Обёртка для правой стороны ---------- */
.groom-wrapper {
    position: relative;
    display: inline-block;
}

/* ---------- Общая анимация "появления" ---------- */
@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 2s ease, transform 2s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}


@keyframes zoom-in {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.zoom-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 2s ease-out, transform 2s ease-out;
}

.zoom-in.visible {
    opacity: 1;
    transform: scale(1);
}


/* ---------- Общая анимация "сердцебиения" ---------- */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

#musicIcon.heartbeat {
    animation: heartbeat 1.4s infinite ease-in-out;
}

.floating-hearts,
.floating-hearts-mobile {
    width: 48px;
    height: auto;
    animation: heartbeat 1.6s infinite ease-in-out;
    pointer-events: none;
    opacity: 0.9;
    margin-top: 20px;
}

.header-mobile .floating-hearts-mobile {
    margin-top: 40px;
}

/* Позиционирование над фотографией жениха (десктоп) */
.floating-hearts {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
}

.heart-divider {
    display: block;
    margin: 20px auto 8px;
    width: 24px;
    height: auto;
}

.day-heart-wrapper {
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Только анимация без изменения позиции */
.heartbeat-heart {
    width: 32px;
    height: 32px;
    animation: heartbeat 1.6s infinite ease-in-out;
    opacity: 0.75;
}

/* ---------- Адаптивность ---------- */
@media (max-width: 1249px) {
    .calendar-image {
        max-width: 300px;
        height: auto;
    }

    .header-desktop {
        display: none;
    }

    .header-mobile {
        display: block;
        text-align: center;
        padding: 60px 10px 20px;
    }

    .mobile-photo-row {
        display: flex;
        justify-content: center;
        gap: 12px;
        margin-bottom: 16px;
    }

    .header-image {
        width: 48%;
        min-width: 140px;
        max-width: 260px;
        height: auto;
    }

    .header-text {
        margin-top: 12px;
    }

    .header-text h1 {
        font-size: 48px;
        margin: 0;
        line-height: 1.1;
    }

    h1, h2, h3, h4, h5 {
        letter-spacing: 2px;
    }

    .header-mobile .header-image:last-child {
        transform: scale(1.15);
    }

    .map-button {
        width: 100%;
        height: auto;
        padding: 12px 16px;
        font-size: 0.95rem;
        transform: scale(1);
    }

    .map-button:hover {
        transform: scale(1.03);
    }

    #musicIcon {
        width: 64px;
    }

    .calendar-html {
        max-width: 100%;
    }

    .calendar-grid {
        gap: 6px;
    }

    .day-heart {
        width: 28px;
        height: 28px;
    }

    .timeline-text {
        font-size: 1rem;
    }

    .timeline-time {
        font-size: 0.75rem;
    }
}

@media (max-width: 400px) {
    .header-image {
        width: 55%;
        min-width: 160px;
        max-width: 200px;
    }

    .header-text h1 {
        font-size: 38px;
    }

    h2, h3, h4, h5 {
        font-size: 28px;
        letter-spacing: 1px;
    }

    .header-mobile .header-image:last-child {
        transform: scale(1.15);
    }

    .calendar-grid {
        gap: 5px;
    }

    .day-heart {
        width: 24px;
        height: 24px;
    }

    #musicIcon {
        width: 58px;
    }

    .timeline-text {
        font-size: 0.7rem;
    }

    .timeline-time {
        font-size: 0.7rem;
    }

    .countdown-blocks {
        gap: 6px;
    }

    .flip-container {
        width: 50px;
        height: 40px;
    }

    .flip-front,
    .flip-back {
        font-size: 1.4rem;
    }

    .countdown-separator {
        font-size: 1.4rem;
        margin-bottom: 4px;
    }

    .countdown-label {
        font-size: 0.75rem;
    }
}
