body {
    display: flex;
    flex-direction: column;
    margin: 0;
    height: 100vh; /* Full viewport height */
    background-color: black;
    font-family: Arial, Helvetica, sans-serif;
}

.wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 80%;
    margin: 0 auto; /* Centers content horizontally */
    flex-grow: 1; /* Ensure it takes up remaining space between header and footer */
    min-height: 0; /* Prevent overflow issues */
}

.header {
    width: 50vw;
    margin-bottom: 20px; /* Adds proper spacing between header and content */
}

.header img {
    width: 100%; /* Ensures the image scales to the div's width */
    height: auto; /* Keeps the aspect ratio of the image */
    object-fit: cover; /* Ensures the image covers the div, cropping if necessary */
}

.container {
    display: flex;
    justify-content: space-between;
    align-items: stretch; /* Ensures both video and text box have the same height */
    width: 100%;
}

iframe {
    width: 48%;
    aspect-ratio: 16 / 9;
    border: none;
    height: auto;
}

.text-box {
    width: 48%;
    overflow-y: auto; /* Scroll the content if it overflows */
    /* background-color: darkgray; */
    color: white;
    padding: 20px;
    box-sizing: border-box;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    height: auto; /* Allow natural height based on aspect ratio */
    max-height: calc(48vw * 9 / 16); /* Match height of the video based on aspect ratio */
}

p {
    color: white;
    text-align: justify;
    font-size: clamp(12px, 2vw, 14px);
    margin: 0; /* Remove margin for consistent alignment */
}

.footer {
    height: 70px; /* Fixed footer height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    width: 100%;
    z-index: 10;
}

.footer p {
    margin: 3px 0; /* Ensure there’s spacing between the paragraphs */
    font-size: 12px;
    color: gray;
}

a:link {
    color: white;
    text-decoration: none;
}

a:visited {
    color: white;
    text-decoration: none;   
}

/* Media query for smaller screens */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        align-items: center;
    }

    iframe {
        width: 100%;
        max-height: calc(100vw * 9 / 16); /* Maintain 16:9 ratio for the video */
        margin-bottom: 20px;
    }

    .header {
        width: 80vw;
    }

    .text-box {
        width: 100%; /* Full width on small screens */
        max-height: none; /* Remove the fixed height to allow the text box to expand */
        height: auto; /* Allow the text box to grow based on the content */
        overflow-y: visible; /* No scrolling unless absolutely necessary */
        margin-bottom: 20px;
    }
}