* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    padding: 20px;
}

.class1, .class2 {
    width: 100%;
    display: flex;
    margin-bottom: 2em;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Fix the text container */
#text {
    width: 60%;
    padding: 2em;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.heading {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 1em;
    color: #333;
}

.info {
    font-size: 1.1em;
    line-height: 1.5;
    color: #555;
}

.image-container {
    width: 40%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
}

.image-text {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    width: 100%;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 1.5em;
    position: absolute;
    bottom: 0;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .class1, .class2 {
        flex-direction: column;
        height: auto;
    }
    
    #text, .image-container {
        width: 100%;
    }
    
    .image-container {
        height: 300px;
    }
}