/*
Theme Name: ibnus
Theme URI: https://example.com
Author: Ibnus
Author URI: https://example.com
Description: Custom theme ibnus
Version: 1.0
License: GPLv2 or later
Text Domain: ibnus
*/

/* Ibnus Theme - Complete Header + Responsive + Animations CSS */

/* --------------------------------------------------------------
   BASIC RESET
-------------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: sans-serif;
    line-height: 1.6;
}

/* --------------------------------------------------------------
   HEADER BASE STRUCTURE
-------------------------------------------------------------- */
.site-header {
    width: 100%;
    display: flex;
    align-items: center;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo wrapper */
.site-branding img {
	height: 100px;
    max-height: 100px;
    width: auto;
    display: block;
}

/* Title fallback */
.site-title a {
    text-decoration: none;
    color: inherit;
}
.site-description {
    font-size: 14px;
    opacity: 0.7;
}

/* --------------------------------------------------------------
   HEADER LAYOUTS (Left, Right, Center)
-------------------------------------------------------------- */

/* LEFT LAYOUT: Logo left, menu right */
.site-header.layout-left .container {
    flex-direction: row;
}

/* RIGHT LAYOUT: Logo right, menu left */
.site-header.layout-right .container {
    flex-direction: row-reverse;
}

/* CENTER LAYOUT: logo above menu */
.site-header.layout-center .container {
    flex-direction: column;
    justify-content: center;
    padding: 20px 0;
    text-align: center;
    gap: 15px;
}
.site-header.layout-center .main-nav .menu {
    justify-content: center;
}

/* --------------------------------------------------------------
   NAVIGATION MENU
-------------------------------------------------------------- */

.main-nav .menu {
    list-style: none;
    display: flex;
    gap: 25px;
    align-items: left;
    transition: all 0.3s ease;
}

.main-nav .menu li a {
    text-decoration: none;
    /*color: #ffffff!important;*/
    font-weight: 500;
    transition: opacity 0.25s ease;
}

.main-nav .menu li a:hover {
    opacity: 0.5;
}
.sub-menu .sub-menu  {
    right: 100%!important;
    top: 50%!important;
}
ul#menu-menu-1.menu {
    line-height: 100px;
}
ul#menu-menu-1.menu ul {
    line-height: 20px;
}
li.menu-item-has-children > a::after {
  content: "+"; /* Inserts the plus symbol */
  margin-left: 5px;
  /* Additional styling for positioning and appearance */
    position: relative;
    width: 10px;
    display: inline-block;
    font-weight: bold;
    font-size: 14px;
}
li.menu-item-has-children:hover > a::after {
  content: "-"; /* Minus or different icon on hover */
  /*transform: rotate(90deg); /* Optional: an actual rotation effect */*/
  position: relative;
    width: 10px;
    display: inline-block;
    font-weight: bold;
    font-size: 14px;
}

