@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(180deg, #1c1c1c, #333333); /* Dark modern gradient */
    color: #f0c674; /* Softer, modern gold */
    font-family: 'Montserrat', sans-serif;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
}

h1 {
    font-size: 3em;
    margin-bottom: 0.5em;
    text-align: center;
    letter-spacing: 2px;
    color: #ffffff;
}

h2.name {
    font-size: 2.5em;
    margin-bottom: 0.3em;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #f0c674;
}

h2.dates {
    font-size: 1.8em;
    margin-bottom: 1em;
    font-style: italic;
    color: #e0e0e0;
}

p {
    font-size: 1.2em;
    margin-bottom: 1.5em;
    line-height: 1.8;
    color: #dcdcdc;
}

.additional-message,
.beloved-message,
.family-message,
.positive-message {
    font-size: 1.3em;
    margin-top: 1em;
    font-style: italic;
    max-width: 90%;
    color: #f0c674;
}

.divider {
    width: 50%;
    height: 2px;
    background-color: #f0c674;
    margin: 30px 0;
}

img.main-image {
    width: 100%;
    max-width: 600px;
    border: 4px solid #f0c674;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(240, 198, 116, 0.7);
    margin-bottom: 2em;
    transition: transform 0.3s ease-in-out;
}

img.main-image:hover {
    transform: scale(1.05);
}

.happy-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 2em;
}

.happy-images img {
    width: 100%;
    border: 3px solid #f0c674;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(240, 198, 116, 0.6);
    transition: transform 0.3s ease-in-out;
}

.happy-images img:hover {
    transform: scale(1.05);
}

.speech {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center the image and text */
    max-width: 900px;
    padding: 30px;
    background-color: #1e1e1e;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(240, 198, 116, 0.5);
    text-align: left; /* Keep text left-aligned */
    margin-bottom: 2em;
}

.speech img.speech-image {
    width: 100%;
    max-width: 500px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(240, 198, 116, 0.6);
    align-self: center; /* Ensure the image is centered */
}


.speech img.speech-image:hover {
    transform: scale(1.05);
}

.speech h3 {
    font-size: 2em;
    margin-bottom: 1em;
    color: #f0c674;
}

.speech p {
    font-size: 1.2em;
    color: #dcdcdc;
}

.group-photo-section {
    text-align: center;
    margin-top: 2em;
}

.group-photo-section img.group-photo {
    width: 100%;
    max-width: 800px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(240, 198, 116, 0.6);
    margin-bottom: 1em;
    transition: transform 0.3s ease-in-out;
}

.group-photo-section img.group-photo:hover {
    transform: scale(1.05);
}

footer {
    font-size: 0.9em;
    text-align: center;
    margin-top: auto;
    padding: 1.5em 0;
    border-top: 1px solid #f0c674;
    width: 100%;
    color: #dcdcdc;
}

/* Media Query for Tablets and Desktops */
@media (min-width: 768px) {
    h1 {
        font-size: 3.5em;
    }

    h2.name {
        font-size: 2.8em;
    }

    h2.dates {
        font-size: 2.2em;
    }

    .speech {
        padding: 40px;
    }
}

/* Media Query for Smaller Screens */
@media (max-width: 480px) {
    h1 {
        font-size: 2.2em;
    }

    h2.name {
        font-size: 1.9em;
    }

    h2.dates {
        font-size: 1.5em;
    }

    p, .additional-message, .beloved-message, .family-message, .positive-message {
        font-size: 1.1em;
    }

    img.main-image {
        max-width: 95%;
    }

    .happy-images {
        grid-template-columns: 1fr;
    }

    .speech {
        padding: 20px;
        max-width: 100%;
    }
}
