.title {
    margin-top: 20px;
    margin-bottom: -10px;
    font-size: clamp(40px, 8vw, 100px); 
    text-align: center;
}

nav ul {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 15px 10px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 20px auto !important;
    width: 90% !important;
    max-width: 340px !important;
}

nav ul li {
    display: block !important;
    text-align: center !important;
    width: calc(33.333% - 10px) !important; 
    margin: 0 !important;
    flex-grow: 0 !important;
}

nav ul li a {
    display: block !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

.bridesmaid-section,
.groomsman-section {
    display: flex;
    flex-direction: column; 
    width: 100%;
    height: auto;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
    padding: 0 20px;
    box-sizing: border-box;
    text-align: center;
}

.bridesmaid-section h1 {
    font-family: "Sacramento";
    font-size: clamp(32px, 6vw, 48px);
    margin: 10px 0;
    text-align: center;
}

.groomsman-section h1 {
    font-family: "Sacramento";
    font-size: clamp(32px, 6vw, 48px);
    margin-top: 40px;
    margin-bottom: 0px;;
    text-align: center;
}

.bridesmaid-section img.flowers,
.groomsman-section img.tux1,
.groomsman-section img.tux {
    display: none;
    width: auto;
    opacity: 40%;
}

.groomsman-section img.tux1 {
    transform: scaleX(-1);
}

.party-row {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 30px;
    width: 90%;
    max-width: 900px;
    margin: 20px auto 0;
}

.party-row h1 {
    font-family: "Cormorant Upright";
    font-size: clamp(30px, 5vw, 50px);
    margin-top: 0px;
    margin-bottom: -10px;
    text-align: center;
}

.party-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
    margin: 0;
}

.party-member:nth-child(4),
.party-member:nth-child(5) {
    grid-column: auto;
}

.party-member img {
    display: block;
    width: 100%;
    max-width: 280px;
    height: 300px;
    object-fit: cover;
    border-radius: 4px;
}

.party-member p {
    margin: 12px 0 0;
    font-size: 18px;
}

.footer {
    text-align: center;
    width: 100%;
    margin-top: 40px;
}

@media (min-width: 601px) {
    .party-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 769px) {
    nav ul {
        flex-wrap: nowrap !important;
        max-width: none !important;
        width: auto !important;
        gap: 20px !important;
    }

    nav ul li {
        width: auto !important;
    }

    .bridesmaid-section,
    .groomsman-section {
        flex-direction: row;
        justify-content: space-evenly;
        margin-top: -20px;
    }

    .bridesmaid-section img.flowers,
    .groomsman-section img.tux1,
    .groomsman-section img.tux {
        display: block;
        height: 500px;
        max-height: none;
    }

    .party-row {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 30px 10px;
    }

    .party-member {
        grid-column: span 2;
    }

    .party-member:nth-child(4) {
        grid-column: 2 / span 2;
    }

    .party-member:nth-child(5) {
        grid-column: 4 / span 2;
    }

    .party-member img {
        width: 90%;
        max-width: none;
    }
}
