/*
Theme Name: Divi Child
Template: Divi
Version: 1.0
*/


/* =========================================================
   GED Detail Post Layout (Divi)
========================================================= */
:root{
  --ged-blue: #0b2f6b;
  --ged-border: #e7e8ea;
  --ged-soft: #f1f2f3;
  --ged-sticky-top: 110px; /* kalau header tinggi, naikkan (misal 140px) */
}

body.single .gedPostLayout{
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

body.single .gedPostMain,
body.single .gedPostSidebar{
  background: #fff;
  border: 1px solid var(--ged-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,.06);
}

body.single .gedPostHero img{
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

body.single .gedPostBody{
  padding: 22px;
}

body.single .gedPostTitle{
  margin: 6px 0 12px;
  font-size: 34px;
  line-height: 1.2;
  color: var(--ged-blue);
  font-weight: 800;
}

body.single .gedPostMeta{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #667085;
  margin: 0 0 18px;
}
body.single .gedPostMetaItem{
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
body.single .gedPostMetaItem:not(:last-child)::after{
  content: "|";
  color: #c7c9cc;
  margin-left: 14px;
}

body.single .gedPostContent{
  font-size: 16px;
  line-height: 1.9;
  color: #1f2937;
}
body.single .gedPostContent p{ margin: 0 0 1.1em; }
body.single .gedPostContent img,
body.single .gedPostContent iframe,
body.single .gedPostContent video{
  max-width: 100% !important;
  height: auto;
}
body.single .gedPostContent a{ color: var(--ged-blue); font-weight: 700; }

/* Sidebar */
body.single .gedPostSidebar{
  position: sticky;
  top: var(--ged-sticky-top);
  align-self: start;
}

body.single .gedLatest__head{
  background: var(--ged-soft);
  padding: 14px 16px;
  font-size: 22px;
  font-weight: 900;
  color: var(--ged-blue);
}

body.single .gedLatest__list{
  list-style: none;
  margin: 0;
  padding: 0;
}

body.single .gedLatest__item{
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--ged-border);
}

body.single .gedLatest__thumb{
  width: 74px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--ged-border);
  background: #fff;
  display: block;
}
body.single .gedLatest__thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.single .gedLatest__title{
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;

  font-size: 15px;
  line-height: 1.25;
  font-weight: 800;
  color: var(--ged-blue);
  text-decoration: none;
}
body.single .gedLatest__title:hover{ text-decoration: underline; }

body.single .gedLatest__meta{
  margin-top: 6px;
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: #667085;
}
body.single .gedLatest__metaItem{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
body.single .gedIcon{
  width: 14px;
  height: 14px;
  fill: currentColor;
  opacity: .9;
}

body.single .gedLatest__empty{
  padding: 14px 16px;
  color: #667085;
}

/* Responsive: Tablet */
@media (max-width: 980px){
  body.single .gedPostLayout{
    grid-template-columns: 1fr;
  }
  body.single .gedPostSidebar{
    position: static;
  }
}

/* Responsive: Mobile */
@media (max-width: 767px){
  body.single .gedPostLayout{ padding: 16px 12px; }
  body.single .gedPostBody{ padding: 16px; }
  body.single .gedPostTitle{ font-size: 24px; }
  body.single .gedLatest__head{ font-size: 18px; }
  body.single .gedLatest__item{
    grid-template-columns: 68px minmax(0, 1fr);
    padding: 12px 12px;
  }
}

/* Override revisi css :root + body.single .gedPostLayout + tambahkan style hero + ads. */
:root{
  --ged-blue: #0b2f6b;
  --ged-border: #e7e8ea;
  --ged-soft: #f1f2f3;

  /* REVISI WIDTH */
  --ged-wrap: 1380px;       /* bikin layout lebih lebar */
  --ged-sidebar-w: 420px;   /* sidebar dilebarkan */
  --ged-gap: 28px;

  --ged-sticky-top: 110px;
}

/* ====== NEWS HERO (seperti referensi) ====== */
body.single .gedNewsHero{
  position: relative;
  width: 100%;
  min-height: 170px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
body.single .gedNewsHero__overlay{
  position:absolute; inset:0;
  background: rgba(0,0,0,.55);
}
body.single .gedNewsHero__inner{
  position: relative;
  max-width: var(--ged-wrap);
  margin: 0 auto;
  padding: 22px 16px;
  min-height: 170px;
  display:flex;
  align-items:center;
}
body.single .gedNewsHero__back{
  display:inline-flex;
  align-items:center;
  gap:10px;
  color:#fff;
  text-decoration:none;
  font-weight:800;
  font-size: 28px;
  line-height: 1.1;
}
body.single .gedNewsHero__back:hover{ opacity: .92; }
body.single .gedNewsHero__arrow{
  font-size: 40px;
  line-height: 1;
  margin-top: -2px;
}

/* ====== LAYOUT WIDTH REVISI ====== */
body.single .gedPostLayout{
  max-width: var(--ged-wrap);
  margin: 0 auto;
  padding: 24px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--ged-sidebar-w);
  gap: var(--ged-gap);
}

/* kalau sudah pakai hero, jarak atas diperkecil biar rapih */
body.single .gedPostLayout--withHero{
  padding-top: 18px;
}

/* Sidebar sticky tetap */
body.single .gedPostSidebar{
  position: sticky;
  top: var(--ged-sticky-top);
  align-self: start;
}

/* ====== ADS SLOT ====== */
body.single .gedSidebarAd{
  margin-top: 14px;
  border: 1px solid var(--ged-border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
body.single .gedSidebarAd__head{
  background: var(--ged-soft);
  padding: 12px 16px;
  font-weight: 900;
  color: var(--ged-blue);
}
body.single .gedSidebarAd__slot{
  padding: 14px 16px;
}
body.single .gedSidebarAd__placeholder{
  border: 2px dashed #cfd3d8;
  border-radius: 10px;
  padding: 18px 14px;
  text-align: center;
  color: #667085;
  font-weight: 700;
}

/* ====== TABLET/MOBILE ====== */
@media (max-width: 980px){
  body.single .gedPostLayout{
    grid-template-columns: 1fr;
  }
  body.single .gedPostSidebar{
    position: static;
  }
  body.single .gedNewsHero__back{ font-size: 22px; }
  body.single .gedNewsHero__arrow{ font-size: 34px; }
}

@media (max-width: 767px){
  body.single .gedNewsHero__inner{ padding: 18px 12px; min-height: 150px; }
  body.single .gedNewsHero{ min-height: 150px; }
  body.single .gedNewsHero__back{ font-size: 18px; }
}

/* Override */
/* =========================================
   FIX 1: News Hero full width (full-bleed)
   ========================================= */
body.single{ overflow-x: hidden; }

body.single .gedNewsHero{
  /* breakout dari container/row divi */
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;
}

/* inner tetap rapi mengikuti lebar konten */
body.single .gedNewsHero__inner{
  max-width: var(--ged-wrap);
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* =========================================
   FIX 2: Jarak gedSidebarAd jangan nempel
   ========================================= */
body.single .gedSidebarAd{
  margin-top: 24px !important; /* tambah jarak */
}

body.single .gedLatest{
  padding-bottom: 10px; /* biar ada “nafas” sebelum ads */
}
/* ================================
   HERO: full & nempel paling atas
================================ */
:root{ --ged-hero-pull: 54px; } /* kalau masih ada jarak, naikan jadi 70px */

body.single{ overflow-x: hidden; }

body.single .gedNewsHero{
  /* full-bleed */
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;

  /* tarik ke atas (hapus padding section divi) */
  margin-top: calc(-1 * var(--ged-hero-pull));
}

/* jika header kamu fixed dan hero ketutup header, kecilkan pull */
@media (max-width: 980px){
  :root{ --ged-hero-pull: 0px; }
}
/* ================================
   SIDEBAR: pisah jadi 2 card (Latest + Ads)
================================ */
body.single .gedPostSidebar{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  padding: 0 !important;
}

/* jadikan gedLatest juga card */
body.single .gedLatest{
  background: #fff;
  border: 1px solid var(--ged-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,.06);
}

/* ads card sudah card, tinggal jarak */
body.single .gedSidebarAd{
  margin-top: 18px !important;
  box-shadow: 0 10px 25px rgba(0,0,0,.06);
}
/* ================================
   MOBILE: layout lebih lebar + ads full width
================================ */
@media (max-width: 767px){
  /* bikin layout keluar dari row divi biar nggak sempit */
  body.single .gedPostLayout{
    position: relative;
    left: 50%;
    width: 100vw;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 14px 10px !important;
  }

  body.single .gedPostBody{
    padding: 16px 14px !important;
  }

  /* ads / placeholder full lebar */
  body.single .gedSidebarAd__slot{ padding: 12px !important; }
  body.single .gedSidebarAd__placeholder{
    width: 100%;
    padding: 16px 10px !important;
  }
  body.single ins.adsbygoogle{
    display:block !important;
    width:100% !important;
  }
}
