/* =============================================================================
   Blog Posts Carousel — fed-avada-elements plugin
   Design source: Figma node 3743-2204 "Blog"
   ============================================================================= */

/* ---- Section ---- */
.fed-bp-section {
    background: #fff;
    padding: 60px 40px 100px;
    box-sizing: border-box;
}
.fed-bp-inner {
    max-width: 1400px;
    margin: 0 auto;
}

/* ---- Section header (title + subtitle) ---- */
.fed-bp-section__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
}
/* Two-class selector (0,2,0) beats Avada element-level heading rules.
   padding-left:0 cancels the 25px Avada injects via fusion-responsive-typography-calculated. */
.fed-bp-section .fed-bp-section__title {
    font-size: 30px !important;
    font-weight: 700 !important;
    color: #425563 !important;
    line-height: 36px !important;
    text-align: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
}
.fed-bp-section .fed-bp-section__subtitle {
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #425563 !important;
    line-height: 26px !important;
    text-align: center !important;
    margin: 0 !important;
    max-width: 900px;
}

/* ---- Carousel wrapper ---- */
.fed-bp-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}
/* overflow-x:clip clips slides horizontally without creating a scroll container.
   Combined with overflow-y:visible, box-shadows render above/below the window
   boundary — unlike overflow-x:hidden which forces overflow-y to auto.
   min-width:0 overrides the default min-width:auto on flex items, which would
   otherwise allow the window to expand to its content's min-content size. */
.fed-bp-carousel__window {
    flex: 1;
    min-width: 0;
    overflow-x: clip;
    overflow-y: visible;
    padding: 0 24px;
    margin: 0 -24px;
}
.fed-bp-carousel__track {
    display: flex;
    gap: 55px;
    transition: transform .35s ease;
    will-change: transform;
}
.fed-bp-carousel__slide {
    flex-shrink: 0;
    min-width: 0;
}

/* Slide widths are set by JavaScript (setWidths) which reads from
   .fed-bp-section — a stable block element unaffected by carousel content. */

/* ---- Nav buttons ---- */
/* Hidden by default; JS adds .fed-bp-carousel--has-nav when navigation is needed.
   Figma design: plain 24 × 24 px arrow icons — no border circle, no fill. */
.fed-bp-carousel__btn {
    flex-shrink: 0;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    /* Slightly larger tap target while keeping the visual footprint of the icon */
    width: 44px !important;
    height: 44px !important;
    cursor: pointer;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    color: #1181C4 !important;
    transition: color .2s;
    padding: 0 !important;
    box-shadow: none !important;
}
.fed-bp-carousel--has-nav .fed-bp-carousel__btn {
    display: flex !important;
}
.fed-bp-carousel__btn:hover {
    color: #0168A6 !important;
    background: none !important;
}
.fed-bp-carousel__btn:disabled {
    opacity: .3;
    cursor: not-allowed;
}
.fed-bp-carousel__btn svg {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
}

/* ---- Blog Post Card ---- */
.fed-bp-card {
    display: flex !important;
    flex-direction: column !important;
    height: 520px;
    background: #fff !important;
    /* Matches fd-card-layouts default: subtle tinted border */
    border: 1px solid rgba(1, 104, 166, 0.3) !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    text-decoration: none !important;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25) !important;
    transition: border-color .2s ease, box-shadow .2s ease;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
.fed-bp-card:hover {
    /* Matches fd-card-layouts hover: border deepens, no transform/shadow change */
    border-color: #0168A6 !important;
    text-decoration: none !important;
}

/* ---- Card image ---- */
.fed-bp-card__img {
    flex-shrink: 0;
    height: 200px;
    overflow: hidden;
}
.fed-bp-card__img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}
/* Placeholder when no image is provided */
.fed-bp-card__img--empty {
    background-color: #D2EAF8;
}

/* ---- Card body ---- */
.fed-bp-card__body {
    flex: 1;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    padding: 20px 21px 25px !important;
    box-sizing: border-box;
}

/* ---- Card title ---- */
.fed-bp-card .fed-bp-card__title,
.fed-bp-card:visited .fed-bp-card__title,
.fed-bp-card:hover .fed-bp-card__title,
.fed-bp-card:active .fed-bp-card__title {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #425563 !important;
    line-height: 26px !important;
    text-decoration: none !important;
    margin: 0 0 20px !important;
    padding: 0 !important;
}

/* ---- Card excerpt ---- */
.fed-bp-card__excerpt {
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #425563 !important;
    line-height: 26px !important;
    /* Clamp to 4 lines (4 × 26px = 104px), matching Figma's h-[104px] on the excerpt */
    display: -webkit-box !important;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
    max-height: 104px;
    margin: 0 0 20px !important;
    padding: 0 !important;
}

