/* assets/css/style.css - Expanded FreightLink Public & Invoice Styling */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --primary: #0f2b48;
  --primary-hover: #163d66;
  --accent: #2563eb;
  --accent-light: #3b82f6;
  --highlight: #f59e0b;
  --dark-bg: #0b131f;
  --surface-dark: #132033;
  --card-bg: #ffffff;
  --text-primary: #1e293b;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --border-color: #e2e8f0;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(15, 43, 72, 0.05);
  --shadow-md: 0 10px 25px rgba(15, 43, 72, 0.08);
  --shadow-lg: 0 20px 40px rgba(15, 43, 72, 0.14);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--primary);
}

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

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: var(--shadow-sm);
}

.top-bar {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  padding: 8px 0;
}

.top-bar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-info {
  display: flex;
  gap: 20px;
}

.top-info span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-links a {
  color: #fbbf24;
  font-weight: 600;
}

.top-links a:hover {
  color: #ffffff;
}

.navbar {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  font-family: 'Outfit', sans-serif;
}

.brand-logo img {
  max-height: 44px;
  width: auto;
  object-fit: contain;
}

.brand-logo .logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 32px;
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: #334155;
  position: relative;
  padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.btn-nav {
  background: linear-gradient(135deg, var(--accent) 0%, #1d4ed8 100%);
  color: white !important;
  padding: 10px 22px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-nav:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* Mobile Toggle */
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary);
  padding: 8px;
}

/* Hero Section */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, #0b131f 0%, #132742 100%);
  color: white;
  padding: 90px 24px 110px 24px;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.18;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 3.2rem;
  line-height: 1.15;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-title span {
  background: linear-gradient(135deg, #60a5fa 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #94a3b8;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Tracking Card */
.tracking-card-box {
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  max-width: 740px;
  margin: 0 auto;
}

.tracking-form-group {
  display: flex;
  gap: 10px;
}

.tracking-input {
  flex: 1;
  border: 2px solid #e2e8f0;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.tracking-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.btn-track {
  background: linear-gradient(135deg, var(--accent) 0%, #1d4ed8 100%);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
}

.btn-track:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

/* Progress Tracker Bar - Robust Horizontal Stepper */
.shipment-progress-wrapper {
  padding: 30px 24px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  width: 100%;
  overflow-x: auto;
}

.progress-track-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  align-items: flex-start;
  text-align: center;
}

.progress-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 3;
}

.progress-step-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 3px solid #cbd5e1;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 10px;
  transition: var(--transition);
}

.progress-step-item.active .progress-step-icon {
  background: #2563eb;
  border-color: #93c5fd;
  color: #ffffff;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.25);
}

.progress-step-item.completed .progress-step-icon {
  background: #10b981;
  border-color: #a7f3d0;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.progress-step-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #64748b;
}

.progress-step-item.active .progress-step-label {
  color: #2563eb;
}

.progress-step-item.completed .progress-step-label {
  color: #10b981;
}

/* Leaflet Map Styling */
.map-container-box {
  background: #ffffff;
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
}

#tracking-map {
  width: 100%;
  height: 420px;
  min-height: 420px;
  border-radius: 16px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  z-index: 1;
}

/* Pulsating Radar Marker Animation */
.radar-pulse-marker {
  width: 20px;
  height: 20px;
  background: #2563eb;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.8);
  position: relative;
}

.radar-pulse-marker::after {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 50%;
  border: 2px solid #3b82f6;
  animation: pulseRadar 1.8s infinite ease-out;
}

@keyframes pulseRadar {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Feature Cards Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  margin-top: 40px;
}

.feature-card {
  background: var(--card-bg);
  padding: 32px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-light);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: #eff6ff;
  color: var(--accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
}

/* Process / How It Works Grid */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 40px;
  position: relative;
}

