
/* ==========================================
   MELSCAP — ACADEMIC PUBLISHING
   GLOBAL VISUAL REFINEMENT
   Desktop & Mobile
   ========================================== */


/* 1. WARNA IDENTITAS MELSCAP */

:root {
    --melscap-navy: #142B49;
    --melscap-gold: #B68C4C;
    --melscap-teal: #356C67;
    --melscap-ivory: #F7F5EF;
    --melscap-text: #405266;
}


/* 2. JUDUL HALAMAN (PAGES)
   Beranda dikecualikan */

body.page:not(.home) h1 {
    font-size: clamp(34px, 3.6vw, 46px) !important;
    line-height: 1.2 !important;
    letter-spacing: -0.025em;
    overflow-wrap: break-word;
}


/* 3. JUDUL ARTIKEL ILMIAH */

body.single-post .entry-title {
    color: var(--melscap-navy);
    font-size: clamp(32px, 3.5vw, 44px) !important;
    font-weight: 700;
    line-height: 1.25 !important;
    letter-spacing: -0.02em;
    overflow-wrap: break-word;
}


/* 4. HEADING DALAM ARTIKEL */

.single-post .entry-content h2 {
    color: #183348;
    font-size: clamp(25px, 2.4vw, 30px);
    font-weight: 700;
    line-height: 1.35;
    margin-top: 36px;
    margin-bottom: 18px;
}

.single-post .entry-content h3 {
    color: #183348;
    font-size: clamp(20px, 2vw, 23px);
    line-height: 1.4;
    margin-top: 28px;
    margin-bottom: 14px;
}


/* 5. GARIS GOLD DI BAWAH H2 ARTIKEL */

.single-post .entry-content h2::after {
    content: "";
    display: block;
    width: 46px;
    height: 3px;
    background: var(--melscap-gold);
    margin-top: 11px;
    border-radius: 3px;
}


/* 6. KETERBACAAN PARAGRAF ARTIKEL */

.single-post .entry-content > p {
    line-height: 1.75;
    margin-bottom: 20px;
}


/* 7. KOTAK PERTIMBANGAN KLINIS */

.clinical-gold {
    border-left: 4px solid #B68C4C;
    background-color: #F9F3E8;
    padding: 20px 24px;
    border-radius: 6px;
    margin-top: 24px;
    margin-bottom: 28px;
}

.clinical-mint {
    border-left: 4px solid #5E8F86;
    background-color: #EDF5F2;
    padding: 20px 24px;
    border-radius: 6px;
    margin-top: 24px;
    margin-bottom: 28px;
}


/* 8. SEMBUNYIKAN MENU MELSCAP TAMBAHAN
   Logo dan halaman filosofi tetap ada */

#primary-nav .menu-item-melscap {
    display: none !important;
}


/* ==========================================
   9. SCIENTIFIC SERIES — HERO PANEL
   ========================================== */

body.page-id-218 .melscap-series-hero {
    background: var(--melscap-ivory) !important;
    border: 1px solid #E3D9C9;
    border-left: 4px solid var(--melscap-gold);
    border-radius: 16px;

    padding: 28px 36px !important;
    margin: 0 0 28px !important;

    box-shadow: 0 8px 28px rgba(20,43,73,0.045);

    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.page-id-218 .melscap-series-hero
.wp-block-group__inner-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}


/* Hapus jarak berlebihan dari blok Gutenberg */

body.page-id-218 .melscap-series-hero p,
body.page-id-218 .melscap-series-hero h2 {
    margin: 0 !important;
    padding: 0 !important;
}


/* Label Academic Collection */

