/*
Theme Name: Wahdah Pinrang Official
Theme URI: https://wahdahpinrang.or.id
Author: DPD Wahdah Islamiyah Pinrang
Description: Tema WordPress ringan, cepat, dan responsif untuk HP maupun Laptop dengan palet warna Wahdah Islamiyah.
Version: 1.2.0
Text Domain: wahdah-pinrang
*/

:root {
    --wi-teal: #0E7C86;
    --wi-teal-dark: #095961;
    --wi-gold: #CE8E00;
    --wi-gold-hover: #b37b00;
    --wi-ice: #D8ECEE;
    --wi-ice-soft: #F2F9FA;
    --wi-grad-dark: linear-gradient(135deg, #0E7C86 0%, #4A789C 100%);
    --wi-grad-soft: linear-gradient(135deg, #9AD3D6 0%, #E4F0F2 100%);
    --wi-text: #1E293B;
    --wi-muted: #64748B;
    --wi-white: #FFFFFF;
    --wi-radius: 12px;
    --wi-shadow: 0 4px 20px rgba(14, 124, 134, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--wi-text);
    background-color: #FAFDFD;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.25s ease;
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* TOP BAR (Tampil di Laptop, Ringkas di HP) */
.top-bar {
    background: var(--wi-grad-dark);
    color: var(--wi-white);
    font-size: 0.82rem;
    padding: 7px 0;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.top-bar-links a {
    color: var(--wi-ice);
    margin-left: 15px;
    font-weight: 500;
}

.top-bar-links a:hover {
    color: var(--wi-gold);
}

/* HEADER UTAMA (Proporsional di Laptop & HP) */
.site-header {
    background: var(--wi-white);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 999;
    border-bottom: 3px solid var(--wi-teal);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80px;
    padding: 10px 20px;
    gap: 20px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.site-logo-link {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.site-logo-img {
    height: 56px !important;
    width: auto !important;
    max-width: 78px;
    object-fit: contain;
}

.site-branding-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-title {
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--wi-teal);
    line-height: 1.2;
    letter-spacing: -0.2px;
}

.site-description {
    font-size: 0.76rem;
    color: var(--wi-muted);
    margin-top: 3px;
    line-height: 1.2;
}

/* NAVIGASI DESKTOP / LAPTOP */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.main-nav > ul,
.main-nav div > ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 6px 18px;
    align-items: center;
    justify-content: flex-end;
}

.main-nav li {
    position: relative;
    list-style: none;
}

.main-nav a {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--wi-text);
    padding: 8px 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.main-nav > ul > li > a:hover,
.main-nav > ul > .current-menu-item > a {
    color: var(--wi-teal);
}

.main-nav li.menu-item-has-children > a::after {
    content: '▾';
    font-size: 0.75rem;
    color: var(--wi-teal);
    margin-left: 3px;
}

/* Sub-Menu Dropdown di Laptop */
.main-nav ul.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    background: var(--wi-white);
    box-shadow: 0 10px 25px rgba(14, 124, 134, 0.15);
    border-radius: 8px;
    border-top: 3px solid var(--wi-gold);
    padding: 8px 0;
    z-index: 1000;
}

.main-nav li:hover > ul.sub-menu {
    display: block;
}

.main-nav ul.sub-menu a {
    display: block;
    padding: 9px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    border-bottom: 1px solid #F1F5F9;
}

.main-nav ul.sub-menu li:last-child a {
    border-bottom: none;
}

.main-nav ul.sub-menu a:hover {
    background: var(--wi-ice-soft);
    color: var(--wi-teal);
    padding-left: 20px;
}

.main-nav ul.sub-menu ul.sub-menu {
    top: 0;
    left: 100%;
}

/* TOMBOL AKSI HEADER (CARI & MENU HP) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.search-toggle, .menu-toggle {
    background: var(--wi-ice-soft);
    border: 1px solid var(--wi-ice);
    color: var(--wi-teal);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.search-toggle:hover, .menu-toggle:hover {
    background: var(--wi-teal);
    color: var(--wi-white);
}

.menu-toggle {
    display: none;
}

.header-search-bar {
    display: none;
    background: var(--wi-ice-soft);
    padding: 14px 0;
    border-top: 1px solid var(--wi-ice);
}

.header-search-bar.active {
    display: block;
}

.search-form-wrap {
    display: flex;
    gap: 10px;
}

.search-form-wrap input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    font-size: 0.95rem;
}

.search-form-wrap button {
    background: var(--wi-teal);
    color: var(--wi-white);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* SECTION HEADINGS */
.section-wrap {
    padding: 50px 0;
}

.section-bg-ice {
    background: linear-gradient(180deg, var(--wi-ice-soft) 0%, var(--wi-ice) 100%);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 26px;
    border-bottom: 2px solid #E2E8F0;
    padding-bottom: 12px;
}

.section-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--wi-teal);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 24px;
    background: var(--wi-gold);
    border-radius: 4px;
    flex-shrink: 0;
}

.section-link {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--wi-teal);
    background: var(--wi-white);
    padding: 6px 15px;
    border-radius: 20px;
    border: 1.5px solid var(--wi-teal);
}