/* ---- Card "Read more" link ---- */
/* margin-top:auto pushes read-more to the bottom of the card body,
   regardless of whether the excerpt is present or how long it is. */
.fed-bp-card__read-more {
    display: flex !important;
    align-items: center !important;
    gap: 5px;
    text-decoration: none !important;
    height: 35px;
    margin-top: auto !important;
}
.fed-bp-card__read-more-label {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1181C4 !important;
    line-height: 21px !important;
    text-decoration: none !important;
    white-space: nowrap;
}
.fed-bp-card:hover .fed-bp-card__read-more-label {
    color: #005fa3 !important;
}
.fed-bp-card__read-more svg {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    flex-shrink: 0 !important;
    color: #1181C4 !important;
    stroke: #1181C4 !important;
    display: block !important;
}
.fed-bp-card:hover .fed-bp-card__read-more svg {
    stroke: #005fa3 !important;
    color: #005fa3 !important;
}

/* ---- Bottom bar (dots) ---- */
.fed-bp-bottom-bar {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

/* Dots hidden on desktop; shown via media query at tablet and below */
.fed-bp-carousel__dots { display: none; }

/* ---- CTA Button ---- */
.fed-bp-cta {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}
.fed-bp-cta__btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 55px;
    min-width: 222px;
    padding: 10px 28px !important;
    background: #fff !important;
    border: 2px solid #1181C4 !important;
    border-radius: 36px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 21px !important;
    color: #1181C4 !important;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background .2s, color .2s;
    box-sizing: border-box;
}
.fed-bp-cta__btn:hover {
    background: #1181C4 !important;
    color: #fff !important;
    text-decoration: none !important;
}

/* ---- Responsive ---- */

/* Tablet — 640–1023 px */
@media (max-width: 1023px) {
    .fed-bp-section { padding: 40px 20px 60px; }
    .fed-bp-section__header { margin-bottom: 30px; }
    .fed-bp-section .fed-bp-section__title { font-size: 26px !important; }
    .fed-bp-section .fed-bp-section__subtitle { font-size: 15px !important; }
    .fed-bp-carousel { gap: 10px; }
    .fed-bp-carousel__window { overflow-x: clip; overflow-y: visible; padding: 0 20px; margin: 0 -20px; }
    .fed-bp-carousel__track { gap: 26px; }
    .fed-bp-card .fed-bp-card__title,
    .fed-bp-card:visited .fed-bp-card__title,
    .fed-bp-card:hover .fed-bp-card__title,
    .fed-bp-card:active .fed-bp-card__title { font-size: 20px !important; }
    .fed-bp-card__read-more-label { font-size: 16px !important; }
    /* Hide nav arrow buttons on tablet — dots replace them */
    .fed-bp-carousel--has-nav .fed-bp-carousel__btn { display: none !important; }
    /* Dots */
    .fed-bp-carousel__dots {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 6px;
        flex-wrap: wrap;
    }
    .fed-bp-carousel__dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #1181C4;
        opacity: .3;
        transition: opacity .2s;
        flex-shrink: 0;
    }
    .fed-bp-carousel__dot--active { opacity: 1; }
    .fed-bp-bottom-bar { margin-top: 8px; }
}

/* Phone — up to 639 px */
@media (max-width: 639px) {
    .fed-bp-section { padding: 32px 16px 48px; }
    .fed-bp-section__header { margin-bottom: 24px; }
    .fed-bp-section .fed-bp-section__title { font-size: 22px !important; line-height: 28px !important; }
    .fed-bp-section .fed-bp-section__subtitle { font-size: 14px !important; }
    .fed-bp-carousel { gap: 0; }
    .fed-bp-carousel__window { padding-left: 0 !important; padding-right: 0 !important; margin-left: 0 !important; margin-right: 0 !important; }
    .fed-bp-carousel__track { gap: 16px; }
    /* Strip hover lift on touch screens — prevents compositing-layer flicker */
    .fed-bp-card,
    .fed-bp-card:hover,
    .fed-bp-card:active {
        transition: none !important;
        transform: none !important;
        box-shadow: 0 4px 4px rgba(0, 0, 0, .25) !important;
        will-change: auto !important;
    }
    .fed-bp-card .fed-bp-card__title,
    .fed-bp-card:visited .fed-bp-card__title,
    .fed-bp-card:hover .fed-bp-card__title,
    .fed-bp-card:active .fed-bp-card__title { font-size: 18px !important; }
    .fed-bp-card__read-more-label { font-size: 15px !important; }
    .fed-bp-bottom-bar { margin-top: 20px; }
    .fed-bp-cta__btn { font-size: 16px !important; min-width: 180px; }
}