/* ==========================================================================
   REVE Chat homepage (Version 4): Industries — "Built around the needs of your industry."
   Markup: template-parts/rc-v4-homepage/industries.php. Behaviour: js/rc-v4-homepage/industries.js.
   Five panels side by side (desktop) or stacked (up to 1000px); the open panel (.is-on) grows and shows its body.
   Each panel's colour comes from --rc-industries-color (inline style).
   Shared tokens, heading, reveal: css/rc-v4-base.css.
   ========================================================================== */

/* section: 80 / 64 (<=1000) / 48 (<=700) */
.rc .rc-industries { background: #f7f6fb; padding: 80px 0; }
@media (max-width: 1000px) { .rc .rc-industries { padding: 64px 0; } }
@media (max-width: 700px) { .rc .rc-industries { padding: 48px 0; } }

/* heading: centred, title on top and description below (same as the product pages; V4 2130849) */
.rc-industries .rc-industries-head { align-items: center; text-align: center; max-width: 820px; margin-inline: auto; }
.rc-industries .rc-industries-title { line-height: 1.08; max-width: none; text-wrap: balance; }
.rc-industries .rc-industries-subtitle { max-width: 58ch; padding-bottom: 0; margin-inline: auto; text-wrap: pretty; }

/* panels row */
.rc-industries .rc-industries-panels { display: flex; gap: 12px; height: 400px; }

.rc-industries .rc-industries-panel {
  position: relative; flex: 1 1 0; min-width: 0; overflow: hidden;
  border-radius: 22px; border: 1px solid rgba(91, 63, 208, 0.16); background: #efecfa; color: var(--rc-ink);
  transition: flex-grow 0.7s var(--rc-ease), background-color 0.4s;
}
.rc-industries .rc-industries-panel:not(.is-on):hover { background: #e7e2f8; }
.rc-industries .rc-industries-panel.is-on {
  flex-grow: 4.4; background: var(--rc-industries-color); border-color: transparent; color: #fff;
}

/* closed state: the tab (number on top, title rotated at the bottom) fills the panel */
.rc-industries .rc-industries-tab {
  position: absolute; inset: 0; width: 100%; flex-direction: column; justify-content: space-between;
  padding: 22px 0 26px; text-align: center; color: var(--rc-ink); line-height: 1.55;
  transition: opacity 0.3s;
}
.rc-industries .rc-industries-tab-number {
  display: block; font-family: var(--rc-font-label); font-size: 12px; font-weight: 400; line-height: 1.55; color: var(--rc-ink-2);
}
.rc-industries .rc-industries-tab-title {
  display: block; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap;
  font-family: var(--rc-font); font-size: clamp(26px, 2.3vw, 32px); font-weight: 500; line-height: 1; letter-spacing: -0.015em;
  color: var(--rc-ink);
}
.rc-industries .rc-industries-panel.is-on .rc-industries-tab { opacity: 0; pointer-events: none; }

/* open state: illustration + text */
.rc-industries .rc-industries-panel-body {
  position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center;
  gap: 20px; padding: 28px 30px; opacity: 0; visibility: hidden;
  transition: opacity 0.3s, visibility 0s 0.3s;
}
.rc-industries .rc-industries-panel.is-on .rc-industries-panel-body {
  opacity: 1; visibility: visible; transition: opacity 0.5s 0.25s, visibility 0s;
}
.rc-industries .rc-industries-panel-art {
  display: block; width: 100%; max-height: 330px; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.25));
}
.rc-industries .rc-industries-panel-text { gap: 14px; }
.rc-industries .rc-industries-panel-label {
  display: block; font-family: var(--rc-font-label); font-size: 11px; font-weight: 400; line-height: 1.55;
  letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.8;
}
.rc-industries .rc-industries-panel-title {
  margin: 0; padding: 0; color: inherit; font-family: var(--rc-font);
  font-size: clamp(28px, 2.6vw, 38px); font-weight: 500; line-height: 1; letter-spacing: -0.022em;
}
.rc-industries .rc-industries-panel-desc {
  margin: 0; color: inherit; font-family: var(--rc-font-text); font-size: 15.5px; line-height: 1.6; opacity: 0.95;
}
.rc-industries .rc-industries-panel-link,
.rc-industries .rc-industries-panel-link:hover {
  gap: 6px; margin-top: 6px; padding: 10px 16px; border-radius: 999px; background: #fff; color: var(--rc-ink);
  font-family: var(--rc-font); font-size: 14px; font-weight: 500; line-height: 1.55; text-decoration: none;
}
.rc-industries .rc-industries-panel-link svg { display: block; flex: none; vertical-align: baseline; }

/* mid desktop: no room for the illustration */
@media (min-width: 1001px) and (max-width: 1240px) {
  .rc-industries .rc-industries-panel-body { grid-template-columns: minmax(0, 1fr); align-content: center; }
  .rc-industries .rc-industries-panel-art { display: none; }
}

/* tablet + mobile: panels stack; closed panels are 64px bars (title left, number right) */
@media (max-width: 1000px) {
  .rc-industries .rc-industries-panels { flex-direction: column; height: auto; }
  .rc-industries .rc-industries-panel {
    flex: none; height: 64px; transition: height 0.6s var(--rc-ease), background-color 0.4s;
  }
  .rc-industries .rc-industries-panel.is-on { height: 520px; }
  .rc-industries .rc-industries-tab { flex-direction: row; padding: 0 22px; }
  .rc-industries .rc-industries-tab-title {
    order: -1; writing-mode: horizontal-tb; transform: none; font-size: 19px; line-height: 1.55; letter-spacing: -0.02em;
  }
  .rc-industries .rc-industries-panel-body {
    grid-template-columns: minmax(0, 1fr); align-content: start; padding: 24px 22px; gap: 14px;
  }
  .rc-industries .rc-industries-panel-art { max-height: 190px; }
  .rc-industries .rc-industries-panel-title { font-size: clamp(30px, 3vw, 44px); }
  .rc-industries .rc-industries-panel-desc { font-size: 16px; }
}
/* phones: no illustration, so the open panel stays compact */
@media (max-width: 860px) {
  .rc-industries .rc-industries-panel-art { display: none; }
  .rc-industries .rc-industries-panel.is-on { height: 330px; }
}
@media (max-width: 360px) {
  .rc-industries .rc-industries-panel.is-on { height: 350px; }
}

@media (prefers-reduced-motion: reduce) {
  .rc-industries .rc-industries-panel,
  .rc-industries .rc-industries-tab,
  .rc-industries .rc-industries-panel-body,
  .rc-industries .rc-industries-panel.is-on .rc-industries-panel-body { transition: none; }
}
