/* === Переменные === */
:root {
    --primary: #8B1538;
    --primary-light: #A0213F;
    --primary-dark: #6B0F2A;
    --accent: #D4AF37;
    --accent-light: #E5C158;
    --pink: #FDF8F5;
    --pink-dark: #F5E6E0;
    --text-dark: #2C1810;
    --text-muted: #6B4E42;
    --bg: #FFFAF7;
    --white: #FFFFFF;
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', sans-serif;
    --font-script: 'Great Vibes', cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === ВИДЕОФОН === */

#video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    z-index: -2;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

#bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    object-fit: cover;
    pointer-events: none;
}

.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    background: rgba(255, 250, 247, 0.95);
    z-index: -1;
    pointer-events: none;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

.hero,
.info,
.timeline-section,
.rsvp,
.location,
.footer {
    background: transparent !important;
    position: relative;
    z-index: 1;
}

.info-card,
.timeline__content,
.rsvp-form,
.additional-info,
.location__card,
.location__map {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* === HERO === */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

.hero__content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1.5s ease;
}

.hero__photo {
    width: 220px;
    height: 220px;
    margin: 0 auto 30px;
    border-radius: 50%;
    border: 4px solid var(--accent);
    box-shadow: 0 0 0 8px rgba(212, 175, 55, 0.15), 0 15px 40px rgba(139, 21, 56, 0.2);
    overflow: hidden;
    animation: fadeInUp 1s ease;
}

.hero__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero__save-date {
    font-family: var(--font-script);
    font-size: 32px;
    color: var(--accent);
    margin-bottom: 20px;
}

.hero__names {
    font-family: var(--font-serif);
    font-size: clamp(48px, 10vw, 96px);
    font-weight: 400;
    color: var(--primary);
    letter-spacing: 2px;
    margin-bottom: 20px;
    line-height: 1.1;
}

.amp {
    font-family: var(--font-script);
    color: var(--accent);
    font-size: 0.7em;
    margin: 0 10px;
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

.divider span:first-child,
.divider span:last-child {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.heart {
    color: var(--primary);
    font-size: 20px;
}

.hero__date {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.hero__location {
    font-size: 16px;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 40px;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 40px 0;
}

.countdown__item {
    background: var(--white);
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(139, 21, 56, 0.1);
    min-width: 90px;
    border: 1px solid var(--pink-dark);
}

.countdown__number {
    display: block;
    font-family: var(--font-serif);
    font-size: 42px;
    font-weight: 600;
    color: var(--primary);
    line-height: 1;
}

.countdown__label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

/* === ИНДИКАТОР ПРОКРУТКИ === */
.scroll-down {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
    color: var(--primary);
    opacity: 0.6;
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
    text-decoration: none;
    padding: 10px;
}

.scroll-down:hover {
    opacity: 1;
    color: var(--primary-dark);
}

.scroll-down svg {
    width: 32px;
    height: 32px;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Общие стили секций === */
section { padding: 100px 0; }

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 500;
    text-align: center;
    color: var(--primary);
    margin-bottom: 15px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 18px;
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* === INFO === */
.info {
    background: transparent;
}

.info__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.info-card {
    background: rgba(255, 255, 255, 0.92);
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--pink-dark);
    transition: all 0.4s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(139, 21, 56, 0.15);
    border-color: var(--primary);
}

.info-card__icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.info-card h3 {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 15px;
}

.info-card p {
    color: var(--text-muted);
    line-height: 1.8;
}

/* === Блок дополнительной информации === */
.additional-info {
    margin-top: 60px;
    background: rgba(255, 255, 255, 0.92);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(139, 21, 56, 0.1);
    border: 1px solid var(--pink-dark);
    text-align: center;
}

.additional-info__title {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 25px;
}

.additional-info__content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

.additional-info__content p {
    margin-bottom: 15px;
}

.additional-info__content p:last-child {
    margin-bottom: 0;
}

/* === ГАЛЕРЕЯ ФОТОГРАФИЙ === */
.gallery {
    margin-top: 80px;
    text-align: center;
}

.gallery__title {
    font-family: var(--font-script);
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 40px;
}

.gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.gallery__item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    box-shadow: 0 10px 30px rgba(139, 21, 56, 0.15);
    border: 3px solid var(--white);
    transition: all 0.4s ease;
}

.gallery__item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(139, 21, 56, 0.25);
}

.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.gallery__item:hover img {
    transform: scale(1.05);
}

/* === Как добраться === */
.location {
    padding: 100px 0;
    background: transparent;
    overflow: hidden;
}

.location__header {
    text-align: center;
    margin-bottom: 60px;
}

.location__pretitle {
    font-family: var(--font-script);
    font-size: 32px;
    color: var(--accent);
    margin-bottom: 10px;
}

.location__header .section-title {
    margin-bottom: 20px;
}

.location__header .divider {
    margin: 20px auto 0;
}

.location__grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: stretch;
    max-width: 1100px;
    margin: 0 auto;
}

