/* ═══════════════════════════════════════════════════════════
   Remote Hive — Clients Dome Section
   3D rotating dome gallery + CTA card
   ═══════════════════════════════════════════════════════════ */

/* ── Custom Properties (overridden via Customizer inline styles) ── */
.rh-clientsdome {
    --rh-clientsdome-bg: #ffffff;
    --rh-clientsdome-heading-clr: #0f172a;
    --rh-clientsdome-highlight-clr: #2563eb;
    --rh-clientsdome-label-clr: #2563eb;
    --rh-clientsdome-cta-bg: #0f2a4a;
    --rh-clientsdome-cta-text: #ffffff;
    --rh-clientsdome-cta-highlight: #f5c542;
    --rh-clientsdome-btn-bg: #ffffff;
    --rh-clientsdome-btn-text: #0f2a4a;
    --rh-clientsdome-btn-hover-bg: #e8edf3;
    --rh-clientsdome-quote-text: #cbd5e1;
    --rh-clientsdome-quote-author: #ffffff;
    --rh-clientsdome-dome-overlay: #ffffff;
    --rh-clientsdome-tile-radius: 10px;

    /* Dome internals */
    --cd-radius: 420px;
    --cd-segments: 24;
    --cd-rot-y-unit: calc(360deg / var(--cd-segments) / 2);
    --cd-rot-x-unit: calc(360deg / var(--cd-segments) / 2);
    --cd-circ: calc(var(--cd-radius) * 3.14);
    --cd-tile-w: calc(var(--cd-circ) / var(--cd-segments));
    --cd-tile-h: calc(var(--cd-circ) / var(--cd-segments));
}

/* ── Section ── */
.rh-clientsdome {
    position: relative;
    background: var(--rh-clientsdome-bg);
    padding: 100px 0 120px;
    overflow: hidden;
}

/* ── Container ── */
.rh-clientsdome__container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Label ── */
.rh-clientsdome__label {
    display: block;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--rh-clientsdome-label-clr);
    margin-bottom: 20px;
}

/* ── Heading (H2) ── */
.rh-clientsdome__heading {
    text-align: center;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--rh-clientsdome-heading-clr);
    margin: 0 auto 60px;
    max-width: 860px;
}

.rh-clientsdome__heading-highlight {
    color: var(--rh-clientsdome-highlight-clr);
    font-weight: 800;
}

/* ── Two-Column Grid ── */
.rh-clientsdome__grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    align-items: center;
}

/* ═══════════════════════════════════════════════════════════
   DOME GALLERY (left column)
   ═══════════════════════════════════════════════════════════ */
.rh-clientsdome__dome-wrap {
    position: relative;
    width: 100%;
    min-height: 480px;
}

.rh-clientsdome__dome {
    position: relative;
    width: 100%;
    height: 480px;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
}

.rh-clientsdome__dome:active {
    cursor: grabbing;
}

/* Stage — perspective container */
.rh-clientsdome__stage {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    perspective: calc(var(--cd-radius) * 2);
    perspective-origin: 50% 50%;
    contain: layout paint size;
}

/* Sphere — 3D container */
.rh-clientsdome__sphere {
    transform-style: preserve-3d;
    transform: translateZ(calc(var(--cd-radius) * -1));
    will-change: transform;
}

/* Individual tile wrapper */
.rh-clientsdome__tile {
    position: absolute;
    top: -999px;
    bottom: -999px;
    left: -999px;
    right: -999px;
    margin: auto;
    transform-style: preserve-3d;
    transform-origin: 50% 50%;
    backface-visibility: hidden;
}

/* Tile image container */
.rh-clientsdome__tile-img {
    position: absolute;
    display: block;
    inset: 12px;
    border-radius: var(--rh-clientsdome-tile-radius);
    background: transparent;
    overflow: hidden;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    transform: translateZ(0);
}

.rh-clientsdome__tile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    backface-visibility: hidden;
    filter: grayscale(1);
    transition: filter 0.4s ease;
}

.rh-clientsdome__dome:hover .rh-clientsdome__tile-img img {
    filter: grayscale(0.6);
}

/* Overlays — radial gradient + blur */
.rh-clientsdome__overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background-image: radial-gradient(
        rgba(255, 255, 255, 0) 55%,
        var(--rh-clientsdome-dome-overlay) 100%
    );
}

.rh-clientsdome__overlay--blur {
    background-image: none;
    -webkit-mask-image: radial-gradient(
        rgba(255, 255, 255, 0) 60%,
        var(--rh-clientsdome-dome-overlay) 85%
    );
    mask-image: radial-gradient(
        rgba(255, 255, 255, 0) 60%,
        var(--rh-clientsdome-dome-overlay) 85%
    );
    backdrop-filter: blur(3px);
}

/* Edge fades */
.rh-clientsdome__edge-fade {
    position: absolute;
    z-index: 5;
    pointer-events: none;
}

.rh-clientsdome__edge-fade--top,
.rh-clientsdome__edge-fade--bottom {
    left: 0;
    right: 0;
    height: 100px;
}

.rh-clientsdome__edge-fade--top {
    top: 0;
    background: linear-gradient(to bottom, var(--rh-clientsdome-dome-overlay), transparent);
}

.rh-clientsdome__edge-fade--bottom {
    bottom: 0;
    background: linear-gradient(to top, var(--rh-clientsdome-dome-overlay), transparent);
}

.rh-clientsdome__edge-fade--left,
.rh-clientsdome__edge-fade--right {
    top: 0;
    bottom: 0;
    width: 80px;
}

.rh-clientsdome__edge-fade--left {
    left: 0;
    background: linear-gradient(to right, var(--rh-clientsdome-dome-overlay), transparent);
}

