/* public/css/public-home-programs.css
   Section "Jelajah ke luar negeri" di homepage.
   Animasi otomatis: pesawat terbang kanan -> kiri, kartu keluar dari
   perut pesawat lalu jatuh pakai parasut, pesawat parkir di kiri atas.
   Dipakai oleh resources/views/public/partials/home-programs.blade.php */

/* font tulisan tangan buat aksen judul */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600;700&display=swap');

.hmp-sec {
    --hmp-teal: #14b8bd;
    --hmp-teal-dark: #0d9ba0;
    --hmp-teal-deep: #0a7e82;
    --hmp-ink: #12393b;
    --hmp-muted: #5f7e80;

    position: relative;
    width: 100vw;
    margin: 8px 0 0 calc(50% - 50vw);
    background: var(--hmp-teal);
    overflow: clip;
}

/* cegah scroll horizontal gara-gara 100vw */
.hm { overflow-x: clip; }

.hmp-stage {
    position: relative;
    isolation: isolate;
    padding: 34px 0 48px;
}

.hmp-inner { position: relative; z-index: 2; max-width: 1000px; box-sizing: border-box; }

/* ---------- pesawat ---------- */
.hmp-plane {
    --hmp-plane-w: 520px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5; /* lewat di atas kartu */
    width: var(--hmp-plane-w);
    pointer-events: none;
    filter: drop-shadow(0 18px 14px rgba(4, 60, 64, .25));
    will-change: transform;
}

.hmp-plane svg { display: block; width: 100%; height: auto; overflow: visible; }

/* sebelum JS siap, pesawat disembunyiin */
.hmp-sec:not(.is-ready) .hmp-plane { visibility: hidden; }

/* udah parkir: melayang pelan */
.hmp-plane.is-parked .hmp-plane-body { animation: hmpHover 3.4s ease-in-out infinite; }

@keyframes hmpHover {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-8px) rotate(-1.2deg); }
}

.hmp-plane-shadow {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: 300px;
    height: 40px;
    border-radius: 50%;
    background: rgba(4, 60, 64, .3);
    filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    will-change: transform, opacity;
}

/* ---------- judul ---------- */
.hmp-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 24px;
    margin: 0 0 22px;
}

.hmp-park { position: relative; height: 160px; } /* tempat parkir pesawat */

.hmp-head-text { max-width: 520px; }

.hmp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .45);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.hmp-head h2 {
    margin: 10px 0 8px;
    font-size: clamp(22px, 2.5vw, 30px);
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
    letter-spacing: -.015em;
}

/* "bareng UETC!" -> tulisan tangan, agak miring, ada coretan di bawahnya */
.hmp-script {
    position: relative;
    display: inline-block;
    margin-top: 2px;
    font-family: 'Caveat', cursive;
    font-size: 1.45em;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    color: #fff3c4;
    transform: rotate(-3deg);
    transform-origin: 0 50%;
}

.hmp-script::after {
    content: '';
    position: absolute;
    left: 2%;
    right: -4%;
    bottom: -8px;
    height: 12px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8 C 50 2, 110 2, 198 6' fill='none' stroke='%23f5b942' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

.hmp-head p { margin: 12px 0 0; color: rgba(255, 255, 255, .88); font-size: 14.5px; line-height: 1.6; }

/* ---------- grup kartu (Camp & Trip / Kuliah di China) ---------- */
/* grup selebar konten (sejajar sama judul & pesawat), gak ada sisa kosong */
.hmp-group { width: 100%; }
.hmp-group + .hmp-group { margin-top: 26px; }

.hmp-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.hmp-group-head h3 {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: #fff;
}

.hmp-note {
    display: inline-block;
    font-family: 'Caveat', cursive;
    font-size: 20px;
    font-weight: 600;
    color: #fff3c4;
    transform: rotate(-2deg);
}

.hmp-group-head a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.hmp-group-head a i { transition: transform .15s ease; }
.hmp-group-head a:hover i { transform: translateX(3px); }

.hmp-grid {
    display: grid;
    /* selalu 4 kolom biar rapi; kalau datanya kurang dari 4, kartu tetap
       ukuran sama (gak melar) */
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.hmp-drop {
    position: relative;
    display: flex;
    transform-origin: 50% -40px; /* berayun dari tali parasut */
    will-change: transform, opacity;
}

.hmp-drop > .hmp-pass { flex: 1; }

.hmp-chute {
    position: absolute;
    left: 50%;
    top: -44px;
    z-index: 2;
    width: 58px;
    margin-left: -29px;
    opacity: 0;
    pointer-events: none;
    transform-origin: 50% 100%;
}

.hmp-chute svg { display: block; width: 100%; height: auto; }

/* ---------- kartu boarding pass ---------- */
.hmp-pass {
    --hole: var(--hmp-teal); /* lubang sobekan = warna latar */
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(5, 70, 74, .08), 0 14px 26px rgba(5, 70, 74, .14);
    transition: transform .2s ease, box-shadow .2s ease;
}

.hmp-pass:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 10px rgba(5, 70, 74, .1), 0 22px 36px rgba(5, 70, 74, .2);
    color: inherit;
}

.hmp-pass-img {
    position: relative;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    background: var(--hmp-teal-dark);
}

.hmp-pass-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.hmp-pass:hover .hmp-pass-img img { transform: scale(1.05); }

.hmp-pass-ph {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: var(--hmp-teal-dark);
    color: rgba(255, 255, 255, .9);
    font-size: 22px;
}

.hmp-pass-ph--china { position: relative; background: var(--hmp-teal-deep); }

.hmp-hanzi {
    position: absolute;
    right: 10px;
    bottom: -8px;
    font-size: 34px;
    font-weight: 800;
    color: rgba(255, 255, 255, .16);
}

.hmp-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: var(--hmp-teal-deep);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.hmp-pass-body { flex: 1; padding: 9px 12px 8px; }

.hmp-route-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e6f1f1;
}

