/* ========================================
   Share Buttons - Style Fancy
   ======================================== */

.singular .entry-header .shared-counts-wrap {
    margin: 25px 0;
}

.shared-counts-wrap.style-fancy {
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 4px 0;
}

.shared-counts-wrap.style-fancy::-webkit-scrollbar {
    display: none;
}

.shared-counts-wrap.style-fancy .shared-counts-button {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    align-items: center;
    border-radius: 3px;
    color: #fff;
    display: inline-flex;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 4px;
    padding: 10px 12px;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
}

.shared-counts-wrap.style-fancy .shared-counts-button:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.shared-counts-wrap.style-fancy .shared-counts-button svg {
    fill: #fff;
    height: 18px;
    width: 18px;
    flex-shrink: 0;
}

.shared-counts-wrap.style-fancy .shared-counts-element {
    display: inline-flex;
    align-items: center;
    padding: 0 4px;
    line-height: 1;
}

.shared-counts-wrap.style-fancy .shared-counts-element.icon-element {
    padding: 1px 0;
}

.shared-counts-wrap.style-fancy .shared-counts-label {
    display: none;
    line-height: 1;
}

/* Platform Colors */
.shared-counts-wrap.style-fancy .shared-counts-button.facebook {
    background: #3a589e;
}
.shared-counts-wrap.style-fancy .shared-counts-button.facebook:hover {
    background: #2c4379;
}

.shared-counts-wrap.style-fancy .shared-counts-button.x-share-button {
    background: #000;
}
.shared-counts-wrap.style-fancy .shared-counts-button.x-share-button:hover {
    background: #333;
}

.shared-counts-wrap.style-fancy .shared-counts-button.chatgpt {
    background: #181818;
}
.shared-counts-wrap.style-fancy .shared-counts-button.chatgpt:hover {
    background: #212121;
}

.shared-counts-wrap.style-fancy .shared-counts-button.perplexity {
    background: #0098a1;
}
.shared-counts-wrap.style-fancy .shared-counts-button.perplexity:hover {
    background: #106875;
}
.shared-counts-wrap.style-fancy .shared-counts-button.perplexity svg {
    fill: none !important;
    stroke: #fff;
    stroke-width: 0.5;
}

.shared-counts-wrap.style-fancy .shared-counts-button.linkedin {
    background: #0077b5;
}
.shared-counts-wrap.style-fancy .shared-counts-button.linkedin:hover {
    background: #005582;
}

.shared-counts-wrap.style-fancy .shared-counts-button.whatsapp {
    background: #25d366;
}
.shared-counts-wrap.style-fancy .shared-counts-button.whatsapp:hover {
    background: #1da851;
}

.shared-counts-wrap.style-fancy .shared-counts-button.email {
    background: #f4f4f4;
    color: #464646;
}
.shared-counts-wrap.style-fancy .shared-counts-button.email:hover {
    background: #e7e7e7;
}
.shared-counts-wrap.style-fancy .shared-counts-button.email svg {
    fill: #464646;
}

/* Responsive Visibility */
.shared-counts-wrap.style-fancy .shared-counts-element.hide-element {
    display: none;
}

@media (max-width: 1100px) {
    .shared-counts-wrap.style-fancy .shared-counts-element.hide-element-tablet-down {
        display: none;
    }
}

@media (max-width: 800px) {
    .shared-counts-wrap.style-fancy .shared-counts-element.hide-element-mobile-down {
        display: none;
    }
    .shared-counts-wrap.style-fancy .shared-counts-element.on-desktop-only {
        display: none;
    }
}

@media (max-width: 560px) {
    .shared-counts-wrap.style-fancy .shared-counts-button {
        padding: 8px 10px;
    }
    .shared-counts-wrap.style-fancy .shared-counts-button svg {
        width: 16px;
        height: 16px;
    }
}

/* ========================================
   Single Post Layout: Meta Row
   Byline (kiri) + Share Buttons (kanan)
   ======================================== */

/**
 * Container satu baris: meta info di kiri, share buttons di kanan.
 * Margin-bottom menggantikan margin yang sebelumnya ada di .maci-single__byline.
 */
.maci-single__meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-bottom: 0;
}

/**
 * Wrapper share buttons — normalisasi margin bawaan dari class .singular.
 * Pastikan tombol sejajar tengah dengan teks byline.
 */
.maci-single__share {
    flex-shrink: 0;
}

.maci-single__share .shared-counts-wrap.style-fancy {
    margin: 0;
    padding: 0;
}

/* ========================================
   Single Post: Excerpt Block
   Tampil sebagai ringkasan eksekutif
   antara Featured Image dan Content Body
   ======================================== */

