/* Homepage services showcase */
.rbs { --y: #FFCD00; --k: #111; display: grid; grid-template-columns: 360px 1fr; gap: 1.5rem; margin-top: var(--wp--preset--spacing--60, 2.5rem); align-items: stretch; }

/* Tabs */
.rbs-tabs { display: flex; flex-direction: column; gap: .5rem; }
.rbs-tab {
  position: relative; display: flex; align-items: center; gap: 1rem; width: 100%;
  padding: 1rem 1.2rem; border: 1px solid #E7E2D4; border-radius: 12px; background: #fff;
  font: inherit; color: var(--k); text-align: left; cursor: pointer; overflow: hidden;
  transition: background .25s, border-color .25s, transform .25s, box-shadow .25s;
}
.rbs-tab:hover { border-color: var(--y); transform: translateX(4px); }
.rbs-tab:focus-visible { outline: 2px solid var(--k); outline-offset: 2px; }
.rbs-tab[aria-selected="true"] { background: var(--k); border-color: var(--k); color: #fff; transform: translateX(8px); box-shadow: 0 14px 30px -18px rgba(0,0,0,.6); }
.rbs-num { font-size: .8rem; font-weight: 800; color: #9a968c; min-width: 1.6rem; letter-spacing: .05em; }
.rbs-tab[aria-selected="true"] .rbs-num { color: var(--y); }
.rbs-tab-title { font-weight: 700; font-size: 1rem; line-height: 1.3; flex: 1; }
.rbs-tab::after { content: ""; width: 8px; height: 8px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); opacity: 0; transition: opacity .25s; }
.rbs-tab[aria-selected="true"]::after { opacity: 1; color: var(--y); }

/* Auto-advance progress bar */
.rbs-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.rbs-bar i { display: block; height: 100%; width: 0; background: var(--y); }
.rbs-tab[aria-selected="true"] .rbs-bar i { animation: rbs-fill var(--rbs-dur, 6000ms) linear forwards; }
.rbs.is-paused .rbs-tab[aria-selected="true"] .rbs-bar i { animation-play-state: paused; }
.rbs.is-stopped .rbs-bar { display: none; }
@keyframes rbs-fill { from { width: 0; } to { width: 100%; } }

/* Stage */
.rbs-stage { position: relative; border-radius: 18px; overflow: hidden; min-height: 560px; background: var(--k); box-shadow: 0 30px 60px -30px rgba(0,0,0,.5); }
.rbs-panel { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s linear .6s; }
.rbs-panel.is-active { opacity: 1; visibility: visible; transition: opacity .6s ease, visibility 0s; z-index: 1; }
.rbs-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 6s ease; }
.rbs-panel.is-active .rbs-img { transform: scale(1); }
.rbs-panel::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(17,17,17,.92) 0%, rgba(17,17,17,.7) 45%, rgba(17,17,17,.1) 100%); }

.rbs-info { position: absolute; z-index: 2; left: 0; bottom: 0; top: 0; width: min(520px, 100%); padding: 2.5rem; box-sizing: border-box; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; }
.rbs-info > * { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.rbs-panel.is-active .rbs-info > * { opacity: 1; transform: none; }
.rbs-panel.is-active .rbs-info > :nth-child(2) { transition-delay: .1s; }
.rbs-panel.is-active .rbs-info > :nth-child(3) { transition-delay: .18s; }
.rbs-panel.is-active .rbs-info > :nth-child(4) { transition-delay: .26s; }
.rbs-panel.is-active .rbs-info > :nth-child(5) { transition-delay: .34s; }
.rbs-kicker { font-size: .78rem; font-weight: 800; letter-spacing: .14em; color: var(--y); }
.rbs-info h3 { margin: .5rem 0 .8rem; font-size: clamp(1.6rem, 2.6vw, 2.2rem); color: #fff; }
.rbs-info p { margin: 0 0 1.1rem; color: #e2e2e2; font-size: 1rem; line-height: 1.6; }
.rbs-info ul { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; gap: .55rem; }
.rbs-info li { position: relative; padding-left: 1.9rem; font-size: .95rem; }
.rbs-info li::before { content: "✓"; position: absolute; left: 0; top: .1em; width: 1.3em; height: 1.3em; border-radius: 50%; background: var(--y); color: var(--k); font-weight: 800; font-size: .78rem; display: grid; place-items: center; }
.rbs-btns { display: flex; flex-wrap: wrap; gap: .7rem; }
.rbs-btn { display: inline-flex; align-items: center; padding: .85rem 1.5rem; border-radius: 10px; background: var(--y); color: var(--k) !important; font-weight: 700; text-decoration: none !important; transition: background .2s, color .2s; }
.rbs-btn:hover { background: #fff; }
.rbs-btn-ghost { background: transparent; color: #fff !important; box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); }
.rbs-btn-ghost:hover { background: #fff; color: var(--k) !important; }

/* Tablet / mobile: tabs become a swipeable row above the panel */
@media (max-width: 960px) {
  .rbs { grid-template-columns: 1fr; gap: 1rem; }
  .rbs-tabs { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--wp--preset--spacing--50, 1rem); scrollbar-width: none; padding-bottom: 4px; margin: 0 calc(-1 * var(--wp--preset--spacing--50, 1rem)); padding-left: var(--wp--preset--spacing--50, 1rem); padding-right: var(--wp--preset--spacing--50, 1rem); }
  .rbs-tabs::-webkit-scrollbar { display: none; }
  .rbs-tab { flex: none; width: auto; scroll-snap-align: start; padding: .75rem 1rem; }
  .rbs-tab:hover, .rbs-tab[aria-selected="true"] { transform: none; }
  .rbs-tab::after { display: none; }
  .rbs-tab-title { white-space: nowrap; font-size: .92rem; }
  .rbs-stage { min-height: 600px; }
  .rbs-panel::before { background: linear-gradient(180deg, rgba(17,17,17,.05) 0%, rgba(17,17,17,.75) 40%, rgba(17,17,17,.95) 100%); }
  .rbs-info { width: 100%; padding: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .rbs *, .rbs *::before { transition: none !important; animation: none !important; }
}
