@font-face {
    font-family: "Aptos Light";
    src: url("fonts/Aptos-Light.woff2") format("woff2"),
         url("fonts/Aptos-Light.woff") format("woff");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Aptos Body";
    src: url("fonts/Aptos-Body.woff2") format("woff2"),
         url("fonts/Aptos-Body.woff") format("woff");
    font-weight: bold;
    font-style: normal;
}
html {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.wrapper {
    max-width: 1300px;
    width: 100%;
    padding: 0 1em;
    box-sizing: border-box;
    margin-top: 1em;
}

header {
    position: relative;
    width: 100%;
    text-align: center;
    padding-bottom: 0px;
}

header h1 {
    position: absolute;
    bottom: -50px; /* Distance from the bottom */
    left: 50px; /* Distance from the left */
    color: white;
    font-size: 3em;
    font-weight: bold;
    z-index: 2;
    white-space: normal; /* Allow text to wrap */
    max-width: 90%; /* Prevents text from going off-screen */
    /* word-break: break-word; Ensures words break properly */

}

.header-image {
    width: 100%;
    display: flex;
    justify-content: center;
}

.header-image img {
    width: 100%;
    height: auto; /* Maintain aspect ratio */
    display: block;
}
.subtitle {
    font-size: 0.528em; /* Adjust size as needed */
    font-weight: normal; /* Keep it light */
    display: inline-block;
    width: 100%; /* Make sure the subtitle stretches across the container */

}
.text-container {
    width: 100%; /* Full width */
    display: block; /* Single column layout */
    font-family: "Aptos Light", Arial, sans-serif !important;
    font-size:medium;
}

.textbox {
    width: 100%; /* Full width */
    padding: 0;
    box-sizing: border-box;
    font-family: "Aptos Light", Arial, sans-serif !important;
    font-size: 1.3em;
    border-radius: 5px;
    min-height: 65px;
    outline: none;
    cursor: text;
    background-color: white;
    margin-bottom: 0; /* Adds space between list and next content */
}

.textbox p {
    font-size: 1em;
}

.larger-text {
    font-size: 1.3em !important; /* Adjust the size */
}

/* Bullet list styling */
.bullet-list ul {
    padding-left: 1.5em; /* Indent bullet points */
    margin: 0;
    list-style-type: disc; /* Default bullet style */
    font-family: "Aptos Light", Arial, sans-serif !important;
}

.container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Two equal-width columns */
    column-gap: 1em; /* Space between items */
    width: 100%;
    box-sizing: border-box;
}

.container a {
    text-decoration: none; /* Remove underline from links inside .container */
}

.box {
    position: relative;
    width: 100%; /* Full width */
    display: flex;
    flex-direction: column; /* Stack the image and text vertically */
    justify-content: flex-start;
    box-sizing: border-box;
    padding:0; /* Adds some space around the content (adjust as needed) */
    font-family: "Aptos Light", Arial, sans-serif !important;
    font-weight: normal !important;
    font-size: large;
}

.subbox {
    position: relative;
    width: 100%; /* Full width of the box */
    padding-top: 60%; /* Forces the image to have a 16:9 aspect ratio */
    overflow: hidden;
}

.subbox img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the box without distortion */
    filter: grayscale(100%);
}

.subbox h1 {
    position: absolute;
    transform: translate(-2%, -80%); /* Center the text perfectly */
    color: #f70505;
    font-size: 1.5em;
    font-weight: bold;
    z-index: 2; /* Make sure the text is above the image */
    text-align: right;
}

.subbox-text {
    position: relative;
    padding: 1em;
    background-color: rgba(255, 255, 255, 0.7); /* Optional: make the text more readable over image */
    text-align: center;
    z-index: 1; /* This ensures the text isn't over the image */
}

.subbox-text p {
    font-size: 3em;
    color: #333;
    margin: 0;
}

h1, h2, h3, h4, h5, h6, p {
    font-family: "Aptos Light", Arial, sans-serif;
}

h1 b, h2 b, h3 b, h4 b, h5 b, h6 b, p b,
h1 strong, h2 strong, h3 strong, h4 strong, h5 strong, h6 strong, p strong {
    font-family: "Aptos Body", Arial, sans-serif;
}

h2, h2 b, h2 strong {
    font-family: "Aptos Body", Arial, sans-serif !important;
}
h1 {
    text-align: justify; /* Justify the text */
    width: 100%; /* Ensure the container takes full width */
}

.main-title, .subtitle {
    display: inline-block; /* Treat both parts as block elements */
    width: 100%; /* Make each part take up the full width */
}

h1::after {
    content: ""; /* This is a hack to ensure the last line gets justified */
    display: inline-block;
    width: 100%;
}
.quote-container {
    width: 100%; /* Full width container */
    /* padding: 1em; Space inside the container */
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

.quote {
    font-style: italic; /* Italic for the quote */
    /* font-size: 1.4em; Slightly larger text for the quote */
    color: rgb(80, 157, 213);
    margin: 0; /* Remove margin from the quote paragraph */
}

.citation {
    font-size: 0.9em; /* Smaller text for the citation */
    font-weight: normal; /* Normal weight for citation */
    text-align: left; /* Align citation to the right */
    margin-top: 0.5em; /* Adds space between quote and citation */
    color: #555; /* Slightly muted color for citation */
}

/* Ensure modal is hidden on page load */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Dark overlay */
    align-items: center;
    justify-content: center;
}

/* Enlarged image in modal */
.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0px 4px 15px rgba(255, 255, 255, 0.2);
}

