/* ============================================
   Trex Ship - Track Page Redesign Styles
   Mobile-First Responsive Design
   ============================================ */

/* 1. CSS Variables */
:root {
  --primary: #6c5ce7;
  --primary-hover: #5a4bd4;
  --primary-light: #f0edff;
  --primary-lighter: #f8f7ff;
  --dark: #2d3436;
  --dark-lighter: #636e72;
  --white: #ffffff;
  --bg: #f8f6f0;
  --bg-warm: #f5f0eb;
  --muted: #636e72;
  --muted-light: #b2bec3;
  --border: #e8e4dc;
  --success: #00b894;
  --warning: #fdcb6e;
  --danger: #e17055;
  --timeline-completed: #0984e3;
  --timeline-current: #e17055;
  --timeline-pending: #dfe6e9;
  --radius-sm: 0.5rem;
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --transition: all 0.3s ease;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --container-max: 1200px;
  --section-py: 5rem;
}

/* 2. Base & Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* 3. Utility Classes */
.container-trex {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--dark);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--muted);
  max-width: 36rem;
  line-height: 1.7;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dark);
  box-shadow: var(--shadow-sm);
}

/* 4. Buttons */
.btn-trex {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 9999px;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-trex-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-trex-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-trex-outline {
  background: var(--white);
  color: var(--dark);
  border: 1px solid var(--border);
}

.btn-trex-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-trex-white {
  background: var(--white);
  color: var(--primary);
}

.btn-trex-white:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.btn-trex-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-trex-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

/* 5. Navbar */
.navbar-trex {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
}

.navbar-trex.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  padding: 0.75rem 0;
}

.navbar-trex-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* Mobile: toggle left, brand center, links/actions hidden */
.navbar-trex-toggle {
  order: 1;
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 0.75rem;
  background: var(--bg);
  border: none;
  position: relative;
  z-index: 1002;
  transition: var(--transition);
}

.navbar-trex-toggle:hover {
  background: var(--primary-light);
}

.navbar-trex-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}

/* Hamburger to X animation */
.navbar-trex-toggle.active .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar-trex-toggle.active .bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.navbar-trex-toggle.active .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.navbar-trex-brand {
  order: 2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--dark);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.navbar-trex-brand .brand-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1rem;
}

.navbar-trex-brand img {
  max-height: 32px;
  max-width: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.navbar-trex-links {
  order: 3;
  display: none;
  align-items: center;
  gap: 2rem;
}

.navbar-trex-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--dark);
  opacity: 0.8;
}

.navbar-trex-links a:hover {
  opacity: 1;
  color: var(--primary);
}

.navbar-trex-actions {
  order: 4;
  display: none;
  align-items: center;
  gap: 1rem;
}

/* Mobile Menu Overlay Backdrop */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Menu Slide-in Panel */
.navbar-trex-mobile {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: var(--white);
  z-index: 999;
  padding: 5rem 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
}

.navbar-trex-mobile.active {
  transform: translateX(0);
}

.navbar-trex-mobile a {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--dark);
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-trex-mobile a:hover {
  color: var(--primary);
  padding-left: 0.5rem;
}

.navbar-trex-mobile a:last-of-type {
  border-bottom: none;
}

.navbar-trex-mobile .mobile-cta {
  margin-top: 1rem;
  text-align: center;
  justify-content: center;
}

/* Mobile menu close button (visible inside panel) */
.mobile-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark);
  font-size: 1.25rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.mobile-close-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* 6. Hero Section */
.hero-trex {
  position: relative;
  padding: 7rem 0 6rem;
  background: var(--primary-lighter);
  overflow: hidden;
}

/* Hero background overlay - soft purple blobs */
.hero-trex::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 80% 60% at 15% 40%, rgba(160, 170, 255, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 85% 30%, rgba(180, 190, 255, 0.3) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 50% 80%, rgba(140, 160, 255, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 60% 20%, rgba(200, 210, 255, 0.25) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}

/* Hero bottom purple fade */
.hero-trex::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 240px;
  background: linear-gradient(180deg, transparent 0%, rgba(180, 190, 255, 0.5) 40%, rgba(160, 170, 255, 0.85) 100%);
  pointer-events: none;
  z-index: 1;
}

.hero-trex-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-trex-visual {
  position: relative;
  z-index: 2;
}

/* Hand holding phone image */
.hero-hand-phone-wrap {
  position: relative;
  width: 280px;
  margin: 0 auto;
}

.hero-hand-phone {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 25px 50px rgba(73, 98, 244, 0.25));
}

.hero-trex-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.hero-trex-badge .badge-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero-trex-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.hero-trex-title .serif-line {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
  margin-top: 0.25rem;
}

.hero-trex-desc {
  font-size: 1rem;
  color: var(--muted);
  max-width: 32rem;
  margin: 1.25rem auto 2rem;
  line-height: 1.7;
}

