/* ==========================================================================
   Homepage "Son postlar" — featured post + compact list
   Loaded only by front/index.blade.php and scoped under .latest-posts, so the
   blog pages (which still use .posts .card from app.css) are unaffected.
   ========================================================================== */

.latest-posts {
    --lp-accent: #ff0c00;
    --lp-ink: #232323;
    --lp-body: #55555c;
    --lp-muted: #8a8a92;
    --lp-line: #e8e8ea;
    --lp-soft: #f5f5f5;
}

.latest-posts__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 44px;
    margin-top: 20px; /* matches the homepage heading-to-cards gap (index.css) */
}

/* Only one post (count set to 1 in the panel): the feature takes the row. */
.latest-posts__grid--single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* shared */

.latest-posts__date {
    display: block;
    margin-bottom: 8px;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--lp-muted);
}

.latest-posts a {
    text-decoration: none;
}

/* ------------------------------------------------------------ featured post */

.latest-posts__feature-media {
    display: block;
    overflow: hidden;
    border-radius: 15px;
    background: var(--lp-soft);
    aspect-ratio: 3 / 2;
}

.latest-posts__feature-media img,
.latest-posts__item-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.latest-posts__feature:hover .latest-posts__feature-media img,
.latest-posts__item:hover .latest-posts__item-media img {
    transform: scale(1.04);
}

.latest-posts__feature-body {
    padding-top: 22px;
}

.latest-posts__feature-title {
    margin: 0 0 12px;
    font-size: 25px;
    line-height: 1.3;
    font-weight: 700;
}

.latest-posts__feature-title a {
    color: var(--lp-ink);
    transition: color 0.18s ease;
}

.latest-posts__feature:hover .latest-posts__feature-title a {
    color: var(--lp-accent);
}

.latest-posts__excerpt {
    max-width: 640px;
    margin: 0 0 16px;
    font-size: 15.5px;
    line-height: 1.7;
    color: var(--lp-body);
}

.latest-posts__more {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: var(--lp-accent);
}

.latest-posts__more::after {
    content: "\2192";
    display: inline-block;
    margin-left: 8px;
    transition: transform 0.18s ease;
}

.latest-posts__more:hover {
    color: var(--lp-accent);
}

.latest-posts__more:hover::after {
    transform: translateX(4px);
}

/* ------------------------------------------------------------ compact list */

/*
 * Spread the rows over the full height of the feature beside them, so the
 * two columns end on the same line.
 */
.latest-posts__list {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.latest-posts__item {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--lp-line);
}

.latest-posts__item:first-child {
    padding-top: 0;
}

.latest-posts__item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.latest-posts__item-media {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    background: var(--lp-soft);
    aspect-ratio: 3 / 2;
}

.latest-posts__item-title {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.45;
    font-weight: 600;
}

.latest-posts__item-title a {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--lp-ink);
    transition: color 0.18s ease;
}

.latest-posts__item:hover .latest-posts__item-title a {
    color: var(--lp-accent);
}

/* ----------------------------------------------------------------- footer */

.latest-posts__footer {
    margin: 40px 0 50px;
    text-align: center;
}

.latest-posts__all {
    display: inline-block;
    padding: 11px 30px;
    font-size: 14px;
    font-weight: 600;
    color: var(--lp-ink);
    border: 1px solid var(--lp-line);
    border-radius: 40px;
    transition: color 0.18s ease, border-color 0.18s ease;
}

.latest-posts__all::after {
    content: "\2192";
    margin-left: 8px;
}

.latest-posts__all:hover {
    color: var(--lp-accent);
    border-color: var(--lp-accent);
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 1199px) {
    .latest-posts__grid {
        gap: 32px;
    }

    .latest-posts__item {
        grid-template-columns: 140px minmax(0, 1fr);
        gap: 16px;
    }

    .latest-posts__feature-title {
        font-size: 22px;
    }
}

@media (max-width: 991px) {
    .latest-posts__grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 575px) {
    .latest-posts__grid {
        margin-top: 20px;
    }

    .latest-posts__feature-title {
        font-size: 19px;
    }

    .latest-posts__excerpt {
        font-size: 14.5px;
    }

    .latest-posts__item {
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 14px;
        padding: 14px 0;
    }

    .latest-posts__item-title {
        font-size: 14px;
    }

    .latest-posts__footer {
        margin: 30px 0 40px;
    }
}