/* --------------------------------------------------------------
   ANIMATIONS
-------------------------------------------------------------- */
.fade-in {
    animation: fadeIn 0.4s ease forwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

.slide-down {
    animation: slideDown 0.35s ease forwards;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Wrapper umum */
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* LOGO default */
.site-branding {
    flex: 0 0 auto;
}

/* MENU default */
.main-nav {
    flex: 1;
}

/* ===========================================
   1) LOGO LEFT
=========================================== */
body.logo-left .site-header .container {
    flex-direction: row;
}
body.logo-left .site-branding {
    order: 1;
    text-align: left;
}
body.logo-left .main-nav {
    order: 2;
}

/* Menu left or right */
body.logo-left.menu-left .main-nav { justify-content: flex-start; }
body.logo-left.menu-right .main-nav { justify-content: flex-end; }

/* ===========================================
   2) LOGO RIGHT
=========================================== */
body.logo-right .site-header .container {
    flex-direction: row-reverse;
}

body.logo-right .site-branding {
    order: 1;
    text-align: right;
}

body.logo-right .main-nav {
    order: 2;
}

/* Menu left or right */
body.logo-right.menu-left .main-nav { justify-content: flex-start; }
body.logo-right.menu-right .main-nav { justify-content: flex-end; }

/* ===========================================
   3) LOGO CENTER
=========================================== */
body.logo-center .site-header .container {
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

body.logo-center .site-branding {
    order: 1;
    margin-bottom: 10px;
    text-align: center;
}

body.logo-center .main-nav {
    order: 2;
    width: 100%;
    justify-content: center;
}
/* ===========================================
   FIX LOGO CENTER — benar-benar center
=========================================== */
body.logo-center .site-header .container {
    display: flex;
    flex-direction: column;
    align-items: center !important;
    justify-content: center;
    text-align: center;
}

/* Logo */
body.logo-center .site-branding {
    order: 1;
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* pastikan gambar & teks dalam div logo ikut benar² center */
body.logo-center .site-branding * {
    margin-left: auto;
    margin-right: auto;
}

/* Menu */
body.logo-center .main-nav {
    order: 2;
    width: 100%;
    display: flex;
    justify-content: center !important;
}


/* ===========================================
   NEW LAYOUT: Logo kiri, menu kiri, logo di atas menu
=========================================== */

body.logo-left-stack .site-header .container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;   /* kiri */
    justify-content: flex-start;
    text-align: left;
    gap: 10px;
}

/* Logo kiri */
body.logo-left-stack .site-branding {
    order: 1;
    width: 100%;
    display: flex;
    justify-content: flex-start;
}

/* Menu kiri */
body.logo-left-stack .main-nav {
    order: 2;
    width: 100%;
    display: flex;
    justify-content: flex-start;
}

/* Menu item tetap kiri */
body.logo-left-stack .main-nav .menu {
    justify-content: flex-start;
}

/* ===========================================
   Layout: Logo kiri + Menu kiri (stacked)
=========================================== */

body.logo-left-stack .site-header .container {
    display: flex;
    flex-direction: column;      /* atas-bawah */
    align-items: flex-start;     /* kiri */
    justify-content: flex-start;
    gap: 10px;
}

/* Logo kiri */
body.logo-left-stack .site-branding {
    order: 1;
    width: 100%;
    display: flex;
    justify-content: flex-start;
}

/* Menu kiri */
body.logo-left-stack .main-nav {
    order: 2;
    width: 100%;
    display: flex;
    justify-content: flex-start;
}

/* Menu item tetap kiri */
body.logo-left-stack .main-nav .menu {
    justify-content: flex-start;
}

/* ============================
   DROPDOWN MENU (DESKTOP)
============================ */
.main-nav .menu li {
    position: relative;
}
.main-nav li a {
    color: #ffffff;
}
ul.sub-menu a {
    color:#333333;
}
.main-nav .menu li ul.sub-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: #fff;
    list-style: none;
    padding: 10px 0;
    min-width: 200px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all .25s ease;
    z-index: 999;
    color:#000000;
}

.main-nav .menu li:hover > ul.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-nav .menu li ul.sub-menu li {
    display: block;
    padding: 0;
}

.main-nav .menu li ul.sub-menu li a {
    display: block;
    padding: 10px 15px;
    white-space: nowrap;
}

.main-nav .menu li ul.sub-menu li a:hover {
    background: rgba(0,0,0,0.05);
}

/*slicknav*/
.slicknav_nav {
    border-top:solid 1px #a1cfeb;
    border-top:solid 1px #fff;
}
.slicknav_brand {
    padding: 0px 0px 54px!important;
}
/*wrapper slicknav*/
.slicknav_menu {
    padding: 0px!important;
}
.slicknav_btn {
    padding: 10px 8px 8px 8px;
}
.slicknav_nav ul {
    margin: 0 0 0 0px;
}
.slicknav-flex {
    /*padding: 10px 10px 10px 0;*/
}
/*bar*/
.slicknav_menu .slicknav_icon-bar {
    height: 5px;
    width: 30px;
}
.slicknav_btn {
    padding: 10px 20px 8px 8px;
    margin:5px 5px 6px 6px;
}
/*bg page title*/
.bg_title {
    background: #f3f3f3;
    position: absolute;
    width: 100%;
    margin-top: -37px;
    height: 150px;
    background-image: linear-gradient(to bottom, #e9e9e9, #ffffff);
    /*background: url(assets/images/bgx.jpg);*/
}

/*
================================================================
lightbox image block
================================================================
*/
/* Overlay */
/* RESET AGAR POPUP TIDAK TERIKAT PARENT */
.lightbox-adv-overlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;

    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 999999999 !important;

    opacity: 0;
    transition: opacity .25s ease;
}

/* Jangan biarkan transform parent mempengaruhi popup */
.popup-image,
.popup-image * {
    transform: none !important;
}

/* Gambar */
.lightbox-adv-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    transform: scale(0.8);
    transition: transform .25s ease;
}

/* Saat aktif */
.lightbox-adv-overlay.show {
    opacity: 1;
}
.lightbox-adv-overlay.show img {
    transform: scale(1);
}

/* CLOSE BUTTON */
.lightbox-adv-close {
    position: fixed;
    top: 24px;
    right: 30px;
    font-size: 32px;
    color: #fff;
    cursor: pointer;
    z-index: 9999999999;
}

/* ARROWS */
.lightbox-adv-prev,
.lightbox-adv-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 48px;
    color: #fff;
    cursor: pointer;
    z-index: 9999999999;
}

