/* ===================================================================
       Articles — premium editorial layout, scoped on top of the
       existing theme (th-blog / th-btn / th-pagination / widget_search).
       Falls back gracefully if --theme-color isn't defined globally.
    =================================================================== */
.ea-page {
    --ea-primary: var(--theme-color, #FF5A5F);
    --ea-ink: var(--title-color, #0A1929);
    --ea-line: rgba(10, 25, 41, .08);
    --ea-muted: #67728A;
}

/* ---- Toolbar / Search ---- */
.ea-toolbar {
    margin-bottom: 48px;
}

.ea-search-widget {
    max-width: 560px;
}

.ea-search-form {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--ea-line);
    border-radius: 50px;
    padding: 6px 6px 6px 22px;
    box-shadow: 0 10px 30px rgba(10, 25, 41, .05);
    transition: border-color .3s ease, box-shadow .3s ease;
}

.ea-search-form:focus-within {
    border-color: color-mix(in srgb, var(--ea-primary) 45%, var(--ea-line));
    box-shadow: 0 14px 34px rgba(10, 25, 41, .09);
}

.ea-search-form input[type="text"] {
    flex: 1 1 auto;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14.5px;
    color: var(--ea-ink);
    padding: 10px 8px;
}

.ea-search-form input[type="text"]::placeholder {
    color: #98A2B3;
}

.ea-search-form button {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ea-primary);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease;
}

.ea-search-form button:hover {
    transform: scale(1.06);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--ea-primary) 35%, transparent);
}

.ea-search-form button:active {
    transform: scale(.96);
}

.ea-search-meta {
    margin: 12px 2px 0;
    font-size: 13.5px;
    color: var(--ea-muted);
}

.ea-search-meta a {
    color: var(--ea-primary);
    font-weight: 600;
    text-decoration: none;
    margin-inline-start: 6px;
}

.ea-search-meta a:hover {
    text-decoration: underline;
}

/* ---- Section titles ---- */
.ea-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 800;
    color: var(--ea-ink);
    margin-bottom: 22px;
}

.ea-section-title::before {
    content: "";
    width: 6px;
    height: 20px;
    border-radius: 4px;
    background: var(--ea-primary);
    flex: none;
}

/* ---- Featured article ---- */
.ea-featured {
    position: relative;
    display: block;
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    margin-bottom: 48px;
    box-shadow: 0 24px 60px rgba(10, 25, 41, .12);
    transition: transform .4s ease, box-shadow .4s ease;
}

.ea-featured:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 70px rgba(10, 25, 41, .16);
}

.ea-featured_img {
    aspect-ratio: 3 / 2;
    background: #EDEFF3;
    overflow: hidden;
}

.ea-featured_img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.ea-featured:hover .ea-featured_img img {
    transform: scale(1.05);
}

.ea-featured_overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(20px, 4vw, 46px);
    background: linear-gradient(0deg, rgba(6, 12, 20, .92) 0%, rgba(6, 12, 20, .55) 45%, rgba(6, 12, 20, 0) 80%);
}

.ea-badge {
    align-self: flex-start;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #fff;
    background: var(--ea-primary);
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 16px;
}

.ea-featured_meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, .75);
    margin-bottom: 12px;
}

.ea-featured_meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ea-featured_title {
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 800;
    line-height: 1.25;
    color: #fff;
    margin-bottom: 12px;
    max-width: 780px;
}

.ea-featured_text {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, .82);
    max-width: 680px;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Card grid ---- */
.ea-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    margin-bottom: 20px;
}


@media (max-width: 767px) {
    .ea-grid {
        grid-template-columns: 1fr;
    }
}

.ea-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--ea-line);
    border-radius: 20px;
    overflow: hidden;
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.ea-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 46px rgba(10, 25, 41, .10);
    border-color: transparent;
}

.ea-card_img {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #F2F4F7;
}

.ea-card_img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.ea-card:hover .ea-card_img img {
    transform: scale(1.06);
}

.ea-card_body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 24px 24px 22px;
}

.ea-card_date {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--ea-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.ea-card_title {
    font-size: 18.5px;
    font-weight: 800;
    line-height: 1.4;
    color: var(--ea-ink);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ea-card_title a {
    color: inherit;
    text-decoration: none;
    transition: color .25s ease;
}

.ea-card:hover .ea-card_title a {
    color: var(--ea-primary);
}

.ea-card_text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--ea-muted);
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ea-card_footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 6px;
    border-top: 1px solid var(--ea-line);
}

.ea-card_readtime {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ea-muted);
}