.hero-trex-ctas {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.hero-trex-visual {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
}

/* Phone Mockup */
.phone-mockup-trex {
  position: relative;
  width: 260px;
  margin: 0 auto;
  background: var(--dark);
  border-radius: 2.5rem;
  padding: 0.625rem;
  box-shadow: var(--shadow-xl);
}

.phone-mockup-trex::before {
  content: '';
  position: absolute;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 24px;
  background: var(--dark);
  border-radius: 0 0 1rem 1rem;
  z-index: 2;
}

.phone-screen-trex {
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  border-radius: 2rem;
  padding: 2rem 1rem 1.5rem;
  min-height: 340px;
  position: relative;
  overflow: hidden;
}

.phone-map-area {
  position: relative;
  width: 100%;
  height: 200px;
  background: #dbeafe;
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 1rem;
}

.phone-map-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 50% 50% 50% 0;
  transform: translate(-50%, -50%) rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.phone-map-pin::after {
  content: '';
  width: 12px;
  height: 12px;
  background: var(--white);
  border-radius: 50%;
  transform: rotate(45deg);
}

.phone-info-card {
  background: var(--white);
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.phone-info-icon {
  width: 32px;
  height: 32px;
  background: var(--primary-light);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 0.875rem;
}

.phone-info-text {
  font-size: 0.75rem;
}

.phone-info-text strong {
  display: block;
  font-size: 0.875rem;
  color: var(--dark);
}

.phone-info-text span {
  color: var(--muted);
}

/* Floating notification cards */
.float-card {
  position: absolute;
  background: var(--white);
  border-radius: 0.875rem;
  padding: 0.875rem 1rem;
  box-shadow: var(--shadow-lg);
  z-index: 3;
  animation: float-card 4s ease-in-out infinite;
  min-width: 140px;
  border: 1px solid var(--border);
}

/* Left side cards */
.float-card-left-1 {
  top: 0;
  left: 0;
  animation-delay: 0s;
}

.float-card-left-2 {
  top: 38%;
  left: 0;
  animation-delay: 0.8s;
}

.float-card-left-3 {
  bottom: 5%;
  left: 0;
  animation-delay: 1.6s;
}

/* Right side cards */
.float-card-right-1 {
  top: 5%;
  right: 0;
  animation-delay: 0.4s;
}

.float-card-right-2 {
  top: 42%;
  right: 0;
  animation-delay: 1.2s;
}

.float-card-right-3 {
  bottom: 0;
  right: 0;
  animation-delay: 2s;
}

@keyframes float-card {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.float-card-label {
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.float-card-value {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.15rem;
}

.float-card-sub {
  font-size: 0.75rem;
  color: var(--muted-light);
}

.float-card-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 600;
  margin-top: 0.35rem;
}

.float-card-badge.success {
  background: #dcfce7;
  color: #166534;
}

.float-card-badge.warning {
  background: #fef9c3;
  color: #854d0e;
}

.float-card-badge.info {
  background: #dbeafe;
  color: #1e40af;
}

/* Hand holding phone illustration placeholder */
.hero-hand-illustration {
  position: absolute;
  bottom: -2rem;
  right: -3rem;
  width: 200px;
  height: 280px;
  z-index: 1;
  opacity: 0.9;
  pointer-events: none;
}

/* Partner Logos Marquee */
.partners-trex {
  padding: 2rem 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.partners-marquee {
  display: flex;
  width: max-content;
  animation: marquee-scroll 30s linear infinite;
}

.partners-marquee:hover {
  animation-play-state: paused;
}

.partners-track {
  display: flex;
  align-items: center;
  gap: 4rem;
  padding: 0 2rem;
  flex-shrink: 0;
}

.partner-logo {
  font-size: 1.25rem;
  color: var(--muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  opacity: 0.55;
  transition: opacity 0.3s ease;
  flex-shrink: 0;
}

.partner-logo:hover {
  opacity: 1;
  color: var(--dark);
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* 7. Tracking Section */
.tracking-section-trex {
  padding: var(--section-py) 0;
  background: var(--white);
}

.tracking-trex-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.tracking-trex-content .section-title {
  font-size: 2rem;
}

.tracking-trex-input-wrap {
  margin-top: 2rem;
}

.tracking-trex-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 28rem;
}

.tracking-trex-form input {
  flex: 1;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: 9999px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  color: var(--dark);
  background: var(--white);
  transition: var(--transition);
}

.tracking-trex-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(73, 98, 244, 0.1);
}

.tracking-trex-form input::placeholder {
  color: var(--muted-light);
}

/* Deep purple track button */
.btn-track-purple {
  background: #4c1d95;
  color: var(--white);
  box-shadow: 0 4px 14px rgba(76, 29, 149, 0.4);
  padding: 0.875rem 1.75rem;
  white-space: nowrap;
}

.btn-track-purple:hover {
  background: #3b1674;
  box-shadow: 0 6px 20px rgba(76, 29, 149, 0.5);
  transform: translateY(-2px);
}

.tracking-trex-visual {
  position: relative;
}

.phone-mockup-trex-alt {
  position: relative;
  width: 240px;
  margin: 0 auto;
  background: var(--dark);
  border-radius: 2rem;
  padding: 0.5rem;
  box-shadow: var(--shadow-xl);
  transform: rotate(-3deg);
}

.phone-screen-trex-alt {
  background: var(--white);
  border-radius: 1.5rem;
  padding: 1.5rem 1rem;
  min-height: 300px;
  position: relative;
  overflow: hidden;
}

.phone-screen-trex-alt .phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 18px;
  background: var(--dark);
  border-radius: 0 0 0.75rem 0.75rem;
}

.delivery-card-preview {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  border-radius: 1rem;
  padding: 1rem;
  color: var(--white);
  margin-top: 1rem;
}

.delivery-card-preview h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.delivery-card-preview .delivery-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  opacity: 0.9;
}

/* Play button overlay */
.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  color: var(--primary);
  font-size: 1.25rem;
  z-index: 2;
}

/* 8. Features Section */
.features-trex {
  padding: var(--section-py) 0;
  background: var(--bg);
}

.features-trex-header {
  text-align: center;
  margin-bottom: 3rem;
}

.features-trex-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.feature-card-trex {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border);
}

.feature-card-trex:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.feature-card-trex .feature-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
}

.feature-card-trex .feature-icon-wrap.purple {
  background: var(--primary-light);
  color: var(--primary);
}

.feature-card-trex .feature-icon-wrap.blue {
  background: #e3f2fd;
  color: #0d47a1;
}

.feature-card-trex .feature-icon-wrap.green {
  background: #d1f2eb;
  color: #00695c;
}

.feature-card-trex .feature-icon-wrap.yellow {
  background: #fff3e0;
  color: #e65100;
}

.feature-card-trex .feature-icon-wrap.pink {
  background: #fce4ec;
  color: #ad1457;
}

.feature-card-trex .feature-icon-wrap.orange {
  background: #fff3e0;
  color: #e65100;
}

.feature-card-trex h4 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.feature-card-trex p {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.6;
}

/* 9. Steps Section (Dark) */
.steps-trex {
  padding: var(--section-py) 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.steps-trex::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* Steps background grid overlay */
.steps-trex::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* Section label with arrow */
.section-label-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 1rem;
}

.section-label-arrow::after {
  content: '\2192';
  font-size: 1rem;
  color: var(--primary);
}

.steps-trex-grid {
  display: grid;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

.steps-trex-left .section-title {
  color: var(--white);
  font-size: 2rem;
}

.steps-trex-left .section-subtitle {
  color: rgba(255, 255, 255, 0.7);
}

/* Order tracked floating card */
.order-tracked-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 2rem;
  max-width: 20rem;
}

.order-tracked-card .ot-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.order-tracked-card .ot-icon {
  width: 40px;
  height: 40px;
  background: rgba(99, 102, 241, 0.3);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.order-tracked-card .ot-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.order-tracked-card .ot-status {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.order-tracked-card .ot-route {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.order-tracked-card .ot-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--white);
  color: var(--dark);
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
}

/* Steps list */
.steps-list-trex {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.step-item-trex {
  display: flex;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: var(--transition);
}

.step-item-trex:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.step-number-trex {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--white);
}

.step-content-trex h5 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.step-content-trex p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
}

/* 10. Why Choose Us Section */
.why-trex {
  padding: var(--section-py) 0;
  background: linear-gradient(180deg, var(--white) 0%, var(--bg) 100%);
}

.why-trex-header {
  margin-bottom: 3rem;
}

.why-trex-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 64rem;
  margin: 0 auto;
}

.why-card-trex {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  text-align: center;
}

.why-card-trex:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.why-card-trex .why-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: var(--radius);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1.25rem;
}

