.oic-wrapper {
  display: flex;
  align-items: center;
  gap: 60px; /* Reduced slightly from 80px to give columns more space */
  max-width: 1350px; /* Increased from 1200px to widen the whole block */
  margin: 60px auto;
  margin-bottom: 100px !important;
  box-sizing: border-box;
  padding: 0 40px; /* Increased padding slightly so the shape doesn't clip */
  font-family: inherit;
}

/* --- THE FLIP LOGIC --- */
.oic-wrapper.oic-reverse {
  flex-direction: row-reverse;
}

/* Moves the shape to the outside edge when flipped */
.oic-wrapper.oic-reverse .oic-shape {
  right: auto;
  left: -45px; 
}

/* --- TEXT COLUMN --- */
.oic-text-col {
  flex: 1;
  width: 50%;
}

/* WYSIWYG Text Styling */
.oic-content p {
  font-size: 20px; 
  line-height: 1.6;
  color: #0f2e40;
}

.oic-content p:last-child {
  margin-bottom: 0;
}

/* --- IMAGE COLUMN --- */
.oic-image-col {
  flex: 1;
  width: 50%;
  position: relative;
}

.oic-shape {
  position: absolute;
  right: -45px;
  bottom: -45px;
  width: 140px;
  height: 140px;
  background-color: var(--oic-shape);
  border-radius: 12px;
  z-index: 1;
}

/* --- IMAGE WRAPPER BASE --- */
.oic-image-wrap {
  position: relative;
  width: 100%;
  border-radius: 12px;
  z-index: 2;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  display: block; 
}

/* State 1: No Image Uploaded (Shows gray placeholder) */
.oic-image-wrap.oic-no-image {
  min-height: 400px;
  background-color: #dfdfdf;
}

/* State 2: Image Uploaded (Removes gray background & fixes the shadow gap) */
.oic-image-wrap.oic-has-image {
  min-height: 0 !important; /* Forces the box to collapse perfectly to the image */
  background-color: transparent;
}

/* Force the image to perfectly fill the shadow wrapper */
.oic-image-wrap img {
  width: 100% !important; /* Overrides Salient so the image fills the width */
  height: auto !important;
  display: block !important;
  margin: 0 !important; /* Kills Salient's invisible bottom margin */
}

/* --- CUSTOM BUTTON COLOR OVERRIDES --- */
.oic-wrapper .oic-custom-btn {
  background-color: var(--oic-btn-bg) !important;
  color: var(--oic-btn-color) !important;
  border-color: var(--oic-btn-bg) !important; 
}

.oic-wrapper .oic-custom-btn:hover {
  background-color: var(--oic-btn-bg) !important;
  filter: brightness(1.05);
}

/* --- ANIMATION PROTECTIONS --- */
/* Prevent Salient from forcing float/widths on animated columns */
.oic-wrapper .oic-text-col.col.has-animation,
.oic-wrapper .oic-image-col.col.has-animation {
  float: none !important;
  display: block !important; 
  visibility: visible;
}

/* --- RESPONSIVE BREAKPOINTS --- */
@media (max-width: 1100px) {
  .oic-wrapper { gap: 50px; }
}

@media (max-width: 900px) {
  /* Force stacking on mobile, text on top, regardless of flip */
  .oic-wrapper,
  .oic-wrapper.oic-reverse {
    flex-direction: column;
    gap: 40px;
    margin: 40px auto !important;
    padding: 0 0px !important; /* Override desktop padding to match other elements */
  }

  /* Reset width and animation margins */
  .oic-text-col, 
  .oic-wrapper .oic-text-col.col.has-animation { 
    width: 100% !important; 
    margin: 0 !important;
  }
  
  .oic-content p { 
    font-size: 16px; 
  }

  /* Allow the image to take full width to match the text */
  .oic-image-col,
  .oic-wrapper .oic-image-col.col.has-animation {
    width: 100% !important;
    margin: 0 !important;
  }

  /* Lock shape back to bottom right on mobile and tuck it slightly tighter */
  .oic-shape {
    width: 90px;
    height: 90px;
    right: -15px !important;
    bottom: -15px !important;
    left: auto !important; 
  }
}