/**
 * Shared solutions / focus tab board (home constructions, CM, TI).
 * One visual system — only tab count differs via [data-tabs].
 */

/* —— Board shell —— */
body.make-site .nw-tab-board,
body.make-site .cm-constructions-board {
  border: 1px solid var(--nw-svc-line, var(--nw-border));
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

/* Tab count: default 3 (make-components); override with data-tabs on board or host */
body.make-site .nw-tab-board[data-tabs="4"] .solution-tabs,
body.make-site .cm-constructions-board[data-tabs="4"] .solution-tabs,
body.make-site [data-tabs="4"] > .nw-tab-board .solution-tabs,
body.make-site [data-tabs="4"] > .cm-constructions-board .solution-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
body.make-site .nw-tab-board[data-tabs="2"] .solution-tabs,
body.make-site .cm-constructions-board[data-tabs="2"] .solution-tabs,
body.make-site [data-tabs="2"] > .nw-tab-board .solution-tabs,
body.make-site [data-tabs="2"] > .cm-constructions-board .solution-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.make-site .nw-tab-board .solution-tabs,
body.make-site .cm-constructions-board .solution-tabs {
  margin: 0;
  border-bottom: 0;
  overflow: visible;
}
body.make-site .nw-tab-board .solution-tabs button,
body.make-site .cm-constructions-board .solution-tabs button {
  min-height: 76px;
  justify-content: flex-start;
}
body.make-site .nw-tab-board .solution-tabs .tab-code,
body.make-site .cm-constructions-board .solution-tabs .tab-code {
  font-family: var(--font-heading, Manrope, sans-serif);
  letter-spacing: -0.6px;
  font-size: 24px;
  font-weight: 700;
  color: #000;
}
body.make-site .nw-tab-board .solution-tabs button[aria-selected="true"] .tab-code,
body.make-site .cm-constructions-board .solution-tabs button[aria-selected="true"] .tab-code {
  color: var(--main-color);
}
body.make-site .nw-tab-board .solution-tabs .nw-motion-arrow-fly,
body.make-site .cm-constructions-board .solution-tabs .nw-motion-arrow-fly {
  margin-left: auto;
  flex-shrink: 0;
  font-size: var(--nw-fs-body);
  opacity: 0.55;
  color: inherit;
}
body.make-site .nw-tab-board .solution-tabs button[aria-selected="true"] .nw-motion-arrow-fly,
body.make-site .nw-tab-board .solution-tabs button:hover .nw-motion-arrow-fly,
body.make-site .cm-constructions-board .solution-tabs button[aria-selected="true"] .nw-motion-arrow-fly,
body.make-site .cm-constructions-board .solution-tabs button:hover .nw-motion-arrow-fly {
  opacity: 1;
  color: var(--main-color);
}

/* —— Stacked panels (height = tallest) —— */
body.make-site .nw-tab-panels,
body.make-site .cm-panels {
  display: grid;
  background: #f4f7fb;
}
body.make-site .nw-tab-panel,
body.make-site .cm-panel {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 560px;
  width: 100%;
  background: #f4f7fb;
  overflow: hidden;
  border-top: 0;
  z-index: 0;
}
/* Inactive = visibility only (keep grid height). Do not use [hidden]/make-build display:none. */
body.make-site .nw-tab-panel.is-tab-inactive,
body.make-site .cm-panel.is-tab-inactive,
body.make-site .nw-tab-panel[hidden],
body.make-site .cm-panel[hidden] {
  display: grid !important;
  visibility: hidden !important;
  pointer-events: none !important;
  z-index: 0 !important;
}
body.make-site .nw-tab-panel:not(.is-tab-inactive):not([hidden]),
body.make-site .cm-panel:not(.is-tab-inactive):not([hidden]) {
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

/* —— Visual column —— */
body.make-site .nw-tab-visual,
body.make-site .cm-panel-visual {
  position: relative;
  min-height: 0;
  min-width: 0;
  background: #eef2f7;
}
body.make-site .nw-tab-visual figure,
body.make-site .cm-panel-visual figure {
  margin: 0;
  position: absolute;
  inset: 0;
  overflow: hidden;
}
body.make-site .nw-tab-visual img,
body.make-site .cm-panel-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  position: absolute;
  inset: 0;
}
/* Hover zoom only when not dual-layer swapping (single-img boards) */
body.make-site .nw-tab-panel:hover .nw-tab-visual img {
  transform: scale(1.03);
  transition: transform 0.55s var(--ease-lift, cubic-bezier(0.2, 0.7, 0.2, 1));
}

/* —— Media tag: ONE style for FFC / RFC / PITCH·PROFILE —— */
body.make-site .nw-media-tag,
body.make-site .cm-visual-family {
  position: absolute;
  left: 24px;
  bottom: 24px;
  top: auto;
  z-index: 1;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(12, 22, 40, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: var(--nw-fs-meta);
  font-weight: 650;
  letter-spacing: 1.2px;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* —— Copy column —— */
body.make-site .nw-tab-copy,
body.make-site .cm-panel-copy {
  padding: clamp(32px, 3vw, 44px) clamp(28px, 3vw, 44px);
  background: #f8fafe;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 20px;
  box-sizing: border-box;
}
body.make-site .nw-tab-copy .nw-svc-kicker,
body.make-site .cm-panel-copy .cm-panel-eyebrow {
  margin: 0;
  font-size:var(--nw-fs-meta);
  font-weight: 650;
  letter-spacing: 1.1px;
  color: var(--main-color);
  text-transform: uppercase;
}
body.make-site .nw-tab-copy h3,
body.make-site .cm-panel-copy h3 {
  margin: 0;
  max-width: none;
  width: 100%;
  min-height: calc(1.18em * 2);
  font-size: clamp(28px, 2.6vw, 36px);
  line-height: 1.18;
  letter-spacing: -0.9px;
  font-weight: 450;
  color: #243752;
}
body.make-site .nw-tab-copy > p,
body.make-site .cm-panel-copy > p {
  margin: 0;
  max-width: none;
  width: 100%;
  font-size: var(--nw-fs-secondary);
  line-height: 1.8;
  color: var(--muted, #626d7d);
}
body.make-site .nw-tab-copy dl,
body.make-site .cm-panel-copy dl {
  margin: 0;
  width: 100%;
  flex: 0 0 auto;
}
body.make-site .nw-tab-copy dl > div,
body.make-site .cm-panel-copy dl > div {
  display: grid;
  grid-template-columns: minmax(90px, 118px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border-top: 1px solid var(--nw-border);
  padding: 14px 0;
  line-height: 1.65;
}
body.make-site .nw-tab-copy dl > div:last-child,
body.make-site .cm-panel-copy dl > div:last-child {
  border-bottom: 1px solid var(--nw-border);
}
body.make-site .nw-tab-copy dt,
body.make-site .cm-panel-copy dt {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--nw-fs-meta);
  font-weight: 550;
  color: #5a6d88;
  white-space: nowrap;
}
body.make-site .nw-tab-copy dt .icon,
body.make-site .cm-panel-copy dt .icon {
  font-size: var(--nw-fs-body);
  font-weight: 400;
  color: var(--main-color);
  line-height: 1;
  flex: 0 0 auto;
}
body.make-site .nw-tab-copy dd,
body.make-site .cm-panel-copy dd {
  margin: 0;
  min-width: 0;
  font-size: var(--nw-fs-secondary);
  line-height: 1.65;
  color: #3d4f68;
}
body.make-site .nw-tab-copy .button,
body.make-site .cm-panel-copy .button {
  margin-top: auto;
  align-self: flex-start;
  padding-top: 4px;
}
body.make-site .nw-tab-copy .nw-switch-actions,
body.make-site .cm-panel-copy .nw-switch-actions {
  margin-top: auto;
  width: 100%;
}
body.make-site .nw-tab-copy .nw-switch-actions > .button,
body.make-site .cm-panel-copy .nw-switch-actions > .button {
  margin-top: 0;
  padding-top: 0;
}

@media (max-width: 1100px) {
  body.make-site .nw-tab-board[data-tabs="4"] .solution-tabs,
  body.make-site .cm-constructions-board[data-tabs="4"] .solution-tabs,
  body.make-site [data-tabs="4"] > .nw-tab-board .solution-tabs,
  body.make-site [data-tabs="4"] > .cm-constructions-board .solution-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.make-site .nw-tab-panel,
  body.make-site .cm-panel {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  body.make-site .nw-tab-visual,
  body.make-site .cm-panel-visual {
    min-height: 300px;
    aspect-ratio: 16 / 10;
    position: relative;
  }
}
@media (max-width: 720px) {
  body.make-site .nw-tab-board .solution-tabs,
  body.make-site .nw-tab-board[data-tabs="4"] .solution-tabs,
  body.make-site .cm-constructions-board .solution-tabs,
  body.make-site .cm-constructions-board[data-tabs="4"] .solution-tabs {
    grid-template-columns: 1fr;
  }
  body.make-site .nw-tab-board .solution-tabs button,
  body.make-site .cm-constructions-board .solution-tabs button {
    min-height: 64px;
  }
  body.make-site .nw-tab-board .solution-tabs .nw-motion-arrow-fly,
  body.make-site .cm-constructions-board .solution-tabs .nw-motion-arrow-fly {
    display: none;
  }
  body.make-site .nw-tab-copy dl > div,
  body.make-site .cm-panel-copy dl > div {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
