/* ===========================
   BLOG PAGE LAYOUT
   =========================== */

.blog-page {
    padding: 2.5rem 1rem 3rem;
    background: #f5f6fa;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.blog-container {
    max-width: 1120px;
    margin: 0 auto;
}

/* ===========================
   HEADER
   =========================== */

.blog-header {
    text-align: left;
    margin-bottom: 2.5rem;
}

.blog-title {
    font-size: 2rem;
    line-height: 1.3;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.35rem;
}

.blog-subtitle {
    font-size: 0.98rem;
    line-height: 1.7;
    color: #6b7280;
    max-width: 620px;
}

/* ===========================
   ARTICLE LIST
   =========================== */

.blog-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.article-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-item {
    width: 100%;
}

.article-card {
    display: flex;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1rem;
    background: #ffffff;
    border-radius: 0.9rem;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
    border-color: #d1d5db;
    background: #f9fafb;
}

/* Thumbnail */
.article-thumbnail {
    flex: 0 0 130px;
    max-width: 130px;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #e5e7eb;
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.article-card:hover .article-thumbnail img {
    transform: scale(1.05);
}

/* Body */
.article-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; /* penting untuk truncation */
}

/* Meta & Badge */
.article-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.article-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    background: #ecfdf5;
    color: #047857;
}

.article-badge--secondary {
    background: #eff6ff;
    color: #1d4ed8;
}

/* Title */
.article-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.4rem;
    line-height: 1.5;
}

.article-card:hover .article-title {
    color: #0f766e;
}

/* Excerpt */
.article-excerpt {
    font-size: 0.92rem;
    line-height: 1.7;
    color: #4b5563;
    margin: 0 0 0.5rem;
}

/* Readmore */
.article-readmore {
    margin-top: auto;
    font-size: 0.88rem;
    font-weight: 600;
    color: #0f766e;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    opacity: 0.9;
    transition: color 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.article-card:hover .article-readmore {
    opacity: 1;
    transform: translateX(2px);
}

/* ===========================
   PAGINATION
   =========================== */

.pagination {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
}

.pagination-link {
    min-width: 2.2rem;
    height: 2.2rem;
    padding: 0 0.6rem;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    color: #374151;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: #ffffff;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

.pagination-link:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

.pagination-link.is-active {
    background: #0f766e;
    border-color: #0f766e;
    color: #ffffff;
    font-weight: 600;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 768px) {
    .blog-page {
        padding: 1.5rem 1rem 2.5rem;
    }

    .blog-header {
        text-align: left;
    }

    .blog-title {
        font-size: 1.6rem;
    }

    .article-card {
        flex-direction: row;
        align-items: flex-start;
        padding: 0.85rem;
        gap: 0.9rem;
    }

    .article-thumbnail {
        flex: 0 0 110px;
        max-width: 110px;
    }

    .article-title {
        font-size: 0.98rem;
    }

    .article-excerpt {
        font-size: 0.92rem;
        line-height: 1.7;
        color: #4b5563;
        margin: 0 0 0.5rem;
    }
}

@media (max-width: 520px) {
    .article-card {
        flex-direction: column;
    }

    .article-thumbnail {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
        height: 190px;
    }
}

/* LINE CLAMP UTILITIES */
.clamp-1,
.clamp-2,
.clamp-3,
.clamp-4,
.clamp-5 {
    overflow: hidden;
    display: -webkit-box;
    display: block; /* fallback */
    -webkit-box-orient: vertical;
}

/* Clamp 1 line */
.clamp-1 {
    -webkit-line-clamp: 1;
    line-clamp: 1;
}

/* Clamp 2 lines */
.clamp-2 {
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

/* Clamp 3 lines */
.clamp-3 {
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

/* Clamp 4 lines */
.clamp-4 {
    -webkit-line-clamp: 4;
    line-clamp: 4;
}

/* Clamp 5 lines */
.clamp-5 {
    -webkit-line-clamp: 5;
    line-clamp: 5;
}

/* =========================================
   SEARCH CONTAINER
   ========================================= */
.search-container {
    width: 100%;
    padding: 1rem 0 1.2rem;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: center;
}

.search-form {
    width: 100%;
    max-width: 1120px;
    padding: 0 1rem;
}

.search-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

/* =========================================
   INPUT FIELD
   ========================================= */
.search-input {
    width: 100%;
    padding: 0.75rem 1.25rem;
    padding-right: 3rem;
    font-size: 0.95rem;
    border-radius: 10rem;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #111827;

    transition:
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.search-input:focus {
    background: #ffffff;
    border-color: #128fc9;
    outline: none;
    box-shadow: 0 0 0 3px rgba(18, 143, 201, 0.2);
}

.search-input::placeholder {
    color: #9ca3af;
}

/* =========================================
   SEARCH BUTTON / ICON
   ========================================= */
.search-icon {
    position: absolute;
    right: 0.8rem;
    width: 38px;
    height: 38px;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.search-icon:hover {
    opacity: 0.75;
    transform: scale(1.03);
}

.search-icon .icon {
    width: 20px;
    height: 20px;
}

/* =========================================
   RESPONSIVE ADJUSTMENTS
   ========================================= */
@media (max-width: 640px) {
    .search-input {
        padding: 0.65rem 1rem;
        padding-right: 2.6rem;
        font-size: 0.9rem;
    }

    .search-icon {
        right: 0.6rem;
        width: 34px;
        height: 34px;
    }

    .search-icon .icon {
        width: 18px;
        height: 18px;
    }
}
