/* ===== Global reset-ish ===== */
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; height: auto; display: block; }

/* ===== Base typography ===== */
:root { font-family: var(--im-font); font-size: var(--im-base-font); }
body{
  color: var(--im-text);
  background: #f1f3f5; /* luar (kiri/kanan) */
}

/* Boxed area (GeneratePress) putih dari atas sampai bawah */
#page, .site, .site-content{ background: #fff; }

/* Default: no underline inside theme sections */
.im-home a{ text-decoration: none !important; }
.im-home a:hover{ text-decoration: none !important; }

/* ===== Boxed container ===== */
.im-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Spacing: default lebih rapat */
.im-section { padding: 14px 0; }
.im-section.im-ads { padding: 10px 0; } /* ADS lebih rapat */
.im-mt { margin-top: 14px; }

/* ===== Card ===== */
.im-card {
  background: var(--im-surface);
  border: 1px solid var(--im-border);
  border-radius: var(--im-radius);
  box-shadow: var(--im-shadow);
  overflow: hidden;
}

/* ===== Titles ===== */
.im-section-title { font-size: 18px; font-weight: 800; margin: 0 0 12px; }
.im-section-title-sm { font-size: 15px; font-weight: 800; margin: 0 0 10px; }

.im-title-lg { font-size: 22px; font-weight: 800; margin: 8px 0 0; line-height: 1.2; }
.im-title-md { font-size: 15px; font-weight: 700; margin: 10px 0 0; line-height: 1.25; }
.im-title-tight { margin-top: 6px; }
.im-muted { color: var(--im-muted); font-size: 14px; }

