/*
 * Page: Home News Premium Slider
 * Version: 7.2
 * Target: .home-news
 *
 * Fix:
 * - Glass blur arrows with font icon.
 * - Arrow row aligned with bottom More row.
 * - Keep the original More button padding and colors.
 * - Default thumbnail is grayscale and shows roughly half.
 * - Hover thumbnail becomes full-color and shows more image height.
 * - Image stays below the text and does not cover the text.
 */

.home-news {
    --home-news-theme: #0d0b52;
    --home-news-bg: #f2f3f5;
    --home-news-text: #202428;
    --home-news-muted: #9a9da5;

    position: relative;
    overflow: hidden;

    padding-top: 54px !important;
    padding-bottom: 74px !important;

    background: var(--home-news-bg) !important;
}

.home-news .section-bg {
    background: var(--home-news-bg) !important;
}

.home-news .section-bg-overlay {
    display: none !important;
}

.home-news::before {
    content: "";

    position: absolute;
    left: -190px;
    bottom: -300px;
    z-index: 1;

    width: 430px;
    height: 620px;

    border-radius: 260px 260px 0 0;

    background: var(--home-news-theme);

    opacity: 0.96;

    transform: rotate(-28deg);

    pointer-events: none;
}

.home-news .section-content {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: none !important;
}

/* Title: keep clean, no decorative pseudo elements. */
.home-news .big-title {
    margin-bottom: 18px !important;
}

.home-news .big-title h2 {
    margin-bottom: 0 !important;

    color: var(--home-news-theme) !important;

    font-size: clamp(28px, 2vw, 38px) !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    letter-spacing: -0.03em;
}


/* Layout. */
.home-news .section-content > .row {
    max-width: none !important;
}

.home-news .section-content > .row:nth-child(2) {
    margin-right: 0 !important;
    margin-left: 0 !important;
}

.home-news .section-content > .row:nth-child(2) > .col {
    padding-right: 0 !important;
    padding-left: 0 !important;
}

.home-news .row-slider {
    --home-news-nav-left: clamp(40px, 23vw, 460px);

    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 18px 5.2vw 94px !important;

    overflow: visible !important;
}

.home-news .flickity-viewport {
    overflow: visible !important;
}

.home-news .flickity-slider {
    display: block !important;
}

/* PC: about 4 cards visible. */
.home-news .post-item {
    width: 25% !important;

    padding-right: 8px !important;
    padding-left: 8px !important;
}

/* Card. */
.home-news .post-item .col-inner {
    height: 100%;
}

.home-news .post-item .box-blog-post {
    position: relative;

    height: 442px;

    overflow: hidden;

    border-radius: 12px;

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.98) 0%,
            rgba(255, 255, 255, 0.94) 52%,
            rgba(255, 255, 255, 0.84) 100%
        );

    box-shadow: none !important;

    transition:
        transform 0.34s ease,
        box-shadow 0.34s ease;
}

.home-news .post-item .box-blog-post:hover {
    transform: translateY(-5px);

    box-shadow:
        0 22px 56px rgba(13, 11, 82, 0.10) !important;
}

/* Image area always stays below text. */
.home-news .post-item .box-image {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;

    width: 100%;
    height: 48%;

    margin: 0 !important;

    overflow: hidden;

    opacity: 0.62;

    background: #ffffff;

    transition:
        height 0.44s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.3s ease;
}

