/* Базовые переменные */
@font-face {
    font-family: 'tarbarsam';
    src: url('fonts/tarbarsam\ Ё\ Medium.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #1b213f;
    --primary-dark: #9b3535;
    --secondary: #f5e6d3;
    --text: #1b213f;
    --text-light: #1b213f;
    --bg: #fffaf5;
    --gold: #d4af37;
    --shadow: 0 20px 40px rgba(0,0,0,0.08);
    --accent-font: 'tarbarsam';
    --base-font: 'Manrope';
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--base-font), sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25%;
    position: relative;
    z-index: 1;
}

@media (min-width: 1024px) {
    .container {
        max-width: 50%;
        margin: 0 auto;
        padding: 2rem 0;
    }
}

@media (min-width: 1440px) {
    .container {
        max-width: 50%;
    }
}

.block {
    margin-bottom: 4rem;
}

/* Секция героев */
.hero-section {
    text-align: center;
    padding: 3rem 0;
}

.photo-pair {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    margin-bottom: 2rem;
    position: relative;
}

.photo-wrapper {
    position: relative;
    display: inline-block;
}

.first-child {
    transform: rotate(-10deg);
    z-index: 1;
    margin-right: -10px;
    margin-bottom: 20px;
}

.last-child {
    transform: rotate(15deg);
    z-index: 2;
    margin-left: 0px;
    margin-top: 20px;
}

.hero-photo {
    width: 260px;
    height: auto;
    object-fit: cover;
    display: block;
    box-shadow: var(--shadow);
    animation: rotatePhoto 4s ease-in-out infinite;
}

@keyframes rotatePhoto {
    0%, 100% {
        transform: rotate(0deg);
    }
    35% {
        transform: rotate(1deg);
    }
    65% {
        transform: rotate(-1deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

.couple-title {
    font-family: 'tarbarsam', serif;
    font-size: 3rem;
    margin: 5rem 0 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
    line-height: 1.2;
}

.section-title {
    font-family: var(--accent-font), serif;
    font-size: 3rem;
    text-align: center;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
    white-space: nowrap;
}

.hero-section .section-title {
    margin-bottom: 0;
    line-height: 1.2;
}

.heart-decoration {
    width: 20%;
    height: auto;
    object-fit: contain;
    animation: heartbeat 2s infinite;
}

@keyframes heartbeat {
    0%, 100% { 
        transform: scale(1); 
    }
    20% { 
        transform: scale(1.1); 
    }
}

.reveal-section {
    text-align: center;
}

.description {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    color: var(--text-light);
}

.description.large {
    font-size: 1.3rem;
    line-height: 1.5;
}

.childhood-photo {
    position: relative;
    display: inline-block;
}

.floating-photo {
    width: 400px;
    max-width: 90%;
    height: auto;
    animation: rotatePhoto 4s ease-in-out infinite;
}

.invitation-card {
    text-align: center;
}

.invitation-text {
    font-size: 1.3rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    color: var(--text-light);
    line-height: 1.5;
}

.invitation-date {
    font-family: var(--accent-font), sans-serif;
    font-size: 2rem;
    text-align: center;
    color: var(--primary);
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.timeline-item {
    display: grid;
    grid-template-columns: 30% 25% 45%;
    margin-bottom: 2rem;
    padding: 1rem;
}

.timeline-time {
    font-family: var(--accent-font), sans-serif;
    font-weight: bold;
    justify-self: center;
    align-self: self-start;
    font-size: 2rem;
    color: var(--primary);
    padding-top: 1rem;
    padding-left: 1rem;
}

.timeline-icon {
    display: flex;
    justify-content: center;
    align-self: self-start;
}

.timeline-icon img {
    width: 3rem;
    height: auto;
    object-fit: contain;
    padding-top: 0.75rem;
}

.timeline-content h3 {
    font-family: var(--accent-font), sans-serif;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text);
    white-space: nowrap;
}

.timeline-content p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Блок 5 - места */
.locations-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.ceremony, .banket {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.location-image img {
    width: 100%;
    max-width: 350px;
    height: 100%;
    object-fit: cover;
    margin: 1rem auto;
    display: block;
}

.location-address {
    text-align: center;
    font-family: var(--base-font), sans-serif;
    color: var(--text-light);
    margin: 1rem 0;
}

/* Блок 6 - пожелания */
.wishes-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
}

.wishes-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.wishes-text {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
    color: var(--text-light);
}

.divider-flower {
    margin: 2rem 0;
    font-size: 1.2rem;
    color: var(--gold);
    letter-spacing: 2px;
}

/* Блок 7 - форма */
.rsvp-section {
    padding: 2rem;
}

.rsvp-text {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    text-align: center;
    line-height: 1.5;
    color: var(--text-light);
}

.rsvp-card {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-family: var(--base-font), sans-serif;
    display: block;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.6rem;
    color: var(--text);
}

.form-group input[type="text"] {
    width: 100%;
    padding: 0.8rem 0;
    border: none;
    border-bottom: 1px solid var(--primary);
    font-size: 1rem;
    font-family: inherit;
    background: transparent;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-dark);
}

.radio-group, .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-label, .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.radio-label input, .checkbox-label input {
    cursor: pointer;
    accent-color: var(--primary);
}

.radio-label span, .checkbox-label span {
    font-size: 0.95rem;
}

.submit-btn {
    background: var(--secondary);
    border:1px solid #1b213f;
    font-family: inherit;
    color: var(--text);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    width: auto;
    min-width: 160px;
    justify-content: center;
    align-self: center;
    margin-top: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.form-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 15px;
    text-align: center;
    display: none;
}

.form-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
}

.form-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
}

.footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 3rem 0 1rem;
    color: var(--text-light);
}

.footer-title {
    font-family: var(--accent-font), serif;
    font-size: 1.5rem;
    text-align: center;
    color: var(--primary);
   
}

.footer-small {
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* ========== МОБИЛЬНЫЕ ЭКРАНЫ - МИНИМАЛЬНЫЕ ПРАВКИ ========== */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        margin: 0;
        max-width: 100%;
    }
    
    .block {
        margin-bottom: 2rem;
    }
    
    /* Фото в ряд, как на ПК */
    .photo-pair {
        flex-wrap: nowrap;
        justify-content: center;
    }
    
    .hero-photo {
        width: 30%;
        height: auto;
    }
    
    .first-child {
        transform: rotate(-8deg);
        margin-right: -8px;
        margin-bottom: 15px;
    }
    
    .last-child {
        transform: rotate(12deg);
        margin-left: -8px;
        margin-top: 15px;
    }
    
    /* Егор + Анна = шире, 70% экрана */
    .couple-title {
        width: 70%;
        margin: 1rem auto 0.5rem;
        font-size: 2.2rem;
    }
    
    .hero-section .section-title {
        font-size: 2.5rem;
        width: 100%;
    }
    
    .heart-decoration {
        width: 30%;
    }
    
    /* Универсальный размер текста для всех абзацев */
    .description.large,
    .invitation-text,
    .wishes-text,
    .rsvp-text {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    /* Детская фото */
    .floating-photo {
        width: 280px;
    }
    
    /* Таймлайн */
    .timeline-item {
        grid-template-columns: 60px 45px 1fr;
        gap: 0.5rem;
    }
    
    .timeline-time {
        font-size: 1.2rem;
        padding-left: 0;
    }
    
    .timeline-icon img {
        width: 30px;
    }
    
    .timeline-content h3 {
        font-size: 1.2rem;
        white-space: normal;
    }
    
    .timeline-content p {
        font-size: 0.85rem;
    }

    .locations-section {
    margin-right: 10%;
    margin-left: 10%;
    }
    .rsvp-section {
        padding: 1.5rem;
        border-radius: 30px;
    }
    
    .submit-btn {
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .hero-photo {
        width: 100%;
        height: auto;
    }
    
    .photo-pair {
        gap: 0;
    }
    
    .first-child {
        transform: rotate(-6deg);
        margin-right: -5px;
        margin-bottom: 10px;
    }
    
    .last-child {
        transform: rotate(8deg);
        margin-left: -5px;
        margin-top: 10px;
    }
    
    .couple-title {
        width: 80%;
        font-size: 1.8rem;
    }
    
    .hero-section .section-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .description.large,
    .invitation-text,
    .wishes-text,
    .rsvp-text {
        font-size: 0.8rem;
    }
    
    .floating-photo {
        width: 220px;
    }
    
    
    .wishes-icon {
        width: 60px;
        height: 60px;
    }
    
    .radio-label span, 
    .checkbox-label span {
        font-size: 0.85rem;
    }
}