.process-step-card {
  background: white;
  padding: 32px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.process-step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.step-num-badge {
  position: absolute;
  top: -16px;
  left: 24px;
  width: 38px;
  height: 38px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

/* Rate Estimator Calculator Box */
.calculator-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

/* Partner Marquee Logos */
.partner-marquee {
  display: flex;
  gap: 40px;
  overflow: hidden;
  user-select: none;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  opacity: 0.85;
}

.partner-logo-item {
  font-size: 1.4rem;
  font-weight: 800;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

/* Testimonial Cards */
.testimonial-card {
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  position: relative;
}

/* Page Section Common */
.section-padding {
  padding: 80px 24px;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 50px auto;
}

.section-subtitle {
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-size: 2.3rem;
  color: var(--primary);
  margin-bottom: 16px;
}

/* Tracking Result Box */
.tracking-result-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  margin-top: 30px;
}

.tracking-result-header {
  background: linear-gradient(135deg, var(--primary) 0%, #1e3a8a 100%);
  color: white;
  padding: 28px 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.tracking-id-text {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fbbf24;
}

.tracking-badge {
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Timeline */
.timeline-container {
  padding: 32px;
  position: relative;
}

.timeline-step {
  position: relative;
  padding-left: 45px;
  padding-bottom: 28px;
}

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

.timeline-step::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 30px;
  bottom: 0;
  width: 2px;
  background: #e2e8f0;
}

.timeline-step:last-child::before {
  display: none;
}

.timeline-icon-dot {
  position: absolute;
  left: 4px;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  border: 4px solid #dbeafe;
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-step.completed .timeline-icon-dot {
  background: #10b981;
  border-color: #d1fae5;
  box-shadow: 0 0 0 2px #10b981;
}

.timeline-time {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.timeline-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin: 4px 0;
}

.timeline-desc {
  font-size: 0.95rem;
  color: #475569;
}

/* Invoice Section in Tracking */
.invoice-actions-box {
  background: #f1f5f9;
  border-top: 1px solid var(--border-color);
  padding: 24px 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.btn-invoice {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-invoice-shipping {
  background: #2563eb;
  color: white;
}

.btn-invoice-shipping:hover {
  background: #1d4ed8;
}

.btn-invoice-clearing {
  background: #0d9488;
  color: white;
}

.btn-invoice-clearing:hover {
  background: #0f766e;
}

/* Printable Invoice Template */
.invoice-container {
  max-width: 850px;
  margin: 40px auto;
  background: white;
  padding: 48px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border: 1px solid #e2e8f0;
}

.invoice-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 24px;
  margin-bottom: 32px;
}

.invoice-brand-logo {
  max-height: 60px;
  margin-bottom: 8px;
}

.invoice-title-badge {
  text-align: right;
}

.invoice-title-badge h1 {
  font-size: 2rem;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.05em;
}

.invoice-number-tag {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 700;
}

.invoice-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 32px;
}

.invoice-table th {
  background: #f8fafc;
  color: var(--primary);
  font-weight: 700;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid #e2e8f0;
}

.invoice-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.95rem;
}

.invoice-totals {
  width: 320px;
  margin-left: auto;
}

.invoice-totals-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.95rem;
}

.invoice-totals-row.grand-total {
  border-top: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  padding: 12px 0;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary);
}

.invoice-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px dashed #cbd5e1;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Public Footer */
.site-footer {
  background: #09111e;
  color: #94a3b8;
  padding: 70px 24px 30px 24px;
  border-top: 1px solid #1e293b;
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 50px;
}

.footer-col h4 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a:hover {
  color: #60a5fa;
}

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid #1e293b;
  text-align: center;
  font-size: 0.85rem;
}

/* Print Styles */
@media print {
  body {
    background: white;
    color: black;
  }
  .no-print, .site-header, .site-footer {
    display: none !important;
  }
  .invoice-container {
    box-shadow: none;
    border: none;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
  }
}

/* Advanced Responsive Breakpoints */
@media (max-width: 991px) {
  .top-info {
    font-size: 0.78rem;
    gap: 12px;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .section-title {
    font-size: 2rem;
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    border-bottom: 2px solid var(--accent);
  }
  .nav-menu.show {
    display: flex;
  }
  .menu-toggle {
    display: block;
  }
  .invoice-meta-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .progress-track-bar {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 20px;
  }
}

@media (max-width: 768px) {
  .top-bar-inner {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
  .hero-section {
    padding: 60px 16px 80px 16px;
  }
  .hero-title {
    font-size: 2.1rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .tracking-form-group {
    flex-direction: column;
  }
  .btn-track {
    width: 100%;
  }
  .calculator-box {
    padding: 24px 16px;
  }
  .invoice-container {
    padding: 24px 16px;
  }
  .invoice-header-flex {
    flex-direction: column;
    gap: 20px;
  }
  .invoice-title-badge {
    text-align: left;
  }
  .invoice-totals {
    width: 100%;
  }
  #tracking-map {
    height: 320px;
    min-height: 320px;
  }
  .progress-track-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem;
  }
  .section-padding {
    padding: 50px 16px;
  }
  .section-title {
    font-size: 1.6rem;
  }
  .progress-track-bar {
    grid-template-columns: 1fr;
  }
}
