/* ABC Product Social – Shorts + Instagram CTA */

/* BeTheme: .section_wrapper { display:flex; height:100% } collapses 1fr grids.
   BeTheme static.css also forces max-width:550px !important below 768px —
   opt this section out so Shorts/IG use the full content width. */
.content_wrapper .abc-product-social .section_wrapper,
.abc-product-social .section_wrapper {
  display: block !important;
  width: 100%;
  height: auto;
  max-width: 1220px !important;
  box-sizing: border-box;
}

/* —— Layout: 1–2 shorts beside Instagram —— */
.abc-product-social__beside {
  display: grid;
  gap: 1.25rem;
  align-items: stretch;
  margin-left: auto;
  margin-right: auto;
}

.abc-product-social__beside--count-1 {
  grid-template-columns: minmax(11rem, calc(518px * 9 / 16)) minmax(0, 1fr);
  max-width: calc(518px * 9 / 16 + 615px + 1.25rem);
}

.abc-product-social__beside--count-2 {
  grid-template-columns: minmax(9rem, calc(518px * 9 / 16)) minmax(9rem, calc(518px * 9 / 16)) minmax(0, 615px);
  max-width: calc(2 * (518px * 9 / 16) + 615px + 2.5rem);
}

.abc-product-social__beside .abc-product-social__instagram-wrap,
.abc-product-social__beside .abc-product-social__short {
  min-width: 0;
}

/* —— Layout: 3–4 shorts stacked above Instagram —— */
.abc-product-social__shorts {
  display: grid;
  gap: 1.25rem;
  width: 100%;
  margin: 0 auto 1.25rem;
  align-items: start;
  justify-items: center;
}

.abc-product-social__shorts--count-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: calc(3 * (518px * 9 / 16) + 2 * 1.25rem);
}

.abc-product-social__shorts--count-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: calc(4 * (518px * 9 / 16) + 3 * 1.25rem);
}

.abc-product-social__instagram-wrap--full {
  width: 100%;
}

/*
 * Parent takes available height and owns the CTA surface (bg + radius).
 * CTA stays content-sized and centered inside.
 */
.abc-product-social__instagram-wrap {
  --abc-ig-bg: #f6edee;
  --abc-ig-accent: #d44088;
  --abc-ig-accent-hover: #b83574;
  --abc-ig-text: #3a3a3a;

  display: flex;
  justify-content: center;
  align-items: center;
  align-self: stretch;
  width: 100%;
  height: 100%;
  min-height: 100%;
  padding: 2rem 1.75rem;
  border-radius: 1.5rem;
  background: var(--abc-ig-bg);
  overflow: hidden;
  box-sizing: border-box;
}

.abc-product-social__instagram-wrap--solo {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
}

/* —— YouTube Short card —— */
.abc-short-card {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  z-index: 1;
}

.abc-short-card__media {
  position: relative;
  display: block;
  width: 100%;
  max-width: calc(518px * 9 / 16);
  max-height: 518px;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #111;
  margin-inline: auto;
}

.abc-product-social__short {
  width: 100%;
  max-width: calc(518px * 9 / 16);
}

.abc-short-card__thumb {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.abc-short-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}

.abc-short-card__shorts-icon {
  width: clamp(3.5rem, 28%, 4.75rem);
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
  transition: transform 0.2s ease;
}

.abc-short-card:hover .abc-short-card__shorts-icon,
.abc-short-card:focus-visible .abc-short-card__shorts-icon {
  transform: scale(1.06);
}

.abc-short-card__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 2;
}

.abc-short-card.is-playing {
  cursor: default;
}

.abc-short-card.is-playing .abc-short-card__thumb,
.abc-short-card.is-playing .abc-short-card__play {
  opacity: 0;
  pointer-events: none;
}

/* —— Borlabs Cookie content blocker (YouTube) —— */
.abc-short-card--borlabs {
  cursor: default;
}

.abc-short-card--borlabs .abc-short-card__media {
  background: #111;
}

.abc-short-card--borlabs .brlbs-cmpnt-container,
.abc-short-card--borlabs .brlbs-cmpnt-content-blocker {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border-radius: inherit;
  overflow: hidden;
}

