/* Category Job Post Landing Page Styles */

/* Remove padding from step 1 ONLY when it's the active/only step (no has-padding class) */
/* When user moves to step 2+, has-padding class is added and step 1 gets normal 5rem spacing */
.step-section[data-step="1"]:not(.has-padding) {
    padding-bottom: 0 !important;
}

/* Reassurance section with fade transition and subtle background */
#reassurance-section {
    transition: opacity 0.15s ease-in-out;
}

#reassurance-section-inner:not(.section) {
    padding: 0.6rem 0;
}

#reassurance-section-inner.section {
    padding-top: 0;
}

#reassurance-section:has(#cpcHowItWorksSection) #reassurance-section-inner .columns {
    margin-top: 0;
    margin-bottom: 0;
}

#reassurance-section:has(#cpcHowItWorksSection) #reassurance-section-inner .column {
    padding-top: 0;
    padding-bottom: 0;
}

@media (max-width: 768px) {
    #reassurance-section:has(#cpcHowItWorksSection) #reassurance-section-inner .column {
        padding-top: 0.2rem;
        padding-bottom: 0.2rem;
    }
}

.section.hiw-section {
    border-top: 1px solid #dbdbdb;
    border-bottom: 1px solid #dbdbdb;
    transition: padding 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.section.hiw-section--collapsed {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.section.hiw-section--expanded {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Collapsed title is Bulma is-6 (1rem). Expanded matches is-5 (1.25rem). */
.section.hiw-section .title {
    transition: font-size 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.section.hiw-section--expanded .title.is-6 {
    font-size: 1.25rem;
}

@media (prefers-reduced-motion: reduce) {
    .section.hiw-section,
    .section.hiw-section .title {
        transition: none;
    }
}

/* How it Works step icons */
.hiw-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    margin: 0.5rem auto 1rem;
    border-radius: 50%;
    background-color: #eaf4fd;
}

/* Expand/collapse is driven by the Web Animations API */
.hiw-steps.is-animating {
    overflow: hidden;
}

#cpcHowItWorksSteps[hidden] {
    display: none;
}

/* The heading is the disclosure control. Chevron points down while collapsed
   and rotates up while expanded, matching aria-expanded. */
.hiw-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.15rem 0.35rem;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: inherit;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.hiw-toggle .icon {
    color: #3273dc;
    width: 1.15em;
    height: 1.15em;
    font-size: 0.85em;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.hiw-toggle:hover,
.hiw-toggle:focus-visible {
    color: #3273dc;
    border-bottom-color: #3273dc;
    background-color: rgba(50, 115, 220, 0.06);
    outline: none;
}

.hiw-toggle:focus-visible {
    box-shadow: 0 0 0 3px rgba(50, 115, 220, 0.35);
}

.hiw-toggle[aria-expanded="true"] .icon {
    transform: rotate(180deg);
}

/* Prevent Bulma columns from collapsing the bottom padding */
#reassurance-section-inner .columns {
    margin-bottom: 0;
}

.how-it-works-compact {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
}

.how-it-works-compact .level-item {
    flex-direction: column;
    text-align: center;
}

.how-it-works-compact .icon {
    color: #3273dc;
    margin-bottom: 0.25rem;
}

.how-it-works-compact .level-item p {
    font-size: 0.875rem;
    color: #4a4a4a;
    margin: 0;
}

.category-job-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.category-job-separator-line {
    flex: 1;
    border-top: 1px solid #d0e3f7;
}

/* =========================================================
   Stars
   ========================================================= */

.stars {
    color: #ffa31a;
    font-size: 1rem;
    letter-spacing: 0.1rem;
}

#reassurance-section-inner .stars {
    font-size: 1.2rem;
}

.stars .star-full {
    color: #ffa31a;
}

.stars .star-empty {
    color: #d3d3d3;
}

.stars .star-half {
    background: linear-gradient(to right, #ffa31a 50%, #d3d3d3 50%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* =========================================================
   CPC Reviews Carousel
   ========================================================= */


/* Outer wrapper — fills full container width; buttons positioned inside it */
.cpc-reviews-carousel-wrapper {
    position: relative;
    width: 100%;
}

/* Clipping window - hides overflow cards */
.cpc-reviews-track-outer {
    overflow: hidden;
    width: 100%;
}

/* Track - mobile: native scroll-snap; tablet+: JS transform */
.cpc-reviews-track {
    display: flex;
    gap: 1rem;
    transition: transform 0.3s ease;
    will-change: transform;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.cpc-reviews-track::-webkit-scrollbar {
    display: none;
}

/* Card inner - subtle outline only */
.cpc-review-card-inner {
    height: 100%;
    box-sizing: border-box;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    background: #ffffff;
}

.cpc-review-body {
    border-top: 1px solid #f0f0f0;
}

/* Avatar fallback initial */
.cpc-avatar-initial {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #999;
    font-weight: bold;
}

/* ---- Mobile (<769px): 1 card + ~2rem peek of the next, no buttons ---- */
.cpc-review-card {
    /* 3rem = 1rem gap + 2rem of the next card */
    flex: 0 0 calc(100% - 3rem);
    scroll-snap-align: start;
    /* Stop on the next card even when the swipe is fast */
    scroll-snap-stop: always;
    box-sizing: border-box;
}

.cpc-reviews-prev,
.cpc-reviews-next {
    display: none;
    background: #ffffff;
    border: 1px solid #dbdbdb;
    border-radius: 50%;
    width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    padding: 0;
}
.cpc-reviews-prev:hover,
.cpc-reviews-next:hover {
    background: #f5f8ff;
    border-color: #3e8ed0;
    color: #3e8ed0;
}
.cpc-reviews-prev:disabled,
.cpc-reviews-next:disabled {
    opacity: 0.3;
    cursor: default;
}

/* ---- Tablet (769px–1199px): full width track, buttons float over the edges ---- */
@media screen and (min-width: 769px) {
    .cpc-reviews-track {
        overflow-x: visible;
        scroll-snap-type: none;
    }

    .cpc-review-card {
        flex: 0 0 calc((100% - 2rem) / 3);
    }

    .cpc-reviews-prev,
    .cpc-reviews-next {
        display: flex;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1;
        box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    }

    .cpc-reviews-prev { left: 0.5rem; }
    .cpc-reviews-next { right: 0.5rem; }
}

/* ---- Desktop (>=1200px): buttons sit outside the track in the gutter ---- */
@media screen and (min-width: 1200px) {
    .cpc-reviews-prev,
    .cpc-reviews-next {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        box-shadow: none;
    }

    /* Push buttons outside the track — button width (2.25rem) + gap (0.75rem) */
    .cpc-reviews-prev { left: -3rem; }
    .cpc-reviews-next { right: -3rem; }
}
