
/*
 * St. Benedict's Blog Slider v1.2.2
 * Native-link / native-touch architecture.
 * JavaScript NEVER intercepts card links.
 */

.stbbs-section {
    --stbbs-navy: #061d49;
    --stbbs-navy-2: #0a2b62;
    --stbbs-gold: #dda515;
    --stbbs-blue: #3159e8;
    --stbbs-text: #0d1830;
    --stbbs-muted: #667085;

    width: 100%;
    padding: clamp(32px, 4vw, 52px) 0 clamp(36px, 4vw, 56px);
    background: #fff;
    overflow: hidden;
    box-sizing: border-box;
}

.stbbs-section *,
.stbbs-section *::before,
.stbbs-section *::after {
    box-sizing: border-box;
}

.stbbs-container {
    width: min(1440px, calc(100% - 40px));
    margin: 0 auto;
}

.stbbs-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 22px;
}

.stbbs-heading-copy {
    min-width: 0;
}

.stbbs-title {
    display: flex !important;
    align-items: center;
    gap: 13px;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--stbbs-text) !important;
    font-family: inherit !important;
    font-size: clamp(27px, 3vw, 40px) !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    letter-spacing: -.8px !important;
}

.stbbs-title-line {
    width: 5px;
    height: 42px;
    flex: 0 0 5px;
    background: var(--stbbs-blue);
    border-radius: 2px;
}

.stbbs-subtitle {
    margin: 9px 0 0 18px !important;
    color: var(--stbbs-muted) !important;
    font-family: inherit !important;
    font-size: 16px !important;
    line-height: 1.45 !important;
}

.stbbs-controls {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
}

.stbbs-arrow {
    width: 48px;
    height: 48px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    border: 1px solid #e3e7ee !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: var(--stbbs-navy) !important;
    box-shadow: 0 5px 18px rgba(7, 29, 73, .08);
    cursor: pointer;
    transition: .2s ease;
}

.stbbs-arrow:hover:not(:disabled) {
    background: var(--stbbs-navy) !important;
    border-color: var(--stbbs-navy) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

.stbbs-arrow:disabled {
    opacity: .35;
    cursor: default;
}

.stbbs-arrow span {
    font-family: Arial, sans-serif;
    font-size: 31px;
    line-height: 1;
    font-weight: 300;
    margin-top: -3px;
}

/*
 * Native horizontal scroller.
 * This is deliberate: mobile browsers handle touch scrolling themselves,
 * and the anchor is never intercepted by JavaScript.
 */
.stbbs-track-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

.stbbs-track-wrap::-webkit-scrollbar {
    display: none;
}

.stbbs-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    width: max-content;
    padding: 0 2px 8px;
}

.stbbs-card {
    position: relative;
    flex: 0 0 calc((min(1440px, calc(100vw - 40px)) - 64px) / 5);
    width: calc((min(1440px, calc(100vw - 40px)) - 64px) / 5);
    height: 410px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--stbbs-navy);
    box-shadow: 0 9px 24px rgba(7, 29, 73, .12);
    scroll-snap-align: start;
}

.stbbs-card-link {
    position: absolute !important;
    inset: 0 !important;
    z-index: 10 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    color: #fff !important;
    text-decoration: none !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

.stbbs-card-media {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    background: linear-gradient(145deg, var(--stbbs-navy), var(--stbbs-navy-2));
    pointer-events: none;
}

.stbbs-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .55s ease;
    pointer-events: none;
}

.stbbs-no-image {
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, var(--stbbs-navy), var(--stbbs-navy-2));
}

.stbbs-card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0) 20%,
        rgba(0,0,0,.08) 38%,
        rgba(0,0,0,.74) 76%,
        rgba(0,0,0,.95) 100%
    );
    pointer-events: none;
}

.stbbs-card-content {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 25px 21px 19px;
    pointer-events: none;
}

.stbbs-card:hover .stbbs-card-media img {
    transform: scale(1.045);
}

.stbbs-card-content h3 {
    display: -webkit-box;
    margin: 0 0 14px !important;
    padding: 0 !important;
    overflow: hidden;
    color: #fff !important;
    font-family: inherit !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    line-height: 1.27 !important;
    letter-spacing: -.2px !important;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.stbbs-date {
    display: flex;
    align-items: center;
    gap: 7px;
    color: rgba(255,255,255,.94) !important;
    font-family: inherit !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
}

.stbbs-date svg {
    flex: 0 0 auto;
}

.stbbs-excerpt {
    margin: 10px 0 0 !important;
    color: rgba(255,255,255,.82) !important;
    font-family: inherit !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
}

.stbbs-card-link:focus-visible {
    outline: 3px solid var(--stbbs-gold);
    outline-offset: -3px;
    border-radius: 12px;
}

/* Tablet */
@media (max-width: 1200px) {
    .stbbs-card {
        flex-basis: calc((100vw - 72px) / 3);
        width: calc((100vw - 72px) / 3);
    }
}

@media (max-width: 800px) {
    .stbbs-section {
        padding: 30px 0 38px;
    }

    .stbbs-container {
        width: calc(100% - 28px);
    }

    .stbbs-heading {
        align-items: center;
        margin-bottom: 18px;
    }

    .stbbs-title {
        font-size: 25px !important;
    }

    .stbbs-title-line {
        width: 4px;
        flex-basis: 4px;
        height: 31px;
    }

    .stbbs-subtitle {
        margin-top: 7px !important;
        font-size: 13px !important;
    }

    .stbbs-arrow {
        width: 43px;
        height: 43px;
    }

    .stbbs-card {
        flex-basis: calc((100vw - 44px) / 2);
        width: calc((100vw - 44px) / 2);
        height: 350px;
        border-radius: 11px;
    }
}

/* Mobile */
@media (max-width: 560px) {
    .stbbs-section {
        padding: 26px 0 32px;
    }

    .stbbs-container {
        width: calc(100% - 24px);
    }

    .stbbs-heading {
        gap: 10px;
        margin-bottom: 15px;
    }

    .stbbs-title {
        gap: 10px;
        font-size: 22px !important;
        letter-spacing: -.3px !important;
    }

    .stbbs-title-line {
        height: 25px;
    }

    .stbbs-subtitle {
        margin-left: 14px !important;
        font-size: 12px !important;
    }

    .stbbs-controls {
        gap: 6px;
    }

    .stbbs-arrow {
        width: 38px;
        height: 38px;
    }

    .stbbs-arrow span {
        font-size: 25px;
    }

    .stbbs-track {
        gap: 10px;
        padding-bottom: 5px;
    }

    /* One large card + visible next-card peek */
    .stbbs-card {
        flex-basis: calc(86vw - 10px);
        width: calc(86vw - 10px);
        height: 350px;
        border-radius: 10px;
        scroll-snap-align: start;
    }

    .stbbs-card-content {
        padding: 20px 16px 16px;
    }

    .stbbs-card-content h3 {
        font-size: 18px !important;
        line-height: 1.24 !important;
        margin-bottom: 12px !important;
    }

    .stbbs-date {
        font-size: 12px !important;
    }
}

@media (max-width: 360px) {
    .stbbs-title {
        font-size: 20px !important;
    }

    .stbbs-card {
        height: 330px;
    }

    .stbbs-card-content h3 {
        font-size: 17px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .stbbs-track-wrap,
    .stbbs-card-media img,
    .stbbs-arrow {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
