/* =========================================================================
   ITA Text with Sidebar — Frontend styles
   ========================================================================= */

.ita-text-with-sidebar {
  max-width: 100%;
}

/* Opción del editor: quitar el margen inferior que aplica
   #main-content > * (theme custom.css). La doble clase + #main-content
   gana en especificidad, también sobre la regla responsive del tema. */
#main-content > .ita-text-with-sidebar.ita-tws--no-bottom-margin {
  margin-bottom: 40px;
}

/* ── CTA button (modo sin sidebar) ───────────────────────────────────────── */

.ita-tws-cta {
  margin-top: 24px;
}

/* ── Title row ──────────────────────────────────────────────────────────── */

.ita-tws-title-row {
  margin-bottom: 32px;
}

.ita-tws-titles {
  /* just a wrapper for label + h2 */
}

/* ── Content row: two-column layout ──────────────────────────────────── */

.ita-tws-content-row {
  display: grid;
  gap: 32px;
  align-items: start;
}

.ita-tws--stat .ita-tws-content-row {
  grid-template-columns: 2fr 1fr;
}
.ita-tws--list .ita-tws-content-row {
  grid-template-columns: 1.5fr 1fr;
}
/* ── Sin sidebar: texto a ancho completo ─────────────────────────────── */

.ita-tws--none .ita-tws-content-row {
  grid-template-columns: 1fr;
}

/* ── Left column: body text ──────────────────────────────────────────── */

.ita-tws-body p {
  color: var(--color-text);
  line-height: 20px;
  font-size: 16px;
}

.ita-tws-body li {
  color: var(--color-text-secondary);
  line-height: 20px;
  font-size: 16px;
}

.ita-tws-body p,
.ita-tws-body ul {
  margin-bottom: 24px;
}
.ita-tws-body p:last-child {
  margin-bottom: 0;
}

.ita-tws-body-content p {
  margin-top: 0;
  margin-bottom: 24px;
  color: var(--color-text);
  line-height: 20px;
  font-size: 16px;
}

.ita-tws-body-content p:last-child {
  margin-bottom: 0;
}

.ita-tws-body strong {
  font-weight: 700;
  color: var(--color-text);
}

/* ── Right column: sidebar wrapper ───────────────────────────────────── */

.ita-tws-sidebar-col {
  /* column container */
}

/* ── Sidebar variant: Stat ────────────────────────────────────────────── */

.ita-tws-sidebar--stat {
  border-left: 2px solid var(--color-border-default, #e8e8e3);
  padding-left: 32px;
}

.ita-tws-stat-number {
  font-size: 48px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.3px;
  color: var(--color-text);
  margin-bottom: 16px;
}

.ita-tws-stat-bold {
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  color: var(--color-text);
  margin: 0 0 4px;
}

.ita-tws-stat-body {
  font-size: 14px;
  line-height: 20px;
  color: var(--color-text-secondary);
  margin: 0;
  white-space: pre-line;
}

/* ── Sidebar variant: List ────────────────────────────────────────────── */

.ita-tws-sidebar--list {
  background-color: var(--color-bg-page);
  border-radius: var(--border-radius);
  padding: 24px;
}

.ita-tws-list-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 28px;
  color: var(--color-text);
  margin: 0 0 32px;
}

.ita-tws-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ita-tws-list-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
}
.ita-tws-list-item:not(:last-child) {
  border-bottom: 1px solid var(--color-border-default, #e8e8e3);
}
.ita-tws-list-number {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  color: var(--color-text);
  flex-shrink: 0;
  min-width: 32px;
}

.ita-tws-list-text {
  font-size: 14px;
  line-height: 20px;
  color: var(--color-text-secondary);
}

/* ── Sidebar variant: Video ───────────────────────────────────────────── */

.ita-tws--video .ita-tws-content-row {
  grid-template-columns: 1.2fr 1fr;
}

.ita-tws-sidebar--video {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ita-tws-video-player {
  position: relative;
  border-radius: var(--border-radius, 12px);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: var(--color-bg-page, #f5f5f0);
  cursor: pointer;
}

.ita-tws-video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ita-tws-video-thumb--empty {
  width: 100%;
  height: 100%;
  background-color: var(--color-bg-page, #f5f5f0);
}

.ita-tws-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  line-height: 0;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.ita-tws-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
  opacity: 0.85;
}

.ita-tws-video-player.is-playing .ita-tws-play-btn,
.ita-tws-video-player.is-playing .ita-tws-video-thumb {
  display: none;
}

.ita-tws-video-player iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* CTA section below video */

.ita-tws-video-cta {
  padding: 24px;
  background-color: var(--color-bg-page);
  border-radius: var(--border-radius);
}

.ita-tws-video-cta-label {
  margin: 0 0 8px;
}

.ita-tws-video-cta-title {
  color: var(--color-text);
  margin: 0 0 8px;
}

.ita-tws-video-cta-body {
  font-size: 16px;
  line-height: 24px;
  color: var(--color-text-secondary);
  margin: 0 0 20px;
}

.ita-tws-video-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
}

.ita-tws-video-cta-phone {
  color: white;
  background-color: var(--color-text-secondary);
  margin: 0;
  transition: var(--transition);
}

.ita-tws-video-cta-phone:hover {
  transform: translateY(-2px);
  background-color: var(--color-text);
  color: white;
}

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 767px) {
  .ita-tws--stat .ita-tws-content-row,
  .ita-tws--list .ita-tws-content-row,
  .ita-tws--video .ita-tws-content-row {
    grid-template-columns: 1fr;
  }

  .ita-tws-sidebar--stat {
    border-left: none;
    padding-left: 0;
    border-top: 2px solid var(--color-border-default, #e8e8e3);
    padding-top: 32px;
  }

  .ita-tws-stat-number {
    font-size: 48px;
  }
}
