/* ===========================================================
   Ranosys GCC Benefits — widget styles
   =========================================================== */

.rsc-gccb-section {
    width: 100%;
}

.rsc-gccb-container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 10px;
}

/* -----------------------------------------------------------
   Section Header
----------------------------------------------------------- */
.rsc-gccb-header {
    text-align: center;
    margin: 0 auto 40px;
    max-width: 1100px;
}

.rsc-gccb-subheading {
    display: inline-block;
    font-size: 1pc;
    font-family: Poppins, sans-serif;
    font-weight: 500;
    color: #666;
    letter-spacing: 2px;
    margin: 0 0 12px 0;
    padding: 0 0 8px 0;
    border-bottom: 1px solid #fe5907;
    text-transform: uppercase;
}

.rsc-gccb-heading {
    font-size: 36px;
    line-height: 1.2;
    font-weight: 500;
    margin: 0 auto;
    color: #1a1a1a;
    font-family: Poppins, sans-serif;
}

.rsc-gccb-description {
    color: #333;
    font-family: "source-sans-pro", sans-serif;
    font-size: 18px;
    line-height: 1.5;
    max-width: 1100px;
    margin: 20px auto 0;
}

/* -----------------------------------------------------------
   Grid / Carousel wrapper
----------------------------------------------------------- */
.rsc-gccb-grid {
    --rsc-gccb-cols: 4;
    --rsc-gccb-gap: 24px;
    position: relative;
}

.rsc-gccb-track {
    width: 100%;
}

.rsc-gccb-layout-grid .rsc-gccb-track {
    display: grid;
    grid-template-columns: repeat(var(--rsc-gccb-cols), 1fr);
    gap: var(--rsc-gccb-gap);
}

.rsc-gccb-layout-grid.rsc-gccb-equal-height .rsc-gccb-track {
    align-items: stretch;
}

.rsc-gccb-layout-grid:not(.rsc-gccb-equal-height) .rsc-gccb-track {
    align-items: start;
}

.rsc-gccb-layout-carousel .rsc-gccb-track {
    display: flex;
    gap: var(--rsc-gccb-gap);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}

.rsc-gccb-layout-carousel .rsc-gccb-track::-webkit-scrollbar {
    display: none;
}

.rsc-gccb-layout-carousel .rsc-gccb-card {
    flex: 0 0 calc((100% - (var(--rsc-gccb-cols) - 1) * var(--rsc-gccb-gap)) / var(--rsc-gccb-cols));
    scroll-snap-align: start;
}

.rsc-gccb-layout-carousel:not(.rsc-gccb-equal-height) .rsc-gccb-card {
    align-self: flex-start;
}

/* Carousel nav */
.rsc-gccb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #e5e5e5;
    background: #fff;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.rsc-gccb-nav:hover {
    background: #fe5907;
    border-color: #fe5907;
    color: #fff;
}

.rsc-gccb-nav-prev {
    left: -22px;
}

.rsc-gccb-nav-next {
    right: -22px;
}

.rsc-gccb-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.rsc-gccb-dots button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: #ddd;
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
}

.rsc-gccb-dots button.is-active {
    background: #fe5907;
    transform: scale(1.3);
}

/* -----------------------------------------------------------
   Card
----------------------------------------------------------- */
.rsc-gccb-card {
    --rsc-gccb-card-bg: #ffffff;
    --rsc-gccb-border-color: #e5e5e5;
    --rsc-gccb-accent-color: #fe5907;
    position: relative;
    background-color: var(--rsc-gccb-card-bg);
    border-radius: 12px;
    padding: 30px;
    border: none;
    box-sizing: border-box;
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
    display: flex;
}

/* Bottom accent line — rises up from below the card's bottom edge into
   place on hover, togglable via "Enable Bottom Accent Line on Hover" in
   the widget's Card Styling controls. */
.rsc-gccb-has-accent .rsc-gccb-card::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background-color: var(--rsc-gccb-accent-color);
    opacity: 0;
    transform: translateY(100%);
    transition: transform .3s ease, opacity .3s ease;
    pointer-events: none;
}

.rsc-gccb-has-accent .rsc-gccb-card:hover::after,
.rsc-gccb-has-accent .rsc-gccb-card:focus-within::after {
    opacity: 1;
    transform: translateY(0);
}

.rsc-gccb-grid[data-bg="white"] .rsc-gccb-card {
    --rsc-gccb-card-bg: #ffffff;
}

.rsc-gccb-grid[data-bg="light_gray"] .rsc-gccb-card {
    --rsc-gccb-card-bg: #f5f5f5;
}

