/**
 * Image With Copy & Callout — Styles (GRID update)
 * - Converts .iwcc__bluebox-row to a 2-col grid so the button centers vertically
 * - Fixes responsive rule that mistakenly used grid-template-columns on a flex row
 */

/* ======================================================
   WRAPPER
   ====================================================== */

.image-with-copy-and-callout {
  padding: 54px 0;
  background: #eee;
}

.iwcc__inner {
  max-width: 90%;
  margin: 0 auto;
}

.iwcc__heading {
  margin: 0 0 24px;
  font-weight: 900;
  line-height: 1.1;
  color: #111;
}

.iwcc__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
}

.iwcc__image-wrap {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0,0,0,0.14);
  height: 100%;
  display: flex;
}

.iwcc__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.iwcc__right {
  display: flex;
  flex-direction: column;
  gap: 18px;
}


/* ======================================================
   MAIN COPY (from main group)
   ====================================================== */

.iwcc__copy {
  line-height: 1.8;
  color: #111;
}

.iwcc__copy p + p {
  margin-top: 12px;
}

.iwcc__copy h4, .iwcc__copy h6 {
  color: #000;
  font-weight: 900;
}

.iwcc__copy em {
  font-style: italic;
}

.iwcc__copy a {
  color: #52287e;
  font-weight: 800;
  text-decoration: underline;
}

/* ======================================================
   BLUE BOX (from blue_box group)
   ====================================================== */

.iwcc__bluebox {
  margin-top: 6px;
  background-image: url("/wp-content/themes/skinbonescme/assets/images/Blue.svg");
  background-size: cover;
  background-position: center;
  border-radius: 18px;
  padding: 26px;
  color: #fff;
  box-shadow: 0 12px 26px rgba(0,0,0,0.16);
}

/* GRID ROW: copy (left) + button (right) */
.iwcc__bluebox-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center; /* centers button to the copy block height */
}

/* allow copy to shrink without pushing button out */
.iwcc__bluebox-copy {
  min-width: 0;
  line-height: 1.7;
  color: #fff;
}

.iwcc__bluebox-row h4 {
  font-weight: 900;
  color: #fff;
}

/* kill theme margins + lock button position */
.iwcc__bluebox-row .white-btn {
  margin: 0 !important;
  justify-self: end;
  align-self: center;
  width: fit-content;
}

/* copy typography inside bluebox */
.iwcc__bluebox-copy h4 {
  color: #fff;
  font-weight: 900;
  margin-bottom: 10px;
}

.iwcc__bluebox-copy p {
  margin: 0;
}

.iwcc__bluebox-copy p + p {
  margin-top: 10px;
}

.iwcc__bluebox-copy a {
  color: #fff;
  font-weight: 900;
  text-decoration: underline;
}

.iwcc__bluebox-divider {
  border: 0;
  height: 1px;
  margin: 18px 0;
  background: rgba(255,255,255,0.35);
}

/* ======================================================
   BOTTOM CALLOUT (white box under blue box)
   ====================================================== */

.iwcc__callout {
  margin-top: 6px;
  background: #fff;
  border-radius: 18px;
  padding: 18px 20px;
  color: #111;

  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;

  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
  border: 3px solid #52C4C7;

}

.iwcc__callout-left {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 15px;
}

.iwcc__callout-left .purple-btn {
  margin-top: 0;
  align-self: center;
}

.iwcc__callout-heading {
  color: #000;
}

.iwcc__callout-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}


.iwcc__callout-copy p {
  margin: 0;
}

/* ======================================================
   RESPONSIVE
   ====================================================== */

@media (max-width: 1100px) {
  .iwcc__grid {
    grid-template-columns: 1fr;
  }

  .iwcc__image-wrap img {
    height: 320px;
  }

  /* stack bluebox row (copy then button) */
  .iwcc__bluebox-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .iwcc__bluebox-row .white-btn {
    justify-self: start;
    width: fit-content;
  }

  .iwcc__callout {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .iwcc__callout-right {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .iwcc__copy p {
    margin: 5px 0 20px;
  }
}

/* Extra small screens: allow full-width button */
@media (max-width: 520px) {
  .iwcc__bluebox-row .white-btn {
    width: 100%;
    justify-self: stretch;
    display: inline-flex;
    justify-content: space-between;
  }
}

/* ======================================================
   IWCC CALLOUT — MOBILE LAYOUT (ONLY)
   - icon + heading row
   - copy text below
   - button full width at bottom
   ====================================================== */
@media (max-width: 768px) {

  .image-with-copy-and-callout {
    padding: 40px 0;
  }

 .iwcc__callout{
    display: grid;
    grid-template-columns: 44px 1fr;
    grid-template-areas:
      "icon  heading"
      "icon  copy"
      "btn   btn";
    gap: 10px 14px;
    align-items: start;
    padding: 18px 18px;
  }

  /* icon */
  .iwcc__callout-left > svg{
    grid-area: icon;
    width: 34px;
    height: 34px;
  }

  .iwcc__callout-left{
    display: contents;
  }

  /* heading */
  .iwcc__callout-copyWrap .iwcc__callout-heading{
    grid-area: heading;
    margin: 0;
    line-height: 1.15;
  }

  /* copy under heading (still right of icon) */
  .iwcc__callout-copyWrap .iwcc__callout-copy{
    grid-area: copy;
    margin: 0;
  }
  .iwcc__callout-copyWrap .iwcc__callout-copy p{
    margin: 0;
    line-height: 1.5;
  }

  .iwcc__callout-right{
    display: contents;
  }

  /* button full width */
  .iwcc__callout-right .purple-btn{
    grid-area: btn;
    width: 100%;
    justify-content: space-between;
    margin: 8px 0 0 0 !important;
  }
}