/* ===== Image With Text Section ===== */

.cc_xcxanevt_image_with_text .image-with-text {
  width: 100%;
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.cc_xcxanevt_image_with_text .image-with-text__container {
  max-width: 1400px;
  margin: 0 auto;
  padding-left: clamp(16px, 5vw, 80px);
  padding-right: clamp(16px, 5vw, 80px);
}

/* ---- Grid ---- */
.cc_xcxanevt_image_with_text .image-with-text__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

/* ---- Media column ---- */
.cc_xcxanevt_image_with_text .image-with-text__media {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: var(--iwt-image-aspect-ratio, 4 / 3);
}

.cc_xcxanevt_image_with_text .image-with-text__image, .cc_xcxanevt_image_with_text .image-with-text__image-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cc_xcxanevt_image_with_text .image-with-text__image-placeholder {
  background: var(--color-surface-alt);
}

/* ---- Panel column ---- */
.cc_xcxanevt_image_with_text .image-with-text__panel {
  display: flex;
  align-items: center;
  min-width: 0;
}

/* ===== Tablet (>=768px) ===== */
@media (min-width: 768px) {
  .cc_xcxanevt_image_with_text .image-with-text__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }

  /* Image right swap (tablet+) */
  .cc_xcxanevt_image_with_text .image-with-text--image-right .image-with-text__media {
    order: 2;
  }
  .cc_xcxanevt_image_with_text .image-with-text--image-right .image-with-text__panel {
    order: 1;
  }
}

/* ===== Desktop (>=1024px) ===== */
@media (min-width: 1024px) {
  .cc_xcxanevt_image_with_text .image-with-text {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
  }

  .cc_xcxanevt_image_with_text .image-with-text__grid {
    gap: var(--space-xl);
  }
}

/* ===== Flush image (imageFlush) =====
   The image runs to the section's outer edge; text keeps its padding. Mobile:
   the container loses BOTH side paddings so the image is edge to edge, and the
   text panel re-applies them. Desktop: only the image side loses its padding
   (the grid gap between the columns is unchanged). Scoped to this modifier —
   the shared container rule is untouched. */
/* Vertical: the section's own 64/96px top+bottom padding was the gap above and
   below the image. Removed here so the image touches both boundaries; the section
   height now simply follows the 4:5 image (no min-height anywhere in this mode).
   On mobile the text block keeps its own bottom spacing via the panel. */
.cc_xcxanevt_image_with_text .image-with-text--flush {
  padding-top: 0;
  padding-bottom: 0;
}