.ea-card_link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ea-ink);
    text-decoration: none;
    transition: color .25s ease, gap .25s ease;
}

.ea-card_link i {
    font-size: 10.5px;
    transition: transform .25s ease;
}

.ea-card_link:hover {
    color: var(--ea-primary);
}

.ea-card_link:hover i {
    transform: translateX(4px);
}

/* ---- Sidebar ---- */
.ea-sidebar {
    position: sticky;
    top: 24px;
}

.ea-sidebar_widget + .ea-sidebar_widget {
    margin-top: 24px;
}

/* ---- Categories ---- */
.ea-categories_list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--ea-line) transparent;
}

.ea-categories_list::-webkit-scrollbar {
    width: 5px;
}

.ea-categories_list::-webkit-scrollbar-track {
    background: transparent;
}

.ea-categories_list::-webkit-scrollbar-thumb {
    background: var(--ea-line);
    border-radius: 10px;
}

.ea-categories_list::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--ea-primary) 40%, var(--ea-line));
}

.ea-category_item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--ea-ink);
    transition: background .25s ease, color .25s ease;
}

.ea-category_item:hover {
    background: color-mix(in srgb, var(--ea-primary) 8%, white);
    color: var(--ea-primary);
}

.ea-category_item.active {
    background: var(--ea-primary);
    color: #fff;
}

.ea-category_item.active .ea-category_count {
    background: rgba(255, 255, 255, .25);
    color: #fff;
}

.ea-category_item.active .ea-category_icon {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.ea-category_left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.ea-category_icon {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--ea-primary) 10%, white);
    color: var(--ea-primary);
    font-size: 12.5px;
    transition: background .25s ease, color .25s ease;
}

.ea-category_name {
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ea-category_count {
    flex: none;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--ea-muted);
    background: #F2F4F7;
    padding: 3px 9px;
    border-radius: 50px;
    transition: background .25s ease, color .25s ease;
}

.ea-sidebar_title {
    font-size: 16px;
    font-weight: 800;
    color: var(--ea-ink);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ea-line);
}

.ea-recent_list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ea-recent_item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    text-decoration: none;
    transition: opacity .25s ease;
}

.ea-recent_item:hover {
    opacity: .82;
}

.ea-recent_thumb {
    flex: none;
    width: 72px;
    height: 72px;
    border-radius: 14px;
    overflow: hidden;
    background: #F2F4F7;
}

.ea-recent_thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ea-recent_body {
    min-width: 0;
}

.ea-recent_date {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--ea-primary);
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 4px;
}

.ea-recent_title {
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--ea-ink);
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ea-recent_readtime {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--ea-muted);
}

/* ---- Empty state ---- */
.ea-empty {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border: 1px dashed var(--ea-line);
    border-radius: 20px;
}

.ea-empty_icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--ea-primary) 10%, white);
    color: var(--ea-primary);
    font-size: 26px;
}

.ea-empty_title {
    font-size: 18px;
    font-weight: 800;
    color: var(--ea-ink);
    margin-bottom: 8px;
}

.ea-empty_text {
    font-size: 14.5px;
    color: var(--ea-muted);
    margin-bottom: 0;
}

.ea-empty_text a {
    color: var(--ea-primary);
    font-weight: 700;
    text-decoration: none;
}

.ea-empty_text a:hover {
    text-decoration: underline;
}

/* ---- Pagination ---- */
.ea-pagination-wrap {
    display: flex;
    justify-content: center;
    margin-top: 44px;
}

.ea-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--ea-line);
    border-radius: 50px;
    box-shadow: 0 10px 26px rgba(10, 25, 41, .05);
}

.ea-pagination li a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 6px;
    border-radius: 50%;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ea-ink);
    text-decoration: none;
    transition: background .25s ease, color .25s ease;
}

.ea-pagination li a:hover {
    background: color-mix(in srgb, var(--ea-primary) 10%, white);
    color: var(--ea-primary);
}

.ea-pagination li.active a {
    background: var(--ea-primary);
    color: #fff;
}

.ea-pagination li.ea-nav a {
    background: transparent;
    color: var(--ea-muted);
    font-size: 12px;
}

.ea-pagination li.ea-nav a:hover {
    background: color-mix(in srgb, var(--ea-primary) 10%, white);
    color: var(--ea-primary);
}

/* ---- Fade-up entrance ---- */
.ea-fade-up {
    animation: eaFadeUp .6s ease both;
}


@keyframes eaFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Mobile sidebar spacing ---- */

@media (max-width: 991px) {
    .ea-sidebar {
        position: static;
        margin-top: 48px;
    }
}