/**
 * Image Title Item Image Section – Block Styles
 *
 * Two-column full-width layout:
 *   Left  → teal content column (title, checkmark items, small callout image)
 *   Right → large image column that fills the remaining viewport width
 *
 * The teal background fills 100 % viewport width.
 * The content inside the left column aligns with the site container edge.
 *
 * @package ACF Child Theme
 */

 :root {
    --color-yellow: #e3cd51;
    --color-light: #e7e9ed;
    --color-text: #595959;
    --color-teal: #2d5765;
    --color-white: #ffffff;
    --color-apigpen: #af623d;
    --color-avaxzipen: #54b141;
    --color-amedipen: #4c93b5;
    --color-asolopen: #5b5b5b;
    --font-primary: 'Aptos', sans-serif;
}

/* ─────────────────────────────────────────────────────────────
   Section wrapper – full-width teal background
───────────────────────────────────────────────────────────── */
.itii-section {
    background-color: var(--color-teal, #2d5765);
    width: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

/* ─────────────────────────────────────────────────────────────
   Inner flex row – spans full viewport width (no max-width cap)
   so the image column can bleed to the right edge.
───────────────────────────────────────────────────────────── */
.itii-inner {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-height: 560px;
}

/* ─────────────────────────────────────────────────────────────
   Content column  (~42 % of viewport)
   Left padding uses max() so content aligns with the
   1290 px site container edge on wide viewports and falls
   back to 20 px on narrower ones.
───────────────────────────────────────────────────────────── */
.itii-content-col {
    flex: 0 0 50%;
    max-width: 50%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    /* align left edge of content with the container */
    padding-left: max(20px, calc((100vw - 90%) / 2 + 20px));
}

/* Inner wrapper keeps content from stretching too wide */
.itii-content-inner {
    width: 100%;
    padding: 70px 60px 70px 0;
    box-sizing: border-box;
}

/* ─────────────────────────────────────────────────────────────
   Image column – fills remaining space, image covers fully
───────────────────────────────────────────────────────────── */
.itii-image-col {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.itii-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.itii-image-placeholder {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.15);
}

/* ─────────────────────────────────────────────────────────────
   Swapped layout: image on LEFT, content on RIGHT
───────────────────────────────────────────────────────────── */
.itii-section--swapped .itii-image-col {
    order: -1; /* moves image before content in visual order */
}

/* Flip padding so content aligns with right container edge */
.itii-section--swapped .itii-content-col {
    padding-left: 0;
    padding-right: max(20px, calc((100vw - 90%) / 2 + 20px));
}

.itii-section--swapped .itii-content-inner {
    padding: 70px 0 70px 60px;
}

/* ─────────────────────────────────────────────────────────────
   Title
───────────────────────────────────────────────────────────── */
.itii-title-wrap {
    margin-bottom: 60px;
    display: inline-block; /* shrink-wrap to title text width */
}

.itii-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.25rem;    /* ~36px */
    font-weight: 700;
    color: var(--color-white, #ffffff);
    margin: 0 0 14px 0;
    line-height: 1.2;
}

/* Yellow accent bar – matches title text width */
.itii-title-underline {
    width: 100%;
    height: 4px;
    background-color: var(--color-yellow, #e3cd51);
}

/* ─────────────────────────────────────────────────────────────
   Checkmark items list
───────────────────────────────────────────────────────────── */
.itii-items {
    list-style: none;
    margin: 0 0 50px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.itii-item {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 30px;
}

.itii-item-icon {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.itii-item-icon img {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.itii-item-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-white, #ffffff);
    line-height: 1.4;
}

/* ─────────────────────────────────────────────────────────────
   Small image + callout bubble
───────────────────────────────────────────────────────────── */
.itii-small-image-wrap {
    display: flex;
    align-items: flex-end;
    gap: 0;
    margin-top: 10px;
}

/* White callout bubble */
.itii-callout-bubble {
    background-color: var(--color-white, #ffffff);
    color: #333333;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
    position: relative;
    flex: 0 0 auto;
    max-width: 140px;
    z-index: 1;
}

/* Small image container */
.itii-small-image-container {
    position: relative;
}

.itii-small-image {
    width: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ─────────────────────────────────────────────────────────────
   Responsive – Tablet  769px – 1023px
───────────────────────────────────────────────────────────── */
@media (min-width: 769px) and (max-width: 1023px) {

    .itii-inner {
        min-height: 420px;
    }

    .itii-content-col {
        flex: 0 0 50%;
        max-width: 50%;
        padding-left: 30px;
    }

    .itii-content-inner {
        padding: 50px 40px 50px 0;
    }

    /* Swapped on tablet */
    .itii-section--swapped .itii-content-col {
        padding-left: 0;
        padding-right: 30px;
    }

    .itii-section--swapped .itii-content-inner {
        padding: 50px 0 50px 40px;
    }

    .itii-title {
        font-size: 1.75rem;
    }

    .itii-title-wrap {
        margin-bottom: 28px;
    }

    .itii-items {
        gap: 14px;
        margin-bottom: 28px;
    }

    .itii-item-text {
        font-size: 0.9rem;
    }

    .itii-callout-bubble {
        max-width: 120px;
        font-size: 0.75rem;
        padding: 10px 12px;
    }
}

/* ─────────────────────────────────────────────────────────────
   Responsive – Mobile  ≤ 768px
   Stack columns vertically: content on top, image below
───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {

    .itii-inner {
        flex-direction: column;
        min-height: unset;
    }

    /* Both columns full-width when stacked */
    .itii-content-col,
    .itii-section--swapped .itii-content-col {
        flex: 0 0 auto;
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }

    .itii-content-inner,
    .itii-section--swapped .itii-content-inner {
        max-width: 100%;
        padding: 50px 0;
    }

    .itii-image-col {
        min-height: 280px;
        order: unset !important; /* always below content on mobile */
    }

    .itii-section--swapped .itii-image-col {
        order: unset !important;
    }

    .itii-title {
        font-size: 1.625rem;
    }

    .itii-title-wrap {
        margin-bottom: 24px;
    }

    .itii-title-underline {
        width: 80px;
        height: 3px;
    }

    .itii-items {
        gap: 14px;
        margin-bottom: 28px;
    }

    .itii-item {
        margin-bottom: 0;
    }

    .itii-item-icon {
        flex: 0 0 22px;
        width: 22px;
        height: 22px;
    }
    
    .itii-item-icon img {
        width: 22px;
        height: 22px;
    }

    .itii-item-text {
        font-size: 0.95rem;
    }

    .itii-small-image-wrap {
        flex-wrap: wrap;
        gap: 12px;
    }

    .itii-callout-bubble {
        max-width: 140px;
        font-size: 0.78rem;
    }

    .itii-small-image {
        width: 50%;
    }

    .itii-main-image {
        object-position: top center;
    }
}
