/* ================================================
   Content Image Box - Section Styles
   2-column layout with styled image box
   ================================================ */

/* ------------------------------------------------
   Base Section
   ------------------------------------------------ */
.content-image-box {
    padding: 6rem 0;
    position: relative;
}

.content-image-box--inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100% !important; /* Prevent external CSS from breaking layout */
}

/* ------------------------------------------------
   Two Column Grid
   ------------------------------------------------ */
.content-image-box--grid {
    display: grid;
    grid-template-columns: 3fr 2fr; /* Content 60% | Image 40% */
    gap: 4rem;
    align-items: flex-start; /* Changed from center to start */
}

/* Flipped Layout - Image on left, Content on right */
.content-image-box.layout-flipped .content-image-box--grid {
    grid-template-columns: 2fr 3fr; /* Image 40% | Content 60% */
}

.content-image-box.layout-flipped .content-box--text {
    order: 2; /* Content moves to right */
}

.content-image-box.layout-flipped .content-box--image {
    order: 1; /* Image moves to left */
}

/* Reduce dramatic offset when flipped - image closer to content */
.content-image-box.layout-flipped .content-main-image {
    top: 30px;    /* Less offset from top */
    left: 30px;   /* Less offset from left */
    right: 20px;  /* More space on right (towards content) */
}

/* ------------------------------------------------
   Text Content Column
   ------------------------------------------------ */
.content-box--text {
    /* Content styling */
}

/* Title inside content column */
.content-box--text .feature_block_heading {
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.316;
    color: #1e1e23;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1rem;
}

/* Green underline on titles */
.content-box--text .feature_block_heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #00e65f;
}

.content-description {
    font-size: 1.125rem; /* Larger body text */
    line-height: 1.6;
    margin-bottom: 2rem;
    color: #1e1e23;
}

/* Paragraph spacing */
.content-description p {
    margin-bottom: 1rem;
}

.content-description p:last-child {
    margin-bottom: 0;
}

/* WYSIWYG Rich Text Elements */
.content-description strong,
.content-description b {
    font-weight: 700;
}

.content-description em,
.content-description i {
    font-style: italic;
}

.content-description a {
    color: #00e65f;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.content-description a:hover {
    color: #00a843;
}

.content-description ul,
.content-description ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.content-description ul {
    list-style-type: disc;
}

.content-description ol {
    list-style-type: decimal;
}

.content-description li {
    margin-bottom: 0.5rem;
}

.content-description h2,
.content-description h3,
.content-description h4,
.content-description h5,
.content-description h6 {
    font-weight: 700;
    line-height: 1.3;
    color: #1e1e23;
    margin-bottom: 1rem;
}

.content-description h2 { font-size: 1.75rem; }
.content-description h3 { font-size: 1.5rem; }
.content-description h4 { font-size: 1.25rem; }
.content-description h5 { font-size: 1.125rem; }
.content-description h6 { font-size: 1rem; }

.content-description blockquote {
    border-left: 3px solid #00e65f;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #555;
}

.content-description hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 2rem 0;
}

/* ------------------------------------------------
   Bullet Points (Brand Green)
   ------------------------------------------------ */
.content-bullet-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.content-bullet-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    font-size: 1.125rem;
    line-height: 1.6;
    color: #1e1e23;
}

.content-bullet-list li:last-child {
    margin-bottom: 0;
}

.content-bullet-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 8px;
    height: 8px;
    background-color: #00e65f;
    border-radius: 50%;
}

/* ------------------------------------------------
   Button
   ------------------------------------------------ */
.content-button-wrapper {
    margin-top: 2rem;
}

/* Button Override - Green Style */
.content-image-box .button,
.content-image-box .button.button-primary,
.content-image-box a.button {
    background-color: #00e65f !important;
    color: #1e1e23 !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0.625rem 1.25rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    transition: background-color 0.3s ease !important;
	text-transform: none !important;
}

.content-image-box .button:hover,
.content-image-box .button.button-primary:hover,
.content-image-box a.button:hover {
    background-color: #00a843 !important;
    color: #1e1e23 !important;
}

/* Arrow/Icon Color - Black for green buttons */
.content-image-box .button svg,
.content-image-box .button.button-primary svg,
.content-image-box a.button svg {
    fill: #1e1e23 !important;
    stroke: #1e1e23 !important;
    color: #1e1e23 !important;
}