/* Close button */
.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
}

/* Ensure the gallery is a grid with exactly 3 images per row */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Force 3 columns per row */
    gap: 10px;
    justify-content: center;
    max-width: 1000px; /* Adjust to fit your container */
    margin: auto;
}

/* Adjust the size of thumbnails */
.gallery-img {
    width: 100%; /* Force the image to stretch inside its grid cell */
    height: 200px; /* Fixed height to maintain uniformity */
    object-fit: cover; /* Ensures images cover their container without distortion */
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
}

/* Hover effect */
.gallery-img:hover {
    transform: scale(1.05);
}

.image-gallery {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px; /* Space between rows */
}

.image-row {
    display: flex;
    width: 100%;
    justify-content: space-between; /* Ensure the row fills the entire width */
    gap: 10px; /* Space between images */
}

.image-row img {
    height: auto;
    object-fit: contain; /* Ensures images are fully visible */
}

.image-column {
    flex: 1 1 30%; /* Each column is max 30% width */
    display: flex;
    flex-direction: column;
    gap: 1em; /* Space between images */
}
.image-container {
    position: relative;
    display: inline-block; /* Or block, depending on desired layout */
    width: fit-content; /* or 100% if you want them to take full width of container */
}

.image-container img {
    display: block;
    max-width: 100%; /* Ensure image doesn't overflow container */
    height: auto;
}

.caption {
    width: 100%; /* Take full width of container */
    /* background-color: rgba(0, 0, 0, 0.5); */
    color: black;
    padding: 5px;
    font-size: 0.8em;
    text-align: left;
    /* Remove opacity and transition */
}
.video-container {
    position: relative;
    width: 100%;
    max-width: 1300px; /* Adjust based on design */
    aspect-ratio: 16 / 9;
}

.video-container iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    border: none;
}



/* Mobile-specific layout for cmb.html */
@media (max-width: 768px) {
    .cmb-page .top-section {
        display: grid;
        grid-template-columns: 1fr; /* Stack columns in one column layout on mobile */
      	margin-bottom: 2em;
    }

    .cmb-page .left-column, .cmb-page .right-column {
        width: 100%; /* Ensure both left and right columns take full width */
        font-size: medium;
    }

    .cmb-page .right-column img {
        width: 100%; /* Image takes full width */
        height: auto;
        object-fit: cover;
        margin-bottom: 1em; /* Adds space below the image */
    }

    .cmb-page .left-column {
        order: 2; /* Place the text after the image */
    }
    .cmb-page .left-column li {
        margin-bottom: 10px;
    }

    .cmb-page .right-column {
        order: 1; /* Place the image first */
    }

    .cmb-page .quote-container {
        width: 100%; /* Ensure quotes take full width */
        padding: 0.5em; /* Adjust padding for better spacing on mobile */
    }

    .quote {
        font-size: 1em;
    }
    
    /* Ensure the container on the main page stays 1-column in mobile */
    .container {
        grid-template-columns: 1fr; /* 1 column for mobile view */
    }
    .image-gallery {
        display: block !important; /* Make sure no flexbox behavior is applied */
        width: 100%;  /* Ensure gallery spans the full width */
        padding: 0;
        margin: 0;
    }

    /* For images in mobile, make them fill the full width of the screen */
    .image-gallery img {
        width: 100% !important; /* Images take the full width */
        height: auto; /* Maintain aspect ratio */
        object-fit: contain; /* Prevent cropping */
        margin: 0;
    }
    .image-row {
        display: block;
        padding-bottom: 1em;
    }
    .image-row img {
        width: 100%;
        height: auto;
        object-fit: contain; /* Ensures no image is cropped */
    }
    
    .image-column {
        flex: 1 1 100%; /* Full width */
    }
    .textbox p {
        font-size: 0.7em; /* Smaller size for mobile screens */
    }
    header {
        position: relative;
        width: 100%;
        text-align: center;
        padding-bottom: 0px;
    }

    header h1 {
        position: absolute;
        bottom: -35px !important; /* Distance from the bottom */
        left: 8px !important; /* Distance from the left */
        color: rgb(255, 255, 255);
        font-size: 1.35em;
        font-weight: bold;
        z-index: 2; 
        white-space: normal; /* Allow text to wrap */
        max-width: 90%; /* Prevents text from going off-screen */
        /* word-break: break-word; Ensures words break properly */

    }
    
    .subtitle {
        font-size: 0.53em; /* Adjust size as needed */
        font-weight: normal; /* Keep it light */
        display: inline-block;
        width: 100%; /* Make sure the subtitle stretches across the container */

    }
    
    .box p {
        font-size: medium;
    }


}

/* Desktop version remains the same */
@media (min-width: 769px) {
    .container {
        grid-template-columns: repeat(2, 1fr); /* Two columns on desktop */
    }

    .cmb-page .top-section {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Two columns on desktop */
        gap: 2em; /* Space between columns */
      	margin-bottom: 2em;
    }

    .quote {
        font-size: 1.4em;
    }

    .cmb-page .left-column, .cmb-page .right-column {
        width: 100%; /* Full width of columns */
        font-size: med;
    }

    .cmb-page .quote-container {
        padding: 15px;
    }
    .cmb-page .left-column li {
        margin-bottom: 15px;
    }

    .top-section img {
        width: 100%; /* Full width of the image in the top section */
        height: auto; /* Maintain aspect ratio */
    }

    /* Ensure proper font scaling */
    .textbox, .subbox-text p {
        font-size: 1.2em; /* Slightly larger font for readability */
    }

}
