/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #fafafa;
    position: relative;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/decorations/decor.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    filter: brightness(1.3) contrast(1.1) saturate(1.2);
    z-index: 0;
    pointer-events: none;
}

body > * {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Typography */
.script-font {
    font-family: 'Cormorant', serif;
    font-weight: 400;
    font-style: italic;
}

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.75);
    padding: 30px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    position: relative;
    z-index: 100;
    backdrop-filter: blur(5px);
}

.header-title {
    font-size: 2rem;
    letter-spacing: 8px;
    color: #2c2c2c;
    font-weight: 300;
}

/* Hero Section */
.hero {
    padding: 60px 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.7), rgba(245, 245, 245, 0.7));
    position: relative;
    z-index: 2;
    backdrop-filter: blur(3px);
}

.hero-content {
    text-align: center;
}

.hero-name {
    font-size: 4rem;
    color: #6d7278;
    margin: 20px 0;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    max-width: 500px;
    margin: 30px auto;
}

.photo { /* Класс для изображения */
    width: 100%; /* Заполняем весь контейнер */
    height: 100%; /* Заполняем весь контейнер */
    object-fit: cover; /* Или contain, в зависимости от нужного эффекта */
    display: block; /* Убирает нижний отступ у inline-элементов */
}

.photo-item {
    aspect-ratio: 1;
    overflow: hidden;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #9e9e9e, #757575);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    opacity: 0.2;
}

.photo-label {
    font-size: 2rem;
    font-weight: 600;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin: 30px 0 15px;
    color: #2c2c2c;
}

.pink-text {
    color: #6d7278;
}

.hero-text, .hero-description {
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto 20px;
    line-height: 1.8;
}

/* Countdown Section */
.countdown-section {
    padding: 60px 0;
    background: rgba(255, 255, 255, 0.75);
    position: relative;
    z-index: 2;
    backdrop-filter: blur(3px);
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 40px;
    color: #2c2c2c;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.countdown-item {
    text-align: center;
}

.countdown-number {
    font-size: 4rem;
    font-weight: 700;
    color: #4a4a4a;
    background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(109, 114, 120, 0.3);
    margin-bottom: 10px;
}

.countdown-label {
    font-size: 1rem;
    color: #666;
}

/* Invitation Section */
.invitation-section {
    padding: 60px 0;
    background: linear-gradient(to bottom, rgba(245, 245, 245, 0.7), rgba(255, 255, 255, 0.7));
    position: relative;
    z-index: 2;
    backdrop-filter: blur(3px);
}

.invitation-card {
    background: rgba(255, 255, 255, 0.8);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    backdrop-filter: blur(5px);
}

.invitation-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 30px 0;
}

.invitation-action {
    margin-top: 40px;
}

