/* ================================================================
   ESARAN – CONTENT CSS
   Style untuk: Page, Single Post, Archive/Blog, Search
   Prefix: ep- (esaran page)
================================================================ */

/* ── Variables lokal (inherit dari :root style.css) ── */
.ep-archive-wrap,
.ep-single-wrap,
.ep-page-wrap {
    --ep-content-max:    780px;
    --ep-sidebar-w:      260px;
    --ep-gap:            32px;
    --ep-card-radius:    14px;
    --ep-img-ratio:      56.25%; /* 16:9 */
}

/* ── Container ── */
.ep-container {
    max-width: 1100px;
    margin:    0 auto;
    padding:   0 24px;
    width:     100%;
}

.ep-container--wide {
    max-width: 1280px;
}

/* ═══════════════════════════════════════════════════
   BREADCRUMB
════════════════════════════════════════════════════ */
.ep-breadcrumb {
    display:     flex;
    align-items: center;
    flex-wrap:   wrap;
    gap:         4px;
    font-size:   0.8125rem;
    color:       var(--color-text-light, #94a3b8);
    padding:     20px 0 0;
    margin-bottom: 20px;
}

.ep-breadcrumb a {
    color:           var(--color-text-muted, #64748b);
    text-decoration: none;
    transition:      color 0.2s ease;
}

.ep-breadcrumb a:hover {
    color: var(--color-primary, #2563eb);
}

.ep-breadcrumb__sep {
    display:     flex;
    align-items: center;
    color:       var(--color-border-strong, #cbd5e1);
}

.ep-breadcrumb__current {
    color:         var(--color-text-muted, #64748b);
    overflow:      hidden;
    text-overflow: ellipsis;
    white-space:   nowrap;
    max-width:     300px;
}


/* ═══════════════════════════════════════════════════
   PAGE TEMPLATE
════════════════════════════════════════════════════ */
.ep-page-wrap {
    padding-bottom: 80px;
}

.ep-page__header {
    padding-top:    8px;
    padding-bottom: 24px;
    border-bottom:  1px solid var(--color-border, #e2e8f0);
    margin-bottom:  36px;
    max-width:      var(--ep-content-max);
}

.ep-page__title {
    font-size:      2.25rem;
    font-weight:    700;
    color:          var(--color-text, #0f172a);
    letter-spacing: -0.025em;
    line-height:    1.2;
    margin:         0;
}

.ep-page__content {
    max-width: var(--ep-content-max);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text-muted, #64748b);
}

/* Reset entry-content padding (sudah ada dari container) */
.ep-page-wrap .entry-content,
.ep-single-wrap .entry-content {
    padding: 0;
    max-width: 100%;
    margin: 0;
}


/* ═══════════════════════════════════════════════════
   SINGLE POST TEMPLATE
════════════════════════════════════════════════════ */
.ep-single-wrap {
    padding-bottom: 80px;
}

/* ── Single Header ── */
.ep-single {
    max-width: var(--ep-content-max);
    margin:    0 auto;
}

.ep-single__header {
    padding-top:    8px;
    margin-bottom:  28px;
}

.ep-single__cats {
    display:       flex;
    flex-wrap:     wrap;
    gap:           8px;
    margin-bottom: 16px;
}

/* Badge kategori */
.ep-badge {
    display:        inline-flex;
    align-items:    center;
    padding:        4px 12px;
    font-size:      0.7rem;
    font-weight:    700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius:  4px;
    text-decoration: none;
    transition:     opacity 0.2s ease;
}

.ep-badge--primary {
    background: var(--color-primary, #2563eb);
    color:      #ffffff;
}

.ep-badge--primary:hover {
    opacity: 0.85;
    color:   #ffffff;
}

.ep-single__title {
    font-size:      2.5rem;
    font-weight:    700;
    color:          var(--color-text, #0f172a);
    letter-spacing: -0.03em;
    line-height:    1.2;
    margin-bottom:  20px;
}

/* ── Meta ── */
.ep-single__meta {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    flex-wrap:       wrap;
    gap:             16px;
    padding-bottom:  24px;
    border-bottom:   1px solid var(--color-border, #e2e8f0);
}

.ep-single__author {
    display:     flex;
    align-items: center;
    gap:         12px;
}

.ep-single__avatar {
    width:         36px !important;
    height:        36px !important;
    border-radius: 50% !important;
    object-fit:    cover;
    flex-shrink:   0;
}

.ep-single__author-info {
    display:     flex;
    align-items: center;
    flex-wrap:   wrap;
    gap:         6px;
    font-size:   0.875rem;
    color:       var(--color-text-muted, #64748b);
}

.ep-single__author-name {
    font-weight: 600;
    color:       var(--color-text, #0f172a);
}

.ep-single__meta-sep {
    color: var(--color-border-strong, #cbd5e1);
}

.ep-single__date,
.ep-single__read-time {
    color: var(--color-text-muted, #64748b);
}

/* ── Share buttons ── */
.ep-single__share {
    display:     flex;
    align-items: center;
    gap:         8px;
}

.ep-share-btn {
    display:         flex;
    align-items:     center;
    justify-content: center;
    width:           34px;
    height:          34px;
    border-radius:   50%;
    color:           #ffffff;
    text-decoration: none;
    transition:      transform 0.2s ease, opacity 0.2s ease;
    flex-shrink:     0;
}

.ep-share-btn:hover {
    transform: scale(1.1);
    color:     #ffffff;
    opacity:   0.9;
}

.ep-share-btn--fb  { background: #1877f2; }
.ep-share-btn--tw  { background: #1da1f2; }
.ep-share-btn--wa  { background: #25d366; }

/* ── Featured Image ── */
.ep-single__thumbnail {
    margin-bottom: 36px;
    border-radius: 16px;
    overflow:      hidden;
    box-shadow:    0 8px 32px rgba(15, 23, 42, 0.1);
    line-height:   0;
}

.ep-single__thumbnail-img {
    width:      100%;
    height:     auto;
    display:    block;
    max-height: 500px;
    object-fit: cover;
}

/* ── TOC ── */
.ep-toc {
    background:    var(--color-bg-soft, #f8fafc);
    border:        1px solid var(--color-border, #e2e8f0);
    border-radius: 12px;
    margin-bottom: 36px;
    overflow:      hidden;
}

.ep-toc__toggle {
    display:         flex;
    align-items:     center;
    gap:             10px;
    width:           100%;
    padding:         14px 18px;
    background:      none;
    border:          none;
    cursor:          pointer;
    font-family:     inherit;
    font-size:       0.9375rem;
    font-weight:     600;
    color:           var(--color-text, #0f172a);
    text-align:      left;
    transition:      background 0.2s ease;
}

.ep-toc__toggle:hover {
    background: var(--color-bg-muted, #f1f5f9);
}

.ep-toc__icon {
    color:       var(--color-primary, #2563eb);
    flex-shrink: 0;
    display:     flex;
    align-items: center;
}

.ep-toc__arrow {
    margin-left: auto;
    display:     flex;
    align-items: center;
    color:       var(--color-text-muted, #64748b);
    transition:  transform 0.25s ease;
}

.ep-toc__toggle[aria-expanded="false"] .ep-toc__arrow {
    transform: rotate(-90deg);
}

.ep-toc__list {
    list-style:     none;
    margin:         0;
    padding:        0 18px 14px;
    counter-reset:  toc-counter;
    display:        block;
}

.ep-toc__toggle[aria-expanded="false"] ~ .ep-toc__list {
    display: none;
}

.ep-toc__item {
    counter-increment: toc-counter;
    border-top: 1px solid var(--color-border, #e2e8f0);
}

.ep-toc__item--h3 {
    padding-left: 16px;
}

.ep-toc__link {
    display:         block;
    padding:         8px 0;
    font-size:       0.875rem;
    color:           var(--color-text-muted, #64748b);
    text-decoration: none;
    transition:      color 0.2s ease, padding-left 0.2s ease;
}

.ep-toc__link:hover {
    color:        var(--color-primary, #2563eb);
    padding-left: 4px;
}

/* ── Konten ── */
.ep-single__content {
    font-size:   1rem;
    line-height: 1.85;
    color:       var(--color-text-muted, #64748b);
}

.ep-single__content h2,
.ep-single__content h3,
.ep-single__content h4 {
    color:          var(--color-text, #0f172a);
    font-weight:    700;
    letter-spacing: -0.02em;
    margin-top:     2em;
    margin-bottom:  0.6em;
    line-height:    1.3;
    scroll-margin-top: 90px; /* offset sticky header */
}

.ep-single__content h2 { font-size: 1.5rem; }
.ep-single__content h3 { font-size: 1.25rem; }
.ep-single__content h4 { font-size: 1.1rem; }

.ep-single__content p   { margin-bottom: 1.25em; }
.ep-single__content img { border-radius: 10px; box-shadow: 0 4px 16px rgba(15,23,42,.08); margin: 1.5em 0; }

.ep-single__content a {
    color:                   var(--color-primary, #2563eb);
    text-decoration:         underline;
    text-decoration-color:   rgba(37,99,235,.3);
    text-underline-offset:   3px;
}
.ep-single__content a:hover { text-decoration-color: var(--color-primary, #2563eb); }

.ep-single__content blockquote {
    background:    var(--color-bg-soft, #f8fafc);
    border-left:   4px solid var(--color-primary, #2563eb);
    border-radius: 0 10px 10px 0;
    padding:       20px 24px;
    margin:        2em 0;
    font-style:    italic;
    color:         var(--color-text, #0f172a);
    font-size:     1.05rem;
}

.ep-single__content ul,
.ep-single__content ol { padding-left: 1.5em; margin-bottom: 1.25em; }
.ep-single__content li { margin-bottom: 0.4em; line-height: 1.75; }
.ep-single__content ul li::marker { color: var(--color-primary, #2563eb); }

.ep-single__content code {
    font-size:     0.875em;
    background:    var(--color-bg-muted, #f1f5f9);
    color:         var(--color-secondary, #7c3aed);
    padding:       2px 6px;
    border-radius: 4px;
    border:        1px solid var(--color-border, #e2e8f0);
}

.ep-single__content pre {
    background:    #0f172a;
    color:         #e2e8f0;
    padding:       20px;
    border-radius: 10px;
    overflow-x:    auto;
    margin:        1.5em 0;
    font-size:     0.875rem;
    line-height:   1.7;
    box-shadow:    0 4px 16px rgba(15,23,42,.15);
}

.ep-single__content pre code {
    background: none;
    border:     none;
    color:      inherit;
    padding:    0;
    font-size:  inherit;
}

.ep-single__content table {
    width:           100%;
    border-collapse: collapse;
    margin:          1.5em 0;
    font-size:       0.9rem;
    border-radius:   10px;
    overflow:        hidden;
    box-shadow:      0 1px 4px rgba(15,23,42,.06);
}
.ep-single__content th {
    background:    var(--color-bg-muted, #f1f5f9);
    font-weight:   600;
    font-size:     0.8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding:       10px 14px;
    border-bottom: 2px solid var(--color-border, #e2e8f0);
    text-align:    left;
}
.ep-single__content td {
    padding:       10px 14px;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
    color:         var(--color-text-muted, #64748b);
}

/* ── Footer post (tags) ── */
.ep-single__footer {
    margin-top:  40px;
    padding-top: 24px;
    border-top:  1px solid var(--color-border, #e2e8f0);
}

.ep-single__tags {
    display:     flex;
    align-items: center;
    flex-wrap:   wrap;
    gap:         8px;
}

.ep-single__tags-label {
    display:     flex;
    align-items: center;
    gap:         6px;
    font-size:   0.875rem;
    font-weight: 600;
    color:       var(--color-text-muted, #64748b);
}

.ep-tag {
    display:        inline-flex;
    padding:        5px 12px;
    background:     var(--color-bg-muted, #f1f5f9);
    color:          var(--color-text-muted, #64748b);
    border:         1px solid var(--color-border, #e2e8f0);
    border-radius:  20px;
    font-size:      0.8rem;
    font-weight:    500;
    text-decoration: none;
    transition:     all 0.2s ease;
}

.ep-tag:hover {
    background:   var(--color-primary-light, #eff6ff);
    color:        var(--color-primary, #2563eb);
    border-color: var(--color-primary, #2563eb);
}

/* ── Post navigation prev/next ── */
.ep-post-nav {
    display:               grid;
    grid-template-columns: 1fr 1fr;
    gap:                   16px;
    margin-top:            40px;
    max-width:             var(--ep-content-max);
}

.ep-post-nav__item {
    display:         flex;
    flex-direction:  column;
    gap:             6px;
    padding:         20px;
    background:      var(--color-bg-soft, #f8fafc);
    border:          1px solid var(--color-border, #e2e8f0);
    border-radius:   12px;
    text-decoration: none;
    transition:      all 0.25s ease;
}

.ep-post-nav__item:hover {
    border-color: var(--color-primary, #2563eb);
    background:   #ffffff;
    transform:    translateY(-2px);
    box-shadow:   0 6px 20px rgba(15,23,42,.08);
}

.ep-post-nav__item--next {
    text-align: right;
}

.ep-post-nav__label {
    display:     flex;
    align-items: center;
    gap:         6px;
    font-size:   0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color:       var(--color-primary, #2563eb);
}

.ep-post-nav__item--next .ep-post-nav__label {
    justify-content: flex-end;
}

.ep-post-nav__title {
    font-size:   0.9rem;
    font-weight: 600;
    color:       var(--color-text, #0f172a);
    line-height: 1.4;
}

/* ── Related Posts ── */
.ep-related {
    margin-top: 56px;
    max-width:  var(--ep-content-max);
}

.ep-related__title {
    display:       flex;
    align-items:   center;
    gap:           12px;
    font-size:     1.125rem;
    font-weight:   700;
    color:         var(--color-text, #0f172a);
    margin-bottom: 20px;
}

.ep-related__title-bar {
    display:       block;
    width:         4px;
    height:        20px;
    background:    var(--color-primary, #2563eb);
    border-radius: 2px;
    flex-shrink:   0;
}

.ep-related__grid {
    display:               grid;
    grid-template-columns: repeat(3, 1fr);
    gap:                   16px;
}

.ep-related__card {
    display:         block;
    text-decoration: none;
    border-radius:   10px;
    overflow:        hidden;
    border:          1px solid var(--color-border, #e2e8f0);
    background:      #ffffff;
    transition:      all 0.25s ease;
}

.ep-related__card:hover {
    transform:  translateY(-3px);
    box-shadow: 0 8px 24px rgba(15,23,42,.1);
    border-color: var(--color-border-strong, #cbd5e1);
}

.ep-related__img-wrap {
    position:       relative;
    padding-bottom: 56.25%;
    overflow:       hidden;
    background:     var(--color-bg-muted, #f1f5f9);
}

.ep-related__img {
    position:   absolute;
    inset:      0;
    width:      100%;
    height:     100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.ep-related__card:hover .ep-related__img {
    transform: scale(1.04);
}

.ep-related__img-placeholder {
    position:        absolute;
    inset:           0;
    display:         flex;
    align-items:     center;
    justify-content: center;
    background:      linear-gradient(135deg, #e2e8f0, #f1f5f9);
}

.ep-related__cat {
    position:       absolute;
    top:            10px;
    left:           10px;
    background:     var(--color-primary, #2563eb);
    color:          #ffffff;
    font-size:      0.65rem;
    font-weight:    700;
    letter-spacing: .08em;
    padding:        3px 8px;
    border-radius:  4px;
}

.ep-related__info {
    padding: 14px;
}

.ep-related__post-title {
    font-size:     0.9rem;
    font-weight:   600;
    color:         var(--color-text, #0f172a);
    line-height:   1.4;
    margin-bottom: 6px;
    display:       -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow:      hidden;
}

.ep-related__meta {
    font-size: 0.75rem;
    color:     var(--color-text-light, #94a3b8);
    display:   block;
}

/* ── Comments ── */
.ep-single .comments-area {
    max-width:  var(--ep-content-max);
    margin:     56px auto 0;
    padding:    40px 0 0;
    border-top: 1px solid var(--color-border, #e2e8f0);
}

/* Judul "X Responses" */
.ep-single .comments-area .comments-title {
    font-size:      1.25rem;
    font-weight:    700;
    color:          var(--color-text, #0f172a);
    letter-spacing: -0.01em;
    margin:         0 0 28px;
    padding:        0;
    display:        flex;
    align-items:    center;
    gap:            10px;
}

.ep-single .comments-area .comments-title::before {
    content:       '';
    display:       block;
    width:         4px;
    height:        20px;
    background:    var(--color-primary, #2563eb);
    border-radius: 2px;
    flex-shrink:   0;
}

/* ── Daftar komentar ── */
.ep-single .comment-list {
    list-style: none;
    margin:     0 0 40px;
    padding:    0;
}

.ep-single .comment-list .children {
    list-style: none;
    margin:     0;
    padding:    0 0 0 40px;
}

/* Satu item komentar */
.ep-single .comment-list .comment,
.ep-single .comment-list .pingback {
    margin-bottom: 4px;
}

/* Comment body card */
.ep-single .comment-body {
    display:       flex;
    gap:           14px;
    padding:       20px;
    background:    var(--color-bg-soft, #f8fafc);
    border:        1px solid var(--color-border, #e2e8f0);
    border-radius: 12px;
    margin-bottom: 12px;
    transition:    border-color .2s ease;
}

.ep-single .comment-body:hover {
    border-color: var(--color-border-strong, #cbd5e1);
}

/* Avatar */
.ep-single .comment-body .avatar {
    width:         40px !important;
    height:        40px !important;
    border-radius: 50% !important;
    object-fit:    cover;
    flex-shrink:   0;
    border:        2px solid var(--color-border, #e2e8f0);
}

/* Area teks komentar */
.ep-single .comment-body .comment-content-wrap {
    flex: 1;
    min-width: 0;
}

/* Nama author + meta */
.ep-single .comment-body .comment-author {
    display:     flex;
    align-items: baseline;
    gap:         6px;
    margin-bottom: 4px;
}

.ep-single .comment-body .comment-author .fn {
    font-size:   0.9375rem;
    font-weight: 700;
    color:       var(--color-text, #0f172a);
}

.ep-single .comment-body .comment-author .fn a {
    color:           inherit;
    text-decoration: none;
    transition:      color .2s;
}

.ep-single .comment-body .comment-author .fn a:hover {
    color: var(--color-primary, #2563eb);
}

.ep-single .comment-body .comment-author .says {
    font-size: 0.8rem;
    color:     var(--color-text-light, #94a3b8);
}

/* Metadata (tanggal, jam) */
.ep-single .comment-body .comment-metadata {
    margin-bottom: 10px;
}

.ep-single .comment-body .comment-metadata a {
    font-size:       0.78rem;
    color:           var(--color-text-light, #94a3b8);
    text-decoration: none;
    transition:      color .2s;
}

.ep-single .comment-body .comment-metadata a:hover {
    color: var(--color-primary, #2563eb);
}

/* Isi komentar */
.ep-single .comment-body .comment-content p {
    font-size:   0.9rem;
    color:       var(--color-text-muted, #64748b);
    line-height: 1.7;
    margin:      0 0 8px;
}

.ep-single .comment-body .comment-content p:last-child {
    margin-bottom: 0;
}

/* Tombol Reply */
.ep-single .comment-body .reply {
    margin-top: 10px;
}

.ep-single .comment-body .reply .comment-reply-link {
    display:         inline-flex;
    align-items:     center;
    gap:             5px;
    font-size:       0.78rem;
    font-weight:     600;
    color:           var(--color-primary, #2563eb);
    text-decoration: none;
    padding:         4px 10px;
    border:          1px solid rgba(37,99,235,.25);
    border-radius:   20px;
    background:      rgba(37,99,235,.05);
    transition:      all .2s ease;
}

.ep-single .comment-body .reply .comment-reply-link:hover {
    background:   var(--color-primary, #2563eb);
    border-color: var(--color-primary, #2563eb);
    color:        #ffffff;
}

/* Edit link */
.ep-single .comment-edit-link {
    display:         inline-flex;
    font-size:       0.78rem;
    color:           var(--color-text-light, #94a3b8);
    text-decoration: none;
    margin-left:     8px;
}

/* Komentar awaiting moderation */
.ep-single .comment-awaiting-moderation {
    display:       inline-block;
    font-size:     0.75rem;
    background:    #fef3c7;
    color:         #92400e;
    padding:       2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-weight:   500;
}

/* ── Form "Tinggalkan Balasan" ── */
.ep-single .comment-respond {
    margin-top:    40px;
    padding-top:   32px;
    border-top:    1px solid var(--color-border, #e2e8f0);
}

.ep-single .comment-respond .comment-reply-title {
    font-size:      1.125rem;
    font-weight:    700;
    color:          var(--color-text, #0f172a);
    letter-spacing: -0.01em;
    margin:         0 0 6px;
    display:        flex;
    align-items:    center;
    gap:            10px;
}

.ep-single .comment-respond .comment-reply-title::before {
    content:       '';
    display:       block;
    width:         4px;
    height:        18px;
    background:    var(--color-primary, #2563eb);
    border-radius: 2px;
    flex-shrink:   0;
}

/* "Cancel reply" link */
.ep-single .comment-respond .comment-reply-title small {
    font-size:   0.8rem;
    font-weight: 400;
    margin-left: 8px;
}

.ep-single .comment-respond .comment-reply-title small a {
    color:           var(--color-text-muted, #64748b);
    text-decoration: none;
}

/* Info logged in */
.ep-single .comment-respond .logged-in-as {
    font-size:     0.875rem;
    color:         var(--color-text-muted, #64748b);
    margin-bottom: 20px;
}

.ep-single .comment-respond .logged-in-as a {
    color:           var(--color-primary, #2563eb);
    text-decoration: none;
    font-weight:     500;
}

.ep-single .comment-respond .logged-in-as a:hover {
    text-decoration: underline;
}

/* Required field notice */
.ep-single .comment-respond .comment-notes {
    font-size:     0.8375rem;
    color:         var(--color-text-light, #94a3b8);
    margin-bottom: 20px;
}

/* Form fields */
.ep-single .comment-respond .comment-form {
    display:        flex;
    flex-direction: column;
    gap:            16px;
}

.ep-single .comment-respond .comment-form-comment,
.ep-single .comment-respond .comment-form-author,
.ep-single .comment-respond .comment-form-email,
.ep-single .comment-respond .comment-form-url {
    display:        flex;
    flex-direction: column;
    gap:            6px;
}

.ep-single .comment-respond .comment-form label {
    font-size:   0.875rem;
    font-weight: 600;
    color:       var(--color-text, #0f172a);
}

.ep-single .comment-respond .comment-form label .required {
    color: var(--color-primary, #2563eb);
    margin-left: 2px;
}

/* Input & Textarea */
.ep-single .comment-respond .comment-form input[type="text"],
.ep-single .comment-respond .comment-form input[type="email"],
.ep-single .comment-respond .comment-form input[type="url"],
.ep-single .comment-respond .comment-form textarea {
    width:         100%;
    padding:       11px 16px;
    font-family:   inherit;
    font-size:     0.9rem;
    color:         var(--color-text, #0f172a);
    background:    var(--color-bg-soft, #f8fafc);
    border:        1.5px solid var(--color-border, #e2e8f0);
    border-radius: 10px;
    outline:       none;
    transition:    border-color .2s ease, box-shadow .2s ease, background .2s ease;
    box-sizing:    border-box;
    line-height:   1.5;
}

.ep-single .comment-respond .comment-form input[type="text"]::placeholder,
.ep-single .comment-respond .comment-form input[type="email"]::placeholder,
.ep-single .comment-respond .comment-form input[type="url"]::placeholder,
.ep-single .comment-respond .comment-form textarea::placeholder {
    color: var(--color-text-light, #94a3b8);
}

.ep-single .comment-respond .comment-form input[type="text"]:focus,
.ep-single .comment-respond .comment-form input[type="email"]:focus,
.ep-single .comment-respond .comment-form input[type="url"]:focus,
.ep-single .comment-respond .comment-form textarea:focus {
    border-color: var(--color-primary, #2563eb);
    box-shadow:   0 0 0 3px rgba(37,99,235,.12);
    background:   #ffffff;
}

.ep-single .comment-respond .comment-form textarea {
    min-height: 140px;
    resize:     vertical;
}

/* 2-kolom untuk author + email */
.ep-single .comment-respond .comment-form-fields-row {
    display:               grid;
    grid-template-columns: 1fr 1fr;
    gap:                   16px;
}

/* Cookies checkbox */
.ep-single .comment-respond .comment-form-cookies-consent {
    display:     flex;
    align-items: flex-start;
    gap:         10px;
}

.ep-single .comment-respond .comment-form-cookies-consent input {
    margin-top:  3px;
    flex-shrink: 0;
    accent-color: var(--color-primary, #2563eb);
}

.ep-single .comment-respond .comment-form-cookies-consent label {
    font-size: 0.8rem;
    color:     var(--color-text-muted, #64748b);
    font-weight: 400;
    line-height: 1.5;
}

/* Submit button */
.ep-single .comment-respond .comment-form .form-submit {
    margin: 4px 0 0;
}

.ep-single .comment-respond .comment-form .submit {
    display:       inline-flex;
    align-items:   center;
    padding:       12px 28px;
    background:    var(--color-primary, #2563eb);
    color:         #ffffff;
    border:        none;
    border-radius: 10px;
    font-family:   inherit;
    font-size:     0.9375rem;
    font-weight:   600;
    cursor:        pointer;
    transition:    background .2s ease, transform .2s ease, box-shadow .2s ease;
    letter-spacing: .01em;
}

.ep-single .comment-respond .comment-form .submit:hover {
    background:  var(--color-primary-dark, #1d4ed8);
    transform:   translateY(-1px);
    box-shadow:  0 6px 20px rgba(37,99,235,.3);
}

.ep-single .comment-respond .comment-form .submit:active {
    transform:   translateY(0);
    box-shadow:  none;
}

/* ── Responsive: Comments ── */
@media (max-width: 640px) {
    .ep-single .comment-list .children {
        padding-left: 20px;
    }

    .ep-single .comment-body {
        gap:     10px;
        padding: 16px;
    }

    .ep-single .comment-body .avatar {
        width:  32px !important;
        height: 32px !important;
    }

    .ep-single .comment-respond .comment-form-fields-row {
        grid-template-columns: 1fr;
    }
}


/* ═══════════════════════════════════════════════════
   ARCHIVE / BLOG LAYOUT
════════════════════════════════════════════════════ */
.ep-archive-wrap {
    padding: 40px 0 80px;
}

.ep-archive__header {
    margin-bottom: 32px;
}

.ep-archive__title {
    font-size:      2rem;
    font-weight:    700;
    color:          var(--color-text, #0f172a);
    letter-spacing: -0.02em;
    margin-bottom:  8px;
}

.ep-archive__title span {
    color: var(--color-primary, #2563eb);
}

.ep-archive__desc {
    font-size: 1rem;
    color:     var(--color-text-muted, #64748b);
    margin:    0;
}

/* ── 2-kolom layout: sidebar + main ── */
.ep-archive__layout {
    display:               grid;
    grid-template-columns: var(--ep-sidebar-w) 1fr;
    gap:                   var(--ep-gap);
    align-items:           start;
}

/* ── Sidebar ── */
.ep-archive__sidebar {
    position: sticky;
    top:      calc(var(--esaran-header-h-sm, 60px) + 24px);
    display:  flex;
    flex-direction: column;
    gap:      24px;
}

.ep-sidebar-widget {
    background:    #ffffff;
    border:        1px solid var(--color-border, #e2e8f0);
    border-radius: 12px;
    padding:       20px;
}

.ep-sidebar-widget__title {
    display:       flex;
    align-items:   center;
    gap:           10px;
    font-size:     0.875rem;
    font-weight:   700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color:         var(--color-text, #0f172a);
    margin-bottom: 16px;
}

.ep-sidebar-widget__title-bar {
    display:       block;
    width:         4px;
    height:        16px;
    background:    var(--color-primary, #2563eb);
    border-radius: 2px;
    flex-shrink:   0;
}

/* Search form */
.ep-search-form {
    display:       flex;
    gap:           8px;
    align-items:   stretch;
    width:         100%;
    box-sizing:    border-box;
}

.ep-search-form__input {
    flex:          1 1 0%;
    min-width:     0;          /* KUNCI: cegah overflow flexbox */
    width:         0;          /* paksa flex menghitung ulang lebar */
    padding:       10px 14px;
    font-family:   inherit;
    font-size:     0.875rem;
    border:        1.5px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    background:    var(--color-bg-soft, #f8fafc);
    color:         var(--color-text, #0f172a);
    outline:       none;
    transition:    border-color .2s ease, box-shadow .2s ease;
    box-sizing:    border-box;
}

.ep-search-form__input::placeholder { color: var(--color-text-light, #94a3b8); }
.ep-search-form__input:focus {
    border-color: var(--color-primary, #2563eb);
    box-shadow:   0 0 0 3px rgba(37,99,235,.12);
    background:   #ffffff;
}

.ep-search-form__btn {
    display:         flex;
    align-items:     center;
    justify-content: center;
    width:           40px;
    min-width:       40px;     /* KUNCI: jangan menyusut */
    height:          40px;
    background:      var(--color-primary, #2563eb);
    color:           #ffffff;
    border:          none;
    border-radius:   8px;
    cursor:          pointer;
    flex-shrink:     0;        /* KUNCI: tidak boleh mengecil */
    transition:      background .2s ease, transform .2s ease;
    padding:         0;
}

.ep-search-form__btn:hover {
    background: var(--color-primary-dark, #1d4ed8);
    transform:  scale(1.05);
}

/* Topic list */
.ep-topic-list {
    list-style: none;
    margin:     0;
    padding:    0;
    max-height: 380px;
    overflow-y: auto;
}

.ep-topic-list__item {
    border-bottom: 1px solid var(--color-border, #e2e8f0);
}

.ep-topic-list__item:last-child {
    border-bottom: none;
}

.ep-topic-list__label {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         9px 4px;
    cursor:          pointer;
    gap:             8px;
}

.ep-topic-list__label.is-active .ep-topic-list__link {
    color: var(--color-primary, #2563eb);
    font-weight: 600;
}

.ep-topic-list__link {
    font-size:       0.875rem;
    color:           var(--color-text-muted, #64748b);
    text-decoration: none;
    flex:            1;
    transition:      color .2s ease;
}

.ep-topic-list__link:hover {
    color: var(--color-primary, #2563eb);
}

.ep-topic-list__count {
    font-size:   0.75rem;
    color:       var(--color-text-light, #94a3b8);
    font-weight: 500;
}

/* ── Post Grid ── */
.ep-archive__main {}

.ep-post-grid {
    display:               grid;
    grid-template-columns: repeat(3, 1fr);
    gap:                   20px;
    margin-bottom:         36px;
}

/* ── Post Card ── */
.ep-post-card {
    background:    #ffffff;
    border:        1px solid var(--color-border, #e2e8f0);
    border-radius: var(--ep-card-radius);
    overflow:      hidden;
    display:       flex;
    flex-direction: column;
    transition:    all 0.25s ease;
}

.ep-post-card:hover {
    transform:    translateY(-4px);
    box-shadow:   0 12px 32px rgba(15,23,42,.1);
    border-color: var(--color-border-strong, #cbd5e1);
}

/* Card image */
.ep-post-card__img-link {
    display:    block;
    flex-shrink: 0;
}

.ep-post-card__img-wrap {
    position:       relative;
    padding-bottom: var(--ep-img-ratio);
    overflow:       hidden;
    background:     var(--color-bg-muted, #f1f5f9);
}

.ep-post-card__img {
    position:   absolute;
    inset:      0;
    width:      100%;
    height:     100%;
    object-fit: cover;
    display:    block;
    transition: transform 0.4s ease;
}

.ep-post-card:hover .ep-post-card__img {
    transform: scale(1.05);
}

.ep-post-card__img-placeholder {
    position:        absolute;
    inset:           0;
    display:         flex;
    align-items:     center;
    justify-content: center;
    background:      linear-gradient(135deg, #dde3ea 0%, #e8edf3 100%);
}

/* Kategori badge di atas gambar */
.ep-post-card__cat-badge {
    position:       absolute;
    top:            12px;
    left:           12px;
    background:     rgba(15, 23, 42, 0.75);
    color:          #ffffff;
    font-size:      0.65rem;
    font-weight:    700;
    letter-spacing: .1em;
    padding:        4px 10px;
    border-radius:  4px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Card body */
.ep-post-card__body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ep-post-card__title {
    font-size:     1rem;
    font-weight:   700;
    color:         var(--color-text, #0f172a);
    line-height:   1.45;
    margin-bottom: 8px;
    display:       -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow:      hidden;
}

.ep-post-card__title-link {
    color:           inherit;
    text-decoration: none;
    transition:      color .2s ease;
}

.ep-post-card__title-link:hover {
    color: var(--color-primary, #2563eb);
}

.ep-post-card__excerpt {
    font-size:   0.8375rem;
    color:       var(--color-text-muted, #64748b);
    line-height: 1.6;
    margin-bottom: 16px;
    display:     -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow:    hidden;
    flex:        1;
}

/* Meta: avatar + author + date + arrow */
.ep-post-card__meta {
    display:         flex;
    align-items:     center;
    gap:             10px;
    margin-top:      auto;
    padding-top:     14px;
    border-top:      1px solid var(--color-border, #e2e8f0);
}

.ep-post-card__avatar {
    width:         28px !important;
    height:        28px !important;
    border-radius: 50% !important;
    object-fit:    cover;
    flex-shrink:   0;
}

.ep-post-card__meta-info {
    flex:    1;
    display: flex;
    flex-direction: column;
    gap:     2px;
    min-width: 0;
}

.ep-post-card__author {
    font-size:   0.8rem;
    font-weight: 600;
    color:       var(--color-text, #0f172a);
    overflow:    hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ep-post-card__meta-line {
    font-size: 0.75rem;
    color:     var(--color-text-light, #94a3b8);
    display:   flex;
    gap:       4px;
    align-items: center;
}

.ep-post-card__arrow {
    display:         flex;
    align-items:     center;
    justify-content: center;
    width:           32px;
    height:          32px;
    border-radius:   50%;
    background:      var(--color-primary, #2563eb);
    color:           #ffffff;
    text-decoration: none;
    flex-shrink:     0;
    transition:      background .2s ease, transform .2s ease;
}

.ep-post-card:hover .ep-post-card__arrow {
    background: var(--color-primary-dark, #1d4ed8);
    transform:  scale(1.1);
}

/* ── Paginasi ── */
.ep-pagination {
    display:     flex;
    justify-content: center;
    margin-top:  16px;
}

.ep-pagination .nav-links {
    display:     flex;
    align-items: center;
    gap:         6px;
    flex-wrap:   wrap;
    justify-content: center;
}

.ep-pagination .page-numbers {
    display:         flex;
    align-items:     center;
    justify-content: center;
    width:           38px;
    height:          38px;
    border:          1.5px solid var(--color-border, #e2e8f0);
    border-radius:   8px;
    font-size:       0.875rem;
    font-weight:     500;
    color:           var(--color-text-muted, #64748b);
    text-decoration: none;
    transition:      all .2s ease;
    background:      #ffffff;
}

.ep-pagination .page-numbers:hover {
    border-color: var(--color-primary, #2563eb);
    color:        var(--color-primary, #2563eb);
}

.ep-pagination .page-numbers.current {
    background:   var(--color-primary, #2563eb);
    border-color: var(--color-primary, #2563eb);
    color:        #ffffff;
    font-weight:  600;
}

.ep-pagination .page-numbers.dots {
    border-color: transparent;
    background:   none;
    width:        auto;
    padding:      0 4px;
}

/* ── No results ── */
.ep-no-results {
    text-align: center;
    padding:    60px 24px;
    color:      var(--color-text-muted, #64748b);
}

.ep-no-results svg {
    margin: 0 auto 20px;
    display: block;
}

.ep-no-results h3 {
    font-size:     1.25rem;
    font-weight:   600;
    color:         var(--color-text, #0f172a);
    margin-bottom: 8px;
}

.ep-no-results p {
    font-size: 0.9375rem;
    margin:    0;
}


/* ═══════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
    .ep-post-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ep-archive__layout {
        grid-template-columns: 220px 1fr;
    }

    .ep-related__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 768px */
@media (max-width: 768px) {

    /* Layout archive: sidebar di atas, grid di bawah */
    .ep-archive__layout {
        grid-template-columns: 1fr;
    }

    .ep-archive__sidebar {
        position:   static;
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap:        12px;
        padding-bottom: 4px;
    }

    .ep-sidebar-widget {
        min-width: 280px;
        flex-shrink: 0;
    }

    /* Topic list jadi horizontal scroll */
    .ep-topic-list {
        display:   flex;
        flex-wrap: wrap;
        gap:       8px;
        max-height: none;
        overflow-y: visible;
    }

    .ep-topic-list__item {
        border:  none;
    }

    .ep-topic-list__label {
        padding:        6px 12px;
        background:     var(--color-bg-muted, #f1f5f9);
        border:         1px solid var(--color-border, #e2e8f0);
        border-radius:  20px;
        gap:            6px;
    }

    .ep-topic-list__label.is-active {
        background:   var(--color-primary-light, #eff6ff);
        border-color: var(--color-primary, #2563eb);
    }

    /* Grid post 1 kolom */
    .ep-post-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Single post */
    .ep-single__title { font-size: 1.875rem; }

    .ep-single__meta {
        flex-direction: column;
        align-items:    flex-start;
    }

    .ep-post-nav {
        grid-template-columns: 1fr;
    }

    .ep-post-nav__item--next {
        text-align: left;
    }

    .ep-post-nav__item--next .ep-post-nav__label {
        justify-content: flex-start;
    }

    .ep-related__grid {
        grid-template-columns: 1fr;
    }

    .ep-page__title { font-size: 1.75rem; }

    .ep-container { padding: 0 16px; }
}

/* Mobile: 480px */
@media (max-width: 480px) {
    .ep-single__title { font-size: 1.5rem; }
    .ep-archive__title { font-size: 1.5rem; }
    .ep-page__title { font-size: 1.5rem; }

    .ep-archive-wrap { padding: 24px 0 60px; }

    .ep-sidebar-widget {
        min-width: 240px;
    }
}

/* ── Comment form fields layout ── */
.ep-single .comment-respond .comment-form {
    display:        flex;
    flex-direction: column;
    gap:            16px;
}

/* Field wrapper (label + input) */
.ep-single .comment-respond .comment-form-field {
    display:        flex;
    flex-direction: column;
    gap:            6px;
}

.ep-single .comment-respond .comment-form-field label {
    font-size:   0.875rem;
    font-weight: 600;
    color:       var(--color-text, #0f172a);
}

.ep-single .comment-respond .comment-form-field label .required {
    color:       var(--color-primary, #2563eb);
    margin-left: 2px;
}

.ep-single .comment-respond .comment-form-field input[type="text"],
.ep-single .comment-respond .comment-form-field input[type="email"],
.ep-single .comment-respond .comment-form-field input[type="url"],
.ep-single .comment-respond .comment-form-field textarea {
    width:         100%;
    padding:       11px 16px;
    font-family:   inherit;
    font-size:     0.9rem;
    color:         var(--color-text, #0f172a);
    background:    var(--color-bg-soft, #f8fafc);
    border:        1.5px solid var(--color-border, #e2e8f0);
    border-radius: 10px;
    outline:       none;
    transition:    border-color .2s ease, box-shadow .2s ease, background .2s ease;
    box-sizing:    border-box;
    line-height:   1.5;
    appearance:    none;
    -webkit-appearance: none;
}

.ep-single .comment-respond .comment-form-field input::placeholder,
.ep-single .comment-respond .comment-form-field textarea::placeholder {
    color: var(--color-text-light, #94a3b8);
}

.ep-single .comment-respond .comment-form-field input:focus,
.ep-single .comment-respond .comment-form-field textarea:focus {
    border-color: var(--color-primary, #2563eb);
    box-shadow:   0 0 0 3px rgba(37,99,235,.12);
    background:   #ffffff;
}

.ep-single .comment-respond .comment-form-field textarea {
    min-height: 140px;
    resize:     vertical;
}

/* Author + Email 2 kolom */
.ep-single .comment-respond .comment-form-author,
.ep-single .comment-respond .comment-form-email {
    flex:      1 1 calc(50% - 8px);
    min-width: 0;
}

/* Gabungkan author & email dalam satu baris */
.ep-single .comment-respond .comment-form > .comment-form-author,
.ep-single .comment-respond .comment-form > .comment-form-email {
    width: calc(50% - 8px);
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
    vertical-align: top;
}

/* Row author + email side-by-side */
.ep-single .comment-respond .comment-form {
    display:   block; /* override flex agar bisa float/inline */
}

.ep-single .comment-respond .comment-form-comment,
.ep-single .comment-respond .comment-form-url,
.ep-single .comment-respond .comment-form-cookies-consent,
.ep-single .comment-respond .form-submit {
    display:        block;
    margin-bottom:  16px;
    width:          100%;
}

.ep-single .comment-respond .comment-form-comment { order: 0; }

.ep-single .comment-respond .comment-form-author {
    float:         left;
    width:         calc(50% - 8px);
    margin-right:  16px;
    margin-bottom: 16px;
}

.ep-single .comment-respond .comment-form-email {
    float:         left;
    width:         calc(50% - 0px);
    margin-bottom: 16px;
}

.ep-single .comment-respond .comment-form-url {
    clear: both;
    margin-bottom: 16px;
}

/* Clear float setelah author+email */
.ep-single .comment-respond .comment-form-url::before,
.ep-single .comment-respond .form-submit::before {
    content: '';
    display: table;
    clear:   both;
}

/* Submit button */
.ep-single .comment-respond .form-submit input[type="submit"],
.ep-single .comment-respond .form-submit .submit {
    display:       inline-flex;
    align-items:   center;
    padding:       12px 28px;
    background:    var(--color-primary, #2563eb);
    color:         #ffffff;
    border:        none;
    border-radius: 10px;
    font-family:   inherit;
    font-size:     0.9375rem;
    font-weight:   600;
    cursor:        pointer;
    transition:    background .2s ease, transform .2s ease, box-shadow .2s ease;
    letter-spacing: .01em;
    appearance:    none;
    -webkit-appearance: none;
    line-height:   1;
}

.ep-single .comment-respond .form-submit input[type="submit"]:hover,
.ep-single .comment-respond .form-submit .submit:hover {
    background:  var(--color-primary-dark, #1d4ed8);
    transform:   translateY(-1px);
    box-shadow:  0 6px 20px rgba(37,99,235,.3);
}

/* Comment navigation */
.ep-comment-nav .nav-links {
    display:         flex;
    justify-content: space-between;
    margin-top:      24px;
    padding-top:     20px;
    border-top:      1px solid var(--color-border, #e2e8f0);
}

.ep-comment-nav .nav-links a {
    font-size:       0.875rem;
    font-weight:     600;
    color:           var(--color-primary, #2563eb);
    text-decoration: none;
    padding:         8px 16px;
    border:          1px solid var(--color-primary, #2563eb);
    border-radius:   8px;
    transition:      all .2s ease;
}

.ep-comment-nav .nav-links a:hover {
    background: var(--color-primary, #2563eb);
    color:      #ffffff;
}

/* ── Mobile comment form ── */
@media (max-width: 580px) {
    .ep-single .comment-respond .comment-form-author,
    .ep-single .comment-respond .comment-form-email {
        float:       none;
        width:       100%;
        margin-right: 0;
    }
}

/* ── Mobile sidebar search fix (override) ── */
@media (max-width: 768px) {
    /* Pastikan search form tidak overflow di dalam scroll container */
    .ep-archive__sidebar .ep-sidebar-widget {
        overflow: hidden;    /* cegah konten keluar widget */
    }

    .ep-archive__sidebar .ep-search-form {
        overflow: hidden;
    }

    /* Sidebar widget min-width jangan terlalu lebar */
    .ep-sidebar-widget {
        min-width: 260px;
        max-width: 90vw;
        box-sizing: border-box;
    }

    /* Pastikan input tidak meluber */
    .ep-search-form__input {
        max-width: calc(100% - 48px - 8px); /* 100% dikurangi tombol + gap */
    }
}

@media (max-width: 400px) {
    .ep-sidebar-widget {
        min-width: 240px;
    }
}