/* ===== Meta ===== */
.im-meta { font-size: 12px; color: var(--im-muted); display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.im-dot { opacity: .8; }
.im-meta-on-dark{ color: rgba(255,255,255,0.9); }

/* ===== Media helpers ===== */
.im-media { background: #000; }
.im-cover { width: 100%; height: 100%; object-fit: cover; }
.im-media-locked { height: 460px; position: relative; overflow: hidden; border-radius: var(--im-radius); }
@media (max-width: 991px) { .im-media-locked { height: 380px; } }
@media (max-width: 600px) { .im-media-locked { height: 300px; } }

.im-media-md { height: 160px; }
.im-media-sm { height: 120px; }
.im-media-md, .im-media-sm { overflow: hidden; border-radius: var(--im-radius); }

/* ===== Overlay ===== */
.im-overlay-wrap{ position: relative; }
.im-overlay { position: absolute; inset: 0; background: rgba(0,0,0,var(--im-overlay-alpha)); }
.im-overlay-content { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 2; }
.im-title-on-dark{ color: #fff; }

/* ===== Grid layouts ===== */
.im-grid { display: grid; gap: 28px; }
.im-grid-70-30 { grid-template-columns: 7fr 3fr; align-items: start; }
@media (max-width: 991px) { .im-grid-70-30 { grid-template-columns: 1fr; } }

.im-grid-4 { grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 991px) { .im-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .im-grid-4 { grid-template-columns: 1fr; } }

.im-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 991px) { .im-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .im-grid-3 { grid-template-columns: 1fr; } }

.im-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 600px) { .im-grid-2 { grid-template-columns: 1fr; } }

/* ===== ADS ===== */
.im-ads-card { padding: 12px; }

/* ===== Headline ===== */
.im-headline-big-link{ display:block; color:#fff !important; }
.im-headline-big-link:hover{ color:#fff !important; }

.im-headline-sm-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 991px) { .im-headline-sm-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .im-headline-sm-grid { grid-template-columns: 1fr; } }

/* 4 headline kecil: no round, no heavy shadow */
.im-headline-sm{
  background: #fff;
  border: 1px solid var(--im-border);
  border-radius: 0;         /* ✅ no round */
  box-shadow: none;         /* ✅ clean */
  overflow: hidden;
}
.im-headline-sm-link{ display:block; color: inherit; }
.im-sm-title{
  font-size: 14px;          /* ✅ lebih kecil */
  font-weight: 600;         /* ✅ normal */
  line-height: 1.25;
  margin: 10px 12px 12px;
}

/* ===== Sidebar ===== */
.im-sidebar-box { padding: 14px; }

/* Sidebar 1: sticky desktop, stop at section bottom */
.im-sticky-headline{ position: sticky; top: 90px; }
@media (max-width: 991px){ .im-sticky-headline{ position: static; } }

/* Sidebar 2: sticky desktop */
.im-sticky { position: sticky; top: 90px; }
@media (max-width: 991px) { .im-sticky { position: static; } }

/* ===== Trending ===== */
.im-trending-card a{ color: inherit; display:block; }
.im-trending-body{ padding: 12px; }
.im-trending-body .im-title-md{
  font-size: 15px;
  font-weight: 700;  /* ✅ tidak terlalu tebal */
  margin-top: 8px;
}
.im-trending-body .im-meta-below{ margin-top: 8px; }

/* ===== Latest list ===== */
.im-latest-list { display: grid; gap: 12px; }
.im-latest-item { padding: 0; background: transparent; border: 0; box-shadow: none; border-radius: 0; }
.im-latest-link { display: grid; grid-template-columns: 200px 1fr; gap: 14px; color: inherit; padding: 12px 0; border-bottom: 1px solid var(--im-border); }
.im-latest-thumb { height: 132px; border-radius: 10px; overflow: hidden; }
@media (max-width: 600px) {
  .im-latest-link { grid-template-columns: 1fr; }
  .im-latest-thumb { height: 180px; }
}

/* Latest typography: judul lebih kecil & tidak terlalu tebal */
.im-latest .im-title-lg{
  font-size: 18px;
  font-weight: 650;
  line-height: 1.25;
}
.im-excerpt{
  font-size: 13px;
  color: var(--im-muted);
  margin-top: 6px;
  line-height: 1.35;
}


/* ===== Category block ===== */
.im-catblock { padding: 14px; }
.im-cat-card a { color: inherit; display: block; }
.im-cat-card .im-title-md{ font-weight: 700; }

/* ===== Overlay block 2x2 ===== */
.im-overlay-card a{ display:block; color:#fff; }
.im-overlay-card .im-media-md { height: 220px; position: relative; border-radius: var(--im-radius); overflow:hidden; }

/* ===== 4-col categories ===== */
.im-grid-4cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 991px) { .im-grid-4cols { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .im-grid-4cols { grid-template-columns: 1fr; } }

.im-fourcol-col { padding: 14px; }
.im-fourcol-head{ margin-bottom: 10px; }
.im-fourcol-head .im-section-title-sm{ text-transform: capitalize; } /* ✅ Capital */
.im-fourcol-feature{ margin-top: 8px; } /* ✅ jarak sebelum image */
.im-fourcol-feature a{ color: inherit; display:block; }
.im-fourcol-feature h4{
  font-size: 14px;
  font-weight: 700; /* ✅ tidak terlalu tebal */
  margin: 10px 0 0;
  line-height: 1.25;
}
.im-fourcol-list{ margin-top: 12px; display:grid; gap: 8px; }
.im-divider{ height:1px; background: var(--im-border); }
.im-fourcol-link{
  font-size: 13px;        /* ✅ lebih kecil */
  font-weight: 600;
  color: var(--im-text);
}

/* ===== Pagination ===== */
.im-pagination ul{
  list-style:none;
  display:flex;
  gap:10px;
  padding:0;
  margin:0;
  justify-content:center;
  flex-wrap:wrap;
}
.im-pagination li a,
.im-pagination li span{
  display:inline-flex;
  padding:6px 10px;
  border:1px solid var(--im-border);
  border-radius:0;
  font-weight:600;
  font-size:13px;
  color: var(--im-text);
  background:#fff;
}
.im-pagination li .current{
  background: #111827;
  color: #fff;
  border-color: #111827;
}

/* ===== GeneratePress header/menu clean white + sticky transparent ===== */
/* Logo max height */
.site-logo img,
.custom-logo-link img{
  max-height: 120px;   /* ✅ sesuai request */
  width: auto;
}

/* Desktop header sticky only */
@media (min-width: 992px) {
  #masthead, header.site-header, .site-header{
    position: sticky;
    top: 0;
    z-index: 9999;
    background: #fff;                 /* ✅ white menu */
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
  }
  #masthead.im-scrolled, header.site-header.im-scrolled, .site-header.im-scrolled{
    background: rgba(255,255,255,0.88); /* ✅ transparent on scroll */
    backdrop-filter: blur(10px);
  }

  /* Remove “white block” usually from inner containers */
  .inside-header, .inside-navigation{
    background: transparent !important;
  }

  /* Nav link clean */
  #site-navigation a,
  .main-navigation a,
  .inside-navigation a{
    color: #374151 !important;
    text-decoration: none !important;
  }
  #site-navigation a:hover,
  .main-navigation a:hover,
  .inside-navigation a:hover{
    color: #111827 !important;
  }

  /* Search inside header */
  .im-nav-search{
    margin-left: 14px;
    display: flex;
    align-items: center;
  }
  .im-nav-search input[type="search"]{
    width: 220px;
    max-width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 8px 12px;
    outline: none;
    font-size: 14px;
    background: #fff;
  }
}

/* ===== Footer (child) ===== */
.im-footer{
  background: #1f2937; /* abu tua */
  color: #fff;
  margin-top: 24px;
}
.im-footer a{ color: #fff; opacity: .92; text-decoration: none; }
.im-footer a:hover{ opacity: 1; text-decoration: underline; }
.im-footer .im-footer-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 28px 0;
}
@media (max-width: 991px){
  .im-footer .im-footer-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px){
  .im-footer .im-footer-grid{ grid-template-columns: 1fr; }
}
.im-footer-title{ color:#fff; font-size: 14px; font-weight: 800; margin: 0 0 10px; }
.im-footer-widget{ font-size: 13px; color: rgba(255,255,255,.88); }
.im-footer-bottom{
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 14px 0;
  font-size: 12px;
  color: rgba(255,255,255,.78);
  display:flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* Mobile/tablet: NOT sticky */
@media (max-width: 991px) {
  #masthead, header.site-header, .site-header{ position: static; }
  .im-nav-search{ display:none; }
}

/* Sidebar 1 stretch full height of headline area */
.im-grid-70-30 { align-items: stretch; }
.im-sidebar-stretch{
  height: 100%;
}
@media (max-width: 991px){
  .im-sidebar-stretch{ height: auto; }
}

/* Headline small: no radius on image + tighter gap */
.im-headline-sm-grid{ gap: 10px; }      /* ✅ lebih rapat */
.im-headline-sm .im-media,
.im-headline-sm .im-media-sm{
  border-radius: 0 !important;          /* ✅ no radius image */
}



/* ===== Fix: Sticky sidebar (Chrome) ===== */
.im-sticky,
.im-sticky-headline{
  position: -webkit-sticky;
  position: sticky;
  align-self: start;
  overflow: visible; /* prevents Chrome from treating it as a scroll container */
}

/* ===== Latest News tweaks ===== */
.im-latest .im-title-lg{ font-weight: 700; }
.im-latest-link{ grid-template-columns: 200px 1fr; }
.im-latest-thumb{ height: 132px; }
.im-excerpt{
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--im-muted);
  max-width: 62ch;
}

.im-latest-list .im-latest-item:last-child .im-latest-link { border-bottom: 0; }


/* ===== Hover effects (links + images) ===== */
.im-home a{ transition: color .15s ease; }
.im-home a:hover{ color: #4b5563; } /* sedikit lebih abu */

/* Image hover: sedikit bergerak */
.im-home a .im-cover{ transition: transform .2s ease; }
.im-home a:hover .im-cover{ transform: translateY(-3px); }

/* Read more text (Latest News) */
.im-readmore{
  margin-top: 6px;
  font-size: 12px;
  color: var(--im-muted);
  display: inline-block;
}


/* ===== Footer full width background (meski layout boxed) ===== */
.im-footer{
  position: relative;
  left: 50%;
  margin-left: -50vw;
  width: 100vw;
}
.im-footer .im-container{
  margin-left: auto;
  margin-right: auto;
}


.im-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #777;
}

/* bulat merah */
.im-author-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #d40000;
  position: relative;
  display: inline-block;
}

/* kepala putih */
.im-author-icon::before {
  content: "";
  width: 6px;
  height: 6px;
  background: #ffffff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
}

/* badan putih */
.im-author-icon::after {
  content: "";
  width: 8px;
  height: 4px;
  background: #ffffff;
  border-radius: 4px 4px 2px 2px;
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
}


/* ===== Latest News: excerpt harus selebar judul (full kolom kanan) ===== */
.im-latest-item .im-excerpt{
  display: block;
  width: 100%;
  max-width: none !important;
}

/* Kalau wrapper kolom kanan Latest News pakai flex, ini wajib */
.im-latest-item .im-latest-body,
.im-latest-item .im-latest-content,
.im-latest-item .im-text{
  flex: 1;
  min-width: 0;
}

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

/* Default (belum scroll) */
.im-header{
  position: sticky;
  top: 0;
  z-index: 9999;
  background: #fff;
  box-shadow: 0 10px 26px rgba(0,0,0,0.10);
}

/* Saat scroll: putih transparan 25% */
body.im-scrolled .im-header{
  background: rgba(255,255,255,0.25);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  backdrop-filter: blur(10px);
}


/* ===== Header row layout ===== */
.im-hrow{
  display:flex;
  align-items:center;
  gap:14px;
  width:100%;
}

/* logo kiri fixed */
.im-hlogo{ flex:0 0 auto; }

/* search benar2 center */
.im-hsearch{
  flex: 1 1 auto;
  display:flex;
  justify-content:center;
}

/* menu kanan fixed */
.im-hmenu{
  flex:0 0 auto;
  margin-left:auto; /* pastikan mepet kanan */
}

/* ===== Search estetik (lebih pendek + proporsional) ===== */
.im-search{
  width: min(520px, 100%);       /* jangan terlalu lebar */
  height: 40px;                  /* pendek */
  display:flex;
  align-items:center;
  gap:10px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.85);
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.im-search:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.95);
}