.rsc-gccb-grid[data-border="solid"] .rsc-gccb-card {
    border: 1px solid var(--rsc-gccb-border-color);
}

.rsc-gccb-grid[data-border="shadow"] .rsc-gccb-card {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}

/* Hover effects */
.rsc-gccb-grid[data-hover="lift"] .rsc-gccb-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .1);
}

.rsc-gccb-grid[data-hover="shadow"] .rsc-gccb-card:hover {
    box-shadow: 0 18px 36px rgba(0, 0, 0, .14);
}

.rsc-gccb-grid[data-hover="border"] .rsc-gccb-card:hover {
    border: 1px solid #fe5907;
}

/* -----------------------------------------------------------
   Card inner layout (icon position)
----------------------------------------------------------- */
.rsc-gccb-card-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    gap: 16px;
}

.rsc-gccb-icon-pos-left .rsc-gccb-card-inner {
    flex-direction: row;
    align-items: flex-start;
}

.rsc-gccb-icon-pos-right .rsc-gccb-card-inner {
    flex-direction: row-reverse;
    align-items: flex-start;
}

.rsc-gccb-card-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

/* Vertical alignment inside an equal-height card */
.rsc-gccb-valign-top .rsc-gccb-card-inner {
    justify-content: flex-start;
}

.rsc-gccb-valign-center .rsc-gccb-card-inner {
    justify-content: center;
}

.rsc-gccb-valign-bottom .rsc-gccb-card-inner {
    justify-content: flex-end;
}

/* Content alignment */
.rsc-gccb-align-left .rsc-gccb-card-content {
    text-align: left;
}

.rsc-gccb-align-center .rsc-gccb-card-content {
    text-align: center;
}

.rsc-gccb-align-right .rsc-gccb-card-content {
    text-align: right;
}

.rsc-gccb-icon-pos-top.rsc-gccb-align-center .rsc-gccb-card-inner {
    align-items: center;
}

.rsc-gccb-icon-pos-top.rsc-gccb-align-left .rsc-gccb-card-inner {
    align-items: flex-start;
}

.rsc-gccb-icon-pos-top.rsc-gccb-align-right .rsc-gccb-card-inner {
    align-items: flex-end;
}

/* Match content position across a row — fallback bound.
   Used as-is for Carousel layout and for Left/Right/Hidden icon position
   (no shared row tracks to subgrid onto there), and as the safety net for
   browsers without CSS subgrid support. Caps a heading at 2 lines so one
   unusually long heading can't throw its row's rhythm off, without
   reserving a fixed minimum height that would leave dead space under
   every short, single-line heading. */
.rsc-gccb-match-content .rsc-gccb-card-heading {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

/* Match content position across a row — real alignment via CSS subgrid.
   Scoped to Grid layout + Top icon position (the default, and what the
   6-card benefits layout uses): icon/heading/description each get a
   shared row track sized to the tallest card in that row automatically.
   A short single-line heading takes only the space it needs; a heading
   that wraps to 2 lines pushes every card's description in that row down
   by the same amount, so descriptions stay aligned with zero manual
   guessing and zero wasted space in the common case. */
@supports (grid-template-rows: subgrid) {
    .rsc-gccb-layout-grid.rsc-gccb-icon-pos-top.rsc-gccb-match-content .rsc-gccb-track {
        grid-auto-rows: auto auto 1fr;
    }

    .rsc-gccb-layout-grid.rsc-gccb-icon-pos-top.rsc-gccb-match-content .rsc-gccb-card {
        display: grid;
        grid-template-rows: subgrid;
        grid-row: span 3;
        row-gap: 16px;
    }

    /* Unwrap the two intermediate flex wrappers so the icon, heading, and
       description become direct grid items sharing the card's subgrid
       row tracks — display:contents keeps them in the markup (and usable
       as CSS selectors elsewhere) without creating a layout box. */
    .rsc-gccb-layout-grid.rsc-gccb-icon-pos-top.rsc-gccb-match-content .rsc-gccb-card-inner,
    .rsc-gccb-layout-grid.rsc-gccb-icon-pos-top.rsc-gccb-match-content .rsc-gccb-card-content {
        display: contents;
    }

    /* Heading/description stay at the grid default (justify-items: stretch)
       so they keep the card's full width and wrap exactly as before —
       text-align (inherited through the display:contents wrappers) is
       what actually positions the text. Only the icon, which is a fixed
       intrinsic size, needs its own grid position set explicitly. */
    .rsc-gccb-layout-grid.rsc-gccb-icon-pos-top.rsc-gccb-match-content.rsc-gccb-align-left .rsc-gccb-card-icon {
        justify-self: start;
    }

    .rsc-gccb-layout-grid.rsc-gccb-icon-pos-top.rsc-gccb-match-content.rsc-gccb-align-center .rsc-gccb-card-icon {
        justify-self: center;
    }

    .rsc-gccb-layout-grid.rsc-gccb-icon-pos-top.rsc-gccb-match-content.rsc-gccb-align-right .rsc-gccb-card-icon {
        justify-self: end;
    }

    /* Row-track (vertical) distribution — align-content is the grid
       equivalent of the flex-column default's justify-content above. */
    .rsc-gccb-layout-grid.rsc-gccb-icon-pos-top.rsc-gccb-match-content.rsc-gccb-valign-top .rsc-gccb-card {
        align-content: start;
    }

    .rsc-gccb-layout-grid.rsc-gccb-icon-pos-top.rsc-gccb-match-content.rsc-gccb-valign-center .rsc-gccb-card {
        align-content: center;
    }

    .rsc-gccb-layout-grid.rsc-gccb-icon-pos-top.rsc-gccb-match-content.rsc-gccb-valign-bottom .rsc-gccb-card {
        align-content: end;
    }

    /* The row track itself now grows to fit the tallest heading in that
       row, so the 2-line clamp fallback above is no longer needed here. */
    .rsc-gccb-layout-grid.rsc-gccb-icon-pos-top.rsc-gccb-match-content .rsc-gccb-card-heading {
        display: block;
        -webkit-line-clamp: unset;
        line-clamp: unset;
        overflow: visible;
    }
}

/* -----------------------------------------------------------
   Icon
----------------------------------------------------------- */
.rsc-gccb-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 32px;
    width: calc(32px * 1.4);
    height: calc(32px * 1.4);
    color: #fe5907;
}

