/*
 * Use case pages (/use-cases, /use-cases/{slug}), GoSaaS layout.
 * Hero photo + floating product widget (mc-uc-hero-*, mc-w-*), cs_card cs_style_1 story rows (mc-uc-story,
 * mc-uc-photo, mc-uc-frame), numbered journey (mc-uc-steps) and hub cards (mc-uc-card).
 * Neutral surfaces only; MyCaly green is limited to checks and tiny highlights. Logical properties for RTL.
 */

/* ---------- Shared bits ---------- */
.mc-uc-title-line { display: block; }
.mc-uc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.mc-uc-actions .cs_btn { margin: 0; }

/* ---------- Detail hero ---------- */
.mc-uc-hero h1 { font-weight: 500; }
.mc-uc-hero .mc-answer-box { font-size: 18px; color: var(--heading-color); opacity: .82; }
.mc-uc-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 36px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--mc-line);
}
.mc-uc-hero-stats > div { display: flex; flex-direction: column; min-width: 0; }
.mc-uc-hero-stats dt { order: 2; font-size: 14px; font-weight: 400; color: var(--body-color); line-height: 1.35; }
.mc-uc-hero-stats dd { order: 1; margin: 0 0 4px; font-family: var(--heading-font); font-size: clamp(24px, 2.4vw, 32px); font-weight: 500; color: var(--heading-color); line-height: 1.1; }

.mc-uc-hero-media { position: relative; padding-inline-start: 90px; }
.mc-uc-hero-photo { overflow: hidden; }
.mc-uc-hero-photo img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 5.6; object-fit: cover; }
.mc-uc-hero-shape { position: absolute; top: -34px; inset-inline-end: -22px; width: 70px; height: auto; z-index: 0; pointer-events: none; }
.mc-uc-widget {
  position: absolute;
  inset-inline-start: 0;
  bottom: 44px;
  z-index: 2;
  width: min(330px, 74%);
  animation: mc-uc-float 6s ease-in-out infinite;
}
@media (max-width: 1199px) { .mc-uc-hero-media { padding-inline-start: 60px; } }
@media (max-width: 991px) {
  .mc-uc-hero-media { padding-inline-start: 0; max-width: 560px; margin-inline: auto; }
  .mc-uc-hero-shape { inset-inline-end: -8px; }
  .mc-uc-widget { position: relative; inset: auto; bottom: auto; width: min(340px, calc(100% - 32px)); margin: -120px 0 0 16px; animation: none; }
  [dir="rtl"] .mc-uc-widget { margin: -120px 16px 0 0; }
}
@media (max-width: 420px) {
  .mc-uc-hero-stats { gap: 10px; }
  .mc-uc-hero-stats dt { font-size: 12px; }
}

/* ---------- Floating product widget (compact neutral card) ---------- */
.mc-w {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 18px;
  border-radius: 15px;
  background: #fff;
  border: 1px solid var(--mc-line);
  box-shadow: 0 24px 50px -20px rgba(10, 10, 16, .28);
  font-size: 13px;
  line-height: 1.4;
  color: var(--body-color);
  text-align: start;
}
.mc-w strong { color: var(--heading-color); font-weight: 600; }
.mc-w small { display: block; font-size: 12px; color: var(--body-color); }
.mc-w-head { display: flex; gap: 10px; align-items: center; min-width: 0; padding-bottom: 12px; border-bottom: 1px solid var(--mc-line); }
.mc-w-name { min-width: 0; }
.mc-w-name strong { display: block; font-size: 14px; }
.mc-w-avatar {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--heading-color);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.mc-w-avatar.is-icon { border-radius: 10px; background: var(--mc-surface); color: var(--heading-color); }
.mc-w-avatar.is-sm { width: 30px; height: 30px; font-size: 11px; background: var(--mc-surface); color: var(--heading-color); }
.mc-w-badge {
  position: absolute;
  top: -14px;
  inset-inline-end: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--heading-color);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.mc-w-badge .mc-icon { color: var(--mc-green); }

