/* ==========================================================
   HOME (index.php) - semua class diawali "hm-" agar tidak
   bentrok dengan CSS yang sudah ada.
   Tempel isi file ini ke file CSS website Anda.
   ========================================================== */

@media (min-width: 1280px) {
  .container {
    max-width: 1200px;
    padding-inline: 24px;
  }
}
a:hover {
    color: white;
}
:root {
    --hm-bg: #f0f6ff;
    --hm-ink: #0f172a;
    --hm-muted: #5b6477;
    --hm-blue: #2563eb;
    --hm-blue-dark: #1e4aa0;
    --hm-blue-soft: #e0e8fb;
    --hm-red: #dc2626;
    --hm-white: #ffffff;
    --hm-border: #d6e0f5;

    /* warna gold untuk Kategori Pilihan */
    --hm-gold-1: #ffd96a;   /* terang */
    --hm-gold-2: #e8b53a;   /* utama */
    --hm-gold-3: #b9831a;   /* gelap */
    --hm-gold-ink: #3a2603; /* teks di atas gold */
    
    --home-ink: #0f172a;
    --robux-accent: #2563eb;
    --robux-tint: #dbe7fe;
}

.hm-page {
    background: #060b15;
    padding-top: 40px;
    padding-bottom: 40px;
    max-width: 1240px;
    margin: 0 auto;
    box-sizing: border-box;
    color: var(--hm-ink);
}

.hm-page *,
.hm-page *::before,
.hm-page *::after {
    box-sizing: border-box;
}

/* ---------- HERO ---------- */
.hm-hero {
    position: relative;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    align-items: center;
    gap: 40px;
    margin-bottom: 32px;
}

.hm-hero__title {
    /*margin-top: 14px;*/
    font-size: clamp(32px, 3.4vw, 46px);
    line-height: 1.13;
    letter-spacing: -1.75px;
    font-weight: 700;
    color: var(--hm-white);
}

.hm-accent {
    color: var(--hm-gold-2);
}

.hm-hero__desc {
    margin: 0 0 22px;
    max-width: 480px;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--hm-muted);
}

/* ---------- BLOK MELAYANG (dekorasi hero) ---------- */
.hm-floaters {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

.hm-hero__text,
.hm-hero__visual {
    position: relative;
    z-index: 1;
}

.hm-floater {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--s);
    height: var(--s);
    border-radius: 22%;
    opacity: var(--o, 0.3);
    background: linear-gradient(135deg, var(--c1), var(--c2));
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 8px 18px rgba(0, 0, 0, 0.35);
    transform: rotate(var(--r));
    animation: hm-float var(--d) ease-in-out var(--delay, 0s) infinite alternate;
    will-change: transform;
}

/* lubang di tengah, ala logo Robux */
.hm-floater::after {
    content: "";
    position: absolute;
    inset: 33%;
    border-radius: 26%;
    background: #060b15;
    opacity: 0.55;
}