.rsc-gccb-card-icon svg,
.rsc-gccb-card-icon img {
    width: 1em;
    height: 1em;
    /* fill: currentColor; */
    object-fit: contain;
}

/* -----------------------------------------------------------
   Card typography
----------------------------------------------------------- */
.rsc-gccb-card-heading {
    font-family: Poppins, sans-serif;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.3;
    color: #1a1a1a;
    margin: 0 0 12px 0;
}

.rsc-gccb-card-description {
    font-family: "source-sans-pro", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

/* -----------------------------------------------------------
   Reveal animation (JS toggles .is-visible via IntersectionObserver)

   Scoped under html.ranosys-js — the same sitewide "JS confirmed active"
   gate class used by scroll-animation.css — so cards stay visible by
   default if JS is blocked/fails, instead of being permanently hidden.
----------------------------------------------------------- */
.ranosys-js .rsc-gccb-grid[data-animation="fade"] .rsc-gccb-card {
    opacity: 0;
    transition: opacity .6s ease, transform .6s ease, box-shadow .3s ease, border-color .3s ease;
}

.ranosys-js .rsc-gccb-grid[data-animation="fade"] .rsc-gccb-card.is-visible {
    opacity: 1;
}

.ranosys-js .rsc-gccb-grid[data-animation="slide"] .rsc-gccb-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease, box-shadow .3s ease, border-color .3s ease;
}

.ranosys-js .rsc-gccb-grid[data-animation="slide"] .rsc-gccb-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.ranosys-js .rsc-gccb-grid[data-animation="zoom"] .rsc-gccb-card {
    opacity: 0;
    transform: scale(.9);
    transition: opacity .6s ease, transform .6s ease, box-shadow .3s ease, border-color .3s ease;
}

.ranosys-js .rsc-gccb-grid[data-animation="zoom"] .rsc-gccb-card.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* Elementor editor preview iframe: the observer may never fire there
   (widget can be off-screen inside the panel), so always show cards. */
.elementor-editor-active .rsc-gccb-card {
    opacity: 1 !important;
    transform: none !important;
}

/* -----------------------------------------------------------
   Responsive
----------------------------------------------------------- */
@media (max-width: 1200px) {
    .rsc-gccb-layout-grid .rsc-gccb-track {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .rsc-gccb-layout-carousel .rsc-gccb-card {
        flex-basis: calc(50% - (var(--rsc-gccb-gap) / 2));
    }
}

@media (max-width: 767px) {
    .rsc-gccb-layout-grid .rsc-gccb-track {
        grid-template-columns: 1fr !important;
    }

    .rsc-gccb-layout-carousel .rsc-gccb-card {
        flex-basis: 100%;
    }

    .rsc-gccb-icon-pos-left .rsc-gccb-card-inner,
    .rsc-gccb-icon-pos-right .rsc-gccb-card-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .rsc-gccb-nav-prev {
        left: 0;
    }

    .rsc-gccb-nav-next {
        right: 0;
    }
}
