/* Isolated home-page UI. Category class names intentionally avoid legacy theme selectors. */

.home .isaco-category-heading {
    margin: 44px auto 24px;
    text-align: center;
}

.home .isaco-category-heading h2 {
    margin: 0;
    color: #173b91;
    font-size: clamp(24px, 2.3vw, 38px);
    font-weight: 900;
}

.home .isaco-category-heading > span {
    display: block;
    width: 78px;
    height: 3px;
    margin: 15px auto;
    border-radius: 10px;
    background: #f8c806;
}

.home .isaco-category-heading p {
    margin: 0;
    color: #7887a7;
    font-size: 15px;
}

.home-category-section {
    width: min(100%, 1320px);
    margin-inline: auto;
}

.home-category-banner {
    margin-bottom: 22px;
}

.home-category-banner-inner {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: 220px;
    padding: 24px clamp(30px, 8vw, 120px);
    border-radius: 22px;
    background: linear-gradient(105deg, #173b91 0%, #2148a4 58%, #476bc4 100%);
    box-shadow: 0 16px 34px rgba(23, 59, 145, .18);
    overflow: hidden;
}

.home-category-banner-inner::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .22;
    background: radial-gradient(circle at 85% 20%, #fff 1px, transparent 1.5px) 0 0 / 13px 13px;
    -webkit-mask-image: linear-gradient(to left, #000, transparent 48%);
    mask-image: linear-gradient(to left, #000, transparent 48%);
}

.home-category-banner-media {
    flex: 1 1 58%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.home-category-banner-media img {
    display: block;
    width: 100%;
    max-width: 610px;
    height: 190px;
    margin: auto;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 16px 14px rgba(0, 0, 0, .25));
}

.home-category-banner-content {
    flex: 1 1 42%;
    text-align: center;
    color: #fff;
}

.home-category-banner-content h3 {
    margin: 0 0 20px;
    color: #fff;
    font-size: 27px;
    font-weight: 900;
}

.home-category-banner-content a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 185px;
    min-height: 48px;
    padding: 10px 24px;
    border-radius: 13px;
    background: #f8c806;
    color: #173b91;
    font-weight: 900;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.home-category-banner-content a:hover {
    color: #173b91;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .2);
}

.home-category-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}

.home-category-card {
    display: grid;
    grid-template-rows: minmax(124px, 1fr) auto;
    gap: 10px;
    min-width: 0;
    min-height: 194px;
    padding: 14px;
    border: 1px solid #e0e6ef;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(20, 47, 100, .06);
    color: #fff;
    text-align: center;
    text-decoration: none;
    overflow: hidden;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.home-category-card:hover {
    color: #fff;
    border-color: #c9d5eb;
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(20, 47, 100, .11);
}

.home-category-card-media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 124px;
    padding: 6px;
    text-align: center;
}

.home-category-card-media img {
    display: block;
    width: 100%;
    height: 112px;
    max-width: 100%;
    max-height: 112px;
    margin: auto;
    object-fit: contain;
    object-position: center;
}

.home-category-card-title {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 8px 32px;
    border-radius: 13px;
    background: linear-gradient(90deg, #173b91, #294eaa);
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.5;
    text-align: center;
}

.home-category-card-title > span {
    display: block;
    width: 100%;
    color: inherit;
    text-align: center;
    overflow-wrap: anywhere;
}

.home-category-card-title i {
    position: absolute;
    left: 15px;
    color: #f8c806;
    font: normal 24px/1 Arial, sans-serif;
}

.home-category-more {
    margin-top: 20px;
}

.home-category-more[hidden] {
    display: none;
}

.home-category-more-action {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.home-category-more-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 150px;
    min-height: 46px;
    padding: 9px 22px;
    border: 0;
    border-radius: 13px;
    background: #173b91;
    color: #fff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

/* 800×436 slides: preserve the full image on every viewport. */
.home .custom-center-carousel {
    width: min(100%, 1320px) !important;
    max-width: 1320px !important;
    height: auto !important;
    aspect-ratio: auto !important;
    margin: 24px auto 0 !important;
}

.home .carousel-container {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 800 / 436 !important;
    max-height: min(545px, calc(100vh - 180px));
    border-radius: 22px;
}

.home .carousel-item,
.home .carousel-item a {
    width: 100% !important;
    height: 100% !important;
}

.home .carousel-item img {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: contain !important;
    background: #fff;
}

.home .carousel-dots {
    margin-top: 12px !important;
}

.home .carousel-container .nav-btn {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: #173b91;
    font: 32px/1 Arial, sans-serif;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
    transform: translateY(-50%);
    cursor: pointer;
}

.home .carousel-container .nav-btn.prev { right: 18px; }
.home .carousel-container .nav-btn.next { left: 18px; }

@media (max-width: 768px) {
    .home .isaco-category-heading {
        margin: 28px auto 18px;
    }

    .home .isaco-category-heading h2 {
        font-size: 22px;
    }

    .home-category-banner-inner {
        min-height: 156px;
        padding: 12px 14px;
        gap: 5px;
        border-radius: 17px;
    }

    .home-category-banner-media {
        flex-basis: 58%;
        min-height: 132px;
    }

    .home-category-banner-media img {
        height: 132px;
    }

    .home-category-banner-content {
        flex-basis: 42%;
    }

    .home-category-banner-content h3 {
        margin-bottom: 13px;
        font-size: 16px;
    }

    .home-category-banner-content a {
        min-width: 110px;
        min-height: 39px;
        padding: 7px 15px;
        font-size: 12px;
    }

    .home-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .home-category-card {
        grid-template-rows: minmax(94px, 1fr) auto;
        gap: 7px;
        min-height: 154px;
        padding: 10px;
        border-radius: 14px;
    }

    .home-category-card-media {
        min-height: 94px;
        padding: 4px;
    }

    .home-category-card-media img {
        height: 86px;
        max-height: 86px;
    }

    .home-category-card-title {
        min-height: 42px;
        padding: 7px 28px;
        border-radius: 11px;
        font-size: 13px;
    }

    .home-category-card-title i {
        left: 12px;
        font-size: 21px;
    }

    .home .custom-center-carousel,
    .home .carousel-container {
        height: auto !important;
    }

    .home .carousel-container {
        min-height: 0 !important;
        max-height: none;
        border-radius: 14px;
    }

    .home .carousel-item,
    .home .carousel-item a,
    .home .carousel-item img {
        height: 100% !important;
        min-height: 0 !important;
    }

    .home .carousel-container .nav-btn {
        display: none;
    }
}
