/* ==========================================================================
   ALI Cargo - tampilan bersama untuk halaman depan (header, footer, layar HP)
   File ini dimuat PALING AKHIR di setiap halaman depan, jadi aturan di sini
   menimpa CSS lama yang tertulis di masing-masing halaman.
   Tidak dipakai oleh admin app (folder deprixa/).
   ========================================================================== */

html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }

/* --------------------------------------------------------------------------
   HEADER
   Merah diagonal sekarang jadi latar menu itu sendiri, jadi tulisan menu
   tidak mungkin lagi "keluar" ke bagian putih.
   -------------------------------------------------------------------------- */
.header-wrap {
  position: relative;
  height: auto;
  min-height: 0;
  overflow: visible;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 100;
}
.header-wrap .white-part,
.header-wrap .red-part { display: none; }

.header-wrap .header-content {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: space-between;
  height: auto;
  min-height: 110px;
  padding: 0;
  text-align: left;
}
.header-wrap .logo-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  min-width: 0;
  margin: 0;
  padding: 10px 16px 10px 48px;
  text-decoration: none !important;
}
.header-wrap .logo-image {
  flex: none;
  width: auto;
  max-height: 80px;
  margin: 0 18px 0 0;
}
.header-wrap .company-name {
  display: block;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
  color: #222;
  text-align: left;
  text-shadow: none;
}
.header-wrap .company-name span { display: block; white-space: nowrap; }

.header-wrap .menu-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0 44px 0 130px;
  background: #ff0000;
  -webkit-clip-path: polygon(100px 0, 100% 0, 100% 100%, 0 100%);
          clip-path: polygon(100px 0, 100% 0, 100% 100%, 0 100%);
}
.header-wrap .menu-nav a {
  padding: 10px 18px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  border-right: 1px solid rgba(255, 255, 255, 0.4);
}
.header-wrap .menu-nav a:last-child { border-right: 0; padding-right: 0; }
.header-wrap .menu-nav a:hover,
.header-wrap .menu-nav a:focus { color: #ffdcdc; text-decoration: none; }
.header-wrap .menu-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }

.nav-toggle { display: none; }

/* Laptop kecil: menu dirapatkan supaya tetap muat satu baris */
@media (max-width: 1279px) {
  .header-wrap .logo-link { padding-left: 28px; }
  .header-wrap .logo-image { max-height: 68px; margin-right: 14px; }
  .header-wrap .company-name { font-size: 20px; }
  .header-wrap .menu-nav { padding: 0 24px 0 110px; }
  .header-wrap .menu-nav a { padding: 10px 12px; font-size: 15px; }
}

