/* ==========================================================
   SECTION "TOP UP ROBUX" (index.php)
   Tempel di bawah isi home.css (memakai variabel --hm-* yang sama).
   ========================================================== */

.hm-topup {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 3.7fr);
    align-items: stretch;   /* info & plans selalu sama tinggi */
    gap: 24px;
    margin-top: 32px;
    padding: 18px 18px;
    overflow: hidden;
    color: var(--hm-white);
    background: linear-gradient(180deg, var(--hm-gold-1) 0%, var(--hm-gold-2) 45%, var(--hm-gold-3) 100%);
    border-radius: 16px;
}

.hm-topup__dekor {
    position: absolute;
  z-index: 0;
  top: 50%;
  left: 6%;
  width: 190px;
  height: 190px;
  object-fit: contain;
  opacity: .18;
  filter: brightness(1.4);
  transform: translateY(-50%) rotate(-16deg);
  pointer-events: none;
  user-select: none;
}

@media (max-width: 767.98px) {
  .hm-topup__dekor {
    right: 4px;
    left: auto;
    width: 150px;
    height: 150px;
  }
}

/* ---------- info kiri ---------- */
.hm-topup__info,
.hm-plans {
    position: relative;
    isolation: isolate;
    z-index: 1;
    text-shadow: 0 2px 6px rgba(80, 45, 0, 0.45);
}

.hm-topup__info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hm-topup__title {
    margin: 0 0 3px;
    font-size: 1.4rem;
    font-weight: 750;
    letter-spacing: -0.01em;

}

.hm-topup__price {
    margin: 0 0 4px;
    font-size: 0.95rem;
}

.hm-topup__price strong {
    font-weight: 800;
}

.hm-topup__price small {
    font-size: 0.85rem;
    opacity: 0.85;
}

.hm-topup__sub {
    margin: 0 0 8px;
    font-size: 0.82rem;
    opacity: 0.92;
}

.hm-trusts {
    display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-width: 250px;
  margin-top: 0;
}

.hm-trust {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 8px;
    line-height: 1.15;
    border: 1px solid transparent;
    border-radius: 10px;
}

.hm-trust svg {
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hm-trust small {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
}

.hm-trust strong {
    display: block;
    font-size: 11px;
    font-weight: 800;
}

.hm-trust--green {
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(74, 222, 128, 0.55);
}

.hm-trust--blue {
    color: #dbeafe;
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(147, 197, 253, 0.55);
}

.hm-trust--green strong,
.hm-trust--blue strong,
.hm-trust--green small,
.hm-trust--blue small {
    color: var(--hm-white);
}

/* ---------- kartu metode ---------- */
.hm-plans {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 16px;
    padding-top: 10px;
}

.hm-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 3px 3px 0;
    color: var(--hm-white);
    text-decoration: none;
    /*border: 3px solid rgba(255, 233, 160, 0.75);*/
    border-radius: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

a.hm-plan:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.28);
    color: white;
}

.hm-plan--off {
    background: #667589;
    cursor: not-allowed;
}

.hm-plan--gold {
    background: linear-gradient(135deg, #e6c25a 0%, #c79a24 55%, #b8891b 100%);
}

.hm-plan--blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 55%, #1d4ed8 100%);
}

.hm-plan--green {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 55%, #15803d 100%);
}

/* isi putih */
.hm-plan__body {
    display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
  min-height: 0;
  padding: 8px 11px 7px;
  border-radius: 14px;
  background: var(--site-color-card, #fff);
  color: var(--home-ink);
}

.hm-plan__ikon svg {
    display: block;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hm-plan--off .hm-plan__ikon { color: #5b6477; }
.hm-plan--gold .hm-plan__ikon { color: #8a5a00; }
.hm-plan--blue .hm-plan__ikon { color: var(--hm-blue); }
.hm-plan--green .hm-plan__ikon { color: #15803d; }

.hm-plan__nama {
    margin: 0 0 1px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    color: #000;
}

.hm-plan__desc {
    margin: 0;
    font-size: 11px;
    line-height: 1.35;
    color: var(--hm-muted);
}

.hm-plan__arrow {
    display: grid;
    place-items: center;
    align-self: center;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--robux-tint);
    color: var(--robux-accent);
    transition: transform .2s ease, background-color .2s ease, color .2s ease;
}

.hm-plan__arrow svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hm-plan--gold .hm-plan__arrow { color: #8a5a00; background: #fde9b0; }
.hm-plan--blue .hm-plan__arrow { color: var(--hm-blue); background: #dbe7fe; }
.hm-plan--green .hm-plan__arrow { color: #15803d; background: #dcfce7; }

/* footer berwarna */
.hm-plan__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 11px 5px;
    font-size: 0.74rem;
}

.hm-plan__foot strong {
    font-weight: 800;
}

/* badge */
.hm-plan__badge {
    position: absolute;
    top: -11px;
    z-index: 2;
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--hm-white);
    white-space: nowrap;
    border-radius: 8px;
}

/* badge metode aktif: meloncat-loncat */
@keyframes hm-badge-hop {
    0%, 55%, 100% { transform: translateY(0); }
    12%           { transform: translateY(-7px); }
    26%           { transform: translateY(0); }
    38%           { transform: translateY(-3px); }
    48%           { transform: translateY(0); }
}

.hm-plan__badge--promo {
    animation: hm-badge-hop 1.8s ease-in-out infinite;
    left: -5px;                              /* menjorok keluar kartu (tadinya -4px) */
    background: var(--hm-red);
    border-radius: 8px 8px 8px 0;            /* sudut kiri bawah dibuat lurus agar menyambung ke lipatan */
}

/* lipatan: segitiga gelap di bawah ujung kiri badge */
.hm-plan__badge--promo::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 0;
    border-top: 5px solid #8f1414;           /* merah lebih gelap dari --hm-red */
    border-left: 5px solid transparent;
}

.hm-plan__badge--off {
    right: -5px;                             /* menjorok keluar kartu (tadinya 0) */
    background: #4b5563;
    border-radius: 8px 8px 0 8px;            /* sudut kanan bawah lurus agar menyambung ke lipatan */
}

/* lipatan: segitiga gelap di bawah ujung kanan badge */
.hm-plan__badge--off::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -5px;
    width: 0;
    height: 0;
    border-top: 5px solid #2b3340;           /* abu-abu lebih gelap dari #4b5563 */
    border-right: 5px solid transparent;
}

.hm-plan__ikon {
    flex: none;
}

.hm-plan__text {
    flex: 1;
    min-width: 0;
}

a:hover {
  text-decoration: none;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1200px) {
    .hm-topup {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hm-topup__dekor {
        left: auto;
        right: 20px;
        top: 90px;
    }
}

@media (max-width: 990px) {

    .hm-plans {
        grid-template-columns: 1fr;
        gap: 22px;
    }
}

@media (max-width: 760px) {
    /* HP: latar gold penuh dari tepi kiri ke kanan layar, tanpa sudut membulat */
    .hm-topup {
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        padding: 20px 18px 22px;
        border-radius: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hm-plan__badge--promo { animation: none; }
}