/* Rotating Services widget. Column count comes from --sbp-svc-cols
   (set by js/sbp-services-widget.js). data-rotate="0" keeps a static grid. */

.sbp-services {
    margin-top: 0.25rem;
    max-width: 100%;
    min-width: 0;
    position: relative;
}

.sbp-services-label {
    margin: 0 0 0.55rem;
    padding: 0;
    color: #9aa0b5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.55px;
    line-height: 1.2;
    text-align: center;
    background: transparent;
    border: none;
}

/* Reserve first-slide height until JS marks ready, so the hero does not flash. */
.sbp-services:not([data-sbp-ready="1"]) {
    min-height: 360px;
}

.sbp-services-row {
    display: grid;
    grid-template-columns: repeat(var(--sbp-svc-cols, 3), minmax(0, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 auto;
    padding: 4px 0 0;
    box-sizing: border-box;
}

.sbp-services-portrait .sbp-services-row {
    grid-template-columns: minmax(0, 1fr);
    max-width: 420px;
    gap: 1rem;
}

.sbp-services-short .sbp-services-row {
    gap: 0.75rem;
}

.sbp-svc-card {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    overflow: hidden;
    background: rgba(17, 19, 26, 0.85);
    color: inherit;
    font: inherit;
    text-align: inherit;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, border-color 0.2s ease;
    box-sizing: border-box;
}

.sbp-svc-card:hover,
.sbp-svc-card:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(42, 209, 214, 0.6);
    outline: none;
}

.sbp-svc-media {
    overflow: hidden;
    background: #0a0818;
}

.sbp-svc-media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: 50% 50%;
    border: 0;
    transition: transform 0.3s ease;
}

.sbp-svc-card:hover .sbp-svc-media img,
.sbp-svc-card:focus-visible .sbp-svc-media img {
    transform: scale(1.05);
}

.sbp-svc-body {
    padding: 1.15rem 1.25rem 1.25rem;
    text-align: center;
}

.sbp-svc-title {
    margin: 0 0 0.25rem;
    padding: 0;
    color: #2ad1d6;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 1px;
    line-height: 1.15;
}

.sbp-svc-text {
    margin: 0;
    padding: 0;
    color: #d1d5db;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.45;
}

.sbp-svc-cta {
    display: inline-block;
    margin-top: 0.75rem;
    color: #2ad1d6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
}

/* Rotating stage — height follows the active slide only. */
.sbp-services-stage {
    position: relative;
    width: 100%;
    overflow: hidden;
    flex: 0 0 auto;
    transition: height .4s ease;
}

.sbp-services-stage .sbp-services-row {
    height: auto;
}

.sbp-services-stage.is-instant { transition: none; }

.sbp-services-slide {
    position: absolute;
    top: 0;
    left: 0;
    bottom: auto;
    height: auto;
    width: 100%;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(0);
}

.sbp-services-slide.is-active {
    position: relative;
    height: auto;
    visibility: visible;
    pointer-events: auto;
    z-index: 1;
}

.sbp-services-slide.is-leaving,
.sbp-services-slide.is-entering {
    visibility: visible;
    pointer-events: none;
}

.sbp-services-slide.is-leaving { position: absolute; z-index: 2; }
.sbp-services-slide.is-entering { position: absolute; z-index: 3; }

.sbp-services-stage.is-sliding .sbp-services-slide.is-leaving,
.sbp-services-stage.is-sliding .sbp-services-slide.is-entering {
    transition: transform .5s ease;
}

.sbp-services-stage.is-instant .sbp-services-slide { transition: none; }

.sbp-services-dots {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
    align-items: center;
    justify-content: center;
    margin: 12px 0 0;
    padding: 0;
}

/* Beat host-page `button { min-width: 10vw; ... }` rules. */
.sbp-services .sbp-svc-dot,
.sbp-services .sbp-services-dots button {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    display: block;
    flex: none;
    width: 8px !important;
    height: 8px !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    background: rgba(200, 210, 220, 0.35) !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    font-family: inherit;
    text-indent: 0;
    overflow: hidden;
    cursor: pointer;
}

.sbp-services .sbp-svc-dot[aria-current="true"],
.sbp-services .sbp-services-dots button[aria-current="true"] {
    background: #d8ffe0 !important;
    box-shadow: 0 0 6px rgba(0, 255, 80, 0.7) !important;
    width: 8px !important;
    height: 8px !important;
}

.sbp-services .sbp-svc-dot:hover,
.sbp-services .sbp-services-dots button:hover {
    background: rgba(200, 210, 220, 0.6) !important;
    color: transparent !important;
}

.sbp-services .sbp-svc-dot[aria-current="true"]:hover,
.sbp-services .sbp-services-dots button[aria-current="true"]:hover {
    background: #d8ffe0 !important;
}

.sbp-services .sbp-svc-arrow,
.sbp-services .sbp-services-arrow {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    flex: none;
    width: 32px !important;
    height: 32px !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: rgba(8, 12, 20, 0.72) !important;
    color: #e8ffe8 !important;
    font-size: 26px !important;
    font-family: inherit;
    line-height: 1 !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    text-shadow: none !important;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5) !important;
    cursor: pointer;
}

.sbp-services-prev { left: 0; }
.sbp-services-next { right: 0; }

.sbp-services .sbp-svc-arrow:hover,
.sbp-services .sbp-svc-arrow:focus-visible,
.sbp-services .sbp-services-arrow:hover,
.sbp-services .sbp-services-arrow:focus-visible {
    background: rgba(0, 200, 50, 0.85) !important;
    color: #e8ffe8 !important;
    outline: none;
}

@media (hover: hover) and (pointer: fine) {
    .sbp-services-rotate .sbp-svc-arrow,
    .sbp-services-rotate .sbp-services-arrow { display: block; }
    .sbp-services-rotate { padding: 0 22px; }
}

@media (max-width: 700px) and (orientation: portrait) {
    .sbp-services:not([data-sbp-ready="1"]) {
        min-height: 400px;
    }
    .sbp-services-label { font-size: 0.8rem; }
    .sbp-svc-body { padding: 1rem 1rem 1.1rem; }
}

@media (max-height: 500px) and (orientation: landscape) {
    .sbp-services { margin-top: 8px; }
    .sbp-services-label { font-size: 10px; margin-bottom: 4px; }
    .sbp-svc-body { padding: 0.7rem 0.75rem 0.8rem; }
    .sbp-svc-title { font-size: 1.25rem; }
    .sbp-svc-text { font-size: 0.75rem; }
    .sbp-svc-cta { margin-top: 0.4rem; }
    .sbp-svc-card { border-radius: 12px; }
    .sbp-services-dots { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .sbp-services-stage,
    .sbp-services-slide,
    .sbp-svc-card,
    .sbp-svc-media img { transition: none; }
}

/* Homepage hero mount: keep the widget full-width and clear the fixed desktop footer when scrolled. */
#home-hero .sbp-services-hero-mount {
    width: 100%;
    max-width: 100%;
}
@media (min-width: 768px) {
    #home-hero .sbp-services-hero-mount {
        padding-bottom: 4.25rem;
    }
}
