/* ===== MAIN LAYOUT ===== */
.single-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 30px;
    padding: 30px 20px;
    width: 100%;
    box-sizing: border-box;
    align-items: start;
}

.single-main {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
    box-sizing: border-box;
}

/* ===== HEADER: JUDUL + EXCERPT + META ===== */
.single-header {
    display: block;
    margin: 0 0 2rem 0;
    padding: 0;
    position: static !important;
    top: auto !important;
    transform: none !important;
}

.single-header h1.single-title {
    display: block;
    width: 100%;
    max-width: 100%;
    font-size: 1.95rem;
    font-weight: 800;
    margin: 0 0 1rem 0;
    padding: 0;
    line-height: 1.25;
    color: var(--lj-ink);
}

.single-header .single-excerpt {
    width: 100%;
    font-size: 1rem;
    color: #4a5568;
    margin: 0 0 1rem 0;
    padding: 0;
    line-height: 1.3;
    font-weight: 400;
    font-style: italic;
}

.single-header .single-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.95rem;
    color: #718096;
    margin: 0;
    padding: 15px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

/* ===== THUMBNAIL & CONTENT ===== */
.single-image,
.single-content {
    margin: 2rem 0;
    padding: 0;
    width: 100%;
}

.single-content {
    font-size: 1.15rem;
    line-height: 1.5;
    margin-bottom: 2em;
    color: var(--lj-ink);
}

.single-content p {
    margin-bottom: 1.5em;
}

.single-image img {
    width: 100%;
    height: 450px;
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ===== RELATED ARTICLES ===== */
.related-article-box {
    position: relative;
    border: 1px solid var(--lj-maroon);
    background: #fff;
    padding: 1.25rem 1.5rem 0.5rem;
    margin: 2rem 0 1.5rem;
    border-radius: 12px 12px 0 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.related-article-box .related-label {
    position: absolute;
    top: -20px;
    left: -1px;
    background: var(--lj-maroon);
    font-size: 1rem;
    font-weight: 700;
    color: white;
    padding: 8px 16px;
    text-transform: none;
    border-radius: 6px 6px 6px 0;
    box-shadow: 0 2px 8px rgba(230, 57, 70, 0.3);
}

.related-article-box ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.related-article-box li {
    margin: 0.8rem 0;
    padding: 0;
    border-bottom: 1px solid #e2e8f0;
}

.related-article-box li:last-child {
    border-bottom: none;
}

.related-article-box a {
    text-decoration: none;
    color: #2b6cb0;
    font-weight: 500;
    font-size: 1.05rem;
    transition: color 0.2s ease;
}

.related-article-box a:hover {
    text-decoration: underline;
    color: #2c5282;
}

/* ===== LATEST POSTS - REVISED GRID ===== */
.latest-posts-fullwidth {
    width: 100%;
    padding: 0;
    margin: 0;
}

.latest-posts-fullwidth .single-wrapper {
    display: block;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Latest Posts Styles */
.latest-posts {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.latest-posts h3 {
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--lj-ink);
    border-left: 4px solid var(--lj-maroon);
    padding-left: 0.8rem;
    font-family: var(--lj-font-body);
}

/* GRID 1 BARIS X 5 KOLOM */
.latest-posts .posts-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    width: 100%;
    align-items: start;
}

/* STYLING UNTUK 5 POST GRID */
.latest-posts .secondary-posts {
    display: contents;
}

.latest-posts .secondary-post {
    padding: 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: hidden;
}

.latest-posts .secondary-post:hover {
    transform: translateY(-5px);
}

.latest-posts .secondary-post-thumbnail {
    width: 100%;
    height: 140px;
    object-fit: cover;
    margin-bottom: 0;
    display: block;
}

.latest-posts .secondary-post-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.latest-posts .secondary-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 8px;
    padding-top: 0.25rem;
}

.latest-posts .secondary-post-category {
    color: var(--lj-maroon);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.latest-posts .secondary-post-date {
    color: #64748b;
    font-size: 0.75rem;
    white-space: nowrap;
}

.latest-posts .secondary-post-title {
    font-size: 0.90rem;
    font-weight: 600;
    color: var(--lj-ink);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.2em;
}

/* Link styles */
.latest-posts a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    transition: color 0.3s ease;
}

.latest-posts a:hover {
    color: var(--lj-maroon);
}

.latest-posts .secondary-post:hover .secondary-post-title {
    color: var(--lj-maroon);
}

/* =========================
RESPONSIVE DESIGN
========================= */
@media (max-width: 1200px) {
    .latest-posts .posts-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }
}

