/* ==========================================================================
   EZFolding Blog — Modern Clean UI (Scoped for Bootstrap 3.3.7 compatibility)
   ========================================================================== */

:root {
    --ez-primary: #cf4041;
    --ez-primary-dark: #b23233;
    --ez-primary-soft: #fdf2f2;
    --ez-secondary: #004790;
    --ez-secondary-soft: #eef4fb;
    --ez-ink: #1f2937;
    --ez-muted: #6b7280;
    --ez-border: #e5e7eb;
    --ez-surface: #ffffff;
    --ez-bg: #f5f6f8;
    --ez-radius: 10px;
    --ez-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
    --ez-shadow-md: 0 10px 24px rgba(15, 23, 42, 0.09);
}

/* ---------- Top Header Banner ---------- */
.ez-blog-hero {
    background: linear-gradient(135deg, #cf4041 0%, #a52b2c 100%);
    color: #ffffff;
    padding: 34px 0 38px;
    position: relative;
}

.ez-blog-breadcrumb {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

.ez-blog-breadcrumb li {
    display: inline-flex;
    align-items: center;
}

.ez-blog-breadcrumb li + li:before {
    content: "/";
    margin: 0 8px;
    opacity: 0.65;
}

.ez-blog-breadcrumb a {
    color: #ffffff;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.ez-blog-breadcrumb a:hover {
    opacity: 1;
    text-decoration: underline;
}

.ez-blog-hero-title {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.25;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.ez-blog-hero-subtitle {
    margin: 8px 0 0;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    max-width: 680px;
}

/* ---------- Main Wrapper ---------- */
.ez-blog-main {
    background-color: var(--ez-bg);
    padding: 40px 0 60px;
}

/* ---------- Filter Bar (List Page) ---------- */
.ez-blog-toolbar {
    background: var(--ez-surface);
    border: 1px solid var(--ez-border);
    border-radius: var(--ez-radius);
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: var(--ez-shadow-sm);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ez-blog-filter-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ez-filter-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ez-ink);
    background: #f3f4f6;
    border: 1px solid transparent;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.ez-filter-pill:hover {
    background: var(--ez-primary-soft);
    color: var(--ez-primary);
    border-color: rgba(207, 64, 65, 0.25);
}

.ez-filter-pill.is-active {
    background: var(--ez-primary);
    color: #ffffff;
}

.ez-filter-pill .ez-pill-count {
    margin-left: 6px;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
}

.ez-filter-pill.is-active .ez-pill-count {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.ez-active-filter-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--ez-secondary-soft);
    border: 1px solid rgba(0, 71, 144, 0.18);
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 22px;
    font-size: 13px;
    color: var(--ez-secondary);
}

.ez-active-filter-reset {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    color: var(--ez-primary);
    text-decoration: none !important;
}

.ez-active-filter-reset:hover {
    text-decoration: underline !important;
}

/* ---------- Blog Grid & Cards ---------- */
.ez-blog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.ez-blog-card {
    background: var(--ez-surface);
    border: 1px solid var(--ez-border);
    border-radius: var(--ez-radius);
    overflow: hidden;
    box-shadow: var(--ez-shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.ez-blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ez-shadow-md);
    border-color: rgba(207, 64, 65, 0.35);
}

.ez-blog-card-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #eef0f4;
}

.ez-blog-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.ez-blog-card:hover .ez-blog-card-thumb img {
    transform: scale(1.05);
}

.ez-blog-card-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(207, 64, 65, 0.94);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 999px;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.ez-blog-card-cat:hover {
    background: var(--ez-primary-dark);
    color: #ffffff;
}

.ez-blog-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.ez-blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--ez-muted);
    margin-bottom: 10px;
}

.ez-blog-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ez-blog-card-meta i {
    color: var(--ez-primary);
}

.ez-blog-card-title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--ez-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ez-blog-card-title a {
    color: var(--ez-ink);
    text-decoration: none;
    transition: color 0.18s ease;
}

.ez-blog-card-title a:hover {
    color: var(--ez-primary);
}

.ez-blog-card-excerpt {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.65;
    color: #4b5563;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ez-blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.ez-tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: #f3f4f6;
    color: #4b5563;
    text-decoration: none !important;
    transition: all 0.18s ease;
}

.ez-tag-chip:hover,
.ez-tag-chip.is-active {
    background: var(--ez-primary-soft);
    color: var(--ez-primary);
}

.ez-blog-card-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ez-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ez-primary);
    text-decoration: none !important;
    transition: gap 0.2s ease, color 0.2s ease;
}