.mc-w-rows { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.mc-w-rows > li { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: center; justify-content: space-between; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--mc-line); }
.mc-w-rows > li.is-active { border-color: var(--heading-color); }
.mc-w-rows.mc-w-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mc-w-rows.mc-w-cols-2 > li { flex-direction: column; align-items: flex-start; justify-content: flex-start; }
.mc-w-rows.mc-w-cols-2 strong { font-size: 16px; }
.mc-w-tight > li { padding: 6px 12px; }
.mc-w-person { flex-wrap: nowrap !important; }
.mc-w-person .mc-w-name { flex: 1; min-width: 0; }
.mc-w-person .mc-w-name strong { font-size: 13px; }
.mc-w-person .mc-w-name small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-w-check { flex: none; color: var(--mc-green); }
.mc-w-status { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--mc-surface); font-size: 11px; font-weight: 600; color: var(--body-color); white-space: nowrap; }
.mc-w-status.is-on { color: var(--heading-color); }
.mc-w-status.is-on::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-inline-end: 5px; border-radius: 50%; background: var(--mc-green); vertical-align: middle; }
.mc-w-option { display: block !important; }
.mc-w-option-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.mc-w-option-top b { flex: none; font-weight: 600; color: var(--heading-color); }
.mc-w-option small { margin-top: 2px; }

.mc-w-label { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 600; color: var(--heading-color); }
.mc-w-label small { font-weight: 400; }
.mc-w-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: -4px 0 0; padding: 0; list-style: none; }
.mc-w-chips li { padding: 6px 2px; border-radius: 8px; border: 1px solid var(--mc-line); text-align: center; font-size: 11px; font-weight: 600; color: var(--heading-color); white-space: nowrap; }
.mc-w-chips li.is-active { background: var(--heading-color); border-color: var(--heading-color); color: #fff; }
.mc-w-note { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--mc-surface); min-width: 0; }
.mc-w-note > span:last-child { min-width: 0; }
.mc-w-note strong { display: block; font-size: 12px; }
.mc-w-note small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-w-note-icon { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: #fff; color: var(--heading-color); }
.mc-w-foot { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: space-between; padding: 10px 12px; border-radius: 10px; background: var(--mc-surface); font-size: 12px; }
.mc-w-foot strong { font-size: 12px; }
.mc-w-lines { display: grid; gap: 6px; margin: 0; padding-top: 2px; }
.mc-w-lines > div { display: flex; justify-content: space-between; gap: 12px; }
.mc-w-lines dt { font-weight: 400; }
.mc-w-lines dd { margin: 0; font-weight: 600; color: var(--heading-color); }
.mc-w-lines .mc-w-total { margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--mc-line); align-items: baseline; }
.mc-w-lines .mc-w-total dt { font-weight: 600; color: var(--heading-color); }
.mc-w-lines .mc-w-total dd { font-family: var(--heading-font); font-size: 22px; font-weight: 500; }
.mc-w-small { display: flex; gap: 6px; margin: 0; font-size: 12px; }
.mc-w-small .mc-icon { flex: none; margin-top: 1px; color: var(--mc-green); }

