/* Blok konten: akordeon, dokumen, lampiran. Dipakai situs publik DAN editor admin agar tampilannya sama. */

/* =====================================================================
   Akordeon Konten
   ===================================================================== */
.acc-group { margin: 22px 0; display: flex; flex-direction: column; gap: 10px; }
details.acc-item,
:is(.article-content, .page-content, .article-body) details {
    background: #fff;
    border: 1px solid #dfe6fb;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 21, 123, .05);
    overflow: hidden;
    margin: 12px 0;
    transition: box-shadow .2s ease, border-color .2s ease;
}
.acc-group > details.acc-item { margin: 0; }
details.acc-item[open],
:is(.article-content, .page-content, .article-body) details[open] {
    border-color: #b9c6f3;
    box-shadow: 0 6px 18px rgba(0, 21, 123, .1);
}
details.acc-item > summary,
:is(.article-content, .page-content, .article-body) details > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 20px;
    font-weight: 700;
    font-size: 15.5px;
    line-height: 1.4;
    color: var(--ump-navy-darkest, #00157B);
    background: linear-gradient(180deg, #ffffff 0%, #f6f8ff 100%);
    user-select: none;
}
details.acc-item > summary::-webkit-details-marker,
:is(.article-content, .page-content, .article-body) details > summary::-webkit-details-marker { display: none; }
details.acc-item > summary::after,
:is(.article-content, .page-content, .article-body) details > summary::after {
    content: "+";
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    color: var(--ump-navy-darkest, #00157B);
    background: #e8edff;
    border-radius: 50%;
    transition: transform .25s ease, background .2s ease, color .2s ease;
}
details.acc-item[open] > summary::after,
:is(.article-content, .page-content, .article-body) details[open] > summary::after {
    content: "\2212";
    background: var(--ump-navy-darkest, #00157B);
    color: #fff;
}
details.acc-item > summary:hover,
:is(.article-content, .page-content, .article-body) details > summary:hover { background: #eef2ff; }
details.acc-item > summary:focus-visible { outline: 3px solid rgba(0, 21, 123, .25); outline-offset: -3px; }
.acc-body,
:is(.article-content, .page-content, .article-body) details > *:not(summary) { animation: accReveal .25s ease; }
.acc-body { padding: 4px 22px 18px; border-top: 1px solid #eef1fb; }
.acc-body > :first-child { margin-top: 14px; }
.acc-body > :last-child { margin-bottom: 0; }
:is(.article-content, .page-content, .article-body) details:not(.acc-item) > *:not(summary) { margin-left: 20px; margin-right: 20px; }
:is(.article-content, .page-content, .article-body) details:not(.acc-item) > summary + * { margin-top: 14px; }
:is(.article-content, .page-content, .article-body) details:not(.acc-item) > :last-child { margin-bottom: 18px; }
@keyframes accReveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
/* Penanda akordeon yang belum diproses (mis. JS nonaktif) tampil sebagai judul biasa */
.acc-title { font-weight: 700; color: var(--ump-navy-darkest, #00157B); margin: 18px 0 6px; }
.acc-end { display: none; }

/* =====================================================================
   Dokumen yang disisipkan di isi konten (kartu unduhan)
   ===================================================================== */
:is(.article-content, .page-content, .article-body, .ql-editor) p > a.doc-download {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    width: 100%;
    max-width: 560px;
    box-sizing: border-box;
    margin: 12px 0 !important;
    padding: 12px 16px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f5f8ff 100%) !important;
    border: 1px solid #dbe4fb !important;
    border-left: 5px solid var(--ump-gold, #f2c744) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 21, 123, .07);
    color: var(--ump-navy-darkest, #00157B) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
:is(.article-content, .page-content, .article-body, .ql-editor) p > a.doc-download > span:first-child {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px !important;
    background: #e8edff;
    border-radius: 12px;
}
:is(.article-content, .page-content, .article-body, .ql-editor) p > a.doc-download > span:nth-child(2) {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14.5px;
    line-height: 1.45;
    word-break: break-word;
}
:is(.article-content, .page-content, .article-body, .ql-editor) p > a.doc-download > span:nth-child(2) span {
    display: block;
    margin-top: 2px;
    font-size: 12px !important;
    letter-spacing: .3px;
    color: #64748b !important;
}
:is(.article-content, .page-content, .article-body, .ql-editor) p > a.doc-download > span:last-child {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px !important;
    color: #fff;
    background: var(--ump-navy-darkest, #00157B);
    border-radius: 50%;
    transition: transform .18s ease, background .18s ease;
}
:is(.article-content, .page-content, .article-body, .ql-editor) p > a.doc-download:hover {
    transform: translateY(-2px);
    border-color: #b9c6f3 !important;
    box-shadow: 0 8px 20px rgba(0, 21, 123, .15);
}
:is(.article-content, .page-content, .article-body, .ql-editor) p > a.doc-download:hover > span:last-child {
    background: var(--ump-gold-dark, #b8860b);
    transform: translateY(2px);
}
@media (max-width: 520px) {
    :is(.article-content, .page-content, .article-body, .ql-editor) p > a.doc-download { padding: 10px 12px !important; gap: 10px !important; }
    :is(.article-content, .page-content, .article-body, .ql-editor) p > a.doc-download > span:first-child { width: 40px; height: 40px; }
}

/* Kotak Lampiran & Unduhan (bawah konten) - polesan */
.attachments-box {
    background: linear-gradient(135deg, #f8faff 0%, #f1f5ff 100%);
    border: 1px solid #dfe6fb;
    border-left: 5px solid var(--ump-gold, #f2c744);
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: 0 2px 10px rgba(0, 21, 123, .05);
}
.attachments-title { font-size: 14px; text-transform: uppercase; letter-spacing: .7px; }
.attachment-item a { border-radius: 12px; padding: 12px 16px; border-color: #dbe4fb; }
.attachment-icon {
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #e8edff; border-radius: 10px; font-size: 22px;
}
.attachment-dl {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; background: var(--ump-navy-darkest, #00157B); border-radius: 50%; font-size: 14px;
}
.attachment-item a:hover .attachment-dl { background: var(--ump-gold-dark, #b8860b); }

/* =====================================================================
   Dokumen Sisipan - pilihan bentuk tampilan (kartu, banner, ringkas, tombol, tautan)
   Markup: <div class="doc-embed doc-style-XXX"><a class="doc-download">
             <span class="doc-ico"></span><span class="doc-info"><span class="doc-name"></span><span class="doc-meta"></span></span>
             <span class="doc-act"><span class="doc-act-txt">Unduh</span><span class="doc-act-ico">&#11123;</span></span></a></div>
   ===================================================================== */
.doc-embed { margin: 14px 0; max-width: 100%; }
.doc-embed a.doc-download {
    display: flex; align-items: center; gap: 14px; box-sizing: border-box; text-decoration: none !important;
    color: var(--ump-navy-darkest, #00157B) !important; font-weight: 600; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.doc-embed .doc-ico { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.doc-embed .doc-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.doc-embed .doc-name { font-size: 14.5px; line-height: 1.4; word-break: break-word; }
.doc-embed .doc-meta { font-size: 12px; font-weight: 500; letter-spacing: .3px; color: #64748b; }
.doc-embed .doc-act { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; }
.doc-embed .doc-act-ico { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }

/* 1. Kartu (bawaan) */
.doc-style-card a.doc-download {
    max-width: 580px; padding: 12px 16px; background: linear-gradient(135deg, #ffffff 0%, #f5f8ff 100%);
    border: 1px solid #dbe4fb; border-left: 5px solid var(--ump-gold, #f2c744); border-radius: 14px; box-shadow: 0 2px 8px rgba(0,21,123,.07);
}
.doc-style-card .doc-ico { width: 48px; height: 48px; font-size: 25px; background: #e8edff; border-radius: 12px; }
.doc-style-card .doc-act-txt { display: none; }
.doc-style-card .doc-act-ico { width: 34px; height: 34px; font-size: 16px; color: #fff; background: var(--ump-navy-darkest, #00157B); border-radius: 50%; }
.doc-style-card a.doc-download:hover { transform: translateY(-2px); border-color: #b9c6f3; box-shadow: 0 8px 20px rgba(0,21,123,.15); }
.doc-style-card a.doc-download:hover .doc-act-ico { background: var(--ump-gold-dark, #b8860b); }

/* 2. Banner (menonjol, gradasi navy) */
.doc-style-banner a.doc-download {
    padding: 20px 24px; gap: 18px; color: #fff !important; border-radius: 18px;
    background: linear-gradient(135deg, var(--ump-navy-darkest, #00157B) 0%, #1a3bd1 100%); box-shadow: 0 10px 26px rgba(0,21,123,.28); position: relative; overflow: hidden;
}
.doc-style-banner a.doc-download::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.07); pointer-events: none; }
.doc-style-banner .doc-ico { width: 60px; height: 60px; font-size: 32px; background: rgba(255,255,255,.16); border-radius: 16px; }
.doc-style-banner .doc-name { font-size: 16.5px; color: #fff; }
.doc-style-banner .doc-meta { color: rgba(255,255,255,.75); }
.doc-style-banner .doc-act-txt { display: inline; font-size: 13.5px; font-weight: 700; }
.doc-style-banner .doc-act { padding: 10px 18px; color: var(--ump-navy-darkest, #00157B); background: var(--ump-gold, #f2c744); border-radius: 999px; z-index: 1; }
.doc-style-banner a.doc-download:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(0,21,123,.35); }
.doc-style-banner a.doc-download:hover .doc-act { background: #fff; }

/* 3. Ringkas (satu baris, cocok untuk banyak berkas) */
.doc-style-compact { margin: 6px 0; }
.doc-style-compact a.doc-download { padding: 9px 14px; gap: 12px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; }
.doc-style-compact .doc-ico { width: 32px; height: 32px; font-size: 18px; background: #eef2ff; border-radius: 8px; }
.doc-style-compact .doc-info { flex-direction: row; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.doc-style-compact .doc-name { font-size: 14px; }
.doc-style-compact .doc-meta { font-size: 11.5px; padding: 1px 8px; background: #f1f5f9; border-radius: 999px; }
.doc-style-compact .doc-act-txt { display: none; }
.doc-style-compact .doc-act-ico { font-size: 16px; color: var(--ump-navy-darkest, #00157B); }
.doc-style-compact a.doc-download:hover { border-color: #b9c6f3; background: #f8faff; }

/* 4. Tombol (pil emas/navy) */
.doc-style-button a.doc-download {
    display: inline-flex; padding: 12px 22px; gap: 12px; color: #fff !important; background: var(--ump-navy-darkest, #00157B);
    border-radius: 999px; box-shadow: 0 6px 16px rgba(0,21,123,.25);
}
.doc-style-button .doc-ico { font-size: 20px; }
.doc-style-button .doc-info { flex-direction: row; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.doc-style-button .doc-name { color: #fff; font-size: 14.5px; }
.doc-style-button .doc-meta { color: rgba(255,255,255,.7); }
.doc-style-button .doc-act-txt { display: none; }
.doc-style-button .doc-act-ico { width: 26px; height: 26px; font-size: 13px; color: var(--ump-navy-darkest, #00157B); background: var(--ump-gold, #f2c744); border-radius: 50%; }
.doc-style-button a.doc-download:hover { transform: translateY(-2px); background: #1a3bd1; box-shadow: 0 10px 22px rgba(0,21,123,.32); }

/* 5. Tautan (minimalis) */
.doc-style-link { margin: 6px 0; }
.doc-style-link a.doc-download { display: inline-flex; padding: 2px 0; gap: 8px; font-weight: 600; border-bottom: 2px solid var(--ump-gold, #f2c744); }
.doc-style-link .doc-ico { font-size: 17px; }
.doc-style-link .doc-info { flex-direction: row; align-items: baseline; gap: 8px; }
.doc-style-link .doc-name { font-size: 14.5px; }
.doc-style-link .doc-meta { font-size: 12px; }
.doc-style-link .doc-act-txt { display: none; }
.doc-style-link .doc-act-ico { font-size: 14px; }
.doc-style-link a.doc-download:hover { border-bottom-color: var(--ump-navy-darkest, #00157B); }

@media (max-width: 520px) {
    .doc-style-banner a.doc-download { flex-wrap: wrap; padding: 16px; }
    .doc-style-banner .doc-act { width: 100%; justify-content: center; }
    .doc-style-card a.doc-download { padding: 10px 12px; gap: 10px; }
}
/* Di editor admin: tautan tidak diikuti; klik dipakai untuk mengubah tampilan */
.ql-editor .doc-embed { cursor: pointer; }
.ql-editor .doc-embed a.doc-download { pointer-events: none; }

/* =====================================================================
   Akordeon v2 (dibuat lewat "Pembuat Akordeon"): bernomor, chevron, 3 tema
   ===================================================================== */
.acc-group { counter-reset: acc; --acc-main: var(--ump-navy-darkest, #00157B); --acc-soft: #e8edff; --acc-accent: var(--ump-gold, #f2c744); --acc-border: #dfe6fb; }
.acc-group.acc-theme-gold { --acc-main: #b8860b; --acc-soft: #fff4d6; --acc-accent: #f2c744; --acc-border: #f3e2ad; }
.acc-group > details.acc-item {
    margin: 0; border: 1px solid var(--acc-border); border-left: 4px solid transparent; border-radius: 14px; background: #fff;
    box-shadow: 0 1px 4px rgba(0,21,123,.05); overflow: hidden;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.acc-group > details.acc-item:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,21,123,.09); }
.acc-group > details.acc-item[open] { border-left-color: var(--acc-accent); box-shadow: 0 10px 26px rgba(0,21,123,.12); }
.acc-group > details.acc-item > summary {
    counter-increment: acc; position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 56px 16px 18px;
    font-size: 15.5px; font-weight: 700; color: #1e293b; background: #fff; list-style: none; cursor: pointer;
}
.acc-group > details.acc-item > summary::-webkit-details-marker { display: none; }
.acc-group > details.acc-item > summary::before {
    content: counter(acc); flex: 0 0 auto; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
    font-size: 13.5px; font-weight: 700; color: var(--acc-main); background: var(--acc-soft); border-radius: 50%; transition: all .2s ease;
}
.acc-group > details.acc-item[open] > summary::before { color: #fff; background: var(--acc-main); }
.acc-group > details.acc-item > summary::after {
    content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; margin-top: -7px; padding: 0; background: none; border-radius: 0;
    border-right: 2.5px solid var(--acc-main); border-bottom: 2.5px solid var(--acc-main); transform: rotate(45deg); transition: transform .25s ease, margin .25s ease;
}
.acc-group > details.acc-item[open] > summary::after { content: ""; transform: rotate(-135deg); margin-top: -2px; background: none; color: inherit; }
.acc-group > details.acc-item[open] > summary { color: var(--acc-main); background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%); }
.acc-group > details.acc-item > .acc-body { padding: 4px 22px 20px 64px; border-top: 1px solid #eef1fb; line-height: 1.75; }
.acc-group > details.acc-item > .acc-body img,
.acc-group > details.acc-item > .acc-body iframe,
.acc-group > details.acc-item > .acc-body video { max-width: 100%; border-radius: 10px; }
.acc-group > details.acc-item > .acc-body .article-video-embed { max-width: 100%; }
/* Tema Minimalis: garis pemisah tanpa kartu */
.acc-group.acc-theme-minimal { gap: 0; border-top: 1px solid #e2e8f0; }
.acc-group.acc-theme-minimal > details.acc-item { border: 0; border-bottom: 1px solid #e2e8f0; border-radius: 0; box-shadow: none; background: transparent; }
.acc-group.acc-theme-minimal > details.acc-item:hover { transform: none; box-shadow: none; }
.acc-group.acc-theme-minimal > details.acc-item[open] { box-shadow: none; }
.acc-group.acc-theme-minimal > details.acc-item > summary { background: transparent; padding-left: 4px; }
.acc-group.acc-theme-minimal > details.acc-item > summary::before { display: none; }
.acc-group.acc-theme-minimal > details.acc-item > .acc-body { padding-left: 4px; border-top: 0; }
@media (max-width: 560px) {
    .acc-group > details.acc-item > summary { padding: 14px 44px 14px 14px; gap: 10px; font-size: 14.5px; }
    .acc-group > details.acc-item > summary::after { right: 16px; }
    .acc-group > details.acc-item > .acc-body { padding: 4px 16px 16px 16px; }
}

/* =====================================================================
   Daftar & Penomoran (Lists: Bullet & Numbering) pada Konten Kaya
   Mengatasi reset bawaan Tailwind Preflight (list-style: none)
   ===================================================================== */
:is(.article-content, .page-content, .article-body, .fakultas-rich-intro, .rich-content, .prose, .acc-body) ul:not([class*="nav"]):not([class*="menu"]):not([class*="list-none"]):not([class*="attachments"]) {
    list-style-type: disc !important;
    padding-left: 2rem !important;
    margin: 1em 0 !important;
}

:is(.article-content, .page-content, .article-body, .fakultas-rich-intro, .rich-content, .prose, .acc-body) ol:not([class*="nav"]):not([class*="menu"]):not([class*="list-none"]) {
    list-style-type: decimal !important;
    padding-left: 2rem !important;
    margin: 1em 0 !important;
}

:is(.article-content, .page-content, .article-body, .fakultas-rich-intro, .rich-content, .prose, .acc-body) li {
    display: list-item !important;
    margin-bottom: 0.4em !important;
    line-height: 1.7 !important;
}

:is(.article-content, .page-content, .article-body, .fakultas-rich-intro, .rich-content, .prose, .acc-body) ul ul {
    list-style-type: circle !important;
    margin: 0.25em 0 !important;
    padding-left: 1.5rem !important;
}

:is(.article-content, .page-content, .article-body, .fakultas-rich-intro, .rich-content, .prose, .acc-body) ul ul ul {
    list-style-type: square !important;
}

:is(.article-content, .page-content, .article-body, .fakultas-rich-intro, .rich-content, .prose, .acc-body) ol ol {
    list-style-type: lower-alpha !important;
    margin: 0.25em 0 !important;
    padding-left: 1.5rem !important;
}

:is(.article-content, .page-content, .article-body, .fakultas-rich-intro, .rich-content, .prose, .acc-body) ol ol ol {
    list-style-type: lower-roman !important;
}

/* =====================================================================
   Tautan / Link dalam Konten Kaya (Tampil Jelas dengan Garis Bawah & Warna)
   ===================================================================== */
:is(.article-content, .page-content, .article-body, .fakultas-rich-intro, .rich-content, .prose, .acc-body) a:not(.btn):not(.btn-cta):not(.btn-outline):not(.doc-download):not(.attachment-link):not([class*="badge"]):not([class*="pill"]):not([class*="btn"]) {
    color: var(--ump-blue, #0067B1) !important;
    text-decoration: underline !important;
    text-decoration-thickness: 1.5px !important;
    text-underline-offset: 3px !important;
    font-weight: 600 !important;
    transition: color 0.18s ease, text-decoration-color 0.18s ease !important;
    cursor: pointer !important;
}

:is(.article-content, .page-content, .article-body, .fakultas-rich-intro, .rich-content, .prose, .acc-body) a:not(.btn):not(.btn-cta):not(.btn-outline):not(.doc-download):not(.attachment-link):not([class*="badge"]):not([class*="pill"]):not([class*="btn"]):hover {
    color: var(--ump-navy-darkest, #00157B) !important;
    text-decoration-color: var(--ump-gold, #FFB81C) !important;
}

html.dark :is(.article-content, .page-content, .article-body, .fakultas-rich-intro, .rich-content, .prose, .acc-body) a:not(.btn):not(.btn-cta):not(.btn-outline):not(.doc-download):not(.attachment-link):not([class*="badge"]):not([class*="pill"]):not([class*="btn"]) {
    color: var(--ump-sky, #38BDF8) !important;
}

html.dark :is(.article-content, .page-content, .article-body, .fakultas-rich-intro, .rich-content, .prose, .acc-body) a:not(.btn):not(.btn-cta):not(.btn-outline):not(.doc-download):not(.attachment-link):not([class*="badge"]):not([class*="pill"]):not([class*="btn"]):hover {
    color: #ffffff !important;
    text-decoration-color: var(--ump-gold, #FFB81C) !important;
}

/* =====================================================================
   Perataan Teks Quill (Center, Right, Justify)
   ===================================================================== */
.ql-align-center { text-align: center !important; }
.ql-align-right { text-align: right !important; }
.ql-align-justify { text-align: justify !important; }

/* =====================================================================
   Video Responsif (YouTube, Vimeo, MP4) & Embed Konten
   ===================================================================== */
.article-video-embed,
:is(.article-content, .page-content, .article-body, .fakultas-rich-intro, .rich-content, .prose, .acc-body, .ql-editor) iframe.ql-video,
:is(.article-content, .page-content, .article-body, .fakultas-rich-intro, .rich-content, .prose, .acc-body, .ql-editor) .ql-video {
    position: relative;
    width: 100% !important;
    max-width: 820px;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    margin: 1.5rem auto !important;
    box-shadow: 0 4px 20px rgba(0, 21, 123, 0.12);
    display: block !important;
    background: #000;
}

.article-video-embed iframe,
.article-video-embed video,
:is(.article-content, .page-content, .article-body, .fakultas-rich-intro, .rich-content, .prose, .acc-body, .ql-editor) iframe.ql-video {
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    border-radius: 14px;
    display: block;
}

