/* -------------------------------------------------------------------------
 * Template: Landing Card
 * ------------------------------------------------------------------------- */

.ket-home-latest-card {
    flex: 0 0 calc(50% - calc(var(--km-space-lg) / 2));
    min-width: 0;
    scroll-snap-align: start;
    background: #ffffff;
    box-shadow: var(--km-shadow);
}

.ket-home-latest-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.ket-home-latest-box {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    padding: 32px 24px 20px;
    background: var(--km-surface-alt);
    border-radius: var(--km-radius-md);
}

.ket-home-latest-box__title {
    margin: 0 0 40px;
    text-align: center;
    color: var(--km-text-light);
    font-size: clamp(1.25rem, 2.5vw, 2rem);
    line-height: var(--km-line-height-tight);
    font-weight: var(--km-font-semibold);
}

.ket-home-latest-slider {
    position: relative;
    overflow: hidden;
}

.ket-home-latest-slider__track {
    display: flex;
    gap: var(--km-space-lg);
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.ket-home-latest-slider__track::-webkit-scrollbar {
    display: none;
}

.ket-home-latest-slider__arrow {
    position: absolute;
    top: 20%;
    z-index: 2;
    width: 36px;
    height: 64px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    text-shadow:
        0 0 4px rgba(0, 0, 0, 0.8),
        0 0 8px rgba(0, 0, 0, 0.6);
    font-size: 64px;
    line-height: 1;
    cursor: pointer;
}

.ket-home-latest-slider__arrow--prev {
    left: 5px;
}

.ket-home-latest-slider__arrow--next {
    right: 5px;
}

.ket-home-latest-slider__arrow:hover {
    color: var(--km-primary);
}

.ket-home-latest-box__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.ket-home-latest-box__icon-link,
.ket-home-latest-box__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 28px;
    padding: 6px 10px;
    background: var(--km-primary);
    color: #ffffff;
    border: 0;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.ket-home-latest-box__icon-link:hover,
.ket-home-latest-box__button:hover {
    background: var(--km-primary-hover);
    color: #ffffff;
    transform: translateY(-2px);
}

.ket-home-latest-box__icon {
    flex: 0 0 auto;
    line-height: 1;
}

.ket-home-latest-box__empty {
    margin: 0;
    padding: 80px 24px;
    text-align: center;
    color: var(--km-muted);
}

.ket-home-latest-card__image {
    height: 210px;
    background: var(--km-border);
    overflow: hidden;
}

.ket-home-latest-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ket-home-latest-card__content {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
}

.ket-home-latest-card__title {
    margin: 0;
    color: var(--km-text);
    text-align: center;
    font-size: 24px;
    line-height: 1.35;
    font-weight: 400;

    display: -webkit-box;
    display: box;

    -webkit-box-orient: vertical;

    line-clamp: 4;
    -webkit-line-clamp: 4;

    overflow: hidden;
    text-overflow: ellipsis;

    max-height: calc(1.35em * 4);
}

/* -------------------------------------------------------------------------
 * Shared Breakpoints
 * ------------------------------------------------------------------------- */

@media (max-width: 1400px) and (min-width: 1201px) {
    .ket-home-latest-box {
        padding: 28px 22px 20px;
    }

    .ket-home-latest-slider__track {
        gap: 16px;
    }

    .ket-home-latest-card {
        flex: 0 0 calc(50% - 8px);
        min-width: 0;
    }

    .ket-home-latest-card__image {
        height: 210px;
    }

    .ket-home-latest-card__title {
        font-size: 22px;
        line-height: 1.3;
    }
}

 @media (max-width: 1200px) {
    .ket-home-latest-card {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .ket-home-latest-slider__track {
        gap: 0;
    }

    .ket-home-latest-box {
        padding: 28px 20px 20px;
    }

    .ket-home-latest-box__title {
        margin-bottom: 32px;
    }

    .ket-home-latest-card__image {
        height: 190px;
    }

    .ket-home-latest-card__content {
        min-height: 190px;
        padding: 28px 20px;
    }

    .ket-home-latest-card__title {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    .ket-home-latest-slider__track {
        gap: 0;
    }

    .ket-home-latest-card {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .ket-home-latest-box {
        padding: 24px 16px 18px;
    }

    .ket-home-latest-box__title {
        margin-bottom: 28px;
    }

    .ket-home-latest-card__image {
        height: 180px;
    }

    .ket-home-latest-card__content {
        min-height: 160px;
        padding: 28px 18px;
    }

    .ket-home-latest-card__title {
        font-size: 20px;
    }

    .ket-home-latest-box__actions {
        flex-direction: column;
        align-items: stretch;
        justify-content: stretch;
        gap: 10px;
    }

    .ket-home-latest-box__button,
    .ket-home-latest-box__icon-link {
        width: 100%;
        flex: 1 1 100%;
    }
}