.maki-latest-posts {
    box-sizing: border-box;
    margin: 0 auto;
    max-width: 100%;
    padding: var(--maki-lp-padding-top, 0) 0 var(--maki-lp-padding-bottom, 0);
    width: 100%;
}

.maki-latest-posts__inner {
    border-top: none;
    margin-inline: auto;
    max-width: 100%;
    padding-top: 0;
    width: 100%;
}

.maki-latest-posts--has-divider .maki-latest-posts__inner {
    border-top: 1px solid #eceff1;
    padding-top: var(--maki-lp-divider-gap, 48px);
}

.maki-latest-posts__title {
    color: var(--maki-heading-light, #6f4b0e);
    font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.25;
    margin: 0 auto 36px;
    max-width: 100%;
    text-align: center;
    text-transform: uppercase;
}

.maki-latest-posts__grid {
    display: grid;
    gap: 28px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 360px));
    justify-content: center;
    margin-inline: auto;
    max-width: 100%;
    width: 100%;
}

.maki-latest-posts__card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 20px;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.04);
    max-width: 360px;
    overflow: hidden;
    position: relative;
    transition: border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.maki-latest-posts__card::before {
    background: linear-gradient(90deg, var(--maki-brand, #d49a63), rgba(212, 154, 99, 0.25));
    content: "";
    height: 2px;
    inset: 0 0 auto;
    opacity: 0;
    position: absolute;
    transform: scaleX(0);
    transform-origin: left center;
    transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
}

.maki-latest-posts__card:hover,
.maki-latest-posts__card:focus-within {
    border-color: rgba(212, 154, 99, 0.28);
    box-shadow: 0 24px 52px rgba(15, 23, 42, 0.11);
    transform: translateY(-8px);
}

.maki-latest-posts__card:hover::before,
.maki-latest-posts__card:focus-within::before {
    opacity: 1;
    transform: scaleX(1);
}

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

.maki-latest-posts__media {
    overflow: hidden;
    position: relative;
}

.maki-latest-posts__thumb,
.maki-latest-posts__placeholder {
    display: block;
    height: 230px;
    object-fit: cover;
    transform: scale(1);
    transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.maki-latest-posts__placeholder {
    background: linear-gradient(135deg, #e8eaed 0%, #d4d8dc 100%);
}

.maki-latest-posts__card:hover .maki-latest-posts__thumb,
.maki-latest-posts__card:focus-within .maki-latest-posts__thumb {
    transform: scale(1.06);
}

.maki-latest-posts__overlay {
    background: linear-gradient(
        to bottom,
        rgba(8, 12, 18, 0) 0%,
        rgba(8, 12, 18, 0.08) 40%,
        rgba(8, 12, 18, 0.55) 100%
    );
    inset: 0;
    pointer-events: none;
    position: absolute;
    transition: opacity 0.45s ease;
    z-index: 1;
}

.maki-latest-posts__card:hover .maki-latest-posts__overlay,
.maki-latest-posts__card:focus-within .maki-latest-posts__overlay {
    background: linear-gradient(
        to bottom,
        rgba(8, 12, 18, 0.05) 0%,
        rgba(8, 12, 18, 0.18) 40%,
        rgba(8, 12, 18, 0.78) 100%
    );
}

.maki-latest-posts__media-meta {
    backdrop-filter: blur(6px);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    bottom: 16px;
    color: rgba(255, 255, 255, 0.96);
    font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    left: 16px;
    letter-spacing: 0.12em;
    padding: 6px 12px;
    position: absolute;
    text-transform: uppercase;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.35s ease;
    z-index: 2;
}

.maki-latest-posts__card:hover .maki-latest-posts__media-meta,
.maki-latest-posts__card:focus-within .maki-latest-posts__media-meta {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

.maki-latest-posts__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 22px 22px 24px;
}

.maki-latest-posts__card-title {
    color: var(--maki-dark, #262626);
    font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
    font-size: 1.12rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    transition: color 0.3s ease;
}

.maki-latest-posts__card:hover .maki-latest-posts__card-title,
.maki-latest-posts__card:focus-within .maki-latest-posts__card-title {
    color: var(--maki-heading-light, #6f4b0e);
}

.maki-latest-posts__excerpt {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--maki-text, #666e71);
    display: -webkit-box;
    font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    max-height: calc(1.5em * 2);
    overflow: hidden;
}

.maki-latest-posts__read-more {
    align-items: center;
    align-self: flex-start;
    display: inline-flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
    position: relative;
}

.maki-latest-posts__read-more-text {
    color: var(--maki-brand, #d49a63);
    font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    position: relative;
    text-transform: uppercase;
    transition: letter-spacing 0.35s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
}

.maki-latest-posts__read-more-text::after {
    background: currentColor;
    bottom: -4px;
    content: "";
    height: 1px;
    left: 0;
    position: absolute;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.maki-latest-posts__read-more-icon {
    align-items: center;
    background: rgba(212, 154, 99, 0.12);
    border-radius: 50%;
    color: var(--maki-brand, #d49a63);
    display: inline-flex;
    flex-shrink: 0;
    height: 30px;
    justify-content: center;
    transition: background 0.35s ease, color 0.35s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 30px;
}

.maki-latest-posts__read-more-icon svg {
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.maki-latest-posts__card:hover .maki-latest-posts__read-more-text,
.maki-latest-posts__card:focus-within .maki-latest-posts__read-more-text {
    color: var(--maki-heading-light, #6f4b0e);
    letter-spacing: 0.14em;
}

.maki-latest-posts__card:hover .maki-latest-posts__read-more-text::after,
.maki-latest-posts__card:focus-within .maki-latest-posts__read-more-text::after {
    transform: scaleX(1);
}

.maki-latest-posts__card:hover .maki-latest-posts__read-more-icon,
.maki-latest-posts__card:focus-within .maki-latest-posts__read-more-icon {
    background: var(--maki-brand, #d49a63);
    color: #fff;
    transform: translateX(4px);
}

.maki-latest-posts__card:hover .maki-latest-posts__read-more-icon svg,
.maki-latest-posts__card:focus-within .maki-latest-posts__read-more-icon svg {
    transform: translateX(2px);
}

.maki-latest-posts__card-link:focus-visible {
    outline: none;
}

.maki-latest-posts__card-link:focus-visible .maki-latest-posts__content {
    outline: 2px solid var(--maki-brand, #d49a63);
    outline-offset: 4px;
}

.maki-latest-posts__pagination {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 32px;
}

.maki-latest-posts__page {
    background: #fff;
    border: 1px solid #e6eaed;
    border-radius: 10px;
    color: var(--maki-text, #666e71);
    font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
    font-size: 0.92rem;
    min-width: 42px;
    padding: 10px 14px;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.maki-latest-posts__page:hover,
.maki-latest-posts__page.is-active {
    background: var(--maki-brand, #d49a63);
    border-color: var(--maki-brand, #d49a63);
    color: #fff;
}

@media (max-width: 767px) {
    .maki-latest-posts__grid {
        gap: 20px;
        grid-template-columns: minmax(0, 1fr);
        justify-content: stretch;
    }

    .maki-latest-posts__card {
        margin-inline: auto;
        max-width: 420px;
    }

    .maki-latest-posts__title {
        margin-bottom: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .maki-latest-posts__card,
    .maki-latest-posts__card::before,
    .maki-latest-posts__thumb,
    .maki-latest-posts__overlay,
    .maki-latest-posts__media-meta,
    .maki-latest-posts__read-more-text,
    .maki-latest-posts__read-more-text::after,
    .maki-latest-posts__read-more-icon,
    .maki-latest-posts__read-more-icon svg {
        transition: none;
    }

    .maki-latest-posts__card:hover,
    .maki-latest-posts__card:focus-within {
        transform: none;
    }

    .maki-latest-posts__card:hover .maki-latest-posts__thumb,
    .maki-latest-posts__card:focus-within .maki-latest-posts__thumb {
        transform: none;
    }

    .maki-latest-posts__card:hover .maki-latest-posts__read-more-icon,
    .maki-latest-posts__card:focus-within .maki-latest-posts__read-more-icon {
        transform: none;
    }
}