@media (max-width: 992px) {
    .latest-posts .posts-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .latest-posts .secondary-post-thumbnail {
        height: 140px;
    }
    
    .latest-posts .secondary-post-title {
        font-size: 0.95rem;
        -webkit-line-clamp: 2;
        min-height: 2.8em;
    }
}

@media (max-width: 768px) {
    .latest-posts-fullwidth {
        padding: 25px 0;
        margin: 30px 0;
    }
    
    .latest-posts .posts-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .latest-posts h3 {
        font-size: 1.3rem;
        margin-bottom: 1.2rem;
    }
    
    .latest-posts .secondary-post-thumbnail {
        height: 120px;
    }
    
    .latest-posts .secondary-post-content {
        padding: 0.8rem;
    }
}

@media (max-width: 480px) {
    .latest-posts .posts-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .latest-posts-fullwidth .single-wrapper {
        padding: 0 15px;
    }
    
    .latest-posts .secondary-post-thumbnail {
        height: 150px;
    }
    
    .latest-posts .secondary-post-title {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
        min-height: 2.6em;
    }
}

/* =========================
ANIMATIONS & EFFECTS
========================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.latest-posts .secondary-post {
    animation: fadeInUp 0.6s ease-out;
}

.latest-posts .secondary-post:nth-child(1) { animation-delay: 0.1s; }
.latest-posts .secondary-post:nth-child(2) { animation-delay: 0.2s; }
.latest-posts .secondary-post:nth-child(3) { animation-delay: 0.3s; }
.latest-posts .secondary-post:nth-child(4) { animation-delay: 0.4s; }
.latest-posts .secondary-post:nth-child(5) { animation-delay: 0.5s; }

/* =========================
SPECIAL EFFECTS
========================= */
.latest-posts .secondary-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--lj-maroon), var(--lj-gold), var(--lj-maroon));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.latest-posts .secondary-post:hover::before {
    opacity: 1;
}

/* =========================
MOBILE LAYOUT - SINGLE POST
========================= */
@media (max-width: 768px) {
  
  /* MAIN LAYOUT MOBILE */
  .single-wrapper {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 15px;
    width: 100%;
  }
  
  .single-main {
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin: 0;
  }
  
  /* HEADER MOBILE */
  .single-header {
    margin: 0 0 1.5rem 0;
  }
  
  .single-header h1.single-title {
    font-size: 1.25rem;
    line-height: 1.3;
    margin: 0 0 0.8rem 0;
    font-weight: 999;
  }
  
  .single-header .single-excerpt {
    font-size: 0.95rem;
    margin: 0 0 0.8rem 0;
  }
  
  .single-header .single-meta {
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.85rem;
    padding: 12px 0;
  }
  
  /* THUMBNAIL & CONTENT MOBILE */
  .single-image,
  .single-content {
    margin: 1.5rem 0;
  }
  
  .single-content {
    font-size: 1rem;
    line-height: 1.6;
  }
  
  .single-content p {
    margin-bottom: 1.2em;
  }
  
  .single-image img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
    height:200px;
  }
  
  /* RELATED ARTICLES MOBILE */
  .related-article-box {
    padding: 1rem 1.2rem 0.25rem;
    margin: 1.5rem 0 1rem;
    border-radius: 8px 8px 0 8px;
  }
  
  .related-article-box .related-label {
    top: -18px;
    font-size: 0.9rem;
    padding: 6px 12px;
  }
  
  .related-article-box li {
    margin: 0.6rem 0;
  }
  
  .related-article-box a {
    font-size: 0.95rem;
  }
  
  /* SIDEBAR DISEMBUNYIKAN DI MOBILE */
  .single-wrapper > *:last-child {
    display: none;
  }
  
  /* UTILITY MOBILE */
  .mobile-only {
    display: block;
  }
  
  .desktop-only {
    display: none;
  }
  
}