.why-card-trex h4 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.why-card-trex p {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.6;
}

/* 11. Testimonials Section */
.testimonials-trex {
  padding: var(--section-py) 0;
  background: var(--white);
}

.testimonials-trex-header {
  text-align: center;
  margin-bottom: 3rem;
}

.testimonials-carousel {
  position: relative;
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 3.5rem;
}

.testimonials-track {
  overflow: hidden;
}

.testimonials-slides {
  display: flex;
  transition: transform 0.5s ease;
}

.testimonial-slide {
  min-width: 100%;
  padding: 0 1rem;
}

.testimonial-card-trex {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
}

.testimonial-card-trex .quote-icon {
  font-size: 2rem;
  color: var(--primary);
  opacity: 0.3;
  margin-bottom: 1rem;
}

.testimonial-card-trex blockquote {
  font-size: 1.125rem;
  color: var(--dark);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.testimonial-author img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-author-info {
  text-align: left;
}

.testimonial-author-info .name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--dark);
}

.testimonial-author-info .title {
  font-size: 0.8125rem;
  color: var(--muted);
}

.testimonial-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  z-index: 2;
}

.testimonial-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark);
  font-size: 1rem;
  transition: var(--transition);
  pointer-events: auto;
  box-shadow: var(--shadow-sm);
}

.testimonial-nav-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

/* Stats row */
.testimonials-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 3rem;
}

.stat-badge-trex {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--bg);
  border-radius: 9999px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--dark);
}

.stat-badge-trex i {
  color: var(--success);
}

/* 12. App Download Section */
.app-download-trex {
  padding: var(--section-py) 0;
  background: linear-gradient(180deg, var(--white) 0%, var(--primary-lighter) 100%);
}

.app-download-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.app-download-content .section-title {
  font-size: 2rem;
}

.app-download-phones {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

.app-phone {
  position: absolute;
  width: 180px;
  background: var(--dark);
  border-radius: 1.5rem;
  padding: 0.5rem;
  box-shadow: var(--shadow-xl);
}

.app-phone-1 {
  z-index: 1;
  transform: rotate(-8deg) translateX(-60px);
}

.app-phone-2 {
  z-index: 3;
  transform: translateY(-10px);
}

.app-phone-3 {
  z-index: 2;
  transform: rotate(8deg) translateX(60px);
}

.app-phone-screen {
  background: var(--white);
  border-radius: 1.25rem;
  min-height: 280px;
  padding: 1rem;
}

/* 13. CTA Banner */
.cta-banner-trex {
  padding: 4rem 0;
  background: var(--primary);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner-trex::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cta-banner-trex .section-title {
  color: var(--white);
  font-size: 2rem;
  position: relative;
  z-index: 1;
}

.cta-banner-trex .section-title .serif-line {
  color: rgba(255, 255, 255, 0.9);
}

.cta-banner-trex .cta-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}

/* 14. Footer */
.footer-trex {
  padding: 4rem 0 2rem;
  background: var(--dark);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.footer-trex::before {
  content: attr(data-site-name);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(4rem, 15vw, 12rem);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  letter-spacing: 0.05em;
  line-height: 1;
}

.footer-trex .container-trex {
  position: relative;
  z-index: 1;
}

.footer-trex-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-trex-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-trex-brand .brand-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.footer-trex-desc {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1.5rem;
  max-width: 20rem;
}

.footer-trex-col h5 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--white);
}

.footer-trex-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.footer-trex-col ul li a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  transition: var(--transition);
}

.footer-trex-col ul li a:hover {
  color: var(--white);
}

.footer-trex-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-trex-bottom p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  transition: var(--transition);
}

.footer-socials a:hover {
  background: var(--primary);
  color: var(--white);
}

/* ============================================
   15. COURIER TRACKING RESULT - MODERN REDESIGN
   ============================================ */

.result-trex {
  padding: 2rem 0;
}

.result-trex-container {
  max-width: 800px;
  margin: 0 auto;
}

/* Result Header */
.result-trex-header {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.result-trex-header .tracking-number {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--primary-light);
  border-radius: 9999px;
  font-family: 'Courier New', monospace;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
}

.result-trex-header .status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.status-pill.completed {
  background: #d1f2eb;
  color: #00695c;
}

.status-pill.pending {
  background: #fff3e0;
  color: #e65100;
}

.status-pill.in-transit {
  background: #e3f2fd;
  color: #0d47a1;
}

.status-pill.failed {
  background: #ffebee;
  color: #c62828;
}

/* Progress Bar */
.result-trex-progress {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}

.result-trex-progress .progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.result-trex-progress .progress-header span {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-trex-progress .progress-header strong {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}

.progress-bar-trex {
  height: 8px;
  background: var(--border);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-trex .progress-fill-trex {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, #a29bfe 100%);
  border-radius: 9999px;
  transition: width 0.6s ease;
}

/* Map Card */
.result-trex-map {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}

.result-trex-map h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.result-trex-map h4 i {
  color: var(--primary);
}

.map-container-trex {
  height: 300px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* Info Grid */
.result-trex-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.result-trex-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.result-trex-card .card-header-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.result-trex-card .card-header-icon.sender {
  background: var(--primary-light);
  color: var(--primary);
}

.result-trex-card .card-header-icon.receiver {
  background: #d1f2eb;
  color: #00b894;
}

.result-trex-card h5 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.result-trex-card .info-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--muted);
  margin-bottom: 0.375rem;
}

.result-trex-card .info-row i {
  font-size: 0.875rem;
  color: var(--muted-light);
}

.result-trex-card .info-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

/* Package Details */
.result-trex-details {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}

.result-trex-details h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.result-trex-details h4 i {
  color: var(--primary);
}

.details-grid-trex {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.detail-item-trex .detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-light);
  margin-bottom: 0.25rem;
}

.detail-item-trex .detail-value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--dark);
}

/* Timeline */
.result-trex-timeline {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.result-trex-timeline h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.timeline-trex {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.timeline-trex::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item-trex {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  position: relative;
}

.timeline-item-trex:first-child {
  padding-top: 0;
}

.timeline-item-trex:last-child {
  padding-bottom: 0;
}

.timeline-dot-trex {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  z-index: 1;
}

.timeline-dot-trex.completed {
  background: var(--timeline-completed);
  color: var(--white);
}

.timeline-dot-trex.current {
  background: var(--white);
  border: 2px solid var(--timeline-current);
  color: var(--timeline-current);
  box-shadow: 0 0 0 4px rgba(225, 112, 85, 0.15);
}

.timeline-dot-trex.pending {
  background: var(--white);
  border: 2px solid var(--timeline-pending);
  color: var(--muted-light);
}

.timeline-content-trex {
  flex: 1;
}

.timeline-content-trex h5 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.timeline-content-trex p {
  font-size: 0.875rem;
  color: var(--muted);
}

.timeline-content-trex .time {
  font-size: 0.75rem;
  color: var(--muted-light);
  margin-top: 0.25rem;
}

/* Track Another Button */
.track-another-trex {
  text-align: center;
  margin-bottom: 2rem;
}

.track-another-trex button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem 1.75rem;
  background: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--white);
  transition: var(--transition);
}

