/**
 * SailWP Co-pilot — visual styling for tool-applied marker classes.
 * Theme-agnostic: works on Cadence, Astra, GeneratePress, or any block theme.
 */

/* Section wrapper applied by redesign_page — gives every wrapped section
   real breathing room without depending on theme spacing. */
.swcp-redesigned-section {
    margin-block: clamp(2.5rem, 6vw, 4.5rem) !important;
    padding-block: clamp(1.25rem, 3vw, 2rem);
    max-width: 760px;
    margin-inline: auto;
}
.swcp-redesigned-section > h2 {
    margin-bottom: 1rem;
    line-height: 1.25;
}
.swcp-redesigned-section > p,
.swcp-redesigned-section > ul,
.swcp-redesigned-section > ol {
    line-height: 1.7;
    margin-block: 0.75rem;
}

/* Lead image promoted by redesign_page: sits at the top of its section as
   a visual anchor instead of a mid-content drop-in. */
.swcp-redesigned-lead-image {
    margin-block: 0 1.5rem !important;
    border-radius: 12px;
    overflow: hidden;
}
.swcp-redesigned-lead-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Testimonial carousel: pure-CSS scroll-snap. No JS, no library. Works
   on every modern browser and degrades gracefully to a stacked list. */
.swcp-testimonial-carousel {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 1rem;
    padding-block: 1rem;
    padding-inline: 0.5rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.swcp-testimonial-carousel > * {
    flex: 0 0 min(420px, 85%);
    scroll-snap-align: start;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 14px;
    padding: 1.5rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.swcp-testimonial-carousel > * > * {
    margin-block: 0.5rem;
}
.swcp-testimonial-carousel > * p {
    line-height: 1.6;
}

/* Subtle hint for desktop users that there is more to scroll. */
@media (min-width: 768px) {
    .swcp-testimonial-carousel {
        position: relative;
        mask-image: linear-gradient(to right, black 0, black calc(100% - 64px), transparent 100%);
        -webkit-mask-image: linear-gradient(to right, black 0, black calc(100% - 64px), transparent 100%);
    }
}