/* =========================
TABLET OPTIMIZATION - SINGLE POST
========================= */
@media (min-width: 769px) and (max-width: 1024px) {
  .single-wrapper {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 20px;
  }
  
  .single-wrapper > *:last-child {
    display: none;
  }
}

/* =========================
HIDE MOBILE ELEMENTS DI DESKTOP
========================= */
@media (min-width: 1025px) {
  .mobile-only {
    display: none;
  }
  
  .desktop-only {
    display: block;
  }
}

/* =========================
TOUCH FRIENDLY STYLES
========================= */
@media (max-width: 768px) {
  .single-content a,
  .related-article-box a,
  .latest-posts a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  /* Memastikan tombol dan link mudah diklik */
  button, 
  .hamburger-menu {
    min-width: 44px;
    min-height: 44px;
  }
}

/* =========================
IMPROVED READABILITY
========================= */
@media (max-width: 768px) {
  .single-content {
    font-size: 16px;
    line-height: 1.5;
  }
  
  .single-content h2 {
    font-size: 1.25rem;
    margin: 1.5em 0 0.8em 0;
  }
  
  .single-content h3 {
    font-size: 1.2rem;
    margin: 1.3em 0 0.7em 0;
  }
  
  /* Spacing yang lebih longgar untuk mobile */
  .single-content p,
  .single-content ul,
  .single-content ol {
    margin-bottom: 1.3em;
  }
}
/* =========================
LENSAJAMBI — BREADCRUMB, TANGGAL+SHARE, BOKS PENULIS
========================= */
.lj-breadcrumb {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 12px;
}

.lj-breadcrumb a {
    color: #777;
}

.lj-breadcrumb a:hover {
    color: var(--lj-maroon);
}

.lj-breadcrumb__sep {
    margin: 0 6px;
}

/* Baris tanggal publikasi + tombol share (inline, di bawah judul) */
.lj-meta-share {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.lj-meta-share__date {
    font-size: 0.85rem;
    color: #777;
}

.lj-share-inline {
    display: flex;
    gap: 8px;
}

.lj-share-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lj-ink);
    cursor: pointer;
    transition: all 0.2s ease;
}

.lj-share-btn:hover {
    background: var(--lj-maroon);
    color: #fff;
    border-color: var(--lj-maroon);
}

.lj-share-btn.lj-copied {
    background: var(--lj-gold);
    border-color: var(--lj-gold);
    color: #fff;
}

/* Boks penulis — foto bundar kiri, kanan: nama > profesi > bio (vertikal) */
.lj-author-box {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px;
    background: var(--lj-cream);
    border-radius: 10px;
    margin-bottom: 24px;
}

.lj-author-box__photo-link img,
.lj-author-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.lj-author-box__info {
    flex: 1;
    min-width: 0;
}

.lj-author-box__name {
    font-weight: 700;
    color: var(--lj-ink);
    font-size: 1rem;
    margin-right: 8px;
}

.lj-author-box__name:hover {
    color: var(--lj-maroon);
}

.lj-author-box__profesi {
    font-size: 0.85rem;
    color: #666;
}

.lj-author-box__bio {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.5;
    margin-top: 6px;
    max-height: 2.9em; /* +- 2 baris */
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.lj-author-box__bio.lj-expanded {
    max-height: 500px;
}

.lj-author-box__bio p:first-child {
    margin-top: 0;
}

.lj-author-box__more {
    background: none;
    border: none;
    color: var(--lj-maroon);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 0 0;
    align-self: flex-start;
}

.lj-author-box__more:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .lj-meta-share {
        flex-direction: column;
        align-items: flex-start;
    }
}