.track-another-trex button:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Extra small screens - hide floating cards to prevent overflow */
@media (max-width: 400px) {
  .float-card {
    display: none;
  }
}

/* Mobile testimonial fixes */
@media (max-width: 575.98px) {
  .testimonials-carousel {
    padding: 0;
  }

  .testimonial-slide {
    padding: 0;
  }

  .testimonial-card-trex {
    padding: 1.5rem 1rem;
  }

  .testimonial-card-trex blockquote {
    font-size: 0.9375rem;
  }

  .testimonial-nav {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    justify-content: center;
    margin-top: 1.25rem;
    gap: 1rem;
  }

  .testimonial-nav-btn {
    width: 40px;
    height: 40px;
  }
}

/* ============================================
   16. RESPONSIVE BREAKPOINTS
   ============================================ */

/* Small tablets and up (576px+) */
@media (min-width: 576px) {
  .container-trex {
    padding: 0 1.5rem;
  }

  .hero-trex-title {
    font-size: 2.75rem;
  }

  .section-title {
    font-size: 2.25rem;
  }

  .hero-trex-ctas {
    flex-direction: row;
    justify-content: center;
  }

  .cta-banner-trex .cta-buttons {
    flex-direction: row;
    justify-content: center;
  }

  .details-grid-trex {
    grid-template-columns: repeat(4, 1fr);
  }

  .why-trex-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablets (768px+) */
@media (min-width: 768px) {
  :root {
    --section-py: 6rem;
  }

  .container-trex {
    padding: 0 2rem;
  }

  .navbar-trex-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  .navbar-trex-toggle {
    display: none;
  }

  .navbar-trex-links {
    display: flex;
    justify-self: start;
    order: 1;
  }

  .navbar-trex-brand {
    order: 2;
    justify-self: center;
    position: static;
    transform: none;
  }

  .navbar-trex-actions {
    display: flex;
    justify-self: end;
    order: 3;
  }

  /* Desktop: inline pill form */
  .tracking-trex-form {
    flex-direction: row;
    align-items: center;
    gap: 0;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 9999px;
    padding: 0.375rem;
    box-shadow: var(--shadow-sm);
  }

  .tracking-trex-form:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(73, 98, 244, 0.1), var(--shadow-md);
  }

  .tracking-trex-form input {
    border: none;
    background: transparent;
    padding: 0.75rem 1rem;
    box-shadow: none;
  }

  .tracking-trex-form input:focus {
    box-shadow: none;
  }

  .btn-track-purple {
    padding: 0.75rem 1.5rem;
    flex-shrink: 0;
  }

  .hero-trex {
    padding: 8rem 0 5rem;
  }

  .hero-trex-title {
    font-size: 3.5rem;
  }

  .hero-trex-desc {
    font-size: 1.125rem;
  }

  .phone-mockup-trex {
    width: 300px;
  }

  .phone-screen-trex {
    min-height: 400px;
    padding: 2.5rem 1.25rem 2rem;
  }

  /* Desktop float card positions */
  .float-card-left-1 { top: 2rem; left: -1rem; }
  .float-card-left-2 { top: 40%; left: -2.5rem; }
  .float-card-left-3 { bottom: 2rem; left: -0.5rem; }
  .float-card-right-1 { top: 1rem; right: -1rem; }
  .float-card-right-2 { top: 42%; right: -3rem; }
  .float-card-right-3 { bottom: 3rem; right: -0.5rem; }

  .float-card {
    min-width: 160px;
    padding: 1rem 1.25rem;
  }

  .tracking-trex-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }

  .features-trex-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-trex-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }

  .steps-trex-left .section-title {
    font-size: 2.5rem;
  }

  .why-trex-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .app-download-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }

  .footer-trex-grid {
    grid-template-columns: 2fr repeat(3, 1fr);
  }

  .footer-trex-bottom {
    flex-direction: row;
    justify-content: space-between;
  }

  .result-trex-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .result-trex-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Horizontal timeline for desktop */
  .timeline-trex {
    flex-direction: row;
    justify-content: space-between;
  }

  .timeline-trex::before {
    left: 0;
    right: 0;
    top: 15px;
    bottom: auto;
    height: 2px;
    width: auto;
  }

  .timeline-item-trex {
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    padding: 0;
    gap: 0.75rem;
  }

  .timeline-content-trex {
    text-align: center;
  }
}

/* Desktop (992px+) */
@media (min-width: 992px) {
  .hero-trex-title {
    font-size: 4rem;
  }

  .section-title {
    font-size: 2.5rem;
  }

  .features-trex-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .features-trex-grid .feature-card-trex:nth-child(1),
  .features-trex-grid .feature-card-trex:nth-child(2) {
    grid-column: span 3;
  }

  .features-trex-grid .feature-card-trex:nth-child(3),
  .features-trex-grid .feature-card-trex:nth-child(4),
  .features-trex-grid .feature-card-trex:nth-child(5) {
    grid-column: span 2;
  }

  .hero-hand-illustration {
    width: 280px;
    height: 380px;
    right: -2rem;
  }

  /* Larger desktop float card positions */
  .float-card-left-1 { top: 2rem; left: 2rem; }
  .float-card-left-2 { top: 40%; left: 0; }
  .float-card-left-3 { bottom: 2rem; left: 3rem; }
  .float-card-right-1 { top: 1rem; right: 2rem; }
  .float-card-right-2 { top: 42%; right: 0; }
  .float-card-right-3 { bottom: 3rem; right: 3rem; }

  .hero-trex-visual {
    max-width: 900px;
  }

  .cta-banner-trex .section-title {
    font-size: 2.5rem;
  }
}

/* Large desktop (1200px+) */
@media (min-width: 1200px) {
  .hero-trex-title {
    font-size: 4.5rem;
  }

  .tracking-trex-content .section-title,
  .steps-trex-left .section-title,
  .app-download-content .section-title {
    font-size: 2.75rem;
  }
}

/* ============================================
   17. ANIMATIONS & UTILITIES
   ============================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.6s ease forwards;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted-light);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  left: 1.25rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.3s ease;
  box-shadow: 0 4px 14px rgba(73, 98, 244, 0.4);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(73, 98, 244, 0.5);
}

.back-to-top:active {
  transform: translateY(0);
}

@media (min-width: 768px) {
  .back-to-top {
    left: 2rem;
    bottom: 2.5rem;
  }
}

/* ============================================
   18. TRACKING OVERLAY
   ============================================ */
