/**
 * Flix Theme - Archive Post (Noutati)
 */

.posts-archive__grid-section.section-padding{
    padding: 48px 0 112px 0;
    border-bottom: 1px solid var(--gray-200);
}

.posts-archive {
}

.posts-archive__header {
    text-align: left;
}

.posts-archive__header.section-padding {
    padding: 112px 0 80px 0;
}

.posts-archive__header .page-title {
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 48px;
    line-height: 120%;
    color: #000;
    text-align: left;
}

.posts-archive__toolbar {
    padding: 0;
}

.posts-archive__search {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 560px;
    max-width: 100%;
}

.posts-archive__search-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.posts-archive__search-input {
    width: 100%;
    height: 50px;
    padding: 9px 13px 9px 40px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    background: var(--base-white);
    font-size: 1rem;
    font-family: var(--font-family);
    color: var(--gray-900);
    transition: border-color 0.2s;
}

.posts-archive__search-input::placeholder {
    color: var(--gray-400);
}

.posts-archive__search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--blue-100);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    min-width: 0;
}

/* ================================
   Post Card (project-card-like design)
   ================================ */

.post-card {
    overflow: visible;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 0;
    min-width: 0;
}

.post-card::before {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: 24px;
    background: var(--base-white);
    box-shadow: 0 0 0 0 transparent;
    transition: box-shadow 0.3s;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
}

.post-card:hover::before {
    opacity: 1;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 20px 25px -5px, rgba(0, 0, 0, 0.04) 0px 10px 10px -5px;
}

.post-card__image {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    border: 1px solid var(--gray-300);
    border-radius: 16px;
}

.post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-card__image img {
    transform: scale(1.08);
}

.post-card__content {
    padding: 24px 0px 0px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.post-card__badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.post-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.post-card__badge--category {
    border: 1px solid var(--yellow-300);
    border-radius: 6px;
    padding: 4px 8px;
    background: var(--yellow-50);
    font-family: var(--third-family);
    font-weight: 600;
    font-size: 14px;
    line-height: 150%;
    color: var(--gray-900);
    max-width: 100%;
    overflow-wrap: anywhere;
}

.post-card__badge--category-blog {
    background: var(--gray-50);
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    padding: 4px 8px;
    font-family: var(--third-family);
    font-weight: 600;
    font-size: 14px;
    line-height: 150%;
    color: var(--gray-900);
    max-width: 100%;
    overflow-wrap: anywhere;
}

.post-card__badge--promotion {
    background: var(--yellow-300);
    border: 1px solid var(--yellow-400);
    border-radius: 6px;
    padding: 4px 8px;
    font-family: var(--third-family);
    font-weight: 600;
    font-size: 14px;
    line-height: 150%;
    color: var(--gray-900);
}

.post-card__badge--promotion svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.post-card__badge--date {
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    padding: 4px 8px;
    background: var(--gray-50);
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 14px;
    line-height: 150%;
    color: var(--gray-700);
}

.post-card__badge--date svg {
    width: 16px;
    height: 16px;
}

.post-card__title {
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 20px;
    line-height: 140%;
    color: var(--gray-900);
    margin: 0;
    overflow-wrap: anywhere;
}

.post-card__title a {
    color: inherit;
    text-decoration: none;
}

.post-card__title a:hover {
    color: var(--color-primary);
}

.post-card__excerpt {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.post-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    margin-top: auto;
}

.post-card__link:hover {
    text-decoration: underline;
}

.post-card__link img {
    width: 16px;
    height: 16px;
}

.posts-archive__empty {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--gray-500);
}

.posts-archive .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    margin-top: var(--spacing-2xl);
}

.posts-archive .nav-links a,
.posts-archive .nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 0.5rem;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    text-decoration: none;
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--base-white);
}

.posts-archive .nav-links a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.posts-archive .nav-links .current {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: #eff6ff;
}

.posts-archive .nav-links .dots {
    border: none;
    background: transparent;
}

@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .posts-archive__header.section-padding {
        padding: 48px 0 32px 0;
    }
    .posts-archive__header .page-title {
        font-size: 32px;
    }
    .posts-archive__grid-section.section-padding {
        padding: 48px 0;
    }

    .posts-archive__search {
        width: 100%;
    }

    .posts-archive__search-input {
        height: 48px;
        padding: 10px 12px;
        font-size: 16px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .posts-archive .post-card::before {
        display: none;
    }

    .posts-archive .post-card__image {
        border-radius: 14px;
    }

    .posts-archive .post-card__content {
        padding-top: 16px;
        gap: 10px;
    }

    .posts-archive .post-card__badge--category,
    .posts-archive .post-card__badge--category-blog,
    .posts-archive .post-card__badge--promotion,
    .posts-archive .post-card__badge--date {
        font-size: 13px;
        line-height: 140%;
        padding: 4px 7px;
    }

    .post-card__title {
        font-size: 18px;
        line-height: 145%;
    }

    .posts-archive .post-card__excerpt {
        -webkit-line-clamp: 3;
        font-size: 15px;
        line-height: 155%;
    }

    .posts-archive .post-card__link {
        min-height: 40px;
        padding: 6px 0;
        font-size: 15px;
        align-self: flex-start;
    }

    .posts-archive .nav-links {
        margin-top: 32px;
        gap: 8px;
    }

    .posts-archive .nav-links a,
    .posts-archive .nav-links span {
        min-width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .posts-archive__header.section-padding {
        padding: 40px 0 24px 0;
    }

    .posts-archive__header .page-title {
        font-size: 28px;
    }

    .posts-archive__grid-section.section-padding {
        padding: 32px 0 40px 0;
    }

    .posts-grid {
        gap: 20px;
    }

    .posts-archive .post-card__image {
        aspect-ratio: 4 / 3;
    }

    .posts-archive .post-card__title {
        font-size: 17px;
    }

    .posts-archive .post-card__excerpt {
        font-size: 14px;
    }

    .posts-archive .post-card__link {
        font-size: 14px;
    }
}
