/*--------------------------------------------------------------
 * Sliding Content Widget — Nordic Elementor
 *------------------------------------------------------------*/

/* ── Swiper base rules (not loaded by Elementor for custom widgets) ── */
.nordic-sc-swiper.swiper {
    overflow: hidden;
}

.nordic-sc-swiper .swiper-wrapper {
    display: flex;
    flex-direction: row;
    box-sizing: content-box;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

.nordic-sc-swiper .swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
    transition-property: transform;
    display: block;
}

:root {
    --nsc-arrow-color: #ffffff;
    --nsc-arrow-bg: #000000;
    --nsc-dot-color: transparent;
    --nsc-dot-border: #ff0000;
    --nsc-dot-active: #ff0000;
}

.nordic-sc-container {
    position: relative;
    width: 100%;
}

.nordic-sc-swiper {
    position: relative;
    overflow: hidden;
    padding-bottom: 20px;
    /* space for potential dots */
}

.nordic-sc__card {
    background-color: #F8F3EA;
    /* warm cream background */
    border-radius: 20px;
    padding: 32px;
    height: 100%;
    box-sizing: border-box;
}

.nordic-sc__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr auto;
    gap: 0 40px;
}

/* ── Typography & Elements ────────────────────────────────── */
.nordic-sc__subtitle {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #333;
    margin-bottom: 8px;
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.nordic-sc__title {
    font-size: 32px;
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
    color: #000;
    margin-bottom: 16px;
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

.nordic-sc__desc {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 24px;
    grid-column: 2 / 3;
    grid-row: 3 / 4;
}

.nordic-sc__desc p {
    margin: 0 0 1em;
}

.nordic-sc__desc p:last-child {
    margin-bottom: 0;
}

.nordic-sc__button {
    grid-column: 2 / 3;
    grid-row: 4 / 5;
    align-self: end;
}

.nordic-sc__btn {
    display: inline-block;
    background-color: #ff0033;
    /* red boka button */
    color: #ffffff;
    font-weight: 800;
    font-size: 16px;
    padding: 14px 28px;
    border-radius: 30px;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.2s;
}

.nordic-sc__btn a {
    color: #ffffff;
}

.nordic-sc__btn:hover {
    background-color: #cc0029;
    color: #ffffff;
}

.nordic-sc__image {
    grid-column: 1 / 2;
    grid-row: 1 / 5;
    border-radius: 16px;
    overflow: hidden;
}

.nordic-sc__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 4 / 3;
}

/* ── Navigation Arrows ───────────────────────────────────── */
.nordic-sc-nav {
    width: 48px;
    height: 48px;
    background-color: var(--nsc-arrow-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    cursor: pointer;
}

.nordic-sc-container .swiper-button-prev,
.nordic-sc-container .swiper-button-next {
    color: var(--nsc-arrow-color);
}

.nordic-sc-container .swiper-button-prev:after {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    border-top: 2px solid var(--nsc-arrow-color);
    border-left: 2px solid var(--nsc-arrow-color);
    transform: rotate(-45deg);
    margin-left: 4px;
}

.nordic-sc-container .swiper-button-next:after {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    border-top: 2px solid var(--nsc-arrow-color);
    border-right: 2px solid var(--nsc-arrow-color);
    transform: rotate(45deg);
    margin-right: 4px;
}

.nordic-sc-nav:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Align arrows: next is outside card, prev (if we want it) outside left */
.nordic-sc-container .swiper-button-next {
    right: -24px;
}

.nordic-sc-container .swiper-button-prev {
    left: -24px;
}

/* ── Pagination Dots ─────────────────────────────────────── */
.nordic-sc-dots.swiper-pagination-bullets {
    position: absolute;
    bottom: -30px;
    /* place below card */
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    padding-top: 20px;
}

.nordic-sc-dots .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background-color: var(--nsc-dot-color);
    border: 1px solid var(--nsc-dot-border);
    border-radius: 50%;
    opacity: 1;
    margin: 0 6px !important;
    cursor: pointer;
    display: inline-block;
}

.nordic-sc-dots .swiper-pagination-bullet-active {
    background-color: var(--nsc-dot-active);
    border-color: var(--nsc-dot-active);
}

/* ── Mobile Layout ───────────────────────────────────────── */
@media (max-width: 767px) {
    .nordic-sc__card {
        padding: 24px;
    }

    .nordic-sc__grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto auto;
        gap: 16px 0;
    }

    /* Magic reordering via grid-row */
    .nordic-sc__subtitle {
        grid-column: 1 / 2;
        grid-row: 1;
        margin-bottom: 0;
    }

    .nordic-sc__title {
        grid-column: 1 / 2;
        grid-row: 2;
        font-size: 24px;
    }

    .nordic-sc__image {
        grid-column: 1 / 2;
        grid-row: 3;
        margin-bottom: 8px;
    }

    .nordic-sc__image img {
        aspect-ratio: 16 / 10;
        border-radius: 12px;
    }

    .nordic-sc__desc {
        grid-column: 1 / 2;
        grid-row: 4;
        margin-bottom: 8px;
    }

    .nordic-sc__button {
        grid-column: 1 / 2;
        grid-row: 5;
    }

    .nordic-sc-container .swiper-button-next,
    .nordic-sc-container .swiper-button-prev {
        display: none;
        /* Hide arrows on small screens, rely on swipe + dots */
    }
}