/* Trip Kemuning homepage image sizing correction
   Overrides legacy slider rules that set 900px min-width, 60px image margins
   and 1.3x center-slide scaling. */

/* Main promo carousel: compact, centered and predictable */
html body .carousel.slider,
html body .carousel.slider .slick-list {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}
html body .carousel.slider .slick-track {
    display: flex !important;
    align-items: center !important;
}
html body .carousel.slider .slider-item {
    box-sizing: border-box !important;
    width: min(82vw, 900px) !important;
    min-width: 0 !important;
    max-width: 900px !important;
    margin: 0 14px !important;
    padding: 10px !important;
}
html body .carousel.slider .slider-item .wrap {
    width: 100% !important;
    max-width: 100% !important;
    height: 340px !important;
    max-height: 340px !important;
    overflow: hidden !important;
    border-radius: 14px !important;
}
html body .carousel.slider .slider-item img,
html body .carousel.slider .slider-item.slick-center img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 340px !important;
    margin: 0 !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
    scale: 1 !important;
    filter: none !important;
    box-shadow: none !important;
    border-radius: 12px !important;
}

/* Gallery: fixed tile height, no oversized images */
html body #tk-gallery-home .tk-gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 16px !important;
    align-items: stretch !important;
}
html body #tk-gallery-home a.tk-gallery-card {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: 190px !important;
    min-height: 0 !important;
    max-height: 190px !important;
    aspect-ratio: auto !important;
    overflow: hidden !important;
    border-radius: 14px !important;
}
html body #tk-gallery-home a.tk-gallery-card img {
    display: block !important;
    width: 100% !important;
    height: 190px !important;
    min-height: 0 !important;
    max-height: 190px !important;
    object-fit: cover !important;
    object-position: center !important;
    margin: 0 !important;
    transform: none !important;
}
html body #tk-gallery-home a.tk-gallery-card:hover img,
html body #tk-gallery-home a.tk-gallery-card:focus img {
    transform: scale(1.03) !important;
}

/* Category thumbnails and promo/info images */
html body .cat-bg {
    max-width: 100% !important;
    overflow: hidden !important;
}
html body section.banner-iklans img,
html body .tk-refresh .tk-article-image,
html body .tk-blog-refresh .tk-blog-img {
    max-height: 230px !important;
    height: 230px !important;
    object-fit: cover !important;
    background-position: center !important;
}

/* Tablet */
@media (max-width: 991px) {
    html body .carousel.slider .slider-item {
        width: 86vw !important;
        max-width: 760px !important;
        margin: 0 8px !important;
    }
    html body .carousel.slider .slider-item .wrap,
    html body .carousel.slider .slider-item img,
    html body .carousel.slider .slider-item.slick-center img {
        height: 280px !important;
        max-height: 280px !important;
    }
    html body #tk-gallery-home .tk-gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
    html body #tk-gallery-home a.tk-gallery-card,
    html body #tk-gallery-home a.tk-gallery-card img {
        height: 175px !important;
        max-height: 175px !important;
    }
}
/* Mobile: short slider and two-column gallery */
@media (max-width: 767px) {
    html body .carousel.slider .slider-item {
        width: 92vw !important;
        max-width: 92vw !important;
        margin: 0 5px !important;
        padding: 5px !important;
    }
    html body .carousel.slider .slider-item .wrap,
    html body .carousel.slider .slider-item img,
    html body .carousel.slider .slider-item.slick-center img {
        height: 210px !important;
        max-height: 210px !important;
    }
    html body #tk-gallery-home .tk-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
    html body #tk-gallery-home a.tk-gallery-card,
    html body #tk-gallery-home a.tk-gallery-card img {
        height: 145px !important;
        max-height: 145px !important;
    }
    html body section.banner-iklans img,
    html body .tk-refresh .tk-article-image,
    html body .tk-blog-refresh .tk-blog-img {
        height: 165px !important;
        max-height: 165px !important;
    }
}