/* Soft haze above thumbnail. */
.home-news .post-item .box-image::before {
    content: "";
    position: absolute;
    top: -80px;
    right: 0;
    left: 0;
    z-index: 3;
    height: 79%;
    background: linear-gradient(180deg, rgb(255 255 255 / 59%) 0%, rgb(255 255 255) 56%, rgba(255, 255, 255, 0) 100%);
    opacity: 1;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.home-news .post-item .image-cover {
    width: 100% !important;
    height: 100% !important;

    padding-top: 0 !important;

    background: transparent !important;
}

.home-news .post-item .image-cover a {
    display: block !important;

    width: 100% !important;
    height: 100% !important;
}

/*
 * Default:
 * - grayscale
 * - no side gaps
 * - shifted downward, so only about half of the thumbnail is visible
 */
.home-news .post-item .image-cover img {
    position: absolute !important;
    inset: 0 !important;

    display: block;

    width: 100% !important;
    height: 100% !important;

    object-fit: cover !important;
    object-position: center center !important;

    opacity: 1 !important;

    filter:
        grayscale(100%)
        saturate(0%)
        brightness(1.04);

    transform:
        translateY(7%)
        scale(1.06) !important;

    transition:
        transform 0.46s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.3s ease !important;
}

/*
 * Hover:
 * The image area becomes higher, and the image slides up.
 * Keep cover to avoid left/right blank space.
 */
.home-news .post-item .box-blog-post:hover .box-image {
    height: 62%;
    opacity: 0.98;
}

.home-news .post-item .box-blog-post:hover .box-image::before {
    opacity: 0.12;
}

.home-news .post-item .box-blog-post:hover .image-cover img {
    object-fit: cover !important;
    object-position: center center !important;

    filter:
        grayscale(0%)
        saturate(100%)
        brightness(1);

    transform:
        translateY(0)
        scale(1.01) !important;
}

/* Text stays above image. */
.home-news .post-item .box-text {
    position: relative;
    z-index: 5;

    min-height: 38%;

    padding: 32px 34px 18px !important;

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.98) 0%,
            rgba(255, 255, 255, 0.94) 64%,
            rgba(255, 255, 255, 0) 100%
        ) !important;
}

.home-news .post-item .box-text-inner {
    display: flex;
    flex-direction: column;
}

.home-news .post-item .post-meta {
    order: 1;

    margin-bottom: 20px !important;

    color: var(--home-news-muted) !important;

    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
}

.home-news .post-item .post-title {
    order: 2;

    margin: 0 !important;
}

