/* =========================================================
   APM Logistics - Beranda: CTA + perapian tampilan HP/Android
   File: css/apm-home-mobile.css
   Dimuat PALING AKHIR lewat $extraCss di index.php
   ========================================================= */

/* ---------- Umum: cegah halaman bisa digeser ke samping ---------- */
.home { overflow-x: clip; }
.home img { max-width: 100%; height: auto; }

/* ---------- Layanan: jarak atas (pengganti style inline) ---------- */
.section--layanan { padding-top: 0; }
.services__dots { display: none; }   /* titik slider hanya di HP */

/* ---------- CTA: banner gambar (teks sudah ada di gambar) ---------- */
.cta { position: relative; }
.cta__link { position: absolute; inset: 0; z-index: 2; display: block; }
.cta__link:focus-visible { outline: 3px solid #dc2638; outline-offset: -3px; }

/* =========================================================
   TABLET (≤ 991px)
   ========================================================= */
@media (max-width: 991px) {
    .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 18px; }
}

/* =========================================================
   HP / ANDROID (≤ 767px)
   ========================================================= */
@media (max-width: 767px) {

    /* --- Hero / slider --- */
    .hero.hero--slider { min-height: 0; height: auto; padding: 0; }
    .hero--slider .hero__inner { padding-top: 36px; padding-bottom: 40px; }
    .hero--slider .hero__content { max-width: 100%; width: 100%; }
    .hero--slider .hero__eyebrow { font-size: 12px; letter-spacing: .08em; margin-bottom: 10px; }
    .hero--slider .hero__title { font-size: clamp(26px, 7.4vw, 32px); line-height: 1.18; margin-bottom: 12px; word-break: normal; overflow-wrap: break-word; }
    .hero--slider .hero__lead { font-size: 15px; line-height: 1.6; margin-bottom: 0; }
    .hero-slide__note { font-size: 11.5px; }
    .hero-slider__controls { margin-top: 22px; gap: 10px; flex-wrap: wrap; }
    .hero-slider__arrow { width: 40px; height: 40px; flex-shrink: 0; }
    .hero-slider__arrow svg { width: 18px; height: 18px; }
    .hero-slider__dot { min-width: 10px; min-height: 10px; }

    /* --- Strip Lacak & Cek Tarif: bertumpuk, lebar penuh --- */
    .features { margin-top: 0; padding: 16px 0 8px; }
    .features__inner {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px;
        position: relative;
        z-index: 3;
    }
    .features .feature {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        max-width: none;
        min-width: 0;
        margin: 0;
        padding: 14px 14px;
        border-radius: 16px;
        box-sizing: border-box;
        text-align: left;
    }
    .features .feature__icon-wrap { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; }
    .features .feature__icon { width: 26px; height: 26px; }
    .features .feature__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
    .features .feature__title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; line-height: 1.2; margin: 0; }
    .features .feature__badge { font-size: 10.5px; padding: 3px 8px; }
    .features .feature__input {
        width: 100%;
        min-width: 0;
        font-size: 16px;            /* cegah zoom otomatis saat mengetik */
        padding: 10px 12px;
        box-sizing: border-box;
    }
    .features .feature__input--fake { font-size: 14px; padding: 0; background: none; border: 0; }
    .features .feature__search {
        flex: 0 0 auto;
        min-width: 48px;
        height: 48px;
        padding: 0 14px;
        border-radius: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }
    .features .feature__search svg { width: 20px; height: 20px; }
    .features .feature__search-label { font-size: 14px; }

    /* --- Panel Cek Tarif: tampil di bawah tombol, lebar penuh --- */
    .features .tarif-panel {
        position: relative !important;
        inset: auto !important;
        left: auto !important; right: auto !important; top: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0;
        padding: 18px 14px 16px;
        border-radius: 16px;
        box-sizing: border-box;
    }
    .features .tarif-panel[hidden] { display: none !important; }
    .tarif-panel__close { top: 8px; right: 8px; width: 40px; height: 40px; font-size: 24px; }
    .tarif-form { display: flex; flex-direction: column; gap: 10px; }
    .tarif-row { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; box-sizing: border-box; }
    .tarif-row__ico { flex: 0 0 22px; }
    .tarif-row__input { flex: 1 1 auto; min-width: 0; width: 100%; font-size: 16px; padding: 12px; box-sizing: border-box; }
    .tarif-row__unit { flex: 0 0 auto; }
    .tarif-panel__foot { display: flex; flex-direction: column-reverse; align-items: stretch; gap: 10px; }
    .tarif-panel__note { text-align: center; font-size: 12px; }
    .tarif-panel__btn { width: 100%; min-height: 48px; font-size: 16px; }
    .tarif-result { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .tarif-result table { min-width: 100%; font-size: 14px; }

    /* --- Layanan: SLIDER geser (scroll-snap), kartu berikutnya mengintip --- */
    #layanan .section-head { margin-bottom: 20px; }
    #layanan .section-title { font-size: clamp(22px, 6.4vw, 26px); line-height: 1.25; }
    #layanan .container { overflow: visible; }
    #layanan .services__grid {
        display: flex !important;
        grid-template-columns: none !important;
        gap: 14px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin: 0 -16px;                 /* geser sampai tepi layar */
        padding: 4px 16px 14px;
        scroll-padding-left: 16px;
    }
    #layanan .services__grid::-webkit-scrollbar { display: none; }
    #layanan .service {
        flex: 0 0 82%;
        max-width: 320px;
        scroll-snap-align: start;
        display: flex;
        flex-direction: column;
        min-width: 0;
        margin: 0;
        opacity: 1 !important;           /* kartu di luar layar tetap tampil (efek reveal) */
        transform: none !important;
    }
    .service__img { aspect-ratio: 16 / 10; overflow: hidden; }
    .service__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .service__body { padding: 16px; flex: 1; }
    .service__body h3 { font-size: 17px; margin-bottom: 6px; }
    .service__body p { font-size: 14.5px; line-height: 1.6; }

    #layanan .services__dots { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
    #layanan .services__dot {
        width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px;
        background: #c9d2e3; cursor: pointer; transition: width .25s, background .25s;
    }
    #layanan .services__dot.is-active { width: 22px; background: #dc2638; }

    /* --- Klien --- */
    .clients { padding: 36px 0; }
    .clients h3 { font-size: 16px; text-align: center; margin-bottom: 16px; }
    .clients__track { gap: 12px; }
    .client { flex: 0 0 auto; width: 112px; height: 60px; padding: 8px 12px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; text-align: center; }
    .client img { max-height: 38px; max-width: 100%; width: auto; object-fit: contain; }

    /* --- CTA: tampilkan gambar UTUH, tidak terpotong --- */
    .cta {
        padding: 0 !important;
        min-height: 0 !important;
        height: auto !important;
        background: #ffffff;
    }
    .cta__media {
        position: relative !important;
        inset: auto !important;
        width: 100%;
        aspect-ratio: 16 / 7;              /* sesuaikan jika rasio gambar banner berbeda */
        background-size: contain !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        transform: none !important;
    }
    .cta__media::before, .cta__media::after { display: none !important; }   /* matikan overlay gelap jika ada */
    .cta__inner { display: none !important; }   /* di HP tinggi banner diatur oleh .cta__media */
}

/* =========================================================
   HP kecil (≤ 380px) — Android layar sempit
   ========================================================= */
@media (max-width: 380px) {
    .hero--slider .hero__title { font-size: 24px; }
    .features .feature__search-label { display: none; }    /* tombol cukup ikon */
    .features .feature__search { width: 48px; padding: 0; }
    .features .feature__badge { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .clients__track { animation-duration: 0s !important; }
}