.location__card {
    background: rgba(255, 255, 255, 0.92);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(139, 21, 56, 0.1);
    border: 1px solid var(--pink-dark);
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
    transition: all 0.4s ease;
}

.location__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(139, 21, 56, 0.15);
}

.location__icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.location__name {
    font-family: var(--font-serif);
    font-size: 36px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 10px;
}

.location__address {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.location__details {
    background: var(--bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.location__detail {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 16px;
    color: var(--text-dark);
}

.location__detail:not(:last-child) {
    border-bottom: 1px solid var(--pink-dark);
}

.location__detail-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.location__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary);
    color: var(--white);
    padding: 16px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    margin-top: auto;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(139, 21, 56, 0.25);
}

.location__btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 21, 56, 0.35);
}

.location__btn-arrow {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.location__btn:hover .location__btn-arrow {
    transform: translateX(5px);
}

.location__map {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(139, 21, 56, 0.15);
    border: 3px solid var(--white);
    min-height: 450px;
}

.map-container {
    width: 100%;
    height: 100%;
    min-height: 450px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* === TIMELINE === */
.timeline-section {
    background: transparent;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 0;
}

.timeline__line {
    position: absolute;
    left: 50%;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    transform: translateX(-50%) scaleY(0);
    transform-origin: top;
    transition: transform 2s ease-out;
    border-radius: 3px;
}

.timeline__line.active {
    transform: translateX(-50%) scaleY(1);
}

.timeline__item {
    position: relative;
    width: 50%;
    padding: 20px 50px;
    opacity: 0;
    transition: all 0.8s ease;
}

.timeline__item.left {
    left: 0;
    text-align: right;
    transform: translateX(-50px);
}

.timeline__item.right {
    left: 50%;
    text-align: left;
    transform: translateX(50px);
}

.timeline__item.fade-in.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline__dot {
    position: absolute;
    top: 35px;
    width: 18px;
    height: 18px;
    background: var(--white);
    border: 3px solid var(--primary);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 4px rgba(139, 21, 56, 0.15);
}

.timeline__item.left .timeline__dot {
    right: -9px;
}

.timeline__item.right .timeline__dot {
    left: -9px;
}

.timeline__content {
    background: rgba(255, 255, 255, 0.92);
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(139, 21, 56, 0.1);
    border: 1px solid var(--pink-dark);
    transition: all 0.3s ease;
}

.timeline__content:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(139, 21, 56, 0.2);
}

.timeline__time {
    display: inline-block;
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.timeline__content h3 {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.timeline__content p {
    color: var(--text-muted);
    font-size: 15px;
}

/* === RSVP === */
.rsvp {
    background: transparent;
    text-align: center;
}

.rsvp-form {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.92);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(139, 21, 56, 0.1);
    border: 1px solid var(--pink-dark);
}

.form-group {
    margin-bottom: 28px;
}

.form-label {
    display: block;
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid var(--pink-dark);
    border-radius: 12px;
    font-size: 16px;
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text-dark);
    outline: none;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: var(--font-sans);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 14px 20px;
    border: 1px solid var(--pink-dark);
    border-radius: 12px;
    background: var(--bg);
    transition: all 0.3s ease;
    font-size: 16px;
}

.radio-item:hover {
    border-color: var(--primary);
    background: var(--white);
}

.radio-item input[type="radio"] {
    display: none;
}

.radio-mark {
    width: 22px;
    height: 22px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.radio-item input[type="radio"]:checked ~ .radio-mark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
}

.radio-item input[type="radio"]:checked ~ .radio-mark {
    border-color: var(--primary-dark);
}

.radio-item:has(input[type="radio"]:checked) {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 3px 12px rgba(139, 21, 56, 0.15);
}

.partner-block {
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); max-height: 0; }
    to { opacity: 1; transform: translateY(0); max-height: 200px; }
}

