/* Custom CSS by @ilham.djaya /
/ Theme: Elegant Maroon & Gold (Refined Sidebar Edition) */

/* ================= HEADER ================= */

.pkp_site_name .is_img img {
display: block;
max-height: 165px;
width: auto;
height: auto;
}

/* ================= PAGE STRUCTURE ================= */

.page_index_journal {
display: flex;
flex-direction: column;
}

.pkp_structure_main {
background: #F8F5EF;
}

.current_issue {
order: 2;
}

.additional_content {
order: 1;
}

.pkp_brand_footer {
display: none;
}

.pkp_structure_page {
background: url("https://ejurnal.iainpare.ac.id//public/site/images/muhilhamjaya/pattern_islamic.jpg") repeat fixed;
}

/* ================= REFINED SIDEBAR ================= */

/* Judul Blok Sidebar */
.pkp_block .title {
display: block;
color: #FFFFFF;
margin-top: 15px;
margin-bottom: 8px;
padding: 10px 14px;
width: 100%;
background: linear-gradient(135deg, #800000 0%, #5A0000 100%);
border: 1px solid #D4AF37;
border-left: 4px solid #D4AF37;
border-radius: 6px;
font-weight: 700;
font-size: 0.95rem;
letter-spacing: 0.5px;
box-shadow: 0 4px 10px rgba(128, 0, 0, 0.15);
box-sizing: border-box;
}

/* List / Menu Sidebar */
.pkp_block .content ul {
list-style: none;
padding: 0;
margin: 0;
}

.pkp_block .content ul li {
display: block;
margin-top: 5px;
width: 100%;
background: #7A0C0C;
border: 1px solid rgba(212, 175, 55, 0.5);
border-radius: 6px;
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
overflow: hidden;
box-sizing: border-box;
}

/* Link di dalam Sidebar */
.pkp_block .content ul li a,
.pkp_block a {
display: block;
padding: 9px 14px;
color: #FFFFFF !important;
text-decoration: none;
font-weight: 500;
font-size: 0.9rem;
transition: color 0.25s ease, padding-left 0.25s ease;
width: 100%;
box-sizing: border-box;
}

/* Efek Hover (Warna Transisi Lebih Halus & Tidak Menyilaukan) */
.pkp_block .content ul li:hover {
background: linear-gradient(135deg, #9E1B1B 0%, #7A0C0C 100%);
border-color: #D4AF37;
box-shadow: 0 4px 12px rgba(128, 0, 0, 0.25), 0 0 8px rgba(212, 175, 55, 0.25);
transform: translateY(-1px);
}

.pkp_block .content ul li:hover a {
color: #FFF8E7 !important;
padding-left: 18px;
}

/* Efek Klik / Press (Active State) */
.pkp_block .content ul li:active {
background: #5A0000;
transform: translateY(0);
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* ================= SUBMISSION BUTTON ================= */

.block_make_submission a {
display: block;
background: linear-gradient(135deg, #D4AF37 0%, #B89228 100%) !important;
color: #4A0000 !important;
font-weight: 700;
border-radius: 6px;
padding: 10px 14px;
text-align: center;
border: 1px solid #9E7D1C;
box-shadow: 0 3px 8px rgba(0,0,0,0.15);
transition: all 0.25s ease;
text-transform: uppercase;
font-size: 0.88rem;
letter-spacing: 0.5px;
}

.block_make_submission a:hover {
background: linear-gradient(135deg, #800000 0%, #5A0000 100%) !important;
color: #FFFFFF !important;
border-color: #D4AF37;
box-shadow: 0 5px 12px rgba(128, 0, 0, 0.3);
transform: translateY(-1px);
}

.block_make_submission a:active {
transform: translateY(0);
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ================= LOGIN BOX ================= */

.cmp_form fieldset {
display: block;
color: #FFFFFF;
margin-top: 5px;
padding: 12px 15px;
width: 100%;
background: linear-gradient(135deg, #800000, #5A0000);
border: solid 1px #D4AF37;
border-radius: 8px;
box-shadow: 0 3px 8px rgba(128, 0, 0, 0.25);
box-sizing: border-box;
}

/* ================= GENERAL BUTTON ACCENTS ================= */

button,
.btn-primary {
background: #800000 !important;
border-color: #D4AF37 !important;
color: #FFFFFF !important;
transition: all 0.25s ease !important;
}

button:hover,
.btn-primary:hover {
background: #9E1B1B !important;
border-color: #E5C158 !important;
color: #FFFFFF !important;
box-shadow: 0 3px 8px rgba(128, 0, 0, 0.3);
}

button:active,
.btn-primary:active {
background: #5A0000 !important;
}



/* =========================================================
   ETHNOMATHICA SIDEBAR - INTERACTION OVERRIDES
   These selectors use the actual Ethnomathica page URLs.
   They do not require class="ethno-sidebar" on the wrapper.
   ========================================================= */

/* Keep Ethnomathica submenu text readable */
body .pkp_block .content a[href*="/index.php/ethnomathica/"] {
    color: #51433D !important;
    text-decoration: none !important;
    transition:
        transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 280ms ease,
        background-color 280ms ease,
        color 280ms ease,
        padding-left 280ms ease !important;
}

/* Do not apply submenu rules to the submission button */
body .pkp_block .content a[href*="/index.php/ethnomathica/"]:not([href*="/submissions"]) {
    display: block !important;
    position: relative;
    box-sizing: border-box;
    border-radius: 5px;
    transform: translateX(0) !important;
    will-change: transform;
    -webkit-tap-highlight-color: rgba(200, 164, 93, 0.20);
}

/* Submenu hover: smooth slide, gold accent and soft shadow */
body .pkp_block .content a[href*="/index.php/ethnomathica/"]:not([href*="/submissions"]):hover,
body .pkp_block .content a[href*="/index.php/ethnomathica/"]:not([href*="/submissions"]):focus-visible {
    color: #4B0101 !important;
    background-color: #F0E7D8 !important;
    padding-left: 15px !important;
    transform: translateX(7px) !important;
    box-shadow:
        inset 3px 0 0 #C8A45D,
        0 4px 11px rgba(75, 1, 1, 0.10) !important;
    outline: none;
}

/* Submenu press / touch feedback */
body .pkp_block .content a[href*="/index.php/ethnomathica/"]:not([href*="/submissions"]):active {
    color: #310000 !important;
    background-color: #E9DDC8 !important;
    padding-left: 12px !important;
    transform: translateX(3px) scale(0.985) !important;
    box-shadow: inset 3px 0 0 #A98643 !important;
}

/* Make submenu icons move with a small bounce */
body .pkp_block .content a[href*="/index.php/ethnomathica/"]:not([href*="/submissions"]) span:first-child {
    display: inline-block;
    min-width: 17px;
    color: #B28A45 !important;
    transform: translateX(0) scale(1);
    transition:
        transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
        color 280ms ease !important;
}

body .pkp_block .content a[href*="/index.php/ethnomathica/"]:not([href*="/submissions"]):hover span:first-child,
body .pkp_block .content a[href*="/index.php/ethnomathica/"]:not([href*="/submissions"]):focus-visible span:first-child {
    color: #8A6B32 !important;
    transform: translateX(2px) scale(1.18) !important;
}

/* Explicitly keep the submenu label dark */
body .pkp_block .content a[href*="/index.php/ethnomathica/"]:not([href*="/submissions"]) span:last-child {
    color: #51433D !important;
    transition: color 280ms ease !important;
}

body .pkp_block .content a[href*="/index.php/ethnomathica/"]:not([href*="/submissions"]):hover span:last-child {
    color: #4B0101 !important;
}


/* =========================================================
   CATEGORY HEADINGS
   Targets the maroon category bars in the sidebar HTML.
   ========================================================= */

body .pkp_block .content div[style*="border-left"][style*="#C8A45D"] {
    position: relative;
    overflow: hidden;
    transform: translateX(0);
    transition:
        transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 280ms ease,
        filter 280ms ease !important;
    will-change: transform;
}

/* Category heading hover */
body .pkp_block .content div[style*="border-left"][style*="#C8A45D"]:hover {
    transform: translateX(5px) translateY(-2px) !important;
    filter: brightness(1.10);
    box-shadow:
        0 7px 16px rgba(75, 1, 1, 0.22),
        0 0 9px rgba(200, 164, 93, 0.25) !important;
}

/* Category heading press / touch */
body .pkp_block .content div[style*="border-left"][style*="#C8A45D"]:active {
    transform: translateX(2px) scale(0.985) !important;
    filter: brightness(0.96);
}

/* Category icon movement */
body .pkp_block .content div[style*="border-left"][style*="#C8A45D"] > span:first-child {
    display: inline-block;
    transition: transform 260ms ease, color 260ms ease !important;
}

body .pkp_block .content div[style*="border-left"][style*="#C8A45D"]:hover > span:first-child {
    color: #F5E5C0 !important;
    transform: rotate(-8deg) scale(1.18) !important;
}


/* =========================================================
   SUBMISSION BUTTON INTERACTION
   ========================================================= */

body .pkp_block .content a[href*="/index.php/ethnomathica/submissions"],
.block_make_submission a {
    display: block !important;
    box-sizing: border-box;
    background: linear-gradient(135deg, #D4AF37 0%, #B89228 100%) !important;
    color: #4A0000 !important;
    text-align: center !important;
    border: 1px solid #9E7D1C !important;
    border-radius: 7px !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15) !important;
    transition:
        transform 260ms ease,
        box-shadow 260ms ease,
        filter 260ms ease !important;
}

body .pkp_block .content a[href*="/index.php/ethnomathica/submissions"]:hover,
.block_make_submission a:hover {
    transform: translateY(-3px) scale(1.02) !important;
    filter: brightness(1.06);
    box-shadow:
        0 7px 16px rgba(128, 0, 0, 0.20),
        0 0 9px rgba(212, 175, 55, 0.25) !important;
}

body .pkp_block .content a[href*="/index.php/ethnomathica/submissions"]:active,
.block_make_submission a:active {
    transform: translateY(0) scale(0.975) !important;
    filter: brightness(0.96);
}


/* =========================================================
   TOUCH DEVICES
   On phones/tablets the :active state appears while pressed.
   ========================================================= */

@media (hover: none) and (pointer: coarse) {
    body .pkp_block .content a[href*="/index.php/ethnomathica/"]:not([href*="/submissions"]) {
        -webkit-tap-highlight-color: rgba(200, 164, 93, 0.22);
    }

    body .pkp_block .content a[href*="/index.php/ethnomathica/"]:not([href*="/submissions"]):active {
        transform: translateX(3px) scale(0.985) !important;
        box-shadow: inset 3px 0 0 #A98643 !important;
    }
}


/* =========================================================
   REDUCED MOTION ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    body .pkp_block .content a[href*="/index.php/ethnomathica/"],
    body .pkp_block .content div[style*="border-left"][style*="#C8A45D"],
    .block_make_submission a {
        transition: none !important;
        animation: none !important;
    }
}
