/* Styles for the custom box 1 --------------------------------------------------------------------------- */
.custom-box1 {
    width: 100%;
    margin: 20px 0;
    border: 1px solid #ddd; /* Border for the box */
    box-sizing: border-box;
    padding: 10px;
    background-color: var(--wp--preset--color--bleu);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.06); /* Shadows */
}

/* Content of the custom box (image and details) */
.custom-box1-content {
    display: flex;
    flex-direction: row;
    width: 100%;
}

/* Left side of the box - Thumbnail image */
.custom-box1-left {
    width: 50%;
    padding-right: 10px;
}

.custom-box1-left img {
    width: 100%; /* Ensure the image fills its container */
    height: auto;
}

/* Right side of the box - Title, excerpt, and button */
.custom-box1-right {
    width: 50%;
    padding-left: 10px;
}

.custom-box1-title {
    color: var(--wp--preset--color--white);
    font-size: 30px;
    margin-bottom: 10px;
    margin-top: 0px;
}

.custom-box1-excerpt {
    color: var(--wp--preset--color--white);
    font-size: 22px;
}

.custom-box1-button {
    display: inline-block;
    text-decoration: none;
    background-color: var(--wp--preset--color--orange);
    color: var(--wp--preset--color--white);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 20px;
    font-family: UnistraD;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* Responsive Design */

/* When the image height becomes smaller than the text height */
@media (max-aspect-ratio: 1/1) {
    .custom-box1-content {
        flex-direction: column; /* Stack image and text */
        text-align: center; /* Center-align content */
    }

    .custom-box1-left {
        width: 100%; /* Full width for the image */
        padding-right: 0; /* Remove padding */
    }

    .custom-box1-left img {
        width: 100%; /* Full width image */
        height: auto; /* Maintain aspect ratio */
    }

    .custom-box1-right {
        width: 100%; /* Full width for the text */
        padding-left: 0; /* Remove padding */
        text-align: center; /* Center-align text */
    }

    .custom-box1-title {
        text-align: center; /* Center the title */
    }

    .custom-box1-button {
        margin: 10px auto; /* Center the button */
    }
}

/* Additional responsiveness for smaller screens */
@media (max-width: 480px) {
    .custom-box1-content {
        flex-direction: column; /* Stacked layout */
    }
}


/* Styles for the custom box 2 --------------------------------------------------------------------------- */

/* Styles for the custom box 2 */
.custom-box2 {
    width: 100%;
    margin: 20px 0;
    border: 1px solid #ddd; /* Border for the box */
    box-sizing: border-box;
    padding: 10px;
    background-color: #fff; /* White background */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.06); /* Shadows */
    position: relative;
}

/* Content of the custom box 2 (image and details) */
.custom-box2-content {
    display: flex;
    flex-direction: row;
    width: 100%;
}

/* Left side of the box - Thumbnail image */
.custom-box2-left {
    width: 50%;
    padding-right: 10px;
}

.custom-box2-left img {
    width: 100%; /* Ensure the image fills its container */
    height: auto;
}

/* Right side of the box - Title, excerpt, and button */
.custom-box2-right {
    width: 50%;
    padding-left: 10px;
}

.custom-box2-title {
    color: #ffffff;
    font-size: 36px;
    margin-bottom: 10px;
    padding: 15px;
    background-color: var(--wp--preset--color--rouge);
    position: absolute;
    width: 60%;
    right: 0px;
    top: 20px;
}

.custom-box2-excerpt {
    color: var(--wp--preset--color--black);
    font-size: 24px;
    padding-top: 125px;
}

.custom-box2-button {
    display: inline-block;
    text-decoration: none;
    background-color: var(--wp--preset--color--rouge);
    color: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 26px;
    font-family: UnistraD;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* Responsive Design */

/* When the image height becomes smaller than the text height */
@media (max-aspect-ratio: 1/1) {

    .custom-box2-banner {
        display: none;
    }

    .custom-box2-content {
        flex-direction: column; /* Stack image and text */
        text-align: center; /* Center-align content */
    }

    .custom-box2-left {
        width: 100%; /* Full width for the image */
        padding-right: 0; /* Remove padding */
    }

    .custom-box2-left img {
        width: 100%; /* Full width image */
        height: auto; /* Maintain aspect ratio */
    }

    .custom-box2-right {
        width: 100%; /* Full width for the text */
        text-align: center; /* Center-align text */
        box-sizing: border-box;
    }

    .custom-box2-title {
        text-align: center; /* Center the title */
        width: 75%;
    }

    .custom-box2-excerpt {
        font-size: 26px;
        padding-top: 25px;
    }

    .custom-box2-button {
        margin: 10px auto; /* Center the button */
    }
}

/* Additional responsiveness for smaller screens */
@media (max-width: 480px) {
    .custom-box2-content {
        flex-direction: column; /* Stacked layout */
    }
}
