/* =========================================================
   Ojiosador Innovation Courier - Client Site Styles
   ========================================================= */

:root {
  --brand-navy: #0b3d91;
  --brand-navy-dark: #072a66;
  --brand-gold: #f2a900;
  --brand-gold-dark: #d99400;
  --ink: #1f2937;
  --muted: #6b7280;
  --bg: #f5f7fb;
  --card: #ffffff;
  --border: #e5e7eb;
  --success: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(11, 61, 145, 0.08);
  --font: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Top bar ---------- */
.topbar {
  background: var(--brand-navy-dark);
  color: #d7e3ff;
  font-size: 13px;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}
.topbar span { margin-right: 18px; }

/* ---------- Navbar ---------- */
.navbar {
  background: var(--brand-navy);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 50;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 20px;
}
.brand .logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-navy-dark);
  font-weight: 800;
  font-size: 18px;
}
.brand small {
  display: block;
  font-weight: 400;
  font-size: 11px;
  color: #cfe0ff;
  letter-spacing: 0.5px;
}
.navlinks { display: flex; gap: 26px; align-items: center; }
.navlinks a { color: #e6edfb; font-weight: 500; font-size: 14px; }
.navlinks a:hover { color: var(--brand-gold); }
.btn-admin {
  background: var(--brand-gold);
  color: var(--brand-navy-dark) !important;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 700 !important;
}

/* ---------- Mobile nav toggle (hamburger) ---------- */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-dark) 100%);
  color: #fff;
  padding: 70px 0 110px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(242, 169, 0, 0.15);
}
.hero .container { position: relative; z-index: 2; }
.hero h1 {
  font-size: 42px;
  max-width: 640px;
  margin: 0 0 14px;
  line-height: 1.2;
}
.hero p.lead {
  color: #cfe0ff;
  max-width: 560px;
  font-size: 16px;
  margin-bottom: 34px;
}