.rsvp-btn {
    width: 100%;
    padding: 18px;
    font-size: 18px;
    margin-top: 10px;
    background: var(--primary);
    color: var(--white);
    border: none;
    cursor: pointer;
    border-radius: 12px;
    font-family: var(--font-sans);
    font-weight: 600;
    transition: all 0.3s ease;
}

.rsvp-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(139, 21, 56, 0.3);
}

.rsvp-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.form-message {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    text-align: center;
    font-size: 15px;
    display: none;
}

.form-message.success {
    display: block;
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #A5D6A7;
}

.form-message.error {
    display: block;
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #EF9A9A;
}

.honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.rsvp__note {
    font-family: var(--font-script);
    font-size: 32px;
    color: var(--primary);
    margin-top: 30px;
}

/* === FOOTER === */
.footer {
    background: var(--primary-dark) !important;
    color: var(--white);
    text-align: center;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.footer__names {
    font-family: var(--font-script);
    font-size: 48px;
    color: var(--accent);
    margin-bottom: 10px;
}

.footer p:last-child {
    letter-spacing: 3px;
    color: #FFFFFF;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* === Адаптивность === */
@media (max-width: 900px) {
    .location__grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .location__map {
        order: -1;
        min-height: 350px;
    }
    
    .map-container {
        min-height: 350px;
    }
    
    .location__card {
        padding: 40px 30px;
    }
}

@media (max-width: 768px) {
    section { padding: 70px 0; }

    .timeline__line {
        left: 20px;
    }

    .timeline__item {
        width: 100%;
        padding: 15px 20px 15px 55px;
        text-align: left !important;
    }

    .timeline__item.left,
    .timeline__item.right {
        left: 0;
        transform: translateX(30px);
    }

    .timeline__item.fade-in.visible {
        transform: translateX(0);
    }

    .timeline__item.left .timeline__dot,
    .timeline__item.right .timeline__dot {
        left: 11px;
        right: auto;
    }

    .countdown__item {
        min-width: 75px;
        padding: 15px 18px;
    }

    .countdown__number { font-size: 32px; }

    .hero__save-date { font-size: 26px; }
    .hero__date { font-size: 22px; letter-spacing: 2px; }
    .hero__location { font-size: 14px; }

    .hero__photo {
        width: 160px;
        height: 160px;
        border-width: 3px;
        box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.15), 0 10px 30px rgba(139, 21, 56, 0.2);
    }

    .rsvp-form {
        padding: 30px 20px;
    }
    
    .form-label {
        font-size: 18px;
    }
    
    .radio-item {
        padding: 12px 16px;
        font-size: 15px;
    }

    .additional-info {
        padding: 30px 20px;
        margin-top: 40px;
    }
    
    .additional-info__title {
        font-size: 26px;
    }
    
    .additional-info__content {
        font-size: 15px;
    }

    .gallery__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .gallery__title {
        font-size: 32px;
        margin-bottom: 25px;
    }
    
    .gallery {
        margin-top: 50px;
    }

    .location {
        padding: 70px 0;
    }
    
    .location__pretitle {
        font-size: 26px;
    }
    
    .location__name {
        font-size: 28px;
    }
    
    .location__address {
        font-size: 16px;
    }
    
    .location__detail {
        font-size: 15px;
    }
    
    .location__btn {
        padding: 14px 24px;
        font-size: 15px;
    }
    
    #video-background {
        position: fixed !important;
        width: 100vw !important;
        width: 100dvw !important;
        height: 100vh !important;
        height: 100dvh !important;
    }
    
    #bg-video {
        position: absolute !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    .video-overlay {
        position: fixed !important;
        width: 100vw !important;
        width: 100dvw !important;
        height: 100vh !important;
        height: 100dvh !important;
        background: rgba(255, 250, 247, 0.85) !important;
    }
}

@media (max-width: 480px) {
    .gallery__grid {
        grid-template-columns: 1fr;
        max-width: 300px;
    }
}

@supports (-webkit-touch-callout: none) {
    #bg-video {
        position: fixed !important;
        width: 100vw !important;
        height: 100vh !important;
    }
}