.invitation-note {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #6d7278, #5a5d62);
    color: white;
    box-shadow: 0 5px 15px rgba(109, 114, 120, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(109, 114, 120, 0.4);
}

/* Program Section */
.program-section {
    padding: 60px 0;
    background: rgba(255, 255, 255, 0.75);
    position: relative;
    z-index: 2;
    backdrop-filter: blur(3px);
}

.timeline {
    max-width: 700px;
    margin: 0 auto;
}

.timeline-item {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.timeline-icon {
    flex-shrink: 0;
}

.icon-placeholder {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e0e0e0, #f0f0f0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 3px 10px rgba(109, 114, 120, 0.2);
}

.timeline-content {
    flex: 1;
}

.timeline-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #2c2c2c;
}

.timeline-description {
    color: #666;
    line-height: 1.6;
}

/* Dress Code Section */
.dresscode-section {
    padding: 60px 0;
    background: linear-gradient(to bottom, rgba(245, 245, 245, 0.7), rgba(255, 255, 255, 0.7));
    position: relative;
    z-index: 2;
    backdrop-filter: blur(3px);
}

.dresscode-text, .dresscode-subtitle, .dresscode-note {
    text-align: center;
    max-width: 700px;
    margin: 20px auto;
    line-height: 1.8;
}

.color-palette {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 40px 0;
    flex-wrap: wrap;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.color-box {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.color-box:hover {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Details Section */
.details-section {
    padding: 60px 0;
    background: rgba(255, 255, 255, 0.75);
    position: relative;
    z-index: 2;
    backdrop-filter: blur(3px);
}

.details-content {
    max-width: 800px;
    margin: 0 auto;
}

.detail-item {
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f9f9f9, #f5f5f5);
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.detail-item h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #6d7278;
}

.detail-item p {
    line-height: 1.8;
    color: #555;
}

/* Venue Section */
.venue-section {
    padding: 60px 0;
    background: linear-gradient(to bottom, rgba(245, 245, 245, 0.7), rgba(255, 255, 255, 0.7));
    position: relative;
    z-index: 2;
    backdrop-filter: blur(3px);
}

.venue-card {
    background: rgba(255, 255, 255, 0.8);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    backdrop-filter: blur(5px);
}

.venue-name {
    font-size: 1.5rem;
    margin: 20px 0;
    color: #2c2c2c;
}

.venue-address {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 30px;
}

.venue-map-container {
    margin-top: 30px;
    width: 100%;
}

.venue-map {
    width: 100%;
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border: none;
}

.map-link {
    margin-top: 15px;
    text-align: center;
}

.map-link a {
    color: #6d7278;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.map-link a:hover {
    color: #4a4a4a;
    text-decoration: underline;
}

.map-placeholder {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #e8e8e8, #d0d0d0);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

/* RSVP Section */
.rsvp-section {
    padding: 60px 0;
    background: rgba(255, 255, 255, 0.75);
    position: relative;
    z-index: 2;
    backdrop-filter: blur(3px);
}

.rsvp-card {
    background: rgba(255, 255, 255, 0.8);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    margin: 0 auto;
    backdrop-filter: blur(5px);
}

.rsvp-names {
    font-size: 2.5rem;
    color: #6d7278;
    margin: 20px 0;
    text-align: center;
}

.rsvp-description {
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.8;
}

.rsvp-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6d7278;
}

.radio-group, .checkbox-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-label, .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 400;
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.rsvp-form button[type="submit"] {
    width: 100%;
    margin-top: 20px;
    font-size: 1.1rem;
    padding: 18px;
}

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Menu Selection Section */
.menu-selection-section {
    margin: 40px 0;
    padding: 30px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 15px;
    border: 2px solid rgba(109, 114, 120, 0.2);
    backdrop-filter: blur(5px);
}

.menu-section-title {
    font-size: 1.8rem;
    color: #6d7278;
    margin-bottom: 20px;
    text-align: center;
    font-family: 'Cormorant', serif;
}

.menu-voting-note {
    text-align: center;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    font-style: italic;
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    border-left: 3px solid #6d7278;
}

.menu-group {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.65);
    border-radius: 10px;
    border-left: 4px solid #6d7278;
    backdrop-filter: blur(3px);
}

.menu-group-label {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
    color: #2c2c2c;
    margin-bottom: 15px;
}

.menu-checkbox-group,
.menu-radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-checkbox-group .checkbox-label,
.menu-radio-group .radio-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(2px);
}

.menu-checkbox-group .checkbox-label:hover,
.menu-radio-group .radio-label:hover {
    background: rgba(109, 114, 120, 0.1);
    transform: translateX(5px);
}

.menu-checkbox-group .checkbox-label input[type="checkbox"]:checked + span,
.menu-radio-group .radio-label input[type="radio"]:checked + span {
    font-weight: 600;
    color: #6d7278;
}

.menu-checkbox-group .checkbox-label input[type="checkbox"]:disabled,
.menu-radio-group .radio-label input[type="radio"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.menu-checkbox-group .checkbox-label input[type="checkbox"]:disabled + span,
.menu-radio-group .radio-label input[type="radio"]:disabled + span {
    opacity: 0.5;
}

.menu-hint {
    display: block;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.menu-hint .selected-count {
    font-weight: 600;
}

/* Footer */
.footer {
    background: #4a4a4a;
    padding: 40px 0;
    text-align: center;
    color: white;
    position: relative;
    z-index: 2;
}

.footer-text {
    font-size: 2rem;
    margin-bottom: 10px;
}

.footer-signature {
    font-size: 1.5rem;
    color: #b0b0b0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-title {
        font-size: 1.5rem;
        letter-spacing: 4px;
    }
    
    .hero-name {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .photo-grid {
        max-width: 300px;
    }
    
    .countdown-number {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .countdown {
        gap: 20px;
    }
    
    .invitation-card,
    .venue-card,
    .rsvp-card {
        padding: 30px 20px;
    }
    
    .timeline-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .color-palette {
        flex-wrap: wrap;
    }
    
    .rsvp-names {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .header-title {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }
    
    .hero-name {
        font-size: 2rem;
    }
    
    .countdown-number {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
    
    .photo-label {
        font-size: 1.5rem;
    }
}

/* Мобильная производительность: fixed+filter фона и backdrop-blur сильно грузят скролл */
@media (max-width: 768px) {
    body::before {
        background-attachment: scroll;
        filter: none;
    }

    .header,
    .hero,
    .countdown-section,
    .invitation-section,
    .invitation-card,
    .program-section,
    .dresscode-section,
    .details-section,
    .venue-section,
    .venue-card,
    .rsvp-section,
    .rsvp-card,
    .menu-selection-section,
    .menu-group,
    .menu-radio-group .radio-label,
    .menu-checkbox-group .checkbox-label {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

@media (hover: none) {
    .menu-checkbox-group .checkbox-label:hover,
    .menu-radio-group .radio-label:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    body::before {
        background-attachment: scroll;
        filter: none;
    }

    .header,
    .hero,
    .countdown-section,
    .invitation-section,
    .invitation-card,
    .program-section,
    .dresscode-section,
    .details-section,
    .venue-section,
    .venue-card,
    .rsvp-section,
    .rsvp-card,
    .menu-selection-section,
    .menu-group,
    .menu-radio-group .radio-label,
    .menu-checkbox-group .checkbox-label {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

