/* =============================================
   KM Posts Slider
   ============================================= */

.km-posts {
    --posts-gap: 20px;
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* =============================================
   Track (slides horizontally)
   ============================================= */

.km-posts__track {
    display: flex;
    gap: var(--posts-gap);
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* =============================================
   Card
   ============================================= */

.km-posts__card {
    flex: 0 0 calc((100% - (var(--posts-visible) - 1) * var(--posts-gap)) / var(--posts-visible));
    min-width: 0;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.km-posts__card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.km-posts__card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    color: inherit !important;
    height: 100%;
}

/* =============================================
   Image
   ============================================= */

.km-posts__card-img {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.km-posts__card-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.km-posts__card:hover .km-posts__card-img img {
    transform: scale(1.05);
}

.km-posts__card-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e0d4, #d4c9b8);
}

/* Badge catégorie */
.km-posts__card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 4px;
    font-family: Lato, sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    z-index: 1;
}

/* =============================================
   Body
   ============================================= */

.km-posts__card-body {
    display: flex;
    flex-direction: column;
    padding: 20px;
    flex: 1;
}

.km-posts__card-date {
    font-family: Lato, sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.km-posts__card-title {
    font-family: 'Arca Majora 3', Lato, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.km-posts__card-excerpt {
    font-family: Lato, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* CTA */
.km-posts__card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: Lato, sans-serif;
    font-size: 14px;
    font-weight: 600;
    margin-top: auto;
    transition: gap 0.2s ease;
}

.km-posts__card:hover .km-posts__card-cta {
    gap: 10px;
}

.km-posts__card-cta svg {
    transition: transform 0.2s ease;
}

.km-posts__card:hover .km-posts__card-cta svg {
    transform: translateX(3px);
}

/* =============================================
   Navigation
   ============================================= */

.km-posts__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}

.km-posts__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    background: none;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
    padding: 0;
}

.km-posts__arrow:hover {
    background: rgba(0, 0, 0, 0.05);
}

.km-posts__arrow:disabled {
    opacity: 0.3;
    cursor: default;
}

.km-posts__arrow:disabled:hover {
    background: none;
}

/* Dots */
.km-posts__dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.km-posts__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d1d1;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}

.km-posts__dot--active {
    background: #BE9E66;
    transform: scale(1.25);
}

/* =============================================
   Responsive - Tablet
   ============================================= */

@media (max-width: 1024px) {
    .km-posts {
        --posts-visible: 2 !important;
    }

    .km-posts__card-title {
        font-size: 15px;
    }
}

/* =============================================
   Responsive - Mobile
   ============================================= */

@media (max-width: 768px) {
    .km-posts {
        --posts-visible: 1 !important;
        --posts-gap: 16px;
    }

    .km-posts__card-body {
        padding: 16px;
    }

    .km-posts__card-title {
        font-size: 14px;
    }

    .km-posts__card-excerpt {
        font-size: 13px;
    }

    .km-posts__nav {
        margin-top: 24px;
    }

    .km-posts__arrow {
        width: 38px;
        height: 38px;
    }
}