/* ---------- Tracking Card ---------- */
.track-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  max-width: 700px;
  margin-top: -70px;
  position: relative;
  z-index: 5;
}
.track-card h3 { margin: 0 0 4px; font-size: 18px; color: var(--brand-navy); }
.track-card p.hint { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.track-form { display: flex; gap: 10px; flex-wrap: wrap; }
.track-form input[type="text"] {
  flex: 1;
  min-width: 220px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  font-size: 15px;
  outline: none;
}
.track-form input[type="text"]:focus { border-color: var(--brand-navy); }
.btn-track {
  background: var(--brand-navy);
  color: #fff;
  border: none;
  padding: 14px 26px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-track:hover { background: var(--brand-navy-dark); }
.track-error {
  margin-top: 14px;
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
}

/* ---------- Sections ---------- */
.section { padding: 70px 0; }
.section-title { text-align: center; margin-bottom: 46px; }
.section-title h2 { font-size: 30px; color: var(--brand-navy); margin: 0 0 10px; }
.section-title p { color: var(--muted); max-width: 560px; margin: 0 auto; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon {
  width: 50px; height: 50px;
  border-radius: 12px;
  background: rgba(11,61,145,0.08);
  color: var(--brand-navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}
.feature-card h4 { margin: 0 0 8px; font-size: 17px; }
.feature-card p { color: var(--muted); font-size: 14px; margin: 0; }

.how-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 860px) { .how-steps { grid-template-columns: 1fr 1fr; } }
.how-step { text-align: center; padding: 20px; }
.how-step .num {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--brand-gold); color: var(--brand-navy-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; margin: 0 auto 14px;
}
.how-step h5 { margin: 0 0 6px; font-size: 15px; }
.how-step p { font-size: 13px; color: var(--muted); }

/* ---------- Footer ---------- */
footer {
  background: var(--brand-navy-dark);
  color: #cfe0ff;
  padding: 50px 0 20px;
  margin-top: 40px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
footer h4 { color: #fff; font-size: 15px; margin: 0 0 14px; }
footer p, footer a { color: #b8cbf0; font-size: 13.5px; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin-bottom: 8px; }
.footer-bottom {
  text-align: center;
  font-size: 12.5px;
  color: #8fa8dd;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 34px;
  padding-top: 18px;
}

/* ---------- Tracking result page ---------- */
.result-header {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
}
.result-header h2 { margin: 0 0 6px; color: var(--brand-navy); font-size: 22px; }
.result-header .tn { color: var(--muted); font-size: 14px; }
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  background: var(--brand-navy);
}
.status-delivered { background: var(--success); }
.status-transit { background: #2563eb; }
.status-hold { background: var(--warn); }
.status-cleared { background: #0891b2; }
.status-returned { background: var(--danger); }
.status-outfordelivery { background: #7c3aed; }
.status-default { background: var(--brand-navy); }

.btn-outline {
  border: 1.5px solid var(--brand-navy);
  color: var(--brand-navy);
  background: transparent;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}
.btn-outline:hover { background: var(--brand-navy); color: #fff; }

.route-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 28px;
  margin-bottom: 30px;
}
.route-point { text-align: center; flex: 0 0 auto; }
.route-point .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--brand-navy); margin: 0 auto 6px; }
.route-point span { display: block; font-size: 13px; color: var(--muted); }
.route-point strong { font-size: 14px; }
.route-line {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}
.route-line-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: linear-gradient(90deg, var(--brand-gold), var(--brand-navy));
  border-radius: 4px;
}

/* Timeline */
.timeline-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.timeline-card h3 { margin: 0 0 22px; color: var(--brand-navy); font-size: 18px; }
.timeline { position: relative; margin-left: 10px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 9px; top: 4px; bottom: 4px;
  width: 2px;
  background: var(--border);
}
.timeline-item { position: relative; padding-left: 34px; padding-bottom: 28px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: 0; top: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand-navy);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--brand-navy);
}
.timeline-item:first-child .timeline-dot { background: var(--brand-gold); box-shadow: 0 0 0 2px var(--brand-gold); }
.timeline-item h5 { margin: 0 0 4px; font-size: 14.5px; }
.timeline-item .meta { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.timeline-item p { margin: 0; font-size: 13.5px; color: #374151; }

.view-detail-trigger {
  margin-top: 22px;
  text-align: center;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: #fff;
  border-radius: var(--radius);
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
  animation: modalIn 0.18s ease;
}
@keyframes modalIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--brand-navy);
  color: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
}
.modal-header h3 { margin: 0; font-size: 17px; }
.modal-close { background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; line-height: 1; }
.modal-body { padding: 24px; }
.modal-body .pkg-image {
  width: 100%; max-height: 260px; object-fit: cover;
  border-radius: 10px; margin-bottom: 18px;
  background: #f3f4f6;
}
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.detail-grid .full { grid-column: 1 / -1; }
.detail-grid label { display: block; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 3px; }
.detail-grid p { margin: 0; font-size: 14px; font-weight: 500; }
.qr-wrap { text-align: center; padding-top: 10px; border-top: 1px dashed var(--border); margin-top: 6px; }
.qr-wrap #qrcode-canvas { display: inline-block; margin: 10px auto; }
.qr-wrap .tn-big { font-weight: 800; letter-spacing: 1px; color: var(--brand-navy); font-size: 16px; }

@media (max-width: 780px) {
  .navbar .container { flex-wrap: wrap; }
  .nav-toggle { display: block; }
  .navlinks {
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .navlinks.open { max-height: 400px; padding-top: 14px; }
  .navlinks a { padding: 12px 4px; border-top: 1px solid rgba(255,255,255,0.08); }
  .navlinks .btn-admin { display: inline-block; margin: 10px 4px 8px; text-align: center; }
}

@media (max-width: 640px) {
  .hero h1 { font-size: 30px; }
  .detail-grid { grid-template-columns: 1fr; }
}