.hmp-route-row span {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.05;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--hmp-ink);
    letter-spacing: .03em;
}

.hmp-route-row span:last-child { text-align: right; }

.hmp-route-row small {
    margin-bottom: 2px;
    font-size: 8.5px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--hmp-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hmp-route-row i {
    flex: 1;
    text-align: center;
    color: var(--hmp-teal);
    font-size: 13px;
    transform: rotate(90deg);
}

.hmp-pass-body h4 {
    margin: 0 0 2px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--hmp-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hmp-pass-body p {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.45;
    color: var(--hmp-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hmp-stub {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 12px;
    border-top: 2px dashed #d3ecec;
    background: #f7fdfd;
}

.hmp-stub::before,
.hmp-stub::after {
    content: '';
    position: absolute;
    top: -9px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--hole);
}

.hmp-stub::before { left: -8px; }
.hmp-stub::after  { right: -8px; }

.hmp-code {
    min-width: 0;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--hmp-muted);
    letter-spacing: .04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hmp-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--hmp-teal-deep);
}

.hmp-cta i { transition: transform .15s ease; }
.hmp-pass:hover .hmp-cta i { transform: translateX(3px); }

/* ---------- Camp & Trip: gaya feed Instagram (poster 4:5, tanpa kotak) ---------- */
.hmp-post {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    color: #fff;
    text-decoration: none;
}

.hmp-post:hover { color: #fff; }

.hmp-post-img {
    position: relative;
    aspect-ratio: 4 / 5;               /* rasio postingan IG (1080 x 1350) */
    overflow: hidden;
    border-radius: 16px;
    background: var(--hmp-teal-deep);
    box-shadow: 0 2px 6px rgba(5, 70, 74, .1), 0 16px 30px rgba(5, 70, 74, .22);
    transition: transform .25s ease, box-shadow .25s ease;
}

.hmp-post:hover .hmp-post-img {
    transform: translateY(-4px);
    box-shadow: 0 4px 10px rgba(5, 70, 74, .12), 0 24px 40px rgba(5, 70, 74, .28);
}

.hmp-post-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.hmp-post:hover .hmp-post-img img { transform: scale(1.04); }

/* belum ada poster: gradasi tosca + pesawat besar */
.hmp-post-ph {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(255, 255, 255, .92);
    background:
        radial-gradient(circle at 80% 12%, rgba(255, 255, 255, .22), transparent 42%),
        linear-gradient(160deg, #1cc3c8 0%, #0d9ba0 50%, #08676b 100%);
}

.hmp-post-ph i { font-size: 46px; transform: rotate(-30deg); }

.hmp-post-ph span {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .3em;
    text-transform: uppercase;
    opacity: .75;
}

.hmp-post-img .hmp-tag { top: 10px; left: 10px; padding: 4px 10px; font-size: 10px; }

.hmp-post-cap { padding: 10px 2px 0; min-width: 0; }

.hmp-post-cap h4 {
    margin: 0 0 3px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hmp-post-cap p { margin: 0; font-size: 12px; line-height: 1.5; color: rgba(255, 255, 255, .8); }

/* deskripsi 1 baris, "Lihat detail" selalu kelihatan di baris bawahnya */
.hmp-post-desc { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hmp-post-cta { display: inline-block; margin-top: 2px; font-weight: 800; color: #fff3c4; }
.hmp-post-cta i { display: inline-block; transition: transform .15s ease; }
.hmp-post:hover .hmp-post-cta i { transform: translateX(3px); }

/* ---------- responsif ---------- */
@media (max-width: 960px) {
    .hmp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hmp-plane { --hmp-plane-w: 400px; }
    .hmp-park { height: 140px; }
}

/* HP: judul di bawah tempat parkir, kartu digeser ke samping */
@media (max-width: 640px) {
    .hmp-stage { padding: 22px 0 36px; }

    .hmp-plane { --hmp-plane-w: 250px; }
    .hmp-plane-shadow { width: 160px; height: 24px; }

    .hmp-head { grid-template-columns: 1fr; gap: 4px; margin-bottom: 14px; text-align: center; }
    .hmp-head-text { max-width: none; }
    .hmp-park { height: 84px; }
    .hmp-head h2 { font-size: 20px; margin: 8px 0 2px; }
    .hmp-head p { margin-top: 8px; font-size: 13px; }

    .hmp-group-head h3 { font-size: 15.5px; }
    .hmp-note { font-size: 17px; }

    .hmp-grid {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 16px;
        /* ruang di atas buat parasut (kalau gak, kepotong) */
        margin: -48px -16px 0;
        padding: 52px 16px 10px;
        scrollbar-width: none;
    }

    .hmp-grid::-webkit-scrollbar { display: none; }

    .hmp-drop { flex: 0 0 64%; scroll-snap-align: start; }

    /* selama animasi, geseran kartu dikunci biar gak loncat */
    .hmp-sec.is-playing .hmp-grid { overflow-x: hidden; scroll-snap-type: none; }

    .hmp-head h2 { overflow-wrap: anywhere; }
    .hmp-group-head { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
    .hmp-plane.is-parked .hmp-plane-body { animation: none; }
}