.cc_xcxanevt_image_with_text .image-with-text--flush .image-with-text__container {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.cc_xcxanevt_image_with_text .image-with-text--flush .image-with-text__panel {
  padding-bottom: var(--space-xl);
}

.cc_xcxanevt_image_with_text .image-with-text--flush .image-with-text__panel {
  padding-left: clamp(16px, 5vw, 80px);
  padding-right: clamp(16px, 5vw, 80px);
}

@media (min-width: 768px) {
  .cc_xcxanevt_image_with_text .image-with-text--flush .image-with-text__panel {
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
  }

  .cc_xcxanevt_image_with_text .image-with-text--flush .image-with-text__container {
    padding-right: clamp(16px, 5vw, 80px);
  }

  .cc_xcxanevt_image_with_text .image-with-text--flush.image-with-text--image-right .image-with-text__container {
    padding-left: clamp(16px, 5vw, 80px);
    padding-right: 0;
  }
}

/* ===== Full-width mode ===== */
.cc_xcxanevt_image_with_text .image-with-text--full-width {
  /* No container — section bleeds edge-to-edge */
}

.cc_xcxanevt_image_with_text .image-with-text--full-width .image-with-text__grid {
  grid-template-columns: 1fr;
  gap: 0;
}

.cc_xcxanevt_image_with_text .image-with-text--full-width .image-with-text__media {
  /* Mobile: natural 4/3 image at full width */
  aspect-ratio: 4 / 3;
}

.cc_xcxanevt_image_with_text .image-with-text--full-width .image-with-text__panel {
  padding: var(--space-xl) clamp(16px, 5vw, 80px);
}

@media (min-width: 768px) {
  .cc_xcxanevt_image_with_text .image-with-text--full-width {
    padding-top: 0;
    padding-bottom: 0;
    min-height: 500px;
  }

  .cc_xcxanevt_image_with_text .image-with-text--full-width .image-with-text__grid {
    grid-template-columns: 50% 50%;
    min-height: 500px;
  }

  .cc_xcxanevt_image_with_text .image-with-text--full-width .image-with-text__media {
    aspect-ratio: auto;
    height: 100%;
    min-height: 500px;
  }

  .cc_xcxanevt_image_with_text .image-with-text--full-width .image-with-text__panel {
    padding: var(--space-2xl) clamp(32px, 5vw, 80px);
  }
}

/* ===== Scroll-reveal entrance (motion-safe only) ===== */
@media (prefers-reduced-motion: no-preference) {
  .cc_xcxanevt_image_with_text .image-with-text__media {
    opacity: 0;
    transform: translateX(-20px);
    animation: cc_xcxanevt_image_with_text_image-with-text-in-left 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  }

  .cc_xcxanevt_image_with_text .image-with-text--image-right .image-with-text__media {
    transform: translateX(20px);
    animation-name: cc_xcxanevt_image_with_text_image-with-text-in-right;
  }

  @keyframes cc_xcxanevt_image_with_text_image-with-text-in-left {
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  @keyframes cc_xcxanevt_image_with_text_image-with-text-in-right {
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
}

/* ===== Panel (sub-component: ImageWithTextPanel) ===== */

.cc_xcxanevt_image_with_text .iwt-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
}

/* Base alignment: drives BOTH the text (align-items + text-align) and, since
   the logo is a plain flex child with no competing align-self, its horizontal
   position too. The dedicated .iwt-panel__logo--* rules below are a second,
   independent guarantee — the logo's position never depends on only one of
   the two mechanisms. */
.cc_xcxanevt_image_with_text .iwt-panel--left {
  align-items: flex-start;
  text-align: left;
}

.cc_xcxanevt_image_with_text .iwt-panel--center {
  align-items: center;
  text-align: center;
  margin: 0 auto;
}

.cc_xcxanevt_image_with_text .iwt-panel--right {
  align-items: flex-end;
  text-align: right;
  margin-left: auto;
}

.cc_xcxanevt_image_with_text .iwt-panel--center .iwt-panel__actions {
  justify-content: center;
}

.cc_xcxanevt_image_with_text .iwt-panel--right .iwt-panel__actions {
  justify-content: flex-end;
}

.cc_xcxanevt_image_with_text .iwt-panel__logo {
  display: block;
  /* Height comes from an inline style (mobile) + a per-instance injected
     <style> !important media-query rule (desktop) — see
     ImageWithTextPanel/index.tsx. No height/max-height/max-width here on
     purpose: nothing in this stylesheet may compete with those two. */
  margin-bottom: var(--space-md);
}

/* Logo Alignment — a SEPARATE Studio control from Content Alignment above.
   align-self overrides the parent's align-items for this one child only, so
   the logo's position can never be coupled to (or fought by) the text
   group's own alignment; each is driven by its own independent prop. */
.cc_xcxanevt_image_with_text .iwt-panel__logo--align-left {
  align-self: flex-start;
}

.cc_xcxanevt_image_with_text .iwt-panel__logo--align-center {
  align-self: center;
}

.cc_xcxanevt_image_with_text .iwt-panel__logo--align-right {
  align-self: flex-end;
}

.cc_xcxanevt_image_with_text .iwt-panel__eyebrow {
  display: inline-block;
  margin-bottom: var(--space-sm);
  color: var(--iwt-eyebrow-color, var(--color-accent));
  font-family: var(--font-label);
  font-size: var(--text-label);
  font-weight: 500;
  line-height: 1.4;
}

.cc_xcxanevt_image_with_text .iwt-panel__title {
  margin: 0 0 var(--space-md) 0;
  color: var(--iwt-text-color, var(--color-text-primary));
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 400;
  line-height: 1.15;
  white-space: pre-line;
  text-wrap: balance;
}

.cc_xcxanevt_image_with_text .iwt-panel__description {
  margin: 0 0 var(--space-lg) 0;
  color: var(--iwt-description-color, var(--color-text-secondary));
  font-family: var(--font-body);
  font-size: var(--text-body-lg);
  font-weight: 400;
  line-height: 1.7;
  white-space: pre-line;
  text-wrap: pretty;
}

.cc_xcxanevt_image_with_text .iwt-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.cc_xcxanevt_image_with_text .iwt-panel__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 24px;
  font-family: var(--font-label);
  font-size: var(--text-small);
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 120ms ease;
}

@media (min-width: 1024px) {
  .cc_xcxanevt_image_with_text .iwt-panel__btn {
    padding: 12px 28px;
  }
}

.cc_xcxanevt_image_with_text .iwt-panel__btn:active {
  transform: scale(0.96);
}

.cc_xcxanevt_image_with_text .iwt-panel__btn--primary {
  background: var(--iwt-accent-color, var(--color-accent));
  color: #ffffff;
  border: none;
}

.cc_xcxanevt_image_with_text .iwt-panel__btn--secondary {
  background: transparent;
  color: var(--iwt-text-color, var(--color-text-primary));
  border: 1px solid var(--color-border);
}

@media (prefers-reduced-motion: no-preference) {
  .cc_xcxanevt_image_with_text .iwt-panel {
    opacity: 0;
    transform: translateY(16px);
    animation: cc_xcxanevt_image_with_text_iwt-panel-in 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 80ms forwards;
  }

  .cc_xcxanevt_image_with_text .iwt-panel__btn {
    transition: filter 200ms ease, border-color 200ms ease, color 200ms ease, background-color 200ms ease, transform 120ms ease;
  }

  .cc_xcxanevt_image_with_text .iwt-panel__btn--primary:hover {
    filter: brightness(0.88);
  }

  .cc_xcxanevt_image_with_text .iwt-panel__btn--secondary:hover {
    border-color: var(--iwt-accent-color, var(--color-accent));
  }

  @keyframes cc_xcxanevt_image_with_text_iwt-panel-in {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ── Content alignment (İçerik Hizalaması) — applied to EVERY child explicitly ──
   Not left to the parent's align-items / text-align alone: each text block is a
   full-width block with its own text-align, and the CTA wrapper is a full-width
   flex row whose justify-content places the button itself. !important so no
   theme-level h2 / span / a rule can pull a child back to the left. */
.cc_xcxanevt_image_with_text .iwt-panel__eyebrow, .cc_xcxanevt_image_with_text .iwt-panel__title, .cc_xcxanevt_image_with_text .iwt-panel__description {
  display: block;
  width: 100%;
  align-self: stretch;
}
.cc_xcxanevt_image_with_text .iwt-panel__actions { width: 100%; align-self: stretch; }

.cc_xcxanevt_image_with_text .iwt-panel--left .iwt-panel__eyebrow, .cc_xcxanevt_image_with_text .iwt-panel--left .iwt-panel__title, .cc_xcxanevt_image_with_text .iwt-panel--left .iwt-panel__description { text-align: left !important; }
.cc_xcxanevt_image_with_text .iwt-panel--left .iwt-panel__actions { justify-content: flex-start !important; }

.cc_xcxanevt_image_with_text .iwt-panel--center .iwt-panel__eyebrow, .cc_xcxanevt_image_with_text .iwt-panel--center .iwt-panel__title, .cc_xcxanevt_image_with_text .iwt-panel--center .iwt-panel__description { text-align: center !important; }
.cc_xcxanevt_image_with_text .iwt-panel--center .iwt-panel__actions { justify-content: center !important; }

.cc_xcxanevt_image_with_text .iwt-panel--right .iwt-panel__eyebrow, .cc_xcxanevt_image_with_text .iwt-panel--right .iwt-panel__title, .cc_xcxanevt_image_with_text .iwt-panel--right .iwt-panel__description { text-align: right !important; }
.cc_xcxanevt_image_with_text .iwt-panel--right .iwt-panel__actions { justify-content: flex-end !important; }

/* ── Editorial quote mode (quoteMode) — only the Başlık text, large and bold ── */
.cc_xcxanevt_image_with_text .iwt-panel--quote { max-width: 720px; }
.cc_xcxanevt_image_with_text .iwt-panel__quote {
  margin: 0;
  width: 100%;
  color: var(--iwt-text-color, var(--color-text-primary));
  font-family: var(--font-display);
  font-size: clamp(30px, 8.5vw, 34px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
@media (min-width: 768px) {
  .cc_xcxanevt_image_with_text .iwt-panel__quote { font-size: clamp(38px, 3.2vw, 46px); }
}

/* Quote mode, mobile: the text sits in the middle of its band — equal space above
   and below (the grid gap + the flush bottom padding made it top-heavy). The panel
   is a flex box with align-items:center, so the quote stays centred whatever the
   configured size/alignment. Desktop keeps its column gap and centring. */
@media (max-width: 767px) {
  .cc_xcxanevt_image_with_text .image-with-text--quote .image-with-text__grid { gap: 0; }
  .cc_xcxanevt_image_with_text .image-with-text--quote .image-with-text__panel {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
    align-items: center;
  }
}

/* ===== Image With Text Panel ===== */

.cc_xcxanevt_image_with_text .iwt-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: 560px;
}

.cc_xcxanevt_image_with_text .iwt-panel__eyebrow {
  display: inline-block;
  margin-bottom: var(--space-sm);
  color: var(--iwt-eyebrow-color, var(--color-accent));
  font-family: var(--font-label);
  font-size: var(--text-label);
  font-weight: 500;
  line-height: 1.4;
}

.cc_xcxanevt_image_with_text .iwt-panel__title {
  margin: 0 0 var(--space-md) 0;
  color: var(--iwt-text-color, var(--color-text-primary));
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 400;
  line-height: 1.15;
}

.cc_xcxanevt_image_with_text .iwt-panel__description {
  margin: 0 0 var(--space-lg) 0;
  color: var(--iwt-description-color, var(--color-text-secondary));
  font-family: var(--font-body);
  font-size: var(--text-body-lg);
  font-weight: 400;
  line-height: 1.7;
}

.cc_xcxanevt_image_with_text .iwt-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.cc_xcxanevt_image_with_text .iwt-panel__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 24px;
  font-family: var(--font-label);
  font-size: var(--text-small);
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  border-radius: 2px;
  cursor: pointer;
}

@media (min-width: 1024px) {
  .cc_xcxanevt_image_with_text .iwt-panel__btn {
    padding: 12px 28px;
  }
}

.cc_xcxanevt_image_with_text .iwt-panel__btn--primary {
  background: var(--iwt-accent-color, var(--color-accent));
  color: #ffffff;
  border: none;
}

.cc_xcxanevt_image_with_text .iwt-panel__btn--secondary {
  background: transparent;
  color: var(--iwt-text-color, var(--color-text-primary));
  border: 1px solid var(--color-border);
}

/* ===== Hover & motion ===== */
@media (prefers-reduced-motion: no-preference) {
  .cc_xcxanevt_image_with_text .iwt-panel {
    opacity: 0;
    transform: translateY(16px);
    animation: cc_xcxanevt_image_with_text_iwt-panel-in 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 80ms forwards;
  }

  .cc_xcxanevt_image_with_text .iwt-panel__btn {
    transition: filter 200ms ease, border-color 200ms ease, color 200ms ease, background-color 200ms ease;
  }

  .cc_xcxanevt_image_with_text .iwt-panel__btn--primary:hover {
    filter: brightness(0.88);
  }

  .cc_xcxanevt_image_with_text .iwt-panel__btn--secondary:hover {
    border-color: var(--iwt-accent-color, var(--color-accent));
  }

  @keyframes cc_xcxanevt_image_with_text_iwt-panel-in {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ── Content alignment (İçerik Hizalaması) — applied to EVERY child explicitly ──
   Not left to the parent's align-items / text-align alone: each text block is a
   full-width block with its own text-align, and the CTA wrapper is a full-width
   flex row whose justify-content places the button itself. !important so no
   theme-level h2 / span / a rule can pull a child back to the left. */
.cc_xcxanevt_image_with_text .iwt-panel__eyebrow, .cc_xcxanevt_image_with_text .iwt-panel__title, .cc_xcxanevt_image_with_text .iwt-panel__description {
  display: block;
  width: 100%;
  align-self: stretch;
}
.cc_xcxanevt_image_with_text .iwt-panel__actions { width: 100%; align-self: stretch; }

.cc_xcxanevt_image_with_text .iwt-panel--left .iwt-panel__eyebrow, .cc_xcxanevt_image_with_text .iwt-panel--left .iwt-panel__title, .cc_xcxanevt_image_with_text .iwt-panel--left .iwt-panel__description { text-align: left !important; }
.cc_xcxanevt_image_with_text .iwt-panel--left .iwt-panel__actions { justify-content: flex-start !important; }

.cc_xcxanevt_image_with_text .iwt-panel--center .iwt-panel__eyebrow, .cc_xcxanevt_image_with_text .iwt-panel--center .iwt-panel__title, .cc_xcxanevt_image_with_text .iwt-panel--center .iwt-panel__description { text-align: center !important; }
.cc_xcxanevt_image_with_text .iwt-panel--center .iwt-panel__actions { justify-content: center !important; }

.cc_xcxanevt_image_with_text .iwt-panel--right .iwt-panel__eyebrow, .cc_xcxanevt_image_with_text .iwt-panel--right .iwt-panel__title, .cc_xcxanevt_image_with_text .iwt-panel--right .iwt-panel__description { text-align: right !important; }
.cc_xcxanevt_image_with_text .iwt-panel--right .iwt-panel__actions { justify-content: flex-end !important; }

/* ── Editorial quote mode (quoteMode) — only the Başlık text, large and bold ── */
.cc_xcxanevt_image_with_text .iwt-panel--quote { max-width: 720px; }
.cc_xcxanevt_image_with_text .iwt-panel__quote {
  margin: 0;
  width: 100%;
  color: var(--iwt-text-color, var(--color-text-primary));
  font-family: var(--font-display);
  font-size: clamp(30px, 8.5vw, 34px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
@media (min-width: 768px) {
  .cc_xcxanevt_image_with_text .iwt-panel__quote { font-size: clamp(38px, 3.2vw, 46px); }
}

/* Quote mode, mobile: the text sits in the middle of its band — equal space above
   and below (the grid gap + the flush bottom padding made it top-heavy). The panel
   is a flex box with align-items:center, so the quote stays centred whatever the
   configured size/alignment. Desktop keeps its column gap and centring. */
@media (max-width: 767px) {
  .cc_xcxanevt_image_with_text .image-with-text--quote .image-with-text__grid { gap: 0; }
  .cc_xcxanevt_image_with_text .image-with-text--quote .image-with-text__panel {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
    align-items: center;
  }
}