body.page-id-218 .melscap-series-hero p:first-of-type {
    color: #A77F40 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}


/* Judul panel */

body.page-id-218 .melscap-series-hero h2 {
    color: var(--melscap-navy) !important;
    font-size: clamp(26px, 2.7vw, 33px) !important;
    font-weight: 700;
    line-height: 1.25 !important;
}


/* Subjudul bahasa Inggris */

body.page-id-218
.melscap-series-hero p:nth-of-type(2) {
    color: var(--melscap-teal) !important;
    font-size: 16px !important;
    font-style: italic;
    line-height: 1.5;
}


/* Deskripsi panel */

body.page-id-218
.melscap-series-hero p:nth-of-type(3) {
    color: var(--melscap-text) !important;
    font-size: 15px !important;
    line-height: 1.7;
    max-width: 760px;
    margin-top: 6px !important;
}


/* ==========================================
   10. PENYESUAIAN TABLET
   ========================================== */

@media (max-width: 1024px) {

    body.page:not(.home) h1 {
        font-size: clamp(32px, 4.5vw, 40px) !important;
    }

    body.single-post .entry-title {
        font-size: clamp(30px, 4vw, 38px) !important;
    }
}


/* ==========================================
   11. PENYESUAIAN HANDPHONE
   ========================================== */

@media (max-width: 767px) {

    body.page:not(.home) h1 {
        font-size: 30px !important;
        line-height: 1.23 !important;
        letter-spacing: -0.015em;
    }

    body.single-post .entry-title {
        font-size: 29px !important;
        line-height: 1.3 !important;
    }

    .single-post .entry-content h2 {
        font-size: 24px;
        margin-top: 30px;
        margin-bottom: 16px;
    }

    .single-post .entry-content h3 {
        font-size: 20px;
        margin-top: 24px;
        margin-bottom: 12px;
    }

    .single-post .entry-content > p {
        line-height: 1.7;
        margin-bottom: 18px;
    }

    .clinical-gold,
    .clinical-mint {
        padding: 16px 18px;
        margin-top: 20px;
        margin-bottom: 22px;
    }

    body.page-id-218 .melscap-series-hero {
        padding: 24px 20px !important;
        border-radius: 12px;
        gap: 10px;
        margin-bottom: 24px !important;
    }

    body.page-id-218 .melscap-series-hero h2 {
        font-size: 25px !important;
    }

    body.page-id-218
    .melscap-series-hero p:nth-of-type(2) {
        font-size: 14px !important;
    }

    body.page-id-218
    .melscap-series-hero p:nth-of-type(3) {
        font-size: 15px !important;
    }
}


/* MELSCAP — Jelajahi Topik Mobile Editorial */

@media (max-width: 800px) {

  /* Dua kolom pada handphone */
  body.home .dm-v13-home
  .categories-section .cat-grid.dm-topics-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  /* Kartu lebih kompak */
  body.home .dm-v13-home .dm-topic-card {
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    padding-bottom: 12px !important;
  }

  /* Area ilustrasi lebih pendek */
  body.home .dm-v13-home .dm-topic-art {
    height: 90px !important;
    min-height: 0 !important;
  }

  /* Ilustrasi tetap proporsional */
  body.home .dm-v13-home .dm-topic-art svg,
  body.home .dm-v13-home .dm-topic-art img {
    max-height: 72px !important;
    max-width: 100%;
    object-fit: contain;
  }

  /* Judul kartu */
  body.home .dm-v13-home .dm-topic-card strong {
    font-size: 15px !important;
    line-height: 1.3 !important;
    overflow-wrap: break-word;
  }

  /* Keterangan kartu */
  body.home .dm-v13-home .dm-topic-card small {
    font-size: 12px !important;
    line-height: 1.45 !important;
    overflow-wrap: break-word;
  }
}

/* =========================================
   MELSCAP — TENTANG PENULIS
   Modern Editorial Mobile Layout
   ========================================= */

@media (max-width: 767px) {

  /* Gambar dan tulisan menjadi satu kolom */
  body.home .dm-v13-home .dm-about-band-inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 18px !important;
  }

  /* Ilustrasi ditampilkan di atas */
  body.home .dm-v13-home .dm-about-illustration {
    width: 100% !important;
    max-width: 180px !important;
    margin: 0 auto !important;
    flex: none !important;
  }

  /* Menjaga gambar tetap proporsional */
  body.home .dm-v13-home .dm-about-illustration img,
  body.home .dm-v13-home .dm-about-illustration svg {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Area teks mengambil lebar penuh */
  body.home .dm-v13-home .dm-about-text {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    text-align: left;
  }

  /* Nama penulis */
  body.home .dm-v13-home .dm-about-text h2 {
    font-size: 30px !important;
    line-height: 1.2 !important;
    margin-bottom: 12px !important;
  }

  /* Gelar akademik */
  body.home .dm-v13-home .dm-about-credentials {
    font-size: 15px !important;
    line-height: 1.5 !important;
    margin-bottom: 18px !important;
  }

  /* Deskripsi profil */
  body.home .dm-v13-home .dm-about-text p {
    font-size: 16px !important;
    line-height: 1.75 !important;
    max-width: 100% !important;
  }

  /* Ornamen yang tidak diperlukan di HP */
  body.home .dm-v13-home .dm-about-quote {
    display: none !important;
  }
}

/* =========================================
   MELSCAP — MOBILE EDITORIAL HERO
   Proporsi judul Beranda
   ========================================= */

@media (max-width: 767px) {

  body.home .dm-v13-home
  .dm-feature-hero h1 {
    font-size: clamp(44px, 11vw, 56px) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.025em;
  }

}

/* ==========================================
   MELSCAP — EDITORIAL ARTICLE CARDS
   Tulisan untuk Dipelajari
   ========================================== */

/* Judul kartu artikel */
body.home .dm-v13-home
.featured-section .article-card h3 {
    font-size: clamp(19px, 1.6vw, 23px);
    line-height: 1.3;
    letter-spacing: -0.015em;
    color: #142B49;
    overflow-wrap: break-word;
}

/* Deskripsi artikel */
body.home .dm-v13-home
.featured-section .article-card p {
    font-size: 15px;
    line-height: 1.65;
    color: #536475;
}

/* Area bawah kartu */
body.home .dm-v13-home
.featured-section .card-bottom {
    font-size: 13px;
    line-height: 1.5;
}

/* Penyesuaian khusus handphone */
@media (max-width: 767px) {

    body.home .dm-v13-home
    .featured-section .article-card h3 {
        font-size: 19px !important;
        line-height: 1.32 !important;
        margin-bottom: 10px;
    }

    body.home .dm-v13-home
    .featured-section .article-card p {
        font-size: 14px;
        line-height: 1.6;
    }

    body.home .dm-v13-home
    .featured-section .article-card-body {
        padding: 18px !important;
    }

    body.home .dm-v13-home
    .featured-section .card-bottom {
        font-size: 12px;
    }
}

/* =========================================
   MELSCAP — EDITORIAL ARROW
   Baca Tulisan: tanpa emoji
   ========================================= */

/* Panah asli disembunyikan */
body.home .featured-section
.card-bottom a span[aria-hidden="true"] {
    display: inline-block !important;
    position: relative;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important;
    overflow: hidden;
    vertical-align: middle;
    margin-left: 5px;
}

/* Ujung panah */
body.home .featured-section
.card-bottom a span[aria-hidden="true"]::before {
    content: "";
    position: absolute;
    width: 7px;
    height: 7px;
    top: 1px;
    right: 1px;
    border-top: 1.6px solid #B68C4C;
    border-right: 1.6px solid #B68C4C;
}

/* Garis diagonal panah */
body.home .featured-section
.card-bottom a span[aria-hidden="true"]::after {
    content: "";
    position: absolute;
    width: 13px;
    height: 1.6px;
    background: #B68C4C;
    left: 0;
    bottom: 3px;
    transform: rotate(-45deg);
    transform-origin: center;
}
/* MELSCAP — rapikan jarak awal isi artikel */
body.single-post .article-layout {
  padding-top: 10px;
}

body.single-post .entry-content > h2:first-child {
  margin-top: 0;
}
/* MELSCAP — ukuran Heading 2 artikel */
body.single-post .entry-content h2 {
  font-size: 40px;
  line-height: 1.25;
}

@media (max-width: 580px) {
  body.single-post .entry-content h2 {
    font-size: 31px;
  }
}