.ez-read-more:hover {
    color: var(--ez-primary-dark);
    gap: 9px;
}

/* ---------- Empty State ---------- */
.ez-blog-empty {
    background: var(--ez-surface);
    border: 1px dashed #d1d5db;
    border-radius: var(--ez-radius);
    padding: 52px 24px;
    text-align: center;
}

.ez-blog-empty-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--ez-primary-soft);
    color: var(--ez-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.ez-blog-empty h3 {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 700;
    color: var(--ez-ink);
}

.ez-blog-empty p {
    margin: 0 0 20px;
    color: var(--ez-muted);
    font-size: 14px;
}

.ez-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ez-primary);
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 6px;
    border: none;
    text-decoration: none !important;
    transition: background 0.2s ease;
}

.ez-btn-primary:hover {
    background: var(--ez-primary-dark);
}

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

.ez-pagination {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.ez-pagination li a,
.ez-pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--ez-border);
    background: var(--ez-surface);
    color: var(--ez-ink);
    text-decoration: none;
    transition: all 0.18s ease;
}

.ez-pagination li a:hover {
    border-color: var(--ez-primary);
    color: var(--ez-primary);
    background: var(--ez-primary-soft);
}

.ez-pagination li.active span {
    background: var(--ez-primary);
    border-color: var(--ez-primary);
    color: #ffffff;
}

.ez-pagination li.disabled span {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ---------- Sidebar Widgets ---------- */
.ez-sidebar-card {
    background: var(--ez-surface);
    border: 1px solid var(--ez-border);
    border-radius: var(--ez-radius);
    padding: 20px;
    margin-bottom: 22px;
    box-shadow: var(--ez-shadow-sm);
}

.ez-sidebar-title {
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f2f5;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ez-ink);
    position: relative;
}

.ez-sidebar-title:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 44px;
    height: 2px;
    background: var(--ez-primary);
}

.ez-search-form {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--ez-border);
    border-radius: 8px;
    overflow: hidden;
    background: #f9fafb;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ez-search-form:focus-within {
    border-color: var(--ez-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(207, 64, 65, 0.12);
}

.ez-search-form input {
    flex: 1 1 auto;
    border: none;
    background: transparent;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--ez-ink);
    outline: none;
    min-width: 0;
}

.ez-search-form button {
    border: none;
    background: var(--ez-primary);
    color: #ffffff;
    padding: 0 15px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ez-search-form button:hover {
    background: var(--ez-primary-dark);
}

.ez-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ez-cat-list li + li {
    border-top: 1px solid #f3f4f6;
}

.ez-cat-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 6px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.18s ease;
}

.ez-cat-list a:hover,
.ez-cat-list a.is-active {
    color: var(--ez-primary);
    background: var(--ez-primary-soft);
    padding-left: 10px;
    padding-right: 10px;
}

.ez-cat-count {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: var(--ez-muted);
}

.ez-cat-list a.is-active .ez-cat-count,
.ez-cat-list a:hover .ez-cat-count {
    background: var(--ez-primary);
    color: #ffffff;
}

.ez-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ez-tag-cloud .ez-tag-chip {
    padding: 5px 11px;
    font-size: 12px;
    border: 1px solid var(--ez-border);
    background: #f9fafb;
}

.ez-tag-cloud .ez-tag-chip:hover,
.ez-tag-cloud .ez-tag-chip.is-active {
    border-color: var(--ez-primary);
    background: var(--ez-primary);
    color: #ffffff;
}

/* Compact Sidebar Media List (Recent Posts & Exhibitions) */
.ez-mini-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ez-mini-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f3f4f6;
}

.ez-mini-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.ez-mini-thumb {
    flex: 0 0 76px;
    width: 76px;
    height: 60px;
    border-radius: 7px;
    overflow: hidden;
    background: #eef0f4;
    display: block;
}

.ez-mini-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.ez-mini-item:hover .ez-mini-thumb img {
    transform: scale(1.06);
}

.ez-mini-info {
    flex: 1 1 auto;
    min-width: 0;
}

