
/* =========================================
   BIZSOFT - PRODUCT MODULES
   CENTRALIZED PREMIUM CORPORATE CAROUSEL
   ========================================= */

.product-modules {
    padding: 45px 0;
    background: #ffffff;
}

.product-modules .section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.product-modules .section-header > div:first-child {
    flex: 1;
    min-width: 0;
}


/* =========================================
   SINGLE ROW - SIX VISIBLE MODULES
   ========================================= */

.product-modules .modules-horizontal-scroll {
    --visible-modules: 6;
    --module-gap: 14px;

    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;

    gap: var(--module-gap);

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 8px 0 16px;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;

    overscroll-behavior-x: contain;

    scrollbar-width: none;
    -ms-overflow-style: none;

    counter-reset: module-counter;
}

.product-modules
.modules-horizontal-scroll::-webkit-scrollbar {
    display: none;
}


/* =========================================
   PREMIUM MODULE CARD
   ========================================= */

.product-modules .m-card {
    position: relative;

    isolation: isolate;

    counter-increment: module-counter;

    flex: 0 0 calc(
        (100% - (var(--visible-modules) - 1)
        * var(--module-gap)) / var(--visible-modules)
    );

    display: flex;
    flex-direction: column;

    align-items: flex-start;
    justify-content: flex-start;

    width: auto;
    min-width: 0;
    max-width: none;

    height: auto;
    min-height: 185px;

    margin: 0;
    padding: 14px;

    gap: 10px;

    background: linear-gradient(
        180deg,
        #edf3fa 0,
        #f5f8fc 72px,
        #ffffff 72px,
        #ffffff 100%
    );

    border: 1px solid #dfe7ef;
    border-radius: 12px;

    text-align: left;
    box-sizing: border-box;

    overflow: hidden;

    scroll-snap-align: start;

    box-shadow:
        0 4px 12px rgba(0, 31, 63, 0.045);

    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s ease;
}


/* =========================================
   DECORATIVE CARD BACKGROUND
   ========================================= */

.product-modules .m-card::before {
    content: '';

    position: absolute;

    top: -55px;
    right: -55px;

    width: 125px;
    height: 125px;

    border: 18px solid rgba(40, 125, 206, 0.05);
    border-radius: 50%;

    background: transparent;

    pointer-events: none;
    z-index: -1;

    transition:
        transform 0.3s ease,
        border-color 0.3s ease;
}


/* =========================================
   AUTOMATIC MODULE NUMBERING
   ========================================= */

.product-modules .m-card::after {
    content: counter(
        module-counter,
        decimal-leading-zero
    );

    position: absolute;

    top: 18px;
    right: 14px;

    color: #8fa3b8;

    font-size: 12px;
    font-weight: 600;

    letter-spacing: 1px;
    line-height: 1;

    pointer-events: none;

    transition: color 0.3s ease;
}


/* =========================================
   MODULE ICON
   Preserve existing individual colours
   ========================================= */