.maci-single__excerpt {
    font-size: 1.0625rem;        /* 17px */
    line-height: 1.75;
    font-style: italic;
    color: #475569;
    border-left: 4px solid var(--maci-blue, #4e9ad6);
    background: rgba(78, 154, 214, 0.06);
    border-radius: 0 12px 12px 0;
    padding: 20px 24px;
    margin: 0 0 40px;
}

.maci-single__excerpt p {
    margin: 0;
}

/* ========================================
   Responsive Overrides
   ======================================== */

/* Tablet: tumpuk meta-row jika tidak muat */
@media (max-width: 700px) {
    .maci-single__meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
}

/* Mobile: kurangi padding excerpt */
@media (max-width: 480px) {
    .maci-single__excerpt {
        font-size: 1rem;
        padding: 16px 18px;
        margin-bottom: 28px;
    }
}

/* Dark mode support (opsional) */
@media (prefers-color-scheme: dark) {
    .shared-counts-wrap.style-fancy .shared-counts-button.email {
        background: #2a2a2a;
        color: #ccc;
    }
    .shared-counts-wrap.style-fancy .shared-counts-button.email:hover {
        background: #3a3a3a;
    }
    .shared-counts-wrap.style-fancy .shared-counts-button.email svg {
        fill: #ccc;
    }
}

/* ========================================
   Bottom Share Section
   Label "BAGIKAN ARTIKEL INI :" + tombol
   ======================================== */

/**
 * Wrapper section share di bagian bawah artikel.
 * Dipisahkan dengan garis tipis dari konten di atasnya.
 */
.maci-single__share-bottom {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

/**
 * Label kecil "BAGIKAN ARTIKEL INI :" di atas tombol share.
 * Huruf kapital, spasi lebar, warna muted — tidak bersaing
 * secara visual dengan tombol di bawahnya.
 */
.maci-single__share-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 0 0 12px;
    line-height: 1;
}

/* Normalisasi margin tombol di dalam konteks bottom share */
.maci-single__share-bottom .shared-counts-wrap.style-fancy {
    margin: 0;
    padding: 0;
}

/* ========================================
   Related Articles Section
   "Artikel Terkait" — 3 kartu grid
   ======================================== */

/**
 * Section wrapper.
 * Jarak atas dan garis pemisah memisahkan
 * dari section share di atasnya.
 */
.maci-related {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

/**
 * Heading "Artikel Terkait" dengan garis dekoratif gradient
 * brand (oranye → biru) menggunakan ::after pseudo-element.
 * Kata "Terkait" diberi warna aksen via <span>.
 */
.maci-related__heading {
    position: relative;
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-ink, #0f172a);
    margin: 0 0 28px;
    padding-bottom: 14px;
}

.maci-related__heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        to right,
        #f59e0b,
        var(--maci-blue, #4e9ad6)
    );
}

.maci-related__heading span {
    color: var(--maci-blue, #4e9ad6);
}

/**
 * Grid 3 kolom — satu kolom per kartu.
 * Collapse ke 1 kolom di mobile.
 */
.maci-related__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/**
 * Kartu artikel terkait.
 * Border tipis, sudut melengkung, bayangan muncul saat hover.
 */
.maci-related__card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.maci-related__card:hover {
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.10);
    transform: translateY(-3px);
}

/**
 * Link wrapper — flex column agar body
 * terdorong ke bawah gambar.
 */
.maci-related__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.maci-related__link:hover,
.maci-related__link:focus {
    text-decoration: none;
    opacity: 1;
}

/**
 * Kontainer gambar: rasio tetap 16:9,
 * overflow hidden untuk crop + efek zoom hover.
 */
.maci-related__img {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f1f5f9; /* placeholder saat gambar belum load */
}

.maci-related__img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.maci-related__card:hover .maci-related__img img {
    transform: scale(1.05);
}

/**
 * Placeholder saat post tidak punya featured image.
 * Mengisi area gambar dengan warna background ringan.
 */
.maci-related__img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(78, 154, 214, 0.10),
        rgba(91, 190, 159, 0.08)
    );
}

/**
 * Area teks di bawah gambar.
 */
.maci-related__body {
    padding: 16px 18px 20px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/**
 * Judul kartu: tengah, warna aksen brand, tidak underline.
 */
.maci-related__title {
    font-size: 0.9375rem; /* 15px */
    font-weight: 600;
    line-height: 1.5;
    color: var(--maci-blue, #4e9ad6);
    text-align: center;
    margin: 0;
}

/* ==========================================
   Responsive: Related Articles
   ========================================== */

/* Tablet: 2 kolom */
@media (max-width: 900px) {
    .maci-related__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 1 kolom + heading lebih kecil */
@media (max-width: 600px) {
    .maci-related__grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .maci-related__heading {
        font-size: 1.25rem;
    }

    .maci-related {
        margin-top: 36px;
        padding-top: 28px;
    }

    .maci-single__share-bottom {
        margin-top: 36px;
        padding-top: 24px;
    }
}