.lightbox-adv-prev { left: 25px; }
.lightbox-adv-next { right: 25px; }

/* Efek zoom in image */
/* Container fix ukuran & potong efek zoom */
.popup-image {
    display: inline-block;
    overflow: hidden;
    /*border-radius: 6px;*/
}

/* Gambar awal */
.popup-image img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform .3s ease;
    transform-origin: center center;
}

/* Zoom-in inside frame */
.popup-image:hover img {
    transform: scale(1.15); /* gambar membesar tapi terpotong oleh frame */
}

/* ========== Strong Zoom-In INSIDE FRAME ========== */
/* 1) wrapper harus memotong overflow */
.popup-image,
.wp-block-image.popup-image,
.popup-image-link {              /* fallback selectors */
  display: inline-block !important;
  overflow: hidden !important;
  vertical-align: middle;
  width: auto;                   /* tetap gunakan ukuran yang ada */
  max-width: 100%;
  /*border-radius: 6px;     */
}

/* 2) target berbagai kemungkinan <img> selectors */
.popup-image img,
.wp-block-image.popup-image img,
.popup-image > img,
.popup-image img.wp-image-*,       /* WP generated classes */
.popup-image a img {              /* if wrapped in <a> */
  display: block !important;
  width: 100% !important;
  height: auto !important;
  transition: transform .35s ease !important;
  transform-origin: center center !important;
  will-change: transform;
}

/* 3) HIDUPKAN zoom-in INSIDE FRAME tanpa ubah ukuran frame */
.popup-image:hover img,
.wp-block-image.popup-image:hover img,
.popup-image a:hover img {
  transform: scale(1.12) !important;   /* naikkan angka jika mau lebih besar */
  -webkit-transform: scale(1.12) !important;
}

/* optional: sedikit shadow saat hover */
.popup-image:hover img,
.wp-block-image.popup-image:hover img {
  box-shadow: 0 10px 18px rgba(0,0,0,0.12) !important;
}

/* debug helpers — aktifkan sementara jika masih gagal */
.popup-image.debug { outline: 2px dashed lime !important; }
.popup-image.debug img { outline: 2px dashed red !important; }


/*===============================================================
accordion 'block detail'
===============================================================*/

/* Reset bawaan */
.wp-block-details {
    border: 1px solid #ddd;
    padding: 0;
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
}

/* Summary (judul accordion) */
.wp-block-details > summary {
    cursor: pointer;
    padding: 12px 16px;
    font-weight: bold;
    list-style: none;
    position: relative;
    background: #f8f8f8;
}

/* Hilangkan default arrow browser */
.wp-block-details > summary::-webkit-details-marker {
    display: none;
}

/* Icon default: + */
.wp-block-details > summary::after {
    content: "+";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    transition: transform 0.3s ease, opacity 0.2s;
}

/* Ketika Open → ganti minus */
.wp-block-details[open] > summary::after {
    content: "–";
}

/* Wrapper konten untuk transition */
.wp-block-details .details-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    padding: 0 16px;
}

/* Saat open – animasikan max-height */
.wp-block-details[open] .details-content {
    max-height: 1000px; /* nilai besar untuk auto height */
    padding: 16px;
    line-height: 150%;
}

