/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: #2a3f5e;
    background-color: #fbf7ec;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ===== GEOMETRIC BACKGROUND PATTERN ===== */
.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(90deg, transparent 95%, #344c64 95%),
        linear-gradient(0deg, transparent 95%, #8d684b 95%),
        linear-gradient(45deg, transparent 90%, #203c63 90%),
        linear-gradient(-45deg, transparent 90%, #8d684b 90%);
    background-size: 60px 60px, 60px 60px, 80px 80px, 80px 80px;
    opacity: 0.15;
    z-index: -9999;
    pointer-events: none;
    backface-visibility: hidden;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== SECTION COMMON ===== */
.section {
    padding: 80px 0;
    position: relative;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: #203c63;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 10%;
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, #8d684b, #344c64, #203c63);
    border-radius: 2px;
}

/* ===== DIVIDER WITH HEARTS ===== */
.divider {
    text-align: center;
    padding: 30px 0;
    color: #8d684b;
    font-size: 1.8rem;
    background-color: rgba(251, 247, 236, 0.7);
}

.divider i {
    margin: 0 15px;
    animation: heartbeat 1.5s infinite ease-in-out;
}

.divider i:nth-child(2) {
    animation-delay: 0.2s;
}

.divider i:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    min-height: 100vh;
    overflow: visible;
    background-color: #203c63;
    border-bottom: 8px solid #8d684b;
}

.hero-image {
    display: block;
    width: 100%;
    height: auto;
    z-index: 1;
    opacity: 0.9;
}

.hero-overlay {
    display: none;
}

.hero-content {
    text-align: center;
    color: #fbf7ec;
    z-index: 3;
    padding: 30px;
    max-width: 800px;
    background-color: rgba(251, 247, 236, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    border: 2px solid rgba(141, 104, 75, 0.5);
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 20px;
    color: #fbf7ec;
}

.hero-invite {
    font-size: 1.5rem;
    font-weight: 400;
    color: #fbf7ec;
    border-top: 1px solid rgba(251, 247, 236, 0.5);
    padding-top: 20px;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== EVENT INFO ===== */
.event-info {
    background-color: rgba(251, 247, 236, 0.9);
}

.text-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.large-text {
    font-size: 1.5rem;
    line-height: 1.8;
    margin-bottom: 40px;
    color: #2a3f5e;
}

.calendar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #A4B5C4, #071739);
    color: #fbf7ec;
    font-size: 1.3rem;
    font-weight: 600;
    padding: 18px 35px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(7, 23, 57, 0.3);
    margin-bottom: 15px;
}

.calendar-btn i {
    margin-right: 12px;
    font-size: 1.5rem;
}

.calendar-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(7, 23, 57, 0.5);
    background: #071739;
}

.note {
    font-size: 0.9rem;
    color: #8d684b;
    font-style: italic;
}

/* ===== LOCATION ===== */
.location-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.location-info {
    text-align: center;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(52, 76, 100, 0.1);
    border: 2px solid #8d684b;
}

.church-logo img {
    width: 120px;
    height: auto;
    margin-bottom: 20px;
}

.church-name {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: #203c63;
    margin-bottom: 10px;
}

.church-address {
    font-size: 1.3rem;
    color: #8d684b;
    margin-bottom: 20px;
    font-weight: 500;
}

.church-description {
    font-size: 1.1rem;
    color: #2a3f5e;
    line-height: 1.7;
}
.church-link {
    margin-top: 15px;
    font-size: 1rem;
    color: #8d684b;
}
.church-link a {
    color: #344c64;
    text-decoration: none;
    border-bottom: 1px dashed #8d684b;
    transition: color 0.3s ease;
}
.church-link a:hover {
    color: #203c63;
    border-bottom-style: solid;
}

.map-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(32, 60, 99, 0.2);
    border: 3px solid #344c64;
}

.map-note {
    text-align: center;
    font-size: 0.9rem;
    color: #8d684b;
    margin-top: 10px;
    font-style: italic;
}

/* ===== SCHEDULE ===== */
.schedule-timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.schedule-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #8d684b, #344c64, #203c63);
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 50px;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.time {
    flex: 0 0 120px;
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #203c63;
    background-color: #fbf7ec;
    padding: 15px;
    border-radius: 10px;
    border: 3px solid #8d684b;
    z-index: 1;
}

.event {
    flex: 1;
    padding: 25px;
    margin: 0 30px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(52, 76, 100, 0.15);
    border-left: 5px solid #344c64;
}

.event h3 {
    font-size: 1.8rem;
    color: #203c63;
    margin-bottom: 10px;
}

.event p {
    color: #2a3f5e;
    font-size: 1.1rem;
}

/* ===== WISHES ===== */
.wishes-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.wish-card {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 10px 25px rgba(141, 104, 75, 0.1);
    border-top: 6px solid #8d684b;
    transition: transform 0.3s ease;
}

.wish-card:hover {
    transform: translateY(-10px);
}

.wish-icon {
    font-size: 3rem;
    color: #8d684b;
    margin-bottom: 20px;
}

.wish-text h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: #203c63;
    margin-bottom: 15px;
}

.wish-text p {
    color: #2a3f5e;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* ===== COLOR PALETTE ===== */
.color-palette {
    background-color: rgba(251, 247, 236, 0.9);
}

.palette-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: stretch;
    max-width: 1000px;
    margin: 0 auto;
}

.palette-text {
    text-align: justify;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.palette-text .large-text {
    margin-bottom: 1em;
}
.palette-text .large-text:last-child {
    margin-bottom: 0;
}

.palette-colors {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    height: 100%;
}

.palette-horizontal {
    display: grid;
    grid-template-rows: repeat(6, 1fr);
    gap: 20px;
    width: 100%;
    height: 100%;
}

.color-item {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 3px solid white;
    min-height: 0; /* позволяет сжиматься */
}

.color-item:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

/* ===== FOOTER ===== */
.footer {
    background: linear-gradient(135deg, #203c63, #344c64);
    color: #fbf7ec;
    padding: 60px 0 40px;
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-text {
    font-size: 1.5rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.footer-names {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #fbf7ec;
}

.footer-year {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #8d684b;
    font-weight: 300;
}

.footer-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
}

.footer-decoration .line {
    width: 80px;
    height: 2px;
    background-color: #8d684b;
}

.footer-decoration i {
    margin: 0 20px;
    font-size: 2rem;
    color: #fbf7ec;
}

.footer-note {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 20px;
    font-style: italic;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animated {
    animation: fadeInUp 0.8s ease forwards;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .hero-title {
        font-size: 4rem;
    }
    .hero-subtitle {
        font-size: 2rem;
    }
    .location-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .location-info {
        order: 1;
    }
    .map-wrapper {
        order: 2;
    }
    .schedule-timeline::before {
        left: 30px;
    }
    .timeline-item {
        flex-direction: row !important;
        align-items: flex-start;
    }
    .time {
        flex: 0 0 100px;
        margin-right: 20px;
        margin-left: 0;
    }
    .event {
        margin-left: 0;
        margin-right: 0;
    }
    .palette-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .palette-colors {
        align-items: center;
    }
    .palette-text,
    .palette-colors {
        height: auto;
    }
    .palette-text {
        justify-content: flex-start;
    }
    .palette-horizontal {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
        height: auto;
    }
    .color-item {
        width: 100px;
        height: 60px;
        flex: 0 0 auto;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
    .section-title {
        font-size: 2.2rem;
    }
    .hero-title {
        font-size: 3rem;
    }
    .hero-subtitle {
        font-size: 1.8rem;
    }
    .large-text {
        font-size: 1.2rem;
    }
    .calendar-btn {
        font-size: 1.1rem;
        padding: 15px 25px;
    }
    .wishes-content {
        grid-template-columns: 1fr;
    }
    .palette-layout {
        gap: 30px;
    }
    .palette-text,
    .palette-colors {
        height: auto;
    }
    .palette-text {
        justify-content: flex-start;
    }
    .color-item {
        width: 100%;
        height: 50px;
        flex: 0 0 auto;
    }
    .palette-horizontal {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        height: auto;
    }
    .footer-names {
        font-size: 2.8rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: auto;
        height: auto;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.5rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .time {
        font-size: 1.5rem;
        padding: 10px;
    }
    .event h3 {
        font-size: 1.5rem;
    }
    .palette-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .palette-colors {
        align-items: center;
    }
    .palette-text,
    .palette-colors {
        height: auto;
    }
    .palette-text {
        justify-content: flex-start;
    }
    .palette-horizontal {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        height: auto;
    }
    .color-item {
        width: 80px;
        height: 50px;
        flex: 0 0 auto;
    }
    .footer-names {
        font-size: 2.2rem;
    }
}

@media (max-width: 400px) {
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1.2rem;
    }
    .hero-invite {
        font-size: 1.1rem;
        padding-top: 15px;
    }
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }
    .section-title::after {
        bottom: -10px;
        height: 2px;
    }
    .calendar-btn {
        font-size: 1rem;
        padding: 12px 20px;
    }
    .time {
        flex: 0 0 80px;
        font-size: 1.2rem;
        padding: 8px;
    }
    .event {
        padding: 15px;
    }
    .event h3 {
        font-size: 1.2rem;
    }
    .event p {
        font-size: 1rem;
    }
    .palette-layout {
        gap: 20px;
    }
    .palette-text,
    .palette-colors {
        height: auto;
    }
    .palette-text {
        justify-content: flex-start;
    }
    .color-item {
        width: 70px;
        height: 40px;
        flex: 0 0 auto;
    }
    .palette-horizontal {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        height: auto;
    }
    .footer-names {
        font-size: 1.8rem;
    }
    .footer-text {
        font-size: 1.2rem;
    }
    .footer-year {
        font-size: 1.5rem;
    }
}