.home-news .post-item .post-title a {
    display: -webkit-box;

    overflow: hidden;

    color: var(--home-news-text) !important;

    font-size: clamp(20px, 1.14vw, 24px) !important;
    font-weight: 300 !important;
    line-height: 1.22 !important;
    letter-spacing: -0.04em;

    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.home-news .post-item .from_the_blog_excerpt {
    display: none !important;
}

/* Glass blur arrows with font icons. */
.home-news .flickity-prev-next-button {
    top: auto !important;
    bottom: 12px !important;
    z-index: 20 !important;

    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    width: 58px !important;
    height: 58px !important;

    border: 1px solid rgba(255, 255, 255, 0.68) !important;
    border-radius: 50% !important;

    background: rgba(255, 255, 255, 0.72) !important;
    color: #111820 !important;

    box-shadow:
        0 14px 36px rgba(13, 11, 82, 0.10) !important;

    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);

    opacity: 1 !important;
    visibility: visible !important;

    transform: none !important;

    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.home-news .flickity-prev-next-button.previous {
    left: var(--home-news-nav-left) !important;
    right: auto !important;
}

.home-news .flickity-prev-next-button.next {
    left: calc(var(--home-news-nav-left) + 72px) !important;
    right: auto !important;
}

.home-news .flickity-prev-next-button:hover {
    background: rgba(255, 255, 255, 0.96) !important;
    color: var(--home-news-theme) !important;

    box-shadow:
        0 18px 44px rgba(13, 11, 82, 0.16) !important;

    transform: translateY(-2px) !important;
}

.home-news .flickity-prev-next-button svg,
.home-news .flickity-prev-next-button .flickity-button-icon {
    display: none !important;
}

.home-news .flickity-prev-next-button i {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    color: inherit;

    font-size: 28px;
    font-style: normal;
    line-height: 1;
}


/* v7.2: Strong RemixIcon arrow override. */
.home-news .flickity-prev-next-button .flickity-button-icon,
.home-news .flickity-prev-next-button svg,
.home-news .flickity-prev-next-button path {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.home-news .flickity-prev-next-button i.ri-arrow-left-s-line,
.home-news .flickity-prev-next-button i.ri-arrow-right-s-line {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    width: 100% !important;
    height: 100% !important;

    color: inherit !important;

    font-size: 28px !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: 1 !important;

    opacity: 1 !important;
    visibility: visible !important;

    pointer-events: none !important;
}

/*
 * If the JS is delayed and Flickity's original SVG is still present,
 * show a temporary text fallback instead of a blank circle.
 */
.home-news .flickity-prev-next-button:not(:has(i))::before {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    color: inherit;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 32px;
    font-weight: 400;
    line-height: 1;
}

.home-news .flickity-prev-next-button.previous:not(:has(i))::before {
    content: "‹";
}

.home-news .flickity-prev-next-button.next:not(:has(i))::before {
    content: "›";
}


.home-news .flickity-page-dots {
    display: none !important;
}

/* Counter. */
.home-news .dak-home-news-counter {
    position: absolute;
    top: 70px;
    right: 5.6vw;
    z-index: 8;

    display: inline-flex;
    align-items: flex-start;
    gap: 8px;

    color: #15191d;

    font-size: 34px;
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.04em;

    pointer-events: none;
}

.home-news .dak-home-news-counter-current {
    color: #15191d;

    font-weight: 600;
}

.home-news .dak-home-news-counter-total,
.home-news .dak-home-news-counter-slash {
    color: rgba(21, 25, 29, 0.58);

    font-weight: 300;
}

/* Bottom row: keep the original button padding and colors. */
.home-news .section-content > .row:last-child {
    position: relative;
    z-index: 5;

    width: 100% !important;
    max-width: none !important;

    margin-top: -56px !important;
    margin-right: 0 !important;
    margin-left: 0 !important;

    padding-right: 5.2vw !important;
    padding-left: 5.2vw !important;
}

.home-news .section-content > .row:last-child .col-inner {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.home-news .section-content > .row:last-child .col-inner::before {
    content: "";

    position: absolute;
    top: 50%;
    left: clamp(500px, 36vw, 680px);
    right: 138px;

    border-top: 1px dashed rgba(17, 24, 32, 0.34);

    transform: translateY(-50%);
}

/* Do not change button padding/background/color. Only keep it above the line. */
.home-news .section-content > .row:last-child .button {
    position: relative;
    z-index: 2;
}

/* Tablet. */
@media (max-width: 849px) {
    .home-news {
        padding-top: 50px !important;
        padding-bottom: 70px !important;
    }

    .home-news::before {
        left: -230px;
        bottom: -300px;

        opacity: 0.78;
    }

    .home-news .row-slider {
        padding:
            16px
            24px
            88px !important;
    }

    .home-news .post-item {
        width: 54% !important;
    }

    .home-news .post-item .box-blog-post {
        height: 410px;
    }

    .home-news .post-item .box-text {
        padding: 30px 28px 18px !important;
    }

    .home-news .post-item .post-title a {
        font-size: 22px !important;
    }

    .home-news .dak-home-news-counter {
        top: 62px;
        right: 28px;

        font-size: 30px;
    }

    .home-news .flickity-prev-next-button {
        width: 52px !important;
        height: 52px !important;
        bottom: 36px !important;
    }

    .home-news .flickity-prev-next-button.previous {
        left: 24px !important;
    }

    .home-news .flickity-prev-next-button.next {
        left: 88px !important;
    }

    .home-news .section-content > .row:last-child {
        margin-top: -56px !important;

        padding-right: 24px !important;
        padding-left: 24px !important;
    }

    .home-news .section-content > .row:last-child .col-inner::before {
        left: 154px;
        right: 116px;
    }
}

/* Mobile. */
@media (max-width: 549px) {
    .home-news {
        padding-top: 42px !important;
        padding-bottom: 62px !important;
    }

    .home-news::before {
        left: -265px;
        bottom: -320px;

        width: 400px;
        height: 580px;
    }

    .home-news .big-title {
        margin-bottom: 14px !important;
    }

    .home-news .row-slider {
        padding:
            12px
            18px
            82px !important;
    }

    .home-news .post-item {
        width: 84% !important;

        padding-right: 6px !important;
        padding-left: 6px !important;
    }

    .home-news .post-item .box-blog-post {
        height: 375px;

        border-radius: 12px;
    }

    .home-news .post-item .box-text {
        padding: 24px 20px 16px !important;
    }

    .home-news .post-item .post-meta {
        margin-bottom: 16px !important;

        font-size: 12px !important;
    }

    .home-news .post-item .post-title a {
        font-size: 20px !important;
        line-height: 1.24 !important;
    }

    .home-news .dak-home-news-counter {
        top: 52px;
        right: 18px;

        font-size: 24px;
    }

    .home-news .flickity-prev-next-button {
        width: 48px !important;
        height: 48px !important;
    }

    .home-news .flickity-prev-next-button.previous {
        left: 18px !important;
    }

    .home-news .flickity-prev-next-button.next {
        left: 74px !important;
    }

    .home-news .section-content > .row:last-child {
        margin-top: -54px !important;

        padding-right: 18px !important;
        padding-left: 18px !important;
    }

    .home-news .section-content > .row:last-child .col-inner::before {
        left: 130px;
        right: 104px;
    }
}