/* XERF Section 3 - Version 1 (How it works + media placeholders)
   Compatible with Gutenberg blocks (core/group, core/columns, core/image)
   --------------------------------------------------------------------- */

:root {
  --x3-brand: #8B4A4A;
  --x3-accent: #D4AF37;
  --x3-dark: #1C1C1C;
  --x3-text: #2A2A2A;
  --x3-soft: #FAF7F2;
  --x3-light-bg: #FDFCFA;
  --x3-max: 1200px;
}

/* Section wrapper */
.x3-section {
  background: linear-gradient(to bottom, #FFFFFF 0%, var(--x3-light-bg) 100%);
  padding: clamp(60px, 8vw, 120px) clamp(20px, 5vw, 80px);
}

/* Centered container */
.x3-inner {
  max-width: var(--x3-max);
  margin-inline: auto;
}

/* Title */
.x3-title {
  margin: 0 0 20px;
  text-align: center;
  font-weight: 700;
  line-height: 1.2;
  color: #000000;
  font-size: clamp(28px, 4.5vw, 56px);
  letter-spacing: -0.02em;
}
.x3-title::after {
  content: '';
  display: block;
  width: 120px;
  height: 3px;
  background: var(--x3-brand);
  margin: 15px auto 0;
}

/* ---------------- Rows (Columns) ---------------- */
.content-row {
  display: flex;               /* keep Gutenberg columns semantics */
  gap: 40px;
  margin-bottom: 50px;
  align-items: center;
}

/* Left image containers (with placeholder UI from core/image) */
.rf-comparison,
.depth-diagram {
  background: var(--x3-soft);
  padding: 30px;
  border-radius: 12px;
}

/* Text content */
.text-content h3 {
  font-size: clamp(20px, 2.5vw, 26px);
  color: var(--x3-dark);
  font-weight: 700;
  margin-bottom: 15px;
}
.text-content h4 {
  font-size: clamp(18px, 2vw, 22px);
  color: var(--x3-dark);
  font-weight: 700;
  margin: 20px 0 12px;
}
.text-content p {
  font-size: clamp(14px, 1.6vw, 16px);
  color: var(--x3-text);
  line-height: 1.75;
  margin-bottom: 15px;
}

/* Subtitle */
.x3-subtitle {
  margin: 60px 0 30px;
  text-align: center;
  font-weight: 700;
  color: var(--x3-dark);
  font-size: clamp(20px, 2.6vw, 28px);
}

/* ---------------- Three Modes ---------------- */
.x3-modes {
  display: grid;                           /* independent of Gutenberg columns */
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 30px);
  margin-top: 40px;
}

.x3-mode {
  background: #FFFFFF;
  border-radius: 16px;
  padding: clamp(24px, 4vw, 32px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.x3-mode::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--x3-brand) 0%, var(--x3-accent) 100%);
}

/* Mode-specific tints */
.x3-mode.mode-shallow {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.15) 0%, rgba(255, 167, 107, 0.1) 100%);
}
.x3-mode.mode-shallow::before {
  background: linear-gradient(90deg, rgba(255, 107, 107, 0.8) 0%, rgba(255, 167, 107, 0.8) 100%);
}
.x3-mode.mode-middle {
  background: linear-gradient(135deg, rgba(255, 167, 107, 0.15) 0%, rgba(255, 207, 107, 0.1) 100%);
}
.x3-mode.mode-middle::before {
  background: linear-gradient(90deg, rgba(255, 167, 107, 0.8) 0%, rgba(255, 207, 107, 0.8) 100%);
}
.x3-mode.mode-deep {
  background: linear-gradient(135deg, rgba(255, 207, 107, 0.15) 0%, rgba(255, 237, 107, 0.1) 100%);
}
.x3-mode.mode-deep::before {
  background: linear-gradient(90deg, rgba(255, 207, 107, 0.8) 0%, rgba(255, 237, 107, 0.8) 100%);
}

.x3-mode:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}
.x3-mode-title {
  margin: 0 0 16px;
  font-size: clamp(18px, 2vw, 22px);
  color: var(--x3-dark);
  font-weight: 700;
}
.x3-mode p {
  margin: 0 0 10px;
  color: var(--x3-text);
  line-height: 1.65;
  font-size: clamp(14px, 1.5vw, 16px);
}
.x3-mode p:last-child {
  margin-bottom: 0;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1024px) {
  .content-row {
    flex-direction: column;    /* stack columns on tablet */
    gap: 30px;
  }

  /* Force cards to stack on mobile - override WordPress isStackedOnMobile:false */
  .x3-modes {
    grid-template-columns: 1fr !important;
    display: grid !important;
  }

  .x3-modes .wp-block-column {
    flex-basis: 100% !important;
    width: 100% !important;
  }
}

@media (max-width: 782px) {
  .x3-section {
    padding: clamp(40px, 6vw, 60px) 20px;
  }
  .x3-mode:hover {
    transform: none;
  }
}