.tracking-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tracking-overlay.active {
  opacity: 1;
  visibility: visible;
}

.tracking-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
}

.tracking-overlay-panel {
  position: relative;
  width: min(96%, 800px);
  max-height: 90vh;
  background: var(--bg-warm);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 80px rgba(45, 52, 54, 0.25);
  overflow-y: auto;
  transform: translateY(30px) scale(0.97);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tracking-overlay.active .tracking-overlay-panel {
  transform: translateY(0) scale(1);
}

.tracking-overlay-close {
  position: sticky;
  top: 1rem;
  float: right;
  margin-right: 1rem;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.tracking-overlay-close:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.tracking-overlay-body {
  padding: 2rem 2rem 2.5rem;
}

/* Overlay input section */
.tracking-overlay-input {
  text-align: center;
  padding: 2rem 0;
}

.overlay-icon {
  font-size: 3rem;
  color: var(--primary-light);
  margin-bottom: 1rem;
}

.tracking-overlay-input h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.tracking-overlay-input p {
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.overlay-input-wrap {
  display: flex;
  max-width: 28rem;
  margin: 0 auto;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 9999px;
  padding: 0.375rem;
  transition: var(--transition);
}

.overlay-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(73, 98, 244, 0.1);
}

.overlay-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.75rem 1rem 0.75rem 1.5rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--dark);
  background: transparent;
  border-radius: 9999px;
}

.overlay-input-wrap input::placeholder {
  color: var(--muted-light);
}

.overlay-input-wrap button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 9999px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.overlay-input-wrap button:hover {
  background: var(--primary-hover);
}

/* Overlay loading */
.overlay-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: overlay-spin 0.8s linear infinite;
  margin: 2rem auto 1rem;
}

@keyframes overlay-spin {
  to { transform: rotate(360deg); }
}

.overlay-spinner-sm {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: overlay-spin 0.8s linear infinite;
  vertical-align: middle;
}

.tracking-overlay-result {
  text-align: center;
}

.tracking-overlay-result p {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Overlay error */
.overlay-error-box {
  background: #ffebee;
  border: 1px solid #ffcdd2;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  color: #c62828;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
}

.overlay-error-box i {
  font-size: 1.25rem;
}

/* ============================================
   19. MODERN COURIER RESULT (OVERLAY)
   ============================================ */
.courier-result-modern {
  text-align: left;
  animation: fadeInUp 0.4s ease;
}

.courier-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.courier-track-num {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--primary-light);
  border-radius: 9999px;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.courier-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.125rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.courier-status-badge i {
  font-size: 0.5rem;
}

.courier-status-badge.completed {
  background: #d1f2eb;
  color: #00695c;
}

.courier-status-badge.pending {
  background: #fff3e0;
  color: #e65100;
}

.courier-status-badge.in-transit {
  background: #e3f2fd;
  color: #0d47a1;
}

.courier-status-badge.failed {
  background: #ffebee;
  color: #c62828;
}

/* Modern progress bar */
.courier-progress-modern {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.courier-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.875rem;
}

.courier-progress-top span {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.courier-progress-top strong {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}

.courier-progress-track {
  height: 8px;
  background: var(--border);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.courier-progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--primary), #a29bfe, var(--primary));
  background-size: 200% 100%;
  animation: progress-shimmer 2s ease infinite;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes progress-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Map */
.courier-map-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
  height: 280px;
  min-height: 280px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.courier-map {
  width: 100%;
  height: 100%;
  min-height: 280px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* Parties - Single Card */
.courier-parties-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.courier-parties-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.courier-party-col {
  display: flex;
  flex-direction: column;
}

.courier-party-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-light);
  margin-bottom: 0.5rem;
}

.courier-party-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.courier-party-detail {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.courier-party-detail i {
  font-size: 0.8125rem;
  color: var(--muted-light);
}

/* Package details */
.courier-details {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.courier-details-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.courier-details-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1rem;
}

.courier-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.courier-detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.courier-detail-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-light);
}

.courier-detail-value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--dark);
}

.courier-desc {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.courier-desc p {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.courier-category-badge {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-top: 0.75rem;
}

/* Timeline */
.courier-timeline {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.courier-timeline-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.courier-timeline-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1rem;
}

.courier-timeline-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.courier-timeline-steps::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.courier-timeline-step {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  position: relative;
}

.courier-timeline-step:first-child {
  padding-top: 0;
}

.courier-timeline-step:last-child {
  padding-bottom: 0;
}

.courier-timeline-dot {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  z-index: 1;
}

.courier-timeline-dot.completed {
  background: var(--timeline-completed);
  color: var(--white);
}

.courier-timeline-dot.current {
  background: var(--timeline-current);
  color: var(--white);
  box-shadow: 0 0 0 4px rgba(225, 112, 85, 0.2);
}

.courier-timeline-dot.pending {
  background: var(--timeline-pending);
  color: var(--muted-light);
}

.courier-timeline-info {
  flex: 1;
}

.courier-timeline-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.125rem;
}

.courier-timeline-desc {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Track another */
.courier-track-another {
  text-align: center;
  margin-top: 1rem;
}

.courier-track-another-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--white);
  cursor: pointer;
  transition: var(--transition);
}

.courier-track-another-btn:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--white);
}