/* Browser room variant (online sessions) */
.mc-w-browser { padding: 0; gap: 0; overflow: hidden; }
.mc-w-bar { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--mc-line); font-size: 11px; }
.mc-w-dots { display: inline-flex; gap: 4px; flex: none; }
.mc-w-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--mc-line); }
.mc-w-url { display: inline-flex; gap: 5px; align-items: center; flex: 1; min-width: 0; padding: 4px 10px; border-radius: 999px; background: var(--mc-surface); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-w-stage { position: relative; background: var(--heading-color); }
.mc-w-stage img { display: block; width: 100%; height: auto; }
.mc-w-live, .mc-w-host { position: absolute; padding: 3px 8px; border-radius: 6px; background: rgba(10, 10, 16, .72); color: #fff; font-size: 11px; font-weight: 500; }
.mc-w-live { top: 8px; inset-inline-start: 8px; }
.mc-w-live::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-inline-end: 5px; border-radius: 50%; background: #FF4D4F; vertical-align: middle; }
.mc-w-host { bottom: 8px; inset-inline-start: 8px; }
.mc-w-controls { display: flex; justify-content: center; gap: 8px; padding: 10px; background: #fff; }
.mc-w-controls > span { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--mc-surface); color: var(--heading-color); }
.mc-w-controls > span.is-on { background: var(--mc-green); color: #fff; }

/* ---------- Story rows (cs_card cs_style_1) ---------- */
.mc-uc-story .cs_card_content { max-width: 600px; }
.mc-uc-story-sub { margin: 0 0 10px; font-size: 15px; font-weight: 500; color: var(--gray2-color); }
.mc-uc-story .cs_section_title { font-weight: 500; }
.mc-uc-facts { display: grid; margin: 0 0 30px; border-top: 1px solid var(--mc-line); }
.mc-uc-facts > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--mc-line); font-size: 15px; }
.mc-uc-facts dt { font-weight: 500; color: var(--heading-color); }
.mc-uc-facts dd { margin: 0; }
@media (max-width: 575px) { .mc-uc-facts > div { grid-template-columns: 1fr; } }
.mc-uc-list li { padding-left: 0; padding-inline-start: 40px; }
.mc-uc-list .cs_list_icon { left: auto; inset-inline-start: 0; top: 0; }
.mc-uc-list li:not(:last-child) { margin-bottom: 14px; }
.mc-uc-list .cs_heading_color { font-size: 17px; }
.mc-uc-story .cs_card_content .cs_btn.cs_style_1 { margin-top: 34px; }

/* Photo + floating screenshot */
.mc-uc-photo { margin-inline-end: 40px; }
.mc-uc-photo > img { display: block; aspect-ratio: 1 / 1.05; object-fit: cover; }
.mc-uc-shot {
  position: absolute;
  inset-inline-end: -40px;
  bottom: 36px;
  z-index: 2;
  width: 68%;
  padding: 6px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 50px -20px rgba(10, 10, 16, .3);
  animation: mc-uc-float 6s ease-in-out infinite;
}
.mc-uc-shot img { display: block; width: 100%; height: auto; border-radius: 8px; }
.mc-uc-photo-end { margin-inline: 40px 0; }
.mc-uc-photo-end .mc-uc-shot { inset-inline: -40px auto; animation-delay: -3s; }
@media (max-width: 575px) {
  .mc-uc-photo, .mc-uc-photo-end { margin-inline: 0; }
  .mc-uc-shot, .mc-uc-photo-end .mc-uc-shot { inset-inline: auto 12px; bottom: 12px; width: 72%; animation: none; }
}

/* Interface frame (neutral) */
.mc-uc-frame { padding: clamp(14px, 3vw, 28px); background: var(--mc-surface); }
.mc-uc-frame picture img,
.mc-uc-frame .mc-video-frame { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 18px 40px -22px rgba(10, 10, 16, .3); }
.mc-uc-frame .mc-video-frame { overflow: hidden; }

/* ---------- Journey (numbered cs_iconbox cs_style_1 row) ---------- */
.mc-uc-steps { position: relative; counter-reset: none; }
.mc-uc-step { position: relative; height: 100%; }
.mc-uc-step .cs_iconbox_icon {
  width: 64px;
  height: 64px;
  margin-inline: auto;
  border: 1px solid var(--mc-line);
  font-family: var(--heading-font);
  font-size: 20px;
  font-weight: 500;
}
.mc-uc-step .cs_iconbox_title { font-weight: 500; }
.mc-uc-step .cs_iconbox_subtitle { font-size: 15px; }
.mc-uc-step-detail { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--heading-color); }
.mc-uc-step-detail::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--mc-green); }
@media (min-width: 992px) {
  .mc-uc-steps > li { position: relative; }
  .mc-uc-steps > li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 32px;
    inset-inline-start: calc(50% + 44px);
    width: calc(100% - 88px);
    border-top: 1px dashed #C9C9D1;
  }
}

