/**
 * Content Image Panel Widget Styles
 */


/* Main Container */

.content-image-panel {
    display: flex;
    flex-direction: row;
    gap: 1.875rem;
    box-sizing: border-box;
    width: 100%;
}


/* Layout variations */

.content-image-panel--image-right {
    flex-direction: row;
}

.content-image-panel--image-left {
    flex-direction: row-reverse;
}


/* Content Section */

.content-image-panel__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: calc(50% - 0.9375rem);
    /* Subtracting half the gap to maintain total width of 100% */
}

.content-image-panel__small-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.625rem;
    color: #29949B;
}

.content-image-panel__main-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1.25rem 0;
    color: #004494;
}

.content-image-panel__description {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    color: #333333;
}


/* Button Styles */

.content-image-panel__button-container {
    margin-top: 1.25rem;
}

.content-image-panel__button {
    display: inline-block;
    background-color: #29949B;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 0.25rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.content-image-panel__button:hover {
    background-color: #1e7378;
    color: #ffffff;
}


/* Image Section */

.content-image-panel__image-container {
    width: calc(50% - 0.9375rem);
    /* Subtracting half the gap to maintain total width of 100% */
    position: relative;
}

.content-image-panel__image-wrapper {
    width: 100%;
    height: 400px;
    /* Default height that can be overridden by control */
    overflow: hidden;
    border-radius: 0.25rem;
    position: relative;
}


/* Aspect Ratio Support */

.content-image-panel__image-wrapper[data-aspect-ratio="1:1"] {
    aspect-ratio: 1/1;
    height: auto !important;
}

.content-image-panel__image-wrapper[data-aspect-ratio="3:2"] {
    aspect-ratio: 3/2;
    height: auto !important;
}

.content-image-panel__image-wrapper[data-aspect-ratio="4:3"] {
    aspect-ratio: 4/3;
    height: auto !important;
}

.content-image-panel__image-wrapper[data-aspect-ratio="16:9"] {
    aspect-ratio: 16/9;
    height: auto !important;
}

.content-image-panel__image-wrapper[data-aspect-ratio="21:9"] {
    aspect-ratio: 21/9;
    height: auto !important;
}

.content-image-panel__image-wrapper[data-aspect-ratio="custom"] {
    height: 0 !important;
    padding-bottom: 100%;
    /* Default, will be overridden by control */
}

.content-image-panel__image {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}


/* Responsive Styles */

@media (max-width: 767px) {
    .content-image-panel--stack-mobile {
        flex-direction: column;
        gap: 2rem;
        /* Increased gap for stacked mobile view */
    }
    .content-image-panel--stack-mobile.content-image-panel--mobile-content-first {
        flex-direction: column;
    }
    .content-image-panel--stack-mobile.content-image-panel--mobile-image-first {
        flex-direction: column-reverse;
    }
    .content-image-panel--stack-mobile .content-image-panel__content,
    .content-image-panel--stack-mobile .content-image-panel__image-container {
        width: 100% !important;
        /* Override the calculated width on mobile for stacked layout */
    }
    /* We keep this default mobile height, but it will be overridden by responsive settings if defined */
    .content-image-panel__image-wrapper:not([data-aspect-ratio]) {
        height: 300px;
    }
    .content-image-panel__main-title {
        font-size: 1.875rem;
    }
}