/* =========================================================
 * Home Ads Sidebar V2
 * Panel mengambang di kanan, bukan section.
 * ======================================================= */
.home-ad-side-rail{
  position:fixed;
  z-index:1045;
  top:112px;
  right:18px;
  width:300px;
  max-height:calc(100vh - 136px);
  transition:transform .25s ease,opacity .25s ease;
}

.home-ad-side-rail.is-hidden{
  opacity:0;
  pointer-events:none;
  transform:translateX(calc(100% + 28px));
}

.home-ad-side-card{
  overflow:hidden;
  border:1px solid rgba(7,95,59,.12);
  border-radius:22px;
  background:#fff;
  box-shadow:0 22px 60px rgba(3,36,23,.22);
}

.home-ad-side-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  padding:.85rem .9rem;
  color:#fff;
  background:
    radial-gradient(circle at 100% 0,rgba(224,183,83,.28),transparent 35%),
    linear-gradient(135deg,#043b27,#075f3b);
}

.home-ad-side-header > div{
  display:flex;
  flex-direction:column;
  min-width:0;
}

.home-ad-side-header small{
  color:#f0ca70;
  font-size:.61rem;
  font-weight:850;
  letter-spacing:.12em;
}

.home-ad-side-header strong{
  margin-top:.12rem;
  font-size:.96rem;
}

.home-ad-side-header button{
  appearance:none;
  border:1px solid rgba(255,255,255,.18);
  flex:0 0 34px;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:11px;
  color:#fff;
  background:rgba(255,255,255,.10);
  cursor:pointer;
}

.home-ad-side-media{
  position:relative;
  overflow:hidden;
  min-height:160px;
  max-height:260px;
  background:#edf2ef;
}

.home-ad-side-media > a,
.home-ad-side-media > button{
  appearance:none;
  border:0;
  width:100%;
  height:100%;
  min-height:160px;
  display:block;
  position:relative;
  padding:0;
  background:transparent;
  cursor:pointer;
}

.home-ad-side-media img{
  width:100%;
  height:100%;
  min-height:160px;
  max-height:260px;
  display:block;
  object-fit:contain;
  object-position:center;
  transition:transform .3s ease;
}

.home-ad-side-media a:hover img,
.home-ad-side-media button:hover img{
  transform:scale(1.025);
}

.home-ad-side-media button > span{
  position:absolute;
  right:10px;
  bottom:10px;
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:11px;
  color:#fff;
  background:rgba(3,54,33,.82);
}

.home-ad-side-content{
  padding:1rem;
}

.home-ad-side-type{
  display:inline-flex;
  margin-bottom:.55rem;
  padding:.28rem .52rem;
  border-radius:999px;
  color:#8b6514;
  background:#fff2cf;
  font-size:.62rem;
  font-weight:850;
  letter-spacing:.07em;
  text-transform:uppercase;
}

.home-ad-side-content h2{
  margin:0;
  color:#183127;
  font-size:1.08rem;
  font-weight:850;
  line-height:1.28;
}

.home-ad-side-content p{
  margin:.6rem 0 0;
  color:#68766f;
  font-size:.82rem;
  line-height:1.55;
}

.home-ad-side-action{
  appearance:none;
  border:0;
  width:100%;
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.45rem;
  margin-top:.85rem;
  padding:.65rem .75rem;
  border-radius:12px;
  color:#fff;
  background:linear-gradient(145deg,#075f3b,#043d27);
  font-size:.78rem;
  font-weight:800;
  text-decoration:none;
  cursor:pointer;
}

.home-ad-side-action:hover,
.home-ad-side-action:focus-visible{
  color:#fff;
  filter:brightness(1.06);
}

.home-ad-side-footer{
  display:grid;
  grid-template-columns:42px minmax(0,1fr) 42px;
  align-items:center;
  border-top:1px solid #e8eeea;
  background:#f8faf9;
}

.home-ad-side-footer button{
  appearance:none;
  border:0;
  height:42px;
  display:grid;
  place-items:center;
  color:var(--primary,#075f3b);
  background:transparent;
  cursor:pointer;
}

.home-ad-side-counter{
  color:#6f7b75;
  font-size:.75rem;
  font-weight:700;
  text-align:center;
}

.home-ad-side-trigger{
  appearance:none;
  border:0;
  position:fixed;
  z-index:1044;
  top:42%;
  right:0;
  min-width:46px;
  min-height:88px;
  display:none;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:.3rem;
  padding:.65rem .45rem;
  border-radius:16px 0 0 16px;
  color:#fff;
  background:linear-gradient(180deg,#075f3b,#043c27);
  box-shadow:0 12px 32px rgba(3,54,33,.25);
  cursor:pointer;
}

.home-ad-side-trigger.is-visible{
  display:flex;
}

.home-ad-side-trigger span{
  font-size:.62rem;
  font-weight:800;
  writing-mode:vertical-rl;
  transform:rotate(180deg);
  letter-spacing:.08em;
  text-transform:uppercase;
}

.home-ad-side-lightbox-open{
  overflow:hidden!important;
}

.home-ad-side-lightbox{
  position:fixed;
  z-index:2200;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  visibility:hidden;
  opacity:0;
  padding:70px 18px 18px;
  background:rgba(3,12,8,.95);
  transition:opacity .2s ease,visibility .2s ease;
}

.home-ad-side-lightbox.is-open{
  visibility:visible;
  opacity:1;
}

.home-ad-side-lightbox-backdrop{
  position:absolute;
  inset:0;
}

.home-ad-side-lightbox img{
  position:relative;
  z-index:2;
  max-width:100%;
  max-height:100%;
  display:block;
  object-fit:contain;
  border-radius:15px;
  box-shadow:0 28px 80px rgba(0,0,0,.48);
}

.home-ad-side-lightbox-close{
  appearance:none;
  border:1px solid rgba(255,255,255,.18);
  position:absolute;
  z-index:3;
  top:16px;
  right:16px;
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border-radius:14px;
  color:#fff;
  background:rgba(255,255,255,.10);
  cursor:pointer;
}

@media(max-width:1199.98px) and (min-width:768px){
  .home-ad-side-rail{
    width:260px;
    right:12px;
  }

  .home-ad-side-content h2{
    font-size:1rem;
  }
}

@media(max-width:767.98px){
  .home-ad-side-rail{
    top:auto;
    right:10px;
    bottom:82px;
    width:min(330px,calc(100vw - 20px));
    max-height:calc(100vh - 110px);
    opacity:0;
    pointer-events:none;
    transform:translateX(calc(100% + 20px));
  }

  .home-ad-side-rail.is-mobile-open{
    opacity:1;
    pointer-events:auto;
    transform:translateX(0);
  }

  .home-ad-side-card{
    border-radius:19px;
  }

  .home-ad-side-trigger{
    top:auto;
    right:12px;
    bottom:88px;
    width:50px;
    min-width:50px;
    min-height:50px;
    display:flex;
    border-radius:50%;
    padding:0;
  }

  .home-ad-side-trigger span{
    display:none;
  }

  .home-ad-side-trigger.is-panel-open{
    opacity:0;
    pointer-events:none;
  }

  .home-ad-side-media{
    max-height:230px;
  }

  .home-ad-side-media img{
    max-height:230px;
  }
}