@media (max-width: 575.98px) {
  .tracking-overlay-body {
    padding: 1.5rem 1.25rem;
  }
  .tracking-overlay-panel {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  .overlay-input-wrap {
    flex-direction: column;
    border-radius: var(--radius-lg);
    padding: 0;
    border: none;
    gap: 0.5rem;
  }
  .overlay-input-wrap input {
    border: 2px solid var(--border);
    border-radius: 9999px;
    padding: 0.875rem 1.25rem;
  }
  .overlay-input-wrap button {
    width: 100%;
    justify-content: center;
  }
  .courier-parties-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .courier-details-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .courier-result-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .courier-track-num {
    font-size: 0.9375rem;
  }
  .courier-status-badge {
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
  }
  .courier-progress-modern {
    padding: 1.25rem;
  }
  .courier-details {
    padding: 1.25rem;
  }
  .courier-timeline {
    padding: 1.25rem;
  }
  .courier-map-wrap {
    height: 240px;
    margin-bottom: 1.25rem;
  }
}

/* ============================================
   20. DARK THEME
   ============================================ */
html[data-theme="dark"] {
  color-scheme: dark;
  --primary: #a29bfe;
  --primary-hover: #b2b7ff;
  --primary-light: rgba(162, 155, 254, 0.18);
  --primary-lighter: #1e1e2e;
  --dark: #f8fafc;
  --dark-lighter: #e2e8f0;
  --white: #1a1a2e;
  --bg: #16213e;
  --bg-warm: #1e1e2e;
  --muted: #94a3b8;
  --muted-light: #64748b;
  --border: #2d2d44;
  --success: #55efc4;
  --warning: #ffeaa7;
  --danger: #fab1a0;
  --timeline-completed: #74b9ff;
  --timeline-current: #fab1a0;
  --timeline-pending: #3d3d5c;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.45), 0 4px 6px -4px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] body {
  background: var(--white);
  color: var(--dark);
}

/* Images respect dark mode: content photos get a subtle brightness/contrast adjustment
   so they don't look washed out against dark backgrounds */
html[data-theme="dark"] .hero-hand-phone,
html[data-theme="dark"] .testimonial-author img,
html[data-theme="dark"] .app-phone-screen,
html[data-theme="dark"] .phone-screen-trex-alt,
html[data-theme="dark"] .phone-screen-trex {
  filter: brightness(0.92) contrast(1.05);
}

html[data-theme="dark"] .navbar-trex {
  color: var(--dark);
}

html[data-theme="dark"] .navbar-trex.scrolled {
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

html[data-theme="dark"] .navbar-trex-toggle {
  background: rgba(248, 250, 252, 0.08);
}

html[data-theme="dark"] .navbar-trex-toggle:hover {
  background: rgba(248, 250, 252, 0.15);
}

html[data-theme="dark"] .navbar-trex-toggle .bar {
  background: var(--dark);
}

html[data-theme="dark"] .navbar-trex-mobile {
  background: var(--white);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .navbar-trex-mobile a {
  color: var(--dark);
  border-color: var(--border);
}

html[data-theme="dark"] .mobile-close-btn {
  background: var(--bg);
  color: var(--dark);
}

html[data-theme="dark"] .mobile-close-btn:hover {
  background: var(--primary-light);
}

/* Hero */
html[data-theme="dark"] .hero-trex {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
}

html[data-theme="dark"] .hero-trex::before {
  background-image:
    radial-gradient(ellipse 80% 60% at 15% 40%, rgba(99, 102, 241, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 85% 30%, rgba(129, 140, 248, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 50% 80%, rgba(99, 102, 241, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 60% 20%, rgba(165, 180, 252, 0.15) 0%, transparent 45%);
}

html[data-theme="dark"] .hero-trex::after {
  background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.25) 40%, rgba(99, 102, 241, 0.5) 100%);
}

html[data-theme="dark"] .hero-trex-title .serif-line {
  color: rgba(248, 250, 252, 0.7);
}

html[data-theme="dark"] .hero-trex-badge {
  background: rgba(248, 250, 252, 0.08);
  border-color: var(--border);
  color: var(--dark);
}

html[data-theme="dark"] .phone-mockup-trex,
html[data-theme="dark"] .phone-mockup-trex::before,
html[data-theme="dark"] .phone-mockup-trex-alt,
html[data-theme="dark"] .phone-screen-trex-alt .phone-notch,
html[data-theme="dark"] .app-phone {
  background: var(--dark-lighter);
}

html[data-theme="dark"] .phone-screen-trex {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

html[data-theme="dark"] .phone-map-area {
  background: #1e293b;
}

html[data-theme="dark"] .phone-info-card {
  background: var(--white);
}

html[data-theme="dark"] .phone-info-text strong {
  color: var(--dark);
}

html[data-theme="dark"] .float-card {
  background: var(--white);
  border-color: var(--border);
}

html[data-theme="dark"] .float-card-badge.success {
  background: rgba(74, 222, 128, 0.15);
  color: #86efac;
}

html[data-theme="dark"] .float-card-badge.warning {
  background: rgba(251, 191, 36, 0.15);
  color: #fde047;
}

html[data-theme="dark"] .float-card-badge.info {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

/* Partners */
html[data-theme="dark"] .partners-trex {
  background: var(--white);
  border-color: var(--border);
}

html[data-theme="dark"] .partner-logo:hover {
  color: var(--dark);
}

/* Tracking section */
html[data-theme="dark"] .tracking-section-trex {
  background: var(--white);
}

html[data-theme="dark"] .tracking-trex-form input {
  background: var(--white);
  color: var(--dark);
  border-color: var(--border);
}

html[data-theme="dark"] .tracking-trex-form input::placeholder {
  color: var(--muted-light);
}

html[data-theme="dark"] .phone-screen-trex-alt {
  background: var(--white);
}

html[data-theme="dark"] .delivery-card-preview {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
}

html[data-theme="dark"] .play-overlay {
  background: var(--white);
  color: var(--primary);
}

/* Features */
html[data-theme="dark"] .features-trex {
  background: var(--bg);
}

html[data-theme="dark"] .feature-card-trex {
  background: var(--white);
  border-color: var(--border);
}

html[data-theme="dark"] .feature-card-trex:hover {
  box-shadow: var(--shadow-lg);
}

/* Steps - already dark, fine-tune */
html[data-theme="dark"] .steps-trex {
  background: linear-gradient(135deg, #020617 0%, #0f172a 100%);
}

html[data-theme="dark"] .order-tracked-card {
  background: rgba(248, 250, 252, 0.06);
  border-color: rgba(248, 250, 252, 0.1);
}

html[data-theme="dark"] .order-tracked-card .ot-btn {
  background: var(--dark);
  color: var(--white);
}

html[data-theme="dark"] .step-item-trex {
  background: rgba(248, 250, 252, 0.04);
  border-color: rgba(248, 250, 252, 0.08);
}

html[data-theme="dark"] .step-item-trex:hover {
  background: rgba(248, 250, 252, 0.07);
  border-color: rgba(248, 250, 252, 0.12);
}

/* Why choose us */
html[data-theme="dark"] .why-trex {
  background: linear-gradient(180deg, var(--white) 0%, var(--bg) 100%);
}

html[data-theme="dark"] .why-card-trex {
  background: var(--white);
  border-color: var(--border);
}

/* Testimonials */
html[data-theme="dark"] .testimonials-trex {
  background: var(--white);
}

html[data-theme="dark"] .testimonial-card-trex {
  background: var(--bg);
}

html[data-theme="dark"] .testimonial-nav-btn {
  background: var(--white);
  border-color: var(--border);
  color: var(--dark);
}

html[data-theme="dark"] .stat-badge-trex {
  background: var(--bg);
}

/* App download */
html[data-theme="dark"] .app-download-trex {
  background: linear-gradient(180deg, var(--white) 0%, #0f172a 100%);
}

html[data-theme="dark"] .app-phone-screen {
  background: var(--white) !important;
}

/* CTA banner */
html[data-theme="dark"] .cta-banner-trex {
  background: #4338ca;
}

/* Results section */
html[data-theme="dark"] .results-section {
  background: var(--white);
}

html[data-theme="dark"] .result-trex-header,
html[data-theme="dark"] .result-trex-progress,
html[data-theme="dark"] .result-trex-map,
html[data-theme="dark"] .result-trex-card,
html[data-theme="dark"] .result-trex-details,
html[data-theme="dark"] .result-trex-timeline {
  background: var(--bg);
  border: 1px solid var(--border);
}

html[data-theme="dark"] .result-trex-header .tracking-number {
  background: var(--primary-light);
}

html[data-theme="dark"] .status-pill.completed {
  background: rgba(0, 184, 148, 0.15);
  color: #55efc4;
}

html[data-theme="dark"] .status-pill.pending {
  background: rgba(253, 203, 110, 0.15);
  color: #ffeaa7;
}

html[data-theme="dark"] .status-pill.in-transit {
  background: rgba(162, 155, 254, 0.15);
  color: #a29bfe;
}

html[data-theme="dark"] .status-pill.failed {
  background: rgba(225, 112, 85, 0.15);
  color: #fab1a0;
}

html[data-theme="dark"] .result-trex-card .card-header-icon.sender {
  background: var(--primary-light);
}

html[data-theme="dark"] .result-trex-card .card-header-icon.receiver {
  background: rgba(0, 184, 148, 0.15);
  color: #55efc4;
}

html[data-theme="dark"] .map-container-trex {
  border-color: var(--border);
}

html[data-theme="dark"] .timeline-dot-trex.current {
  background: var(--white);
}

html[data-theme="dark"] .timeline-dot-trex.pending {
  background: var(--white);
}

html[data-theme="dark"] .track-another-trex button {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

html[data-theme="dark"] .track-another-trex button:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--white);
}

html[data-theme="dark"] .empty-state code {
  background: var(--bg) !important;
  color: var(--dark) !important;
}

html[data-theme="dark"] .error-state {
  background: rgba(248, 113, 113, 0.12) !important;
  border-color: rgba(248, 113, 113, 0.25) !important;
  color: #fca5a5 !important;
}

/* Tracking overlay */
html[data-theme="dark"] .tracking-overlay-backdrop {
  background: rgba(2, 6, 23, 0.75);
}

html[data-theme="dark"] .tracking-overlay-panel {
  background: var(--bg-warm);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.55);
}

html[data-theme="dark"] .tracking-overlay-close {
  background: var(--bg);
  color: var(--muted);
}

html[data-theme="dark"] .tracking-overlay-close:hover {
  background: var(--primary-light);
  color: var(--primary);
}

html[data-theme="dark"] .overlay-input-wrap {
  background: var(--white);
  border-color: var(--border);
}

html[data-theme="dark"] .overlay-input-wrap input {
  color: var(--dark);
}

html[data-theme="dark"] .overlay-input-wrap input::placeholder {
  color: var(--muted-light);
}

html[data-theme="dark"] .overlay-error-box {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.25);
  color: #fca5a5;
}

html[data-theme="dark"] .overlay-spinner {
  border-color: var(--border);
  border-top-color: var(--primary);
}

/* Modern courier result (overlay) */
html[data-theme="dark"] .courier-result-modern .courier-progress-modern,
html[data-theme="dark"] .courier-result-modern .courier-map-wrap,
html[data-theme="dark"] .courier-result-modern .courier-parties-card,
html[data-theme="dark"] .courier-result-modern .courier-details,
html[data-theme="dark"] .courier-result-modern .courier-timeline {
  background: var(--bg);
}

html[data-theme="dark"] .courier-result-modern .courier-status-badge.completed {
  background: rgba(0, 184, 148, 0.15);
  color: #55efc4;
}

html[data-theme="dark"] .courier-result-modern .courier-status-badge.pending {
  background: rgba(253, 203, 110, 0.15);
  color: #ffeaa7;
}

html[data-theme="dark"] .courier-result-modern .courier-status-badge.in-transit {
  background: rgba(162, 155, 254, 0.15);
  color: #a29bfe;
}

html[data-theme="dark"] .courier-result-modern .courier-status-badge.failed {
  background: rgba(225, 112, 85, 0.15);
  color: #fab1a0;
}

html[data-theme="dark"] .courier-result-modern .courier-timeline-dot.current {
  background: var(--white);
}

html[data-theme="dark"] .courier-result-modern .courier-timeline-dot.pending {
  background: var(--white);
}

html[data-theme="dark"] .courier-result-modern .courier-desc {
  border-color: var(--border);
}

html[data-theme="dark"] .courier-result-modern .courier-track-another-btn {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

html[data-theme="dark"] .courier-result-modern .courier-track-another-btn:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--white);
}

/* Transaction tracker: keep its own dark-blue styling but adapt its container */
html[data-theme="dark"] .transaction-tracker {
  background: #3b6b8f;
}

/* Footer - already dark, just minor tweaks */
html[data-theme="dark"] .footer-trex {
  background: #020617;
}

html[data-theme="dark"] .footer-socials a:hover {
  background: var(--primary);
}

/* Back to top */
html[data-theme="dark"] .back-to-top {
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

/* Scrollbar */
html[data-theme="dark"] ::-webkit-scrollbar-track {
  background: var(--bg);
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: var(--border);
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* Language dropdown in dark mode */
html[data-theme="dark"] .lang-dropdown {
  background: var(--white);
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

html[data-theme="dark"] .lang-option {
  color: var(--dark);
}

html[data-theme="dark"] .lang-option:hover {
  background: var(--bg);
}

html[data-theme="dark"] .lang-option.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* Bootstrap form controls inside overlay/result */
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
  background-color: var(--white);
  border-color: var(--border);
  color: var(--dark);
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus {
  background-color: var(--white);
  color: var(--dark);
  border-color: var(--primary);
  box-shadow: 0 0 0 0.25rem var(--primary-light);
}

/* Utility / catch-all for inline hardcoded colors */
html[data-theme="dark"] [style*="color:#0f172a"],
html[data-theme="dark"] [style*="color: #0f172a"] {
  color: var(--dark) !important;
}

html[data-theme="dark"] [style*="color:#64748b"],
html[data-theme="dark"] [style*="color: #64748b"] {
  color: var(--muted) !important;
}

html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background:#ffffff"],
html[data-theme="dark"] [style*="background: #ffffff"] {
  background: var(--white) !important;
}

html[data-theme="dark"] [style*="background:#f1f5f9"],
html[data-theme="dark"] [style*="background: #f1f5f9"] {
  background: var(--bg) !important;
}

html[data-theme="dark"] [style*="background:#e2e8f0"],
html[data-theme="dark"] [style*="background: #e2e8f0"] {
  background: var(--border) !important;
}

/* Additional dark mode overrides for inline gradient backgrounds */
html[data-theme="dark"] [style*="background:linear-gradient(135deg,#f1f5f9,#e2e8f0)"],
html[data-theme="dark"] [style*="background: linear-gradient(135deg,#f1f5f9,#e2e8f0)"] {
  background: linear-gradient(135deg, var(--bg), var(--border)) !important;
}

html[data-theme="dark"] [style*="background:linear-gradient(135deg,#e0e7ff,#c7d2fe)"],
html[data-theme="dark"] [style*="background: linear-gradient(135deg,#e0e7ff,#c7d2fe)"] {
  background: linear-gradient(135deg, #1e293b, #334155) !important;
}

html[data-theme="dark"] [style*="background:linear-gradient(135deg,#f0fdf4,#dcfce7)"],
html[data-theme="dark"] [style*="background: linear-gradient(135deg,#f0fdf4,#dcfce7)"] {
  background: linear-gradient(135deg, #064e3b, #065f46) !important;
}

/* Phone mockup inner SVG map area */
html[data-theme="dark"] .phone-screen-trex-alt svg rect[fill="#dbeafe"] {
  fill: #1e293b;
}

html[data-theme="dark"] .phone-screen-trex-alt svg path[stroke="#a5b4fc"] {
  stroke: #475569;
}

html[data-theme="dark"] .app-phone-screen svg rect[fill="#dbeafe"] {
  fill: #1e293b;
}

html[data-theme="dark"] .app-phone-screen svg path[stroke="#a5b4fc"] {
  stroke: #475569;
}

/* Inline hardcoded green map dots and progress bar colors */
html[data-theme="dark"] [style*="color:#22c55e"],
html[data-theme="dark"] [style*="color: #22c55e"] {
  color: var(--success) !important;
}

html[data-theme="dark"] [style*="background:#6366f1"],
html[data-theme="dark"] [style*="background: #6366f1"] {
  background: var(--primary) !important;
}

html[data-theme="dark"] [style*="background:#22c55e"],
html[data-theme="dark"] [style*="background: #22c55e"] {
  background: var(--success) !important;
}

html[data-theme="dark"] [style*="background:#f59e0b"],
html[data-theme="dark"] [style*="background: #f59e0b"] {
  background: var(--warning) !important;
}

/* App phone screen inner white cards */
html[data-theme="dark"] .app-phone-screen [style*="background:#fff"],
html[data-theme="dark"] .app-phone-screen [style*="background: #fff"] {
  background: var(--white) !important;
}

/* General inline white backgrounds inside dark sections */
html[data-theme="dark"] .hero-trex [style*="background:#fff"],
html[data-theme="dark"] .hero-trex [style*="background: #fff"],
html[data-theme="dark"] .tracking-section-trex [style*="background:#fff"],
html[data-theme="dark"] .tracking-section-trex [style*="background: #fff"] {
  background: var(--white) !important;
}

/* More inline hardcoded color overrides for dark mode */
html[data-theme="dark"] [style*="color:#c7d2fe"],
html[data-theme="dark"] [style*="color: #c7d2fe"] {
  color: #475569 !important;
}

html[data-theme="dark"] [style*="color:#a5b4fc"],
html[data-theme="dark"] [style*="color: #a5b4fc"] {
  color: #64748b !important;
}

html[data-theme="dark"] [style*="color:#6366f1"],
html[data-theme="dark"] [style*="color: #6366f1"] {
  color: var(--primary) !important;
}

html[data-theme="dark"] [style*="fill:#6366f1"],
html[data-theme="dark"] [style*="fill: #6366f1"] {
  fill: var(--primary) !important;
}

html[data-theme="dark"] [style*="fill:#dbeafe"],
html[data-theme="dark"] [style*="fill: #dbeafe"] {
  fill: #1e293b !important;
}

html[data-theme="dark"] [style*="stroke:#a5b4fc"],
html[data-theme="dark"] [style*="stroke: #a5b4fc"] {
  stroke: #475569 !important;
}

html[data-theme="dark"] [style*="background:#dbeafe"],
html[data-theme="dark"] [style*="background: #dbeafe"] {
  background: #1e293b !important;
}

html[data-theme="dark"] [style*="background:linear-gradient(135deg,#e0e7ff"],
html[data-theme="dark"] [style*="background: linear-gradient(135deg,#e0e7ff"] {
  background: linear-gradient(135deg, #1e293b, #334155) !important;
}

html[data-theme="dark"] [style*="background:linear-gradient(135deg,#f0fdf4"],
html[data-theme="dark"] [style*="background: linear-gradient(135deg,#f0fdf4"] {
  background: linear-gradient(135deg, #064e3b, #065f46) !important;
}

html[data-theme="dark"] [style*="background:linear-gradient(135deg,#f1f5f9"],
html[data-theme="dark"] [style*="background: linear-gradient(135deg,#f1f5f9"] {
  background: linear-gradient(135deg, var(--bg), var(--border)) !important;
}

/* Fix buttons that use --white for text; in dark mode --white is a dark surface color,
   so force actual light text on colored/solid buttons */
html[data-theme="dark"] .btn-trex-primary,
html[data-theme="dark"] .btn-trex-primary:hover,
html[data-theme="dark"] .btn-track-purple,
html[data-theme="dark"] .btn-track-purple:hover,
html[data-theme="dark"] .overlay-input-wrap button,
html[data-theme="dark"] .overlay-input-wrap button:hover,
html[data-theme="dark"] .delivery-card-preview,
html[data-theme="dark"] .delivery-card-preview h4,
html[data-theme="dark"] .delivery-card-preview .delivery-meta,
html[data-theme="dark"] .btn-trex-ghost,
html[data-theme="dark"] .btn-trex-ghost:hover,
html[data-theme="dark"] .step-number-trex,
html[data-theme="dark"] .courier-status-badge.completed,
html[data-theme="dark"] .courier-status-badge.pending,
html[data-theme="dark"] .courier-status-badge.in-transit,
html[data-theme="dark"] .courier-status-badge.failed,
html[data-theme="dark"] .courier-timeline-dot.completed,
html[data-theme="dark"] .timeline-dot-trex.completed,
html[data-theme="dark"] .result-trex-header .tracking-number,
html[data-theme="dark"] .courier-track-num,
html[data-theme="dark"] .courier-progress-top strong {
  color: #f8fafc !important;
}

/* Keep white button in CTA banner actually light in dark mode */
html[data-theme="dark"] .btn-trex-white {
  background: #f8fafc;
  color: var(--primary);
}

html[data-theme="dark"] .btn-trex-white:hover {
  background: #e2e8f0;
  color: var(--primary-hover);
}

/* Buttons with dark text on light backgrounds that need to remain readable */
html[data-theme="dark"] .order-tracked-card .ot-btn,
html[data-theme="dark"] .order-tracked-card .ot-btn:hover {
  color: var(--white) !important;
}

html[data-theme="dark"] .track-another-trex button:hover,
html[data-theme="dark"] .courier-track-another-btn:hover {
  color: var(--primary) !important;
}