.hm-floater--1 { --x: -1%;  --y: 4%;  --s: 46px; --r: -12deg; --d: 4s;   --o: .30; --c1: #ffd96a; --c2: #b9831a; }
.hm-floater--2 { --x: 40%;  --y: -6%; --s: 30px; --r: 18deg;  --d: 5.5s; --o: .26; --c1: #60a5fa; --c2: #1d4ed8; --delay: -2s; }
.hm-floater--3 { --x: 47%;  --y: 74%; --s: 38px; --r: 8deg;   --d: 5s;   --o: .22; --c1: #ffd96a; --c2: #b9831a; --delay: -4s; }
.hm-floater--4 { --x: 96%;  --y: 8%;  --s: 54px; --r: 20deg;  --d: 4.5s; --o: .30; --c1: #60a5fa; --c2: #1d4ed8; --delay: -1s; }
.hm-floater--5 { --x: 93%;  --y: 82%; --s: 34px; --r: -18deg; --d: 5s;   --o: .28; --c1: #ffd96a; --c2: #b9831a; --delay: -3s; }
.hm-floater--6 { --x: 16%;   --y: 88%; --s: 26px; --r: 14deg;  --d: 7s;   --o: .22; --c1: #60a5fa; --c2: #1d4ed8; --delay: -5s; }
.hm-floater--7 { --x: 22%;  --y: -8%; --s: 36px; --r: -20deg; --d: 5s;   --o: .24; --c1: #ffd96a; --c2: #b9831a; --delay: -6s; }
.hm-floater--8 { --x: 70%;  --y: 92%; --s: 42px; --r: 12deg;  --d: 6.5s; --o: .26; --c1: #60a5fa; --c2: #1d4ed8; --delay: -1.5s; }

@keyframes hm-float {
    from { transform: translateY(0) rotate(var(--r)); }
    to   { transform: translateY(-20px) rotate(calc(var(--r) + 16deg)); }
}

@media (max-width: 900px) {
    /*.hm-floater--3,*/
    /*.hm-floater--7,*/
    /*.hm-floater--8 { display: none; }*/

    .hm-floater--1 { --x: 2%;  --y: 1%;  --s: 34px; }
    .hm-floater--2 { --x: 46%; --y: 49%; --s: 24px; }
    .hm-floater--4 { --x: 92%; --y: 2%;  --s: 38px; }
    .hm-floater--5 { --x: 90%; --y: 66%; --s: 26px; }
    .hm-floater--6 { --x: 4%;  --y: 60%; --s: 24px; }
}

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

/* chips */
.hm-chips {
    display: flex;
    flex-wrap: nowrap;   /* selalu satu baris, ukuran mengecil mengikuti layar */
    gap: 10px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.hm-chip {
    display: inline-flex;
    flex: 0 1 auto;
    min-width: 0;
    align-items: center;
    white-space: nowrap;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--hm-white);
    border: 3px solid transparent;
    border-radius: 999px;
    background: linear-gradient(#131620, #131620) padding-box, linear-gradient(135deg, #fff1b8 0%, #e8b53a 22%, #a87512 48%, #ffe08a 72%, #c99422 100%) border-box;
    /*box-shadow: 0 0 0 1px rgba(255, 217, 106, 0.25), 0 10px 34px rgba(232, 181, 58, 0.22), inset 0 0 36px rgba(255, 217, 106, 0.08);*/
}

.hm-chip svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: var(--hm-blue);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* tombol */
.hm-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
}

.hm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--hm-white);
    text-decoration: none;
    text-shadow: 0 2px 6px rgba(80, 45, 0, 0.45);
    background: linear-gradient(180deg, var(--hm-gold-1) 0%, var(--hm-gold-2) 45%, var(--hm-gold-3) 100%);
    /*border: 1px solid var(--hm-border);*/
    border-radius: 10px;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.hm-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hm-btn:hover {
    transform: translateY(-4px);
    filter: brightness(1.06);
    box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 16px 28px rgba(0, 0, 0, 0.38),
    0 0 22px rgba(255, 217, 106, 0.35);
}

.hm-link {
    font-size: 0.9rem;
    color: var(--hm-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.hm-link:hover {
    color: var(--hm-blue);
    text-decoration: underline;
}

/* visual hero */
.hm-hero__visual {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 320px;
    padding: 24px 24px 0;
    overflow: hidden;
    background: var(--hm-blue-soft);
    border-radius: 28px;
}

.hm-hero__img {
    display: block;
    width: 100%;
    max-width: 380px;
    height: auto;
    object-fit: contain;
}

/* ---------- KATEGORI PILIHAN ---------- */

/* section: latar gelap polos (tanpa border gold) */
.hm-kategori {
    position: relative;
    color: var(--hm-white);
    border-radius: 18px;
}

.hm-kategori__head {
    position: relative;
    margin: 0 0 20px 2px;
}

.hm-kategori__title {
    margin: 0 0 4px;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--hm-gold-1);
}

.hm-kategori__sub {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.hm-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 28px; /* ruang untuk gambar yang menjorok keluar kartu */
}

/* kartu / tombol gold */
.hm-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: 0;
    padding: 12px 100px 12px 18px; /* sisi kanan disediakan untuk gambar */
    color: var(--hm-white);
    text-decoration: none;
    background: linear-gradient(180deg, var(--hm-gold-1) 0%, var(--hm-gold-2) 45%, var(--hm-gold-3) 100%);
    /*border: 1px solid rgba(255, 233, 160, 0.75);*/
    border-radius: 12px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 6px 14px rgba(0, 0, 0, 0.28);
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

a.hm-card:hover {
    transform: translateY(-4px);
    filter: brightness(1.06);
    box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 16px 28px rgba(0, 0, 0, 0.38),
    0 0 22px rgba(255, 217, 106, 0.35);
}

.hm-card__nama {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-shadow: 0 2px 6px rgba(80, 45, 0, 0.45);
}

.hm-card__desc {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.35;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 4px rgba(80, 45, 0, 0.4);
}

/* gambar menjorok keluar dari kartu (kanan atas) */
.hm-card__img {
    position: absolute;
    top: -20px;
    right: 8px;
    width: 84px;
    height: 84px;
    margin: 0;
    object-fit: contain;
    filter: drop-shadow(0 8px 8px rgba(60, 30, 0, 0.4));
    transition: transform 0.25s;
    pointer-events: none;
}

a.hm-card:hover .hm-card__img {
    transform: translateY(-4px) scale(1.2) rotate(-3deg);
}

/* badge kecil di bawah deskripsi */
.hm-card__tag {
    align-self: flex-start;
    margin-top: 4px;
    padding: 2px 9px;
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--hm-gold-ink);
    background: rgba(255, 255, 255, 0.72);
    border-radius: 999px;
}

/* kartu nonaktif (Segera Hadir) */
.hm-card--disabled {
    cursor: not-allowed;
    filter: saturate(0.45) brightness(0.9);
}

.hm-card--disabled .hm-card__img {
    opacity: 0.9;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    /*.hm-page {*/
    /*    padding: 28px 20px 40px;*/
    /*}*/

    .hm-hero {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hm-hero__visual {
        order: -1;
        min-height: 260px;
    }

    .hm-hero__img {
        max-width: 300px;
    }

    .hm-card {
        padding-right: 92px;
    }

    .hm-card__img {
        width: 76px;
        height: 76px;
        top: -16px;
    }
}

@media (max-width: 900px) {
    .hm-grid {
        grid-template-columns: 1fr;
        margin-top: 30px;
        gap: 24px;
    }

    .hm-kategori__head {
        margin-top: 4px;
    }
}

/* chips tetap satu baris di layar kecil: semua ukuran ikut mengecil */
@media (max-width: 560px) {
    .hm-chips {
        gap: 6px;
    }

    .hm-chip {
        gap: 0.4em;
        padding: 0.4em 0.75em;
        font-size: clamp(0.5rem, 2.55vw, 0.78rem);
        border-width: 2px;
    }

    .hm-chip svg {
        flex: none;
        width: 1.15em;
        height: 1.15em;
    }
}