.content-image-box .button .icon,
.content-image-box .button i,
.content-image-box .button::after,
.content-image-box .button::before {
    color: #1e1e23 !important;
    background-color: transparent !important;
    border-color: #1e1e23 !important;
}

/* Ensure arrow paths and shapes are black */
.content-image-box .button svg path,
.content-image-box .button svg polygon,
.content-image-box .button svg polyline,
.content-image-box .button svg line {
    fill: #1e1e23 !important;
    stroke: transparent !important;
}

/* Icon wrapper elements */
.content-image-box .button .button-icon,
.content-image-box .button .anchor-icon {
    color: #1e1e23 !important;
}

/* ------------------------------------------------
   Image Box Column (40%)
   ------------------------------------------------ */
.content-box--image {
    position: relative;
    width: 100%;
}

.image-box-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Square aspect ratio */
}

/* Background Box - Acts as container/frame */
.image-box-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    z-index: 1;
}

/* Main Image - Sits INSIDE the box at bottom-right, showing more box on top-left */
.content-main-image {
    position: absolute;
    bottom: 15px;              /* Small margin from bottom */
    right: 15px;               /* Small margin from right */
    top: 45px;                 /* Large margin from top - shows more box */
    left: 45px;                /* Large margin from left - shows more box */
    width: auto;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ------------------------------------------------
   Standalone Image (No Background Box)
   ------------------------------------------------ */
.content-box--image.standalone .image-box-wrapper {
    display: none; /* Hide box wrapper when standalone */
}

.content-standalone-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* ------------------------------------------------
   Responsive
   ------------------------------------------------ */
@media (max-width: 1024px) {
    .content-image-box {
        padding: 4rem 0;
    }

    .content-image-box--grid {
        gap: 3rem;
    }

    .content-description,
    .content-bullet-list li {
        font-size: 1rem;
    }
    
    /* Reduce image offset on tablets */
    .content-main-image {
        top: 35px;
        left: 35px;
    }
    
    /* Even less offset when flipped on tablets */
    .content-image-box.layout-flipped .content-main-image {
        top: 25px;
        left: 25px;
        right: 18px;
    }
}

@media (max-width: 768px) {
    .content-image-box {
        padding: 3rem 0;
    }

    .content-image-box--grid {
        grid-template-columns: 1fr !important;  /* Force single column */
        gap: 2.5rem;
    }

    /* Mobile always stacks: Content → Image (regardless of flip) */
    /* Override flip layout order on mobile */
    .content-box--text,
    .content-image-box.layout-flipped .content-box--text {
        order: 1 !important;
    }

    .content-box--image,
    .content-image-box.layout-flipped .content-box--image {
        order: 2 !important;
        max-width: 400px;
        margin: 0 auto;
    }
    
    /* Reset image positioning on mobile - equal margins */
    .content-main-image,
    .content-image-box.layout-flipped .content-main-image {
        top: 25px !important;
        right: 15px !important;
        bottom: 15px !important;
        left: 15px !important;
    }
    
    /* Standalone image on mobile */
    .content-standalone-image {
        max-width: 100%;
        border-radius: 8px;
    }

    .content-description,
    .content-bullet-list li {
        font-size: 0.95rem;
    }

    .content-bullet-list li {
        padding-left: 1.5rem;
    }

    .content-bullet-list li::before {
        top: 0.5rem;
        width: 6px;
        height: 6px;
    }
}

@media (max-width: 480px) {
    .content-image-box {
        padding: 2.5rem 0;
    }

    .content-image-box--grid {
        gap: 2rem;
    }

    .content-description,
    .content-bullet-list li {
        font-size: 0.9rem;
    }

    /* Mobile: reset positioning to fit properly - override flip layout */
    .content-main-image,
    .content-image-box.layout-flipped .content-main-image {
        bottom: 15px !important;
        right: 15px !important;
        top: 25px !important;
        left: 15px !important;
    }
    
    /* Standalone image on small mobile */
    .content-standalone-image {
        border-radius: 8px;
    }
    
    /* Ensure image box wrapper contains the image properly on mobile */
    .content-box--image {
        max-width: 100%;
        margin: 0 auto;
    }
}