/* HP dan tablet: logo di kiri, tombol menu di kanan, menu turun ke bawah */
@media (max-width: 1023px) {
  .header-wrap .header-content { flex-wrap: wrap; min-height: 64px; }
  .header-wrap .logo-link { flex: 1 1 0; padding: 8px 8px 8px 14px; }
  .header-wrap .logo-image { max-height: 46px; margin-right: 10px; }
  .header-wrap .company-name { font-size: 14px; }

  .header-wrap.js-nav .nav-toggle {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 96px;
    min-height: 64px;
    margin: 0;
    padding: 0 0 0 26px;
    border: 0;
    border-radius: 0;
    background: #ff0000;
    -webkit-clip-path: polygon(30px 0, 100% 0, 100% 100%, 0 100%);
            clip-path: polygon(30px 0, 100% 0, 100% 100%, 0 100%);
    cursor: pointer;
    -webkit-appearance: none;
            appearance: none;
  }
  .nav-toggle .nav-toggle-bars,
  .nav-toggle .nav-toggle-bars::before,
  .nav-toggle .nav-toggle-bars::after {
    display: block;
    width: 26px;
    height: 3px;
    border-radius: 2px;
    background: #fff;
    transition: transform 0.2s ease, background-color 0.2s ease;
  }
  .nav-toggle .nav-toggle-bars { position: relative; }
  .nav-toggle .nav-toggle-bars::before,
  .nav-toggle .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle .nav-toggle-bars::before { top: -8px; }
  .nav-toggle .nav-toggle-bars::after { top: 8px; }
  .nav-open .nav-toggle .nav-toggle-bars { background: transparent; }
  .nav-open .nav-toggle .nav-toggle-bars::before { transform: translateY(8px) rotate(45deg); }
  .nav-open .nav-toggle .nav-toggle-bars::after { transform: translateY(-8px) rotate(-45deg); }
  .nav-toggle:focus-visible { outline: 3px solid #222; outline-offset: -3px; }

  .header-wrap .menu-nav {
    flex: 1 0 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    background: #d90000;
    -webkit-clip-path: none;
            clip-path: none;
  }
  /* Kalau JavaScript mati, menu tetap tampil (ditumpuk). Kalau hidup, menu
     disembunyikan sampai tombol ditekan. */
  .header-wrap.js-nav .menu-nav { display: none; }
  .header-wrap.js-nav.nav-open .menu-nav { display: flex; }
  .header-wrap .menu-nav a,
  .header-wrap .menu-nav a:last-child {
    padding: 15px 20px;
    font-size: 16px;
    border-right: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
  }
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.footer-slide {
  position: relative;
  clear: both;
  padding: 0;
  /* putih di kiri, merah diagonal di kanan. Baris copyright di bawahnya
     punya latar sendiri, jadi tidak ikut tertutup merah. */
  background: linear-gradient(108deg, #fff 0, #fff 46%, #ff0000 46.1%, #ff0000 100%);
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.25);
  z-index: 10;
}
.footer-slide .footer-red-part { display: none; }

.footer-slide .footer-content {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 24px 64px;
  padding: 36px 48px;
  max-width: none;
  margin: 0;
  background: none;
}
.footer-slide .footer-block {
  float: none;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  color: #333;
}
.footer-slide .footer-block.logo-block { margin-right: auto; text-align: center; }
.footer-slide .mpd-logo-text img { display: block; max-height: 96px; width: auto; margin: 0 auto; }
.footer-slide .mpd-logo-text p { margin: 10px 0 0; font-size: 17px; font-weight: 700; color: #333; text-align: center; }

.footer-slide .footer-block header,
.footer-slide .footer-block.about-block header,
.footer-slide .footer-block.tools-block header {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.footer-slide .footer-block ul {
  display: flex !important;   /* dulu disembunyikan di HP oleh kelas hidden-xs */
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-slide .footer-block ul li { margin: 0; padding: 0; }
.footer-slide .footer-block ul li a,
.footer-slide .footer-block.about-block ul li a,
.footer-slide .footer-block.tools-block ul li a {
  padding: 0;
  border: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
.footer-slide .footer-block ul li a:hover,
.footer-slide .footer-block ul li a:focus { color: #ffdcdc; text-decoration: underline; }
.footer-slide .mpd-social { margin: 0; }

.footer-slide .footer-dark { padding: 18px 48px; background: #333; color: #fff; }
.footer-slide .footer-baseline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}
.footer-slide .footer-text { margin: 0; font-size: 14px; color: #fff; }
.footer-slide .footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; }
.footer-slide .footer-links li a { color: #fff; font-size: 14px; text-decoration: underline; }
.footer-slide .footer-links li a:hover { color: #ffdcdc; }

@media (max-width: 899px) {
  .footer-slide .footer-content {
    flex-direction: column;
    align-items: center;
    gap: 22px;
    padding: 28px 20px;
    text-align: center;
    border-top: 5px solid #ff0000;
  }
  .footer-slide { background: #fff; }
  .footer-slide .footer-block.logo-block { margin: 0; }
  .footer-slide .mpd-logo-text img { max-height: 80px; }
  .footer-slide .footer-block header,
  .footer-slide .footer-block.about-block header,
  .footer-slide .footer-block.tools-block header { color: #222; }
  .footer-slide .footer-block ul { gap: 2px; align-items: center; }
  .footer-slide .footer-block ul li a,
  .footer-slide .footer-block.about-block ul li a,
  .footer-slide .footer-block.tools-block ul li a { display: inline-block; padding: 8px 10px; color: #c40000; }
  .footer-slide .footer-block ul li a:hover,
  .footer-slide .footer-block ul li a:focus { color: #7a0000; }
  .footer-slide .footer-dark { padding: 18px 20px 86px; }  /* ruang untuk tombol WhatsApp */
  .footer-slide .footer-baseline { flex-direction: column; text-align: center; }
  .footer-slide .footer-links { justify-content: center; }
  .footer-slide .footer-links li a { display: inline-block; padding: 6px 4px; }
}

/* Tombol WhatsApp dan tombol kembali ke atas */
.whatsapp-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 50%;
  background: #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  z-index: 1000;
}
.whatsapp-btn:hover { background: #444; }
.whatsapp-btn img { width: 30px; height: 30px; }

#back-top {
  position: fixed;
  right: 22px;
  bottom: 84px;
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: #333 none;
  color: #fff;
  font-size: 20px;
  line-height: 44px;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  z-index: 999;
}
#back-top::before { content: "\2191"; }
#back-top.is-visible { display: block; }
#back-top:hover { background: #444; color: #fff; }

/* --------------------------------------------------------------------------
   ISI HALAMAN DI LAYAR HP
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  /* kotak-kotak di beranda dan halaman tracking */
  .trackorder-boxes { display: block !important; padding: 0 12px; }
  .trackorder-boxes > [class*="col-"] { float: none; width: 100%; max-width: 100%; margin: 0 0 16px; padding: 0; }
  .trackorder-boxes .pod { height: auto; margin: 0; padding: 18px 16px; }
  .trackorder-boxes .pod .media-body { display: block; width: auto; overflow: visible; }
  .trackorder-boxes .pod h3 { font-size: 18px; line-height: 1.3; }
  .trackorder-boxes .pod p { white-space: normal; overflow-wrap: anywhere; }
  .trackorder-boxes .pod img { max-width: 100%; height: auto; }
  .trackorder-boxes .pod br + br { display: none; }
  .trackorder-boxes .pod .btn { display: block; width: 100%; white-space: normal; }

  /* beranda */
  .fw .content-overlay { padding: 16px 0; }
  .fw .content-overlay h5 { margin: 4px 16px 16px !important; font-size: 17px !important; line-height: 1.45; }
  .index_partners { padding: 28px 0; }
  .slider-wrapper .nivo-directionNav a { display: none; }

  /* halaman tracking */
  .title header h1 { font-size: 20px; line-height: 1.3; }
  .title header h1 img { max-width: 64px; height: auto; }
  .track-num { padding-left: 16px; padding-right: 16px; }
  .track-num .search-bar .btn { display: block; width: 100%; margin-top: 10px; white-space: normal; }

  /* tabel lebar (hasil tracking) boleh digeser ke samping, bukan terpotong */
  .table-responsive, .ali-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* --------------------------------------------------------------------------
   HALAMAN HASIL TRACKING DI HP / TABLET
   CSS lama mengunci lebar isi di 1170px, jadi di HP seluruh halaman mengecil
   dan harus digeser ke samping. Di sini isinya dibuat mengikuti lebar layar.
   -------------------------------------------------------------------------- */
@media (max-width: 1199px) {
  .container { width: auto !important; max-width: 100%; }
}
@media (max-width: 991px) {
  main .container { padding-left: 16px; padding-right: 16px; }
  main .container .row { margin-left: 0; margin-right: 0; }
  main .container [class*="col-md-"],
  main .container [class*="col-lg-"] { float: none; width: 100%; padding-left: 0; padding-right: 0; margin-bottom: 14px; }
  main .container h2 { font-size: 18px; line-height: 1.3; }
  main .container h3 { font-size: 17px; line-height: 1.4; overflow-wrap: anywhere; }
  main .container .status-booking { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
  main .container strong { overflow-wrap: anywhere; }
  /* tabel lebar: digeser ke samping di dalam kotaknya sendiri */
  main .container table.table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  main .container img { max-width: 100%; }
  main .page-content, main .text-center { overflow-wrap: anywhere; }
}

/* Halaman Hubungi Kami: kartu kontak dibuat selebar layar dan di tengah */
@media (max-width: 991px) {
  .get-in-touch .iconbox { max-width: none; margin-left: auto; margin-right: auto; }
}

/* Gambar di dalam kotak beranda tidak boleh lebih lebar dari kotaknya (semua ukuran layar) */
.trackorder-boxes .pod img { max-width: 100%; height: auto; }
@media (min-width: 768px) and (max-width: 1023px) {
  .trackorder-boxes { padding-left: 0; padding-right: 0; }
}

/* CSS lama memberi lebar tetap pada <section>; di footer dan beranda ini
   membuat isi sedikit keluar dari tepi layar. */
.footer-slide .footer-content,
.footer-slide .footer-baseline { width: auto; max-width: 100%; margin: 0; box-sizing: border-box; }
.footer-slide .footer-baseline { padding: 0; }
@media (max-width: 1023px) {
  .fw section { max-width: 100%; box-sizing: border-box; }
}

/* Penyesuaian akhir footer: merah diagonal hanya di area menu footer, sisanya
   mengikuti warna baris copyright supaya tidak ada garis sisa di paling bawah. */
.footer-slide { float: none; width: 100%; background: #333; }
.footer-slide .footer-content { background: linear-gradient(108deg, #fff 0, #fff 46%, #ff0000 46.1%, #ff0000 100%); }
.footer-slide .footer-baseline { min-width: 0; }
#back-top { width: 44px !important; height: 44px !important; padding: 0 !important; border-radius: 50% !important; }
@media (max-width: 899px) {
  .footer-slide { background: #333; }
  .footer-slide .footer-content { background: #fff; }
}
.footer-slide .footer-baseline { min-width: 0 !important; }
@media (max-width: 991px) {
  main .container section { width: auto; min-width: 0 !important; max-width: 100%; box-sizing: border-box; }
}

/* HP sangat kecil (lebar di bawah 360px): CSS lama memaksa lebar minimum 320px
   pada setiap <section>, sehingga isi terpotong sedikit di kanan. */
@media (max-width: 359px) {
  html body section, html body main section, html body footer section { min-width: 0 !important; }
}

/* Teks untuk mesin pencari/pembaca layar, tidak terlihat di layar */
.ali-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ===== Halaman layanan, rute, dan FAQ ===== */
.ls-main { color: #222; line-height: 1.65; font-size: 16px; }
.ls-wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.ls-hero { background: linear-gradient(135deg, #1a1a1a 0%, #2b2b2b 60%, #8f0000 100%); color: #fff; padding: 40px 0 36px; }
.ls-hero h1 { color: #fff; font-size: 2.2rem; line-height: 1.2; margin: 8px 0 12px; text-transform: none; letter-spacing: 0; }
.ls-lead { font-size: 1.05rem; max-width: 760px; color: #eee; margin: 0; }
.ls-crumb { font-size: .85rem; color: #ccc; }
.ls-crumb a { color: #fff; text-decoration: underline; }
.ls-section { padding-top: 28px; padding-bottom: 8px; }
.ls-section h2 { font-size: 1.5rem; margin: 0 0 12px; text-transform: none; letter-spacing: 0; color: #111; }
.ls-section h2 small { font-size: .8rem; color: #777; font-weight: 400; margin-left: 6px; }
.ls-section h2 a { color: #111; }
.ls-main a { color: #c40000; }
.ls-list li, .ls-steps li { margin-bottom: 8px; }
.ls-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 20px; }
.ls-card { border: 1px solid #e3e3e3; border-radius: 10px; padding: 18px 20px; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.05); }
.ls-card h2 { font-size: 1.25rem; margin-bottom: 8px; }
.ls-meta { font-size: .85rem; color: #777; margin: 0; }
.ls-chips { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ls-chips a { display: inline-block; padding: 8px 14px; border: 1px solid #ccc; border-radius: 999px; text-decoration: none; color: #222; background: #fff; }
.ls-chips a:hover { border-color: #c40000; color: #c40000; }
.ls-table-wrap { overflow-x: auto; margin: 12px 0; }
.ls-table { width: 100%; border-collapse: collapse; font-size: .95rem; background: #fff; }
.ls-table th { background: #f3f3f3; text-align: left; padding: 10px 12px; border-bottom: 2px solid #ddd; }
.ls-table td { padding: 10px 12px; border-bottom: 1px solid #eee; }
.ls-tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .82rem; }
.ls-tag-darat { background: #fde8e8; color: #9b1c1c; }
.ls-tag-laut { background: #e6f0fb; color: #1b4f91; }
.ls-star { color: #c40000; font-weight: 700; }
.ls-note { font-size: .88rem; color: #555; }
.ls-search { display: block; margin-bottom: 16px; }
.ls-search span { display: block; font-weight: 600; margin-bottom: 6px; }
.ls-search input { width: 100%; max-width: 420px; padding: 11px 14px; font-size: 1rem; border: 1px solid #bbb; border-radius: 8px; box-sizing: border-box; }
.ls-region { margin-bottom: 24px; }
.ls-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: #fff4f4; border: 1px solid #f0c4c4; border-radius: 10px; padding: 18px 20px; margin: 20px 0; }
.ls-cta strong { display: block; font-size: 1.1rem; margin-bottom: 4px; }
.ls-cta span { color: #444; }
.ls-btn { display: inline-block; background: #25a244; color: #fff !important; padding: 12px 20px; border-radius: 8px; text-decoration: none; font-weight: 700; }
.ls-btn:hover { background: #1d8a38; }
.ls-faq { border: 1px solid #e3e3e3; border-radius: 8px; padding: 0 16px; margin-bottom: 10px; background: #fff; }
.ls-faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; }
.ls-faq p { margin: 0 0 14px; }
@media (max-width: 640px) {
  .ls-hero { padding: 28px 0 24px; }
  .ls-hero h1 { font-size: 1.6rem; }
  .ls-table thead { display: none; }
  .ls-table, .ls-table tbody, .ls-table tr, .ls-table td { display: block; width: 100%; box-sizing: border-box; }
  .ls-table tr { border: 1px solid #e3e3e3; border-radius: 8px; margin-bottom: 8px; padding: 6px 12px; }
  .ls-table td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; }
  .ls-table td::before { content: attr(data-label); color: #777; font-size: .85rem; }
  .ls-btn { width: 100%; text-align: center; box-sizing: border-box; }
}
.ls-main { max-width: none; width: 100%; margin: 0; padding: 0; float: none; }
.ls-main h1, .ls-main h2 { text-align: left; }
.ls-main .ls-crumb a { color: #fff; }
.ls-main .ls-btn { color: #fff; }
.ls-main .ls-chips a { color: #222; }
.ls-main .ls-chips a:hover { color: #c40000; }
.ls-main .ls-section h2 a { color: #111; }
.ls-main section.ls-hero { margin: 0; width: 100%; max-width: none; box-sizing: border-box; }