.section-link:hover {
    background: var(--wi-teal);
    color: var(--wi-white);
}

/* KOTAK SHORTCODE [aplikasi_kader_wi] */
.kegiatan-shortcode-wrap {
    background: var(--wi-white);
    border-radius: var(--wi-radius);
    padding: 22px;
    margin-bottom: 28px;
    box-shadow: var(--wi-shadow);
    border-top: 4px solid var(--wi-teal);
    overflow-x: auto;
}

/* HERO HEADLINE GRID (Layar Besar 2 Kolom, HP 1 Kolom) */
.hero-section {
    padding: 30px 0 15px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 24px;
}

.hero-main-card {
    position: relative;
    border-radius: var(--wi-radius);
    overflow: hidden;
    min-height: 430px;
    display: flex;
    align-items: flex-end;
    background-color: var(--wi-teal-dark);
    box-shadow: var(--wi-shadow);
}

.hero-main-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-main-card:hover img {
    transform: scale(1.04);
}

.hero-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 35px 28px 25px;
    background: linear-gradient(0deg, rgba(9, 45, 52, 0.96) 0%, rgba(14, 124, 134, 0.65) 60%, transparent 100%);
    color: var(--wi-white);
}

.badge-gold {
    display: inline-block;
    background: var(--wi-gold);
    color: var(--wi-white);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.hero-main-title {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.32;
    margin-bottom: 10px;
}

.hero-main-title a:hover {
    color: var(--wi-ice);
}

.post-meta {
    font-size: 0.8rem;
    opacity: 0.9;
}

.hero-side-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hero-side-item {
    display: grid;
    grid-template-columns: 115px 1fr;
    gap: 14px;
    background: var(--wi-white);
    padding: 12px;
    border-radius: var(--wi-radius);
    box-shadow: var(--wi-shadow);
    border-left: 4px solid var(--wi-gold);
    align-items: center;
}

.hero-side-thumb {
    height: 88px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--wi-ice);
}

.hero-side-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-side-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 5px;
    color: var(--wi-text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-side-title a:hover {
    color: var(--wi-teal);
}

/* CARD GRID (Berita & Kegiatan) */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.post-card {
    background: var(--wi-white);
    border-radius: var(--wi-radius);
    overflow: hidden;
    box-shadow: var(--wi-shadow);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(216, 236, 238, 0.8);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(14, 124, 134, 0.14);
}

.card-thumb {
    position: relative;
    height: 200px;
    background: var(--wi-grad-soft);
    overflow: hidden;
}

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

.post-card:hover .card-thumb img {
    transform: scale(1.06);
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--wi-teal);
    color: var(--wi-white);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}

.card-badge.kegiatan {
    background: var(--wi-gold);
}

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

.card-date {
    font-size: 0.78rem;
    color: var(--wi-muted);
    margin-bottom: 6px;
}

.card-title {
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--wi-text);
}

.card-title a:hover {
    color: var(--wi-teal);
}

.card-excerpt {
    font-size: 0.88rem;
    color: var(--wi-muted);
    margin-bottom: 14px;
    flex: 1;
}

.card-readmore {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--wi-teal);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* GALERI FOTO SLIDE OTOMATIS */
.gallery-slider-wrap {
    position: relative;
}

.gallery-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 10px;
    scrollbar-width: none;
}

.gallery-track::-webkit-scrollbar {
    display: none;
}

.gallery-slide {
    flex: 0 0 calc(25% - 12px);
    scroll-snap-align: start;
    position: relative;
    height: 240px;
    border-radius: var(--wi-radius);
    overflow: hidden;
    box-shadow: var(--wi-shadow);
    background: var(--wi-teal-dark);
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-slide:hover img {
    transform: scale(1.08);
}

.gallery-caption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 25px 14px 12px;
    background: linear-gradient(0deg, rgba(9, 45, 52, 0.92) 0%, transparent 100%);
    color: var(--wi-white);
}

.gallery-caption span {
    display: inline-block;
    font-size: 0.68rem;
    background: var(--wi-gold);
    padding: 2px 8px;
    border-radius: 3px;
    margin-bottom: 4px;
    font-weight: 700;
}