/* ---------- Hub ---------- */
.mc-uc-hub-intro { max-width: 860px; margin-inline: auto; }
.mc-uc-hub-intro .mc-answer-box { color: var(--heading-color); opacity: .82; }
.mc-uc-checks { margin-top: 26px; font-size: 15px; }
.mc-uc-checks li { padding-left: 0; padding-inline-start: 24px; }
.mc-uc-checks li i { left: auto; inset-inline-start: 0; }
.mc-uc-hub-media { position: relative; }
.mc-uc-hub-photo { overflow: hidden; }
.mc-uc-hub-photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 8; object-fit: cover; }
.mc-uc-hub-shape { position: absolute; top: -40px; inset-inline-end: 60px; width: 72px; height: auto; transform: rotate(90deg); pointer-events: none; }
.mc-uc-hub-float {
  position: absolute;
  inset-inline-start: -30px;
  bottom: 40px;
  gap: 2px;
  width: 240px;
  padding: 18px 20px;
  animation: mc-uc-float 6s ease-in-out infinite;
}
.mc-uc-hub-float strong { font-family: var(--heading-font); font-size: 28px; font-weight: 500; line-height: 1.2; }
.mc-uc-hub-float span { font-size: 13px; }
@media (max-width: 991px) { .mc-uc-hub-float { inset-inline-start: 16px; bottom: 16px; } }
@media (max-width: 575px) {
  .mc-uc-hub-photo img { aspect-ratio: 4 / 3; }
  .mc-uc-hub-float { position: relative; inset: auto; width: auto; margin: -40px 16px 0; animation: none; }
  .mc-uc-hub-shape { inset-inline-end: 10px; width: 54px; }
}

.mc-uc-card { display: flex; flex-direction: column; padding: 14px 14px 26px; border: 1px solid var(--mc-line); }
.mc-uc-card > *:not(.mc-uc-card-thumb) { margin-inline: 14px; }
.mc-uc-card-thumb { display: block; overflow: hidden; margin-bottom: 22px; }
.mc-uc-card-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .6s ease; }
.mc-uc-card:hover .mc-uc-card-thumb img { transform: scale(1.05); }
.mc-uc-card-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.mc-uc-card-head .cs_iconbox_icon { flex: none; width: 46px; height: 46px; padding: 0; background: var(--mc-surface); color: var(--heading-color); }
.mc-uc-card-head .cs_iconbox_icon::before { display: none; }
.mc-uc-card-head h3 a { color: inherit; }
.mc-uc-card-head h3 a:hover { color: var(--mc-green-700); }
.mc-uc-card-type { display: block; margin-top: 2px; font-size: 14px; color: var(--gray2-color); }
.mc-uc-card-text { margin-bottom: 16px; font-size: 15px; }
.mc-uc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.mc-uc-tags li { padding: 4px 10px; border-radius: 999px; background: var(--mc-surface); font-size: 12px; font-weight: 500; color: var(--heading-color); }
.mc-uc-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 18px; margin-bottom: 20px; padding-top: 16px; border-top: 1px solid var(--mc-line); font-size: 13px; }
.mc-uc-meta > div { min-width: 0; }
.mc-uc-meta dt { font-size: 12px; font-weight: 400; color: var(--gray2-color); }
.mc-uc-meta dd { margin: 2px 0 0; font-weight: 500; color: var(--heading-color); }
.mc-uc-card-link { display: inline-flex; gap: 8px; align-items: center; margin-top: auto; font-size: 15px; }
.mc-uc-card-link:hover { color: var(--mc-green-700); }
@media (max-width: 420px) { .mc-uc-meta { grid-template-columns: 1fr 1fr; } }

@keyframes mc-uc-float { 50% { transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { .mc-uc-widget, .mc-uc-shot, .mc-uc-hub-float { animation: none; } }
.mc-noanim .mc-uc-widget, .mc-noanim .mc-uc-shot, .mc-noanim .mc-uc-hub-float { animation: none; }