.im-search-input{
  width:100%;
  height: 40px;
  border:0 !important;
  outline:0 !important;
  background: transparent !important;
  color:#111;
  font-size:14px;
}

.im-search-btn{
  border:0;
  background: transparent;
  height: 40px;
  cursor:pointer;
  padding: 0 6px;
}


/* ===== Logo: biarkan Site Identity yang kontrol ukuran ===== */
.im-hlogo .custom-logo-link img,
.im-hlogo img.custom-logo {
  max-height: none !important;
  width: auto !important;
  height: 60px !important;
}

/* jaga spacing atas/bawah */
.im-hlogo .custom-logo-link img,
.im-hlogo img.custom-logo {
  display:block;
  margin: 5px 0 !important;
}


/* ===== MENU button: hitam + icon + hover invert ===== */
.im-menu-btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid #111;
  background: #111;
  color:#fff;
  font-weight:700;
  letter-spacing:.2px;
  cursor:pointer;
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}

.im-menu-btn:hover{
  background:#fff;
  color:#111;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.12);
}

/* icon hamburger (tanpa fontawesome) */
.im-menu-ico{
  width: 18px;
  height: 12px;
  display:inline-block;
  position:relative;
}
.im-menu-ico::before,
.im-menu-ico::after{
  content:"";
  position:absolute;
  left:0; right:0;
  height:2px;
  background:#fff;
  border-radius:2px;
  transition: background .15s ease;
}
.im-menu-ico::before{ top:0; }
.im-menu-ico::after{ bottom:0; }
.im-menu-ico{
  background: #fff;
  border-radius:2px;
  height:2px;
  top:0;
}

/* saat hover, garis icon ikut jadi hitam */
.im-menu-wrap:hover .im-menu-ico,
.im-menu-wrap:hover .im-menu-ico::before,
.im-menu-wrap:hover .im-menu-ico::after{
  background:#111;
}

/* ===== Dropdown muncul saat hover ===== */
.im-menu-wrap{ position:relative; }
.im-menu-dropdown{
  position:absolute;
  right:0;
  top: calc(100% + 10px);
  min-width: 240px;
  display:none;
  background: rgba(20,20,20,0.95);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 20px 44px rgba(0,0,0,0.25);
  padding: 10px;
  backdrop-filter: blur(10px);
}

.im-menu-wrap:hover .im-menu-dropdown{ display:block; }

.im-menu a{
  display:block;
  padding: 10px 12px;
  color:#fff;
  text-decoration:none;
}
.im-menu a:hover{
  background: rgba(255,255,255,0.08);
}


@media (max-width:768px){
  .im-hmenu{ display:none; }
  .im-hsearch{ justify-content:flex-start; }
  .im-search{ width:100%; }
}