.gallery-caption h4 {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.slider-controls {
    display: flex;
    gap: 8px;
}

.slider-btn {
    background: var(--wi-teal);
    color: var(--wi-white);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
}

/* SINGLE & ARCHIVE CONTENT */
.content-area {
    padding: 40px 0;
}

.single-post-box {
    background: var(--wi-white);
    padding: 32px;
    border-radius: var(--wi-radius);
    box-shadow: var(--wi-shadow);
    max-width: 860px;
    margin: 0 auto;
}

.single-title {
    font-size: 1.85rem;
    color: var(--wi-teal-dark);
    margin: 10px 0 15px;
    line-height: 1.3;
}

.single-thumb {
    margin: 18px 0 22px;
    border-radius: var(--wi-radius);
    overflow: hidden;
}

.entry-content p {
    margin-bottom: 16px;
    font-size: 1.02rem;
}

/* FOOTER */
.site-footer {
    background: var(--wi-grad-dark);
    color: var(--wi-white);
    padding: 50px 0 25px;
    margin-top: 40px;
    border-top: 5px solid var(--wi-gold);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-title {
    font-size: 1.12rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--wi-gold);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a:hover {
    color: var(--wi-gold);
    padding-left: 4px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(216, 236, 238, 0.2);
    font-size: 0.82rem;
    color: var(--wi-ice);
}

/* FLOATING WHATSAPP KANAN BAWAH (DIKUNCI AGAR PASTI MELAYANG) */
.wa-floating-btn {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 99999 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: linear-gradient(135deg, #1FAF5B 0%, #0E7C86 100%) !important;
    color: #FFFFFF !important;
    padding: 8px 15px 8px 10px !important;
    border-radius: 50px !important;
    box-shadow: 0 6px 20px rgba(14, 124, 134, 0.4) !important;
    border: 2px solid #FFFFFF !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    width: auto !important;
    max-width: 260px !important;
    text-decoration: none !important;
}

.wa-floating-btn:hover {
    transform: translateY(-3px);
}

.wa-icon-circle {
    width: 28px !important;
    height: 28px !important;
    background: #25D366 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.wa-icon-circle svg {
    width: 17px !important;
    height: 17px !important;
    fill: #FFFFFF !important;
    display: block !important;
}

.wa-floating-text {
    white-space: nowrap !important;
    color: #FFFFFF !important;
}

/* =========================================================
   OPTIMASI TAMPILAN TABLET & HP (MOBILE RESPONSIVE)
   ========================================================= */
@media (max-width: 992px) {
    .menu-toggle {
        display: inline-flex;
    }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--wi-white);
        padding: 16px 20px;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
        border-top: 1px solid var(--wi-ice);
        max-height: 78vh;
        overflow-y: auto;
    }
    .main-nav.active {
        display: block;
    }
    .main-nav > ul,
    .main-nav div > ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .main-nav li {
        width: 100%;
    }
    .main-nav a {
        width: 100%;
        padding: 10px 6px;
        border-bottom: 1px solid #F1F5F9;
        justify-content: space-between;
    }
    .main-nav ul.sub-menu {
        position: static;
        display: block;
        box-shadow: none;
        border-top: none;
        border-left: 3px solid var(--wi-gold);
        padding: 4px 0 4px 12px;
        margin: 4px 0 8px 6px;
        background: #FAFDFD;
    }
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-slide {
        flex: 0 0 calc(50% - 10px);
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 15px;
    }
    .top-bar-links {
        display: none; /* Menyembunyikan link duplikat di topbar HP agar hemat ruang */
    }
    .top-bar-inner {
        justify-content: center;
        text-align: center;
        font-size: 0.75rem;
    }
    /* Perbaikan Header HP agar tidak tinggi & tidak tergencet */
    .header-inner {
        min-height: 66px;
        padding: 8px 15px;
        gap: 10px;
    }
    .site-branding {
        gap: 10px;
        max-width: calc(100% - 92px);
    }
    .site-logo-img {
        height: 44px !important;
        max-width: 60px;
    }
    .site-title {
        font-size: 0.96rem;
        line-height: 1.22;
    }
    .site-description {
        font-size: 0.68rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 200px;
    }
    .search-toggle, .menu-toggle {
        width: 36px;
        height: 36px;
    }
    /* Hero & Kartu di HP */
    .hero-section {
        padding: 18px 0 10px;
    }
    .hero-main-card {
        min-height: 270px;
    }
    .hero-overlay {
        padding: 20px 16px 16px;
    }
    .hero-main-title {
        font-size: 1.18rem;
    }
    .hero-side-item {
        grid-template-columns: 95px 1fr;
        gap: 12px;
        padding: 10px;
    }
    .hero-side-thumb {
        height: 74px;
    }
    .hero-side-title {
        font-size: 0.88rem;
    }
    .section-wrap {
        padding: 36px 0;
    }
    .section-title {
        font-size: 1.2rem;
    }
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .card-thumb {
        height: 185px;
    }
    .gallery-slide {
        flex: 0 0 82%;
        height: 215px;
    }
    .single-post-box {
        padding: 20px 16px;
    }
    .single-title {
        font-size: 1.4rem;
    }
    .wa-floating-btn {
        bottom: 15px !important;
        right: 15px !important;
        padding: 7px 13px 7px 8px !important;
        font-size: 0.8rem !important;
    }
}
/* =========================================================
   TATA LETAK HALAMAN POSTINGAN (SIDEBAR POPULER, PREV/NEXT, RELATED)
   ========================================================= */
.post-breadcrumb {
    background: var(--wi-ice-soft);
    border: 1px solid var(--wi-ice);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--wi-muted);
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.post-breadcrumb a {
    color: var(--wi-teal);
    font-weight: 600;
}

.post-breadcrumb a:hover {
    color: var(--wi-gold);
}

.post-breadcrumb .current {
    color: var(--wi-text);
    font-weight: 500;
}

.single-layout-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    align-items: start;
}

