/* General page styles */
body {
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
    line-height: 1.7;
    background: linear-gradient(120deg, #f8fafc 0%, #e3e7ed 100%);
    color: #222;
    padding: 20px;
    margin: 20px;
}

/* Main content container */
.party-story {
    padding-top: 80px;
    max-width: auto;
    margin: 0 auto;
    align-items: center;
}

/* Improved layout for image/text blocks */
.contents {
    background: rgba(255,255,255,0.95);
    padding: 20px;
    margin: 10px 0;
    border-radius: 8px;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: center;
    transition: box-shadow 0.3s;
}


/* Paragraph styling inside flex container */
.contents p {
    font-size: 1.5rem;
    margin-bottom: 0;
    color: #222;
    text-align: justify;
    flex: 2 1 100px;
    width: 100%;
    height: fit-content;
}

/* Image styling inside flex container */
.contents .inline-img{
    width: 100%;
    min-height: 60vh;
    margin: 0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(60, 80, 120, 0.13);
    transition: transform 0.25s cubic-bezier(.4,2,.3,1), box-shadow 0.25s;
    flex: 1 1 220px;
    order: 0;
}

/* Adding hover effect for images */
.inline-img:hover {
    transform: scale(1.07) rotate(-1deg);
    box-shadow: 0 8px 32px rgba(60, 80, 120, 0.18);
}

/* Alternate image order for visual interest */
.contents .inline-img:nth-of-type(even) {
    order: 2;
}
.contents .inline-img:nth-of-type(odd) {
    order: 0;
}

/* General image styling */
.contents img {
    margin: 0;
    border-radius: 8px;
    max-height: 22rem;
    width: 100%;
    box-shadow: 0 2px 12px rgba(60, 80, 120, 0.10);
}


/* Clearfix for floating images */
/* Clearfix for floating images */
.contents::after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive styling */
@media (max-width: 900px) {
    .party-story {
        padding-top: 16px;
        max-width: 100vw;
        margin: 0;
    }
    .contents {
        flex-direction: column;
        gap: 12px;
        padding: 10px 2vw;
        border-radius: 10px;
        min-width: 0;
        height: auto;
    }
    .contents p {
        font-size: 1.5rem;
    }
    .inline-img {
        max-width: 100vw;
        width: 100%;
        height: 100%;
        margin: 0 auto 8px auto;
        height: auto;
        order: 0 !important;
        border-radius: 8px;
    }
    .contents img {
        width: 100%;
        border-radius: 8px;
    }
}

@media (max-width: 600px) {
    body {
        padding: 4px;
    }
    .party-story {
        padding-top: 8px;
    }
    .contents {
        padding: 6px 1vw;
        gap: 8px;
    }
    .contents p {
        font-size: 1.5rem;
    }
    .inline-img, .contents img {
        width: 100%;
        max-height: 7rem;
        border-radius: 6px;
    }
}