.abc-short-card--borlabs .brlbs-cmpnt-cb-preset-c,
.abc-short-card--borlabs .brlbs-cmpnt-cb-youtube {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.abc-short-card--borlabs .brlbs-cmpnt-cb-thumbnail {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  pointer-events: none;
  z-index: 0;
}

.abc-short-card--borlabs .brlbs-cmpnt-cb-main {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0 !important;
  padding: 0.75rem !important;
  box-sizing: border-box;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.35) 42%, rgba(0, 0, 0, 0.08) 100%);
  pointer-events: auto;
}

.abc-short-card--borlabs .brlbs-cmpnt-cb-play-button {
  display: none !important;
}

.abc-short-card--borlabs .brlbs-cmpnt-cb-content {
  width: 100%;
  text-align: center;
  pointer-events: auto;
}

.abc-short-card--borlabs .brlbs-cmpnt-cb-description {
  font-size: 0.7rem;
  line-height: 1.3;
  color: #fff;
  margin: 0 0 0.35rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.abc-short-card--borlabs .brlbs-cmpnt-cb-buttons {
  position: relative;
  z-index: 3;
  width: 100%;
  margin: 0 !important;
  pointer-events: auto;
}

.abc-short-card--borlabs .brlbs-cmpnt-cb-btn,
.abc-short-card--borlabs [data-borlabs-cookie-unblock],
.abc-short-card--borlabs [data-borlabs-cookie-accept-service],
.abc-short-card--borlabs [data-borlabs-cookie-show-provider-information] {
  position: relative;
  z-index: 4;
  pointer-events: auto !important;
  cursor: pointer;
  font-size: 0.7rem;
  line-height: 1.25;
  text-align: center;
}

.abc-short-card--borlabs iframe,
.abc-short-card--borlabs .brlbs-cmpnt-cb-fluid-width-video-wrapper-youtube,
.abc-short-card--borlabs .brlbs-cmpnt-cb-fluid-width-video-wrapper-youtube iframe {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  border: 0;
  border-radius: inherit;
  z-index: 5;
}

.abc-short-card--borlabs .brlbs-cmpnt-cb-fluid-width-video-wrapper-youtube {
  padding: 0 !important;
}

/* —— Instagram CTA —— */
.abc-instagram-cta {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  flex: 0 0 auto;
  align-self: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 58rem;
  height: auto !important;
  min-height: 0 !important;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  box-sizing: border-box;
}

.abc-instagram-cta__content {
  position: relative;
  z-index: 1;
  max-width: 36rem;
  margin: 0;
  width: auto;
}

.abc-instagram-cta__headline {
  margin: 0 0 0.75rem;
  color: var(--abc-ig-accent);
  font-family: "Jedira", sans-serif;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 400;
  line-height: 1.25;
}

.abc-instagram-cta__text {
  margin: 0 0 1.5rem;
  color: var(--abc-ig-text);
  font-size: 0.95rem;
  line-height: 1.55;
}

.abc-instagram-cta__button {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.55rem;
  margin: 0;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  background: var(--abc-ig-accent);
  color: #fff !important;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.abc-instagram-cta__button:hover,
.abc-instagram-cta__button:focus-visible {
  background: var(--abc-ig-accent-hover);
  color: #fff !important;
  transform: translateY(-1px);
}

.abc-instagram-cta__ig-icon {
  flex-shrink: 0;
}

.abc-instagram-cta__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  align-self: flex-start;
  min-height: 10rem;
  margin: 0;
  pointer-events: none;
}

.abc-instagram-cta__circle {
  position: absolute;
  width: min(70%, 16rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.abc-instagram-cta__figure {
  position: relative;
  z-index: 1;
  width: min(85%, 14rem);
  height: auto;
  max-height: 16rem;
  object-fit: contain;
}

/* Default line-art SVG recolored via mask → product accent */
.abc-instagram-cta__figure--line {
  display: block;
  aspect-ratio: 355 / 330;
  height: auto;
  max-height: 16rem;
  background-color: var(--abc-ig-accent);
  -webkit-mask-image: var(--abc-ig-figure);
  mask-image: var(--abc-ig-figure);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

/* Beside shorts: illustration top-left; wrap fills row height, CTA centered */
.abc-product-social--beside .abc-instagram-cta {
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 0;
  max-width: 615px;
  width: 100%;
  height: auto !important;
  overflow: visible;
}

.abc-product-social--beside .abc-product-social__instagram-wrap {
  max-width: 615px;
  height: 100%;
  min-height: 100%;
  align-self: stretch;
  padding: 1.75rem 1.75rem 2rem;
}

.abc-product-social--beside .abc-instagram-cta__visual {
  order: -1;
  position: relative;
  flex: 0 0 auto;
  align-self: flex-start;
  width: 11rem;
  height: 11rem;
  min-height: 11rem;
  margin: 0 0 1rem;
  justify-content: center;
  align-items: center;
  overflow: visible;
}

.abc-product-social--beside .abc-instagram-cta__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1 1 auto;
  max-width: none;
  width: 100%;
  height: auto;
  margin: 0;
}

.abc-product-social--beside .abc-instagram-cta__button {
  margin: 0;
  align-self: flex-start;
}

.abc-product-social--beside .abc-instagram-cta__circle {
  position: absolute;
  inset: auto;
  width: 86%;
  height: 86%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.abc-product-social--beside .abc-instagram-cta__figure {
  position: relative;
  z-index: 1;
  width: 96%;
  height: auto;
  max-width: 96%;
  max-height: 96%;
  margin: 0;
  object-fit: contain;
}

@media (min-width: 48rem) {
  /* Solo / full-width Instagram: text left, illustration right */
  .abc-product-social--solo .abc-product-social__instagram-wrap,
  .abc-product-social__instagram-wrap--full {
    padding: 2rem 2.25rem 2rem 2.75rem;
  }

  .abc-product-social--solo .abc-instagram-cta,
  .abc-product-social__instagram-wrap--full .abc-instagram-cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    gap: 1.5rem;
    overflow: visible;
  }

  .abc-product-social--solo .abc-instagram-cta__content,
  .abc-product-social__instagram-wrap--full .abc-instagram-cta__content {
    flex: 1 1 auto;
    max-width: 34rem;
    margin: 0;
  }

  .abc-product-social--solo .abc-instagram-cta__visual,
  .abc-product-social__instagram-wrap--full .abc-instagram-cta__visual {
    order: 0;
    position: relative;
    flex: 0 0 auto;
    align-self: center;
    width: 15rem;
    height: 15rem;
    min-height: 15rem;
    margin: 0;
    justify-content: center;
    align-items: center;
    overflow: visible;
  }

  .abc-product-social--solo .abc-instagram-cta__circle,
  .abc-product-social__instagram-wrap--full .abc-instagram-cta__circle {
    position: absolute;
    inset: auto;
    width: 86%;
    height: 86%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    aspect-ratio: 1;
  }

  .abc-product-social--solo .abc-instagram-cta__figure,
  .abc-product-social__instagram-wrap--full .abc-instagram-cta__figure {
    position: relative;
    z-index: 1;
    width: 96%;
    max-width: 96%;
    height: auto;
    max-height: 96%;
    margin: 0;
    object-fit: contain;
  }

  .abc-product-social__instagram-wrap--full .abc-instagram-cta {
    min-height: 0;
  }
}

@media (max-width: 47.99rem) {
  .abc-product-social__beside--count-1,
  .abc-product-social__beside--count-2 {
    grid-template-columns: 1fr;
  }

  .abc-product-social__beside .abc-product-social__short {
    max-width: 22rem;
    margin-inline: auto;
  }

  .abc-product-social__shorts--count-3,
  .abc-product-social__shorts--count-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* More space between button and illustration (< ~766px) */
  .abc-product-social--solo .abc-instagram-cta,
  .abc-product-social__instagram-wrap--full .abc-instagram-cta {
    justify-content: flex-start;
    align-items: flex-start;
    gap: 2.75rem;
  }

  .abc-product-social--solo .abc-instagram-cta__visual,
  .abc-product-social__instagram-wrap--full .abc-instagram-cta__visual {
    flex: 0 0 auto;
    align-self: flex-start;
    margin: 0;
    min-height: 12rem;
  }
}

@media (max-width: 30rem) {
  .abc-product-social__shorts--count-3,
  .abc-product-social__shorts--count-4 {
    grid-template-columns: 1fr;
  }
}