.ez-mini-title {
    margin: 0 0 4px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ez-mini-title a {
    color: var(--ez-ink);
    text-decoration: none;
}

.ez-mini-title a:hover {
    color: var(--ez-primary);
}

.ez-mini-date {
    font-size: 11.5px;
    color: var(--ez-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ---------- Blog Detail Page ---------- */
.ez-article-card {
    background: var(--ez-surface);
    border: 1px solid var(--ez-border);
    border-radius: var(--ez-radius);
    padding: 30px 32px;
    box-shadow: var(--ez-shadow-sm);
    margin-bottom: 28px;
}

.ez-article-cat-badge {
    display: inline-block;
    background: var(--ez-primary-soft);
    color: var(--ez-primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 12px;
    border-radius: 999px;
    text-decoration: none !important;
    margin-bottom: 14px;
}

.ez-article-cat-badge:hover {
    background: var(--ez-primary);
    color: #ffffff;
}

.ez-article-title {
    margin: 0 0 16px;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--ez-ink);
    letter-spacing: -0.015em;
}

.ez-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid #f0f2f5;
    font-size: 13px;
    color: var(--ez-muted);
}

.ez-article-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ez-article-meta-item i {
    color: var(--ez-primary);
}

.ez-article-cover {
    margin: 0 0 26px;
    border-radius: 10px;
    overflow: hidden;
    background: #eef0f4;
    border: 1px solid #eef0f4;
}

.ez-article-cover img {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    display: block;
}

.ez-article-body {
    font-size: 15.5px;
    line-height: 1.85;
    color: #2d3748;
    word-wrap: break-word;
}

.ez-article-body p {
    margin: 0 0 16px;
}

.ez-article-body h2,
.ez-article-body h3,
.ez-article-body h4 {
    color: var(--ez-ink);
    font-weight: 700;
    margin: 26px 0 12px;
    line-height: 1.35;
}

.ez-article-body h2 { font-size: 22px; }
.ez-article-body h3 { font-size: 19px; }
.ez-article-body h4 { font-size: 16px; }

.ez-article-body ul,
.ez-article-body ol {
    margin: 0 0 18px;
    padding-left: 22px;
}

.ez-article-body li {
    margin-bottom: 6px;
}

.ez-article-body img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    margin: 14px 0;
}

.ez-article-body blockquote {
    border-left: 4px solid var(--ez-primary);
    background: #fafafa;
    padding: 14px 18px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    color: #4b5563;
    font-style: italic;
}

.ez-article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    display: block;
    overflow-x: auto;
}

.ez-article-body table th,
.ez-article-body table td {
    border: 1px solid var(--ez-border);
    padding: 8px 12px;
}

.ez-article-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #f0f2f5;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ez-article-tags-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ez-article-tags-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--ez-ink);
    margin-right: 4px;
}

.ez-article-share-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 14px;
    border-top: 1px solid #f3f4f6;
}

.ez-share-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ez-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #ffffff !important;
    border: none;
    cursor: pointer;
    text-decoration: none !important;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.ez-share-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.ez-share-wa { background: #25d366; }
.ez-share-fb { background: #1877f2; }
.ez-share-tw { background: #111827; }
.ez-share-li { background: #0a66c2; }
.ez-share-copy {
    background: #f3f4f6;
    color: var(--ez-ink) !important;
    border: 1px solid var(--ez-border);
}

.ez-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ez-secondary);
    text-decoration: none !important;
}

.ez-back-link:hover {
    color: var(--ez-primary);
}

/* ---------- Related Articles Section ---------- */
.ez-related-section {
    background: var(--ez-surface);
    border: 1px solid var(--ez-border);
    border-radius: var(--ez-radius);
    padding: 24px 26px;
    box-shadow: var(--ez-shadow-sm);
    margin-bottom: 24px;
}

.ez-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.ez-related-card {
    border: 1px solid #f0f2f5;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
}

.ez-related-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ez-shadow-sm);
}

.ez-related-thumb {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #eef0f4;
}

.ez-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ez-related-body {
    padding: 12px 14px 14px;
}

.ez-related-date {
    font-size: 11px;
    color: var(--ez-muted);
    margin-bottom: 5px;
}

.ez-related-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ez-related-title a {
    color: var(--ez-ink);
    text-decoration: none;
}

.ez-related-title a:hover {
    color: var(--ez-primary);
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .ez-blog-main {
        padding: 28px 0 44px;
    }

    .ez-sidebar-wrap {
        margin-top: 28px;
    }

    .ez-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .ez-blog-hero {
        padding: 24px 0 28px;
    }

    .ez-blog-hero-title {
        font-size: 24px;
    }

    .ez-blog-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .ez-article-card {
        padding: 20px 18px;
    }

    .ez-article-title {
        font-size: 22px;
    }

    .ez-related-grid {
        grid-template-columns: 1fr;
    }
}