.product-modules .m-icon {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;
    min-width: 46px;

    flex-shrink: 0;

    padding: 0;
    margin: 0 0 8px;

    border-radius: 11px;

    font-size: 20px;

    box-shadow:
        0 4px 10px rgba(0, 31, 63, 0.06);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.product-modules .m-icon i {
    margin: 0;
    font-size: 20px;
}


/* =========================================
   MODULE TITLE
   ========================================= */

.product-modules .m-card h4 {
    position: relative;

    width: 100%;

    margin: 0;
    padding: 0 0 7px;

    color: var(--dark-navy, #001f3f);

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    line-height: 1.45;

    text-align: left;
    overflow-wrap: anywhere;

    transition: color 0.3s ease;
}


/* =========================================
   SIGNATURE BLUE ACCENT
   ========================================= */

.product-modules .m-card h4::after {
    content: '';

    position: absolute;

    left: 0;
    bottom: 0;

    width: 23px;
    height: 2px;

    background: var(--primary, #287dce);

    border-radius: 5px;

    opacity: 0.75;

    transition:
        width 0.3s ease,
        background 0.3s ease;
}


/* =========================================
   MODULE DESCRIPTION
   ========================================= */

.product-modules .m-card p {
    position: relative;

    width: 100%;

    margin: 0;
    padding: 0;

    color: var(--text-muted, #64748b);

    font-family: inherit;
    font-size: 12px;
    font-weight: 400;

    line-height: 1.65;

    text-align: left;
    overflow-wrap: anywhere;

    transition: color 0.3s ease;
}


/* =========================================
   PREMIUM NAVY HOVER EFFECT
   ========================================= */

@media (hover: hover) {

    .product-modules .m-card:hover {
        background: linear-gradient(
            145deg,
            #001f3f 0%,
            #07365f 100%
        );

        border-color: #164b78;

        transform: translateY(-4px);

        box-shadow:
            0 10px 22px rgba(0, 31, 63, 0.15);
    }

    .product-modules .m-card:hover::before {
        border-color: rgba(255, 255, 255, 0.07);
        transform: scale(1.2);
    }

    .product-modules .m-card:hover::after {
        color: #8eb3d7;
    }

    .product-modules .m-card:hover .m-icon {
        transform: translateY(-2px);
    }

    .product-modules .m-card:hover h4 {
        color: #ffffff;
    }

    .product-modules .m-card:hover p {
        color: #c4d5e7;
    }

    .product-modules .m-card:hover h4::after {
        width: 42px;
        background: #60a5fa;
        opacity: 1;
    }
}


/* =========================================
   CAROUSEL NAVIGATION
   ========================================= */

.product-modules .modules-nav {
    display: flex;
    align-items: center;

    gap: 7px;

    flex-shrink: 0;
}

.product-modules .modules-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    padding: 0;

    background: #f0f5fc;
    color: var(--primary, #287dce);

    border: 1px solid #dce6f2;
    border-radius: 50%;

    font-size: 12px;

    cursor: pointer;

    transition: all 0.25s ease;
}

.product-modules .modules-nav-btn:hover {
    background: var(--primary, #287dce);
    color: #ffffff;
    border-color: var(--primary, #287dce);
}

.product-modules .modules-nav-btn:focus-visible,
.product-modules .modules-dot:focus-visible {
    outline: 2px solid var(--primary, #287dce);
    outline-offset: 3px;
}


/* =========================================
   PAGINATION INDICATORS
   ========================================= */

.product-modules .modules-pagination {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap: 5px;

    margin-top: 5px;
}

.product-modules .modules-dot {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 16px;
    height: 24px;

    padding: 0;

    background: transparent;

    border: 0;

    cursor: pointer;
}

.product-modules .modules-dot::before {
    content: '';

    width: 6px;
    height: 6px;

    background: #d0d9e5;

    border-radius: 10px;

    transition:
        background 0.25s ease,
        width 0.25s ease;
}

.product-modules .modules-dot.active {
    width: 27px;
}

.product-modules .modules-dot.active::before {
    width: 22px;
    background: var(--primary, #287dce);
}

.product-modules .modules-nav[hidden],
.product-modules .modules-pagination[hidden] {
    display: none;
}


/* =========================================
   SMALL DESKTOP - FIVE CARDS
   ========================================= */

@media (max-width: 1199px) {

    .product-modules .modules-horizontal-scroll {
        --visible-modules: 5;
        --module-gap: 12px;
    }
}


/* =========================================
   TABLET - FOUR CARDS
   ========================================= */

@media (max-width: 992px) {

    .product-modules {
        padding: 35px 0;
    }

    .product-modules .modules-horizontal-scroll {
        --visible-modules: 4;
        --module-gap: 10px;
    }

    .product-modules .m-card {
        min-height: 175px;
        padding: 13px;
        gap: 9px;
    }

    .product-modules .m-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;

        margin-bottom: 6px;
    }
}


/* =========================================
   SMALL TABLET - THREE CARDS
   ========================================= */

@media (max-width: 767px) {

    .product-modules .modules-horizontal-scroll {
        --visible-modules: 3;
    }

    .product-modules .section-header {
        align-items: center;
        gap: 12px;
    }
}


/* =========================================
   MOBILE - TWO CARDS
   ========================================= */

@media (max-width: 576px) {

    .product-modules {
        padding: 30px 0;
    }

    .product-modules .section-header {
        flex-wrap: wrap;
        margin-bottom: 16px;
    }

    .product-modules .section-header > div:first-child {
        flex-basis: 100%;
    }

    .product-modules .modules-nav {
        margin-left: auto;
    }

    .product-modules .modules-horizontal-scroll {
        --visible-modules: 2;
        --module-gap: 10px;
    }

    .product-modules .m-card {
        min-height: 170px;

        padding: 12px;

        gap: 9px;

        border-radius: 10px;

        background: linear-gradient(
            180deg,
            #edf3fa 0,
            #f5f8fc 62px,
            #ffffff 62px,
            #ffffff 100%
        );
    }

    .product-modules .m-icon {
        width: 38px;
        height: 38px;
        min-width: 38px;

        margin-bottom: 5px;

        border-radius: 9px;
    }

    .product-modules .m-icon i {
        font-size: 17px;
    }

    .product-modules .m-card h4 {
        font-size: 12px;
    }

    .product-modules .m-card p {
        font-size: 11.5px;
    }

    .product-modules .modules-nav-btn {
        width: 38px;
        height: 38px;
    }
}


/* =========================================
   EXTRA SMALL MOBILE - ONE CARD
   ========================================= */

@media (max-width: 360px) {

    .product-modules .modules-horizontal-scroll {
        --visible-modules: 1;
    }

    .product-modules .m-card {
        min-height: 155px;
        padding: 14px;
    }

    .product-modules .m-card h4 {
        font-size: 14px;
    }

    .product-modules .m-card p {
        font-size: 12px;
    }
}


/* =========================================
   REDUCED MOTION ACCESSIBILITY
   ========================================= */

@media (prefers-reduced-motion: reduce) {

    .product-modules .modules-horizontal-scroll {
        scroll-behavior: auto;
    }

    .product-modules .m-card,
    .product-modules .m-card::before,
    .product-modules .m-card::after,
    .product-modules .m-icon,
    .product-modules .m-card h4::after,
    .product-modules .modules-dot::before {

        transition: none !important;
        transform: none !important;
    }
}