.single-post-box {
    max-width: 100%;
    margin: 0 0 28px 0;
}

.single-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.85rem;
    color: var(--wi-muted);
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid #E2E8F0;
}

.post-tags-box {
    margin-top: 25px;
    padding-top: 16px;
    border-top: 1px dashed #CBD5E1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 0.85rem;
}

.post-tags-box a {
    background: var(--wi-ice-soft);
    color: var(--wi-teal);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid var(--wi-ice);
}

.post-tags-box a:hover {
    background: var(--wi-teal);
    color: var(--wi-white);
}

/* Navigasi Prev & Next */
.post-prev-next {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 32px;
}

.pn-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    background: var(--wi-white);
    padding: 18px 20px;
    border-radius: var(--wi-radius);
    box-shadow: var(--wi-shadow);
    border: 1px solid var(--wi-ice);
    border-left: 4px solid var(--wi-teal);
}

.pn-next .pn-card {
    text-align: right;
    border-left: 1px solid var(--wi-ice);
    border-right: 4px solid var(--wi-gold);
}

.pn-card:hover {
    transform: translateY(-3px);
    border-color: var(--wi-teal);
}

.pn-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--wi-teal);
    margin-bottom: 6px;
    letter-spacing: 0.4px;
}

.pn-next .pn-label {
    color: var(--wi-gold);
}

.pn-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--wi-text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pn-empty {
    opacity: 0.6;
    background: var(--wi-ice-soft);
}

/* Baca Juga Postingan Lainnya */
.related-posts-box {
    background: var(--wi-white);
    padding: 26px;
    border-radius: var(--wi-radius);
    box-shadow: var(--wi-shadow);
}

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

/* Sidebar Postingan Populer */
.single-sidebar {
    position: sticky;
    top: 98px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-widget {
    background: var(--wi-white);
    padding: 22px;
    border-radius: var(--wi-radius);
    box-shadow: var(--wi-shadow);
    border-top: 4px solid var(--wi-teal);
}

.widget-title {
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--wi-teal);
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--wi-ice);
}

.popular-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.popular-item {
    display: grid;
    grid-template-columns: 26px 68px 1fr;
    gap: 10px;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid #F1F5F9;
}

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

.popular-rank {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--wi-gold);
}

.popular-thumb {
    width: 68px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--wi-ice);
}

.popular-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-info h4 {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.32;
    color: var(--wi-text);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-item:hover .popular-info h4 {
    color: var(--wi-teal);
}

.popular-info span {
    font-size: 0.74rem;
    color: var(--wi-muted);
}

/* Kategori di Sidebar */
.sidebar-cat-list {
    list-style: none;
}

.sidebar-cat-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #F1F5F9;
    font-size: 0.9rem;
    font-weight: 600;
}

.sidebar-cat-list li a:hover {
    color: var(--wi-teal);
    padding-left: 4px;
}

/* Responsif Halaman Postingan di HP & Tablet */
@media (max-width: 992px) {
    .single-layout-grid {
        grid-template-columns: 1fr;
    }
    .single-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .post-prev-next {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .pn-next .pn-card {
        text-align: left;
        border-right: 1px solid var(--wi-ice);
        border-left: 4px solid var(--wi-gold);
    }
    .related-posts-box {
        padding: 18px 15px;
    }
    .related-grid {
        grid-template-columns: 1fr;
    }
}