
:root {
    --child-max-width: 1000px;
    --max-image-dimension: var(--child-max-width);

    --border-color: red;
    --background-color: white; /*yellow;*/
    --child-border-color: black;
    --image-border-color: red;
    --text-border-color: orange;

}

.divu_row {
    display: flex;
    flex-direction: row;
    border: var(--border_size) solid var(--border-color);
    background-color: var(--background-color);
    justify-content: space-evenly;
    box-sizing: border-box;
}

.divu_row .divu_parent {
    flex: 1; /* Automatically divide space equally */
    overflow: hidden;
    border: var(--border_size) solid var(--child-border-color);
    display: flex;
    justify-content: center; /* Horizontally center content */
    align-items: center; /* Vertically center content */
    box-sizing: border-box; /* Include padding and borders in width calculations */
}

.divu_row .align_hcenter {
    justify-content: center;
}

.divu_row .align_left {
    justify-content: flex-start;
}

.divu_row .align_right {
    justify-content: flex-end;
}

.divu_row .align_top {
    align-items: flex-start;
}

.divu_row .align_vcenter {
    align-items: center;
}

.divu_row .align_bottom {
    align-items: flex-end;
}

.divu_row .divu_chld_txt {
    width: 80%;
    margin: 0 10px;
    text-align: center;
    border: var(--border_size) solid var(--text-border-color);
    padding: 0 20px;
    box-sizing: border-box;
}

.divu_row .divu_chld_image {
    flex: 1; /* Allow the image container to grow and take up space */
    display: flex;
    justify-content: center; /* Center the image horizontally */
    align-items: center; /* Center the image vertically */
    border: var(--border_size) solid var(--image-border-color);
    max-width: var(--max-image-dimension); /* Apply the max-width */
    box-sizing: border-box; /* Include padding and borders in width calculations */
    padding-right: 0;
}

.divu_row .divu_chld_image_img {
    max-width: 100%; /* Ensure the image does not exceed its container's width */
    max-height: 100%; /* Ensure the image does not exceed its container's height */
    height: auto; /* Maintain the image's aspect ratio */
    width: auto; /* Maintain aspect ratio, while respecting max-width */
    object-fit: contain; /* Ensure the image stays within its box */ /* Fill; */
    box-sizing: border-box; /* Include padding and borders in width calculations */
}

/* Responsive Design */

/* Tablet (max-width: 768px) */
@media (max-width: 768px) {
    .divu_row {
        flex-direction: column; /* Stack children vertically */
        align-items: center; /* Center children horizontally */
    }

    .divu_row .divu_parent {
        width: 100%; /* Ensure each div takes full width */
        margin-bottom: 20px; /* Add space between stacked divs */
    }

    .divu_row .divu_chld_txt {
        margin: 40px 0; /* Adjust text margin */
        padding: 0 10px; /* Adjust padding for better readability */
    }

    .divu_row .divu_chld_image {
        max-width: 90%; /* Reduce image container width for better fit */
    }
}

/* Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .divu_row {
        flex-direction: column; /* Stack children vertically */
        align-items: center; /* Center children horizontally */
    }

    .divu_row .divu_parent {
        width: 100%; /* Ensure each div takes full width */
        margin-bottom: 15px; /* Adjust space between stacked divs */
    }

    .divu_row .divu_chld_txt {
        margin: 5px 0; /* Further reduce text margin */
        padding: 0 5px; /* Adjust padding for better readability */
        font-size: 14px; /* Decrease font size for better fit on small screens */
    }

    .divu_row .divu_chld_image {
        max-width: 80%; /* Further reduce image container width */
    }
}