.rh-clientsdome__edge-fade--right {
    right: 0;
    background: linear-gradient(to left, var(--rh-clientsdome-dome-overlay), transparent);
}

/* ═══════════════════════════════════════════════════════════
   CTA CARD (right column)
   ═══════════════════════════════════════════════════════════ */
.rh-clientsdome__cta {
    display: flex;
    align-items: center;
    justify-content: center;
}

.rh-clientsdome__cta-inner {
    position: relative;
    background: var(--rh-clientsdome-cta-bg);
    border-radius: 20px;
    padding: 48px 40px 44px;
    overflow: hidden;
    width: 100%;
    max-width: 460px;
}

/* CTA Heading (H3) */
.rh-clientsdome__cta-heading {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--rh-clientsdome-cta-text);
    margin: 0 0 28px;
}

.rh-clientsdome__cta-highlight {
    color: var(--rh-clientsdome-cta-highlight);
    font-weight: 800;
}

/* CTA Button */
.rh-clientsdome__cta-btn {
    display: inline-block;
    background: var(--rh-clientsdome-btn-bg);
    color: var(--rh-clientsdome-btn-text);
    font-size: 16px;
    font-weight: 600;
    padding: 16px 36px;
    border-radius: 50px;
    border: 2px solid transparent;
    text-decoration: none;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    position: relative;
    z-index: 2;
}

.rh-clientsdome__cta-btn:hover,
.rh-clientsdome__cta-btn:focus {
    background: var(--rh-clientsdome-btn-hover-bg);
    color: var(--rh-clientsdome-btn-text);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.rh-clientsdome__cta-btn:active {
    transform: translateY(0);
}

/* Testimonial Quote */
.rh-clientsdome__quote {
    margin: 32px 0 0;
    padding: 0;
    position: relative;
    z-index: 2;
}

.rh-clientsdome__quote-text {
    margin: 0;
}

.rh-clientsdome__quote-text p {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--rh-clientsdome-quote-text);
    font-style: italic;
    margin: 0;
}

.rh-clientsdome__quote-author {
    display: flex;
    flex-direction: column;
    margin-top: 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--rh-clientsdome-quote-author);
    font-style: normal;
}

.rh-clientsdome__quote-company {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.7;
    margin-top: 2px;
}

/* Decorative dots */
.rh-clientsdome__cta-dots {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: grid;
    grid-template-columns: repeat(5, 8px);
    grid-template-rows: repeat(4, 8px);
    gap: 6px;
    opacity: 0.3;
    z-index: 1;
}

.rh-clientsdome__cta-dots span {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--rh-clientsdome-cta-text);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

/* Laptop: 1024–1279 */
@media (max-width: 1279px) {
    .rh-clientsdome {
        padding: 80px 0 100px;
    }

    .rh-clientsdome__heading {
        font-size: 42px;
    }

    .rh-clientsdome__label {
        font-size: 13px;
    }

    .rh-clientsdome__cta-heading {
        font-size: 32px;
    }

    .rh-clientsdome__dome {
        height: 440px;
    }

    .rh-clientsdome__dome-wrap {
        min-height: 440px;
    }
}

/* Tablet: 768–1023 */
@media (max-width: 1023px) {
    .rh-clientsdome {
        padding: 64px 0 80px;
    }

    .rh-clientsdome__heading {
        font-size: 36px;
        margin-bottom: 48px;
    }

    .rh-clientsdome__label {
        font-size: 13px;
    }

    .rh-clientsdome__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .rh-clientsdome__dome {
        height: 400px;
    }

    .rh-clientsdome__dome-wrap {
        min-height: 400px;
    }

    .rh-clientsdome__cta {
        justify-content: center;
    }

    .rh-clientsdome__cta-inner {
        max-width: 520px;
    }

    .rh-clientsdome__cta-heading {
        font-size: 28px;
    }

    .rh-clientsdome__quote-text p {
        font-size: 14px;
    }

    .rh-clientsdome__tile-img {
        inset: 16px;
    }
}

/* Mobile Large: 480–767 */
@media (max-width: 767px) {
    .rh-clientsdome {
        padding: 48px 0 64px;
    }

    .rh-clientsdome__heading {
        font-size: 30px;
        margin-bottom: 36px;
    }

    .rh-clientsdome__label {
        font-size: 12px;
        margin-bottom: 16px;
    }

    .rh-clientsdome__dome {
        height: 340px;
    }

    .rh-clientsdome__dome-wrap {
        min-height: 340px;
    }

    .rh-clientsdome__cta-inner {
        padding: 36px 28px 36px;
    }

    .rh-clientsdome__cta-heading {
        font-size: 24px;
    }

    .rh-clientsdome__cta-btn {
        font-size: 15px;
        padding: 14px 30px;
    }

    .rh-clientsdome__tile-img {
        inset: 20px;
    }
}

/* Mobile Small: below 480 */
@media (max-width: 479px) {
    .rh-clientsdome {
        padding: 40px 0 52px;
    }

    .rh-clientsdome__heading {
        font-size: 26px;
        margin-bottom: 28px;
    }

    .rh-clientsdome__dome {
        height: 280px;
    }

    .rh-clientsdome__dome-wrap {
        min-height: 280px;
    }

    .rh-clientsdome__cta-inner {
        padding: 28px 20px 28px;
        border-radius: 16px;
    }

    .rh-clientsdome__cta-heading {
        font-size: 22px;
    }

    .rh-clientsdome__cta-btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .rh-clientsdome__quote-text p {
        font-size: 13px;
    }

    .rh-clientsdome__cta-dots {
        display: none;
    }

    .rh-clientsdome__tile-img {
        inset: 24px;
    }
}