Worldwide Shipping Made Simple

Fast, reliable, and affordable international shipping to over 220 countries and territories worldwide

220+

Countries Served

50M+

Parcels Delivered

99.8%

On-Time Delivery

24/7

Customer Support

Track Your Shipment

Enter your tracking number to get real-time updates

Our Shipping Services

Comprehensive logistics solutions for all your shipping needs

✈️

Express Air Freight

Fastest delivery option with door-to-door service in 1-3 business days worldwide

  • Express delivery worldwide
  • Door-to-door service
  • Real-time tracking
  • Insurance included
🚢

Ocean Freight

Cost-effective solution for large shipments and international cargo transport

  • Full container load (FCL)
  • Less container load (LCL)
  • Bulk cargo handling
  • Customs clearance
🚚

Ground Transportation

Reliable domestic and cross-border ground shipping services

  • Domestic shipping
  • Cross-border transport
  • Last-mile delivery
  • Warehouse to warehouse
📦

Package Delivery

Standard and expedited package delivery services for businesses and individuals

  • Standard delivery
  • Express packages
  • Signature confirmation
  • Package insurance
🏭

Logistics Solutions

End-to-end supply chain management and warehousing services

  • Supply chain management
  • Warehousing solutions
  • Inventory management
  • Distribution services
📋

Customs Services

Professional customs brokerage and documentation services

  • Customs brokerage
  • Documentation services
  • Compliance consulting
  • Duty and tax calculation

Track Your Shipment

Get real-time updates on your package location and delivery status

📍 Real-time location tracking
📱 SMS and email notifications
📊 Detailed delivery history
🕐 Estimated delivery time

Enter Tracking Number

Get Instant Shipping Quote

Calculate shipping costs for your package delivery worldwide

About GlobalShip

For over 20 years, GlobalShip has been a trusted leader in worldwide shipping and logistics solutions. We specialize in providing fast, reliable, and cost-effective shipping services to individuals and businesses across the globe.

🌍 Global Network

Operations in over 220 countries and territories with a vast network of partners

⚡ Speed & Reliability

99.8% on-time delivery rate with express services available worldwide

💰 Competitive Pricing

Best market rates with transparent pricing and no hidden fees

🔒 Secure Handling

Full insurance coverage and secure packaging for peace of mind

20+

Years of Experience

500+

Global Offices

15,000+

Team Members

$2B+

Annual Revenue

What Our Customers Say

Trusted by businesses and individuals worldwide

"GlobalShip has been our go-to shipping partner for over 5 years. Their reliability and competitive rates have helped our e-commerce business grow globally."

Sarah Johnson E-commerce Business Owner

"Excellent customer service and always delivers on time. I use GlobalShip for all my international package deliveries and have never been disappointed."

Michael Chen International Sales Manager

"The tracking system is outstanding. I can always see where my packages are and when they'll arrive. Great transparency and communication throughout the process."

Emma Rodriguez Frequent Shipper

Contact Us

Get in touch with our shipping experts

📞

Phone

+1 (800) 123-SHIP

24/7 Customer Support

✉️

Email

info@globalship.com

support@globalship.com

📍

Headquarters

123 Shipping Boulevard

New York, NY 10001

🕒

Business Hours

Mon-Fri: 8:00 AM - 8:00 PM

Sat-Sun: 9:00 AM - 5:00 PM

=== assets/css/styles.css === /* Reset and Base Styles */ * { margin: 0; padding: 0; box-sizing: border-box; } html { scroll-behavior: smooth; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; color: #333; background-color: #ffffff; } .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; } /* Typography */ h1, h2, h3, h4, h5, h6 { margin-bottom: 1rem; font-weight: 600; } h1 { font-size: 3rem; } h2 { font-size: 2.5rem; } h3 { font-size: 2rem; } h4 { font-size: 1.5rem; } p { margin-bottom: 1rem; color: #666; } /* Buttons */ .btn { display: inline-block; padding: 12px 24px; border: none; border-radius: 8px; text-decoration: none; font-weight: 600; cursor: pointer; transition: all 0.3s ease; text-align: center; font-size: 1rem; } .btn-primary { background: linear-gradient(135deg, #2563eb, #3b82f6); color: white; } .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3); } .btn-secondary { background: transparent; color: #2563eb; border: 2px solid #2563eb; } .btn-secondary:hover { background: #2563eb; color: white; } .btn-success { background: linear-gradient(135deg, #059669, #10b981); color: white; } .btn-full { width: 100%; } /* Header */ .header { background: white; box-shadow: 0 2px 10px rgba(0,0,0,0.1); position: fixed; top: 0; left: 0; right: 0; z-index: 1000; } .navbar { padding: 1rem 0; } .nav-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; } .nav-logo { display: flex; align-items: center; font-size: 1.5rem; font-weight: bold; color: #2563eb; text-decoration: none; } .logo-icon { margin-right: 8px; font-size: 1.8rem; } .nav-menu { display: flex; list-style: none; gap: 2rem; } .nav-link { text-decoration: none; color: #333; font-weight: 500; transition: color 0.3s ease; } .nav-link:hover { color: #2563eb; } .hamburger { display: none; flex-direction: column; cursor: pointer; } .bar { width: 25px; height: 3px; background: #333; margin: 3px 0; transition: 0.3s; } /* Hero Section */ .hero { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 120px 0 80px; margin-top: 80px; } .hero-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; } .hero-content { text-align: center; margin-bottom: 60px; } .hero-title { font-size: 3.5rem; font-weight: bold; margin-bottom: 1.5rem; background: linear-gradient(135deg, #ffffff, #f0f9ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .hero-subtitle { font-size: 1.3rem; margin-bottom: 2rem; color: #e0e7ff; max-width: 600px; margin-left: auto; margin-right: auto; } .hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; } .hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-top: 3rem; } .stat { text-align: center; padding: 1.5rem; background: rgba(255, 255, 255, 0.1); border-radius: 12px; backdrop-filter: blur(10px); } .stat h3 { font-size: 2.5rem; font-weight: bold; color: #ffffff; margin-bottom: 0.5rem; } .stat p { color: #e0e7ff; font-weight: 500; } /* Quick Actions */ .quick-actions { background: #f8fafc; padding: 40px 0; } .quick-action-card { background: white; padding: 2rem; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); text-align: center; } .tracking-form { display: flex; gap: 1rem; margin-top: 1rem; justify-content: center; } .tracking-input { flex: 1; max-width: 400px; padding: 12px; border: 2px solid #e2e8f0; border-radius: 8px; font-size: 1rem; } .tracking-input:focus { outline: none; border-color: #2563eb; } /* Services Section */ .services { padding: 80px 0; background: white; } .section-header { text-align: center; margin-bottom: 60px; } .section-header h2 { color: #1f2937; margin-bottom: 1rem; } .section-header p { font-size: 1.2rem; color: #6b7280; max-width: 600px; margin: 0 auto; } .services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; } .service-card { background: white; padding: 2rem; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; border: 1px solid #f1f5f9; } .service-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); } .service-icon { font-size: 3rem; margin-bottom: 1rem; } .service-card h3 { color: #1f2937; margin-bottom: 1rem; } .service-card p { margin-bottom: 1.5rem; color: #6b7280; } .service-card ul { list-style: none; } .service-card li { padding: 0.5rem 0; color: #6b7280; position: relative; padding-left: 1.5rem; } .service-card li:before { content: "✓"; position: absolute; left: 0; color: #10b981; font-weight: bold; } /* Tracking Section */ .tracking-section { padding: 80px 0; background: #f8fafc; } .tracking-content { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; } .tracking-info h2 { color: #1f2937; margin-bottom: 1rem; } .tracking-info p { font-size: 1.2rem; color: #6b7280; margin-bottom: 2rem; } .tracking-features { display: flex; flex-direction: column; gap: 1rem; } .feature { display: flex; align-items: center; gap: 1rem; } .feature-icon { font-size: 1.5rem; } .tracking-form-card { background: white; padding: 2rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); } .tracking-form-card h3 { margin-bottom: 1.5rem; color: #1f2937; } .tracking-results { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid #e2e8f0; } .status-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; } .status-badge { padding: 0.5rem 1rem; border-radius: 20px; font-size: 0.9rem; font-weight: 600; } .status-in-transit { background: #dbeafe; color: #1e40af; } .progress-bar { width: 100%; height: 8px; background: #e2e8f0; border-radius: 4px; margin-bottom: 2rem; } .progress-fill { height: 100%; background: linear-gradient(90deg, #2563eb, #3b82f6); border-radius: 4px; transition: width 0.3s ease; } .tracking-timeline { position: relative; } .timeline-item { display: flex; gap: 1rem; margin-bottom: 1.5rem; position: relative; } .timeline-item:not(:last-child):before { content: ''; position: absolute; left: 15px; top: 30px; bottom: -30px; width: 2px; background: #e2e8f0; } .timeline-dot { width: 30px; height: 30px; border-radius: 50%; background: #e2e8f0; flex-shrink: 0; margin-top: 0.25rem; } .timeline-item.current .timeline-dot { background: #2563eb; } .timeline-content h4 { margin-bottom: 0.25rem; color: #1f2937; } .timeline-content p { margin-bottom: 0.25rem; color: #6b7280; } .timeline-time { font-size: 0.9rem; color: #9ca3af; } /* Calculator Section */ .calculator-section { padding: 80px 0; background: white; } .calculator-container { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; } .calculator-form { background: #f8fafc; padding: 2rem; border-radius: 12px; } .form-group { margin-bottom: 1.5rem; } .form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: #374151; } .form-input, .form-select { width: 100%; padding: 12px; border: 2px solid #e2e8f0; border-radius: 8px; font-size: 1rem; transition: border-color 0.3s ease; } .form-input:focus, .form-select:focus { outline: none; border-color: #2563eb; } .dimension-inputs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; } .calculator-results { background: white; padding: 2rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); border: 1px solid #f1f5f9; } .quote-summary { margin-bottom: 2rem; } .quote-detail { display: flex; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid #f1f5f9; } .quote-detail:last-child { border-bottom: none; } .price-breakdown { margin-bottom: 2rem; } .price-item { display: flex; justify-content: space-between; padding: 0.75rem 0; color: #6b7280; } .price-total { display: flex; justify-content: space-between; padding: 1rem 0; border-top: 2px solid #e2e8f0; font-weight: bold; font-size: 1.2rem; color: #1f2937; } .delivery-time { text-align: center; margin-bottom: 2rem; padding: 1rem; background: #ecfdf5; border-radius: 8px; color: #059669; } /* About Section */ .about-section { padding: 80px 0; background: #f8fafc; } .about-content { display: grid; grid-template-columns: 2fr 1fr; gap: 4rem; align-items: start; } .about-text h2 { color: #1f2937; margin-bottom: 1.5rem; } .about-text p { font-size: 1.1rem; margin-bottom: 2rem; color: #6b7280; } .about-features { display: grid; gap: 1.5rem; } .about-feature h4 { color: #1f2937; margin-bottom: 0.5rem; } .about-feature p { color: #6b7280; font-size: 1rem; } .about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; } .stat-card { background: white; padding: 2rem; border-radius: 12px; text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,0.08); } .stat-card h3 { font-size: 2.5rem; font-weight: bold; color: #2563eb; margin-bottom: 0.5rem; } .stat-card p { color: #6b7280; font-weight: 500; } /* Testimonials */ .testimonials { padding: 80px 0; background: white; } .testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; } .testimonial-card { background: #f8fafc; padding: 2rem; border-radius: 12px; border-left: 4px solid #2563eb; } .testimonial-content p { font-style: italic; color: #374151; margin-bottom: 1.5rem; } .testimonial-author strong { color: #1f2937; display: block; margin-bottom: 0.25rem; } .testimonial-author span { color: #6b7280; font-size: 0.9rem; } /* Contact Section */ .contact-section { padding: 80px 0; background: #f8fafc; } .contact-content { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; } .contact-info { display: grid; gap: 2rem; } .contact-item { display: flex; gap: 1rem; align-items: flex-start; } .contact-icon { font-size: 2rem; width: 60px; text-align: center; } .contact-details h4 { color: #1f2937; margin-bottom: 0.5rem; } .contact-details p { color: #6b7280; margin-bottom: 0.25rem; } .contact-form { background: white; padding: 2rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); } .contact-form .form-group { margin-bottom: 1.5rem; } .contact-form input, .contact-form select, .contact-form textarea { width: 100%; padding: 12px; border: 2px solid #e2e8f0; border-radius: 8px; font-size: 1rem; transition: border-color 0.3s ease; } .contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: none; border-color: #2563eb; } .contact-form textarea { resize: vertical; min-height: 120px; } /* Footer */ .footer { background: #1f2937; color: white; padding: 60px 0 20px; } .footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; } .footer-section h4 { margin-bottom: 1rem; color: #f9fafb; } .footer-section ul { list-style: none; } .footer-section li { margin-bottom: 0.5rem; } .footer-section a { color: #d1d5db; text-decoration: none; transition: color 0.3s ease; } .footer-section a:hover { color: #60a5fa; } .footer-logo { display: flex; align-items: center; font-size: 1.5rem; font-weight: bold; color: #60a5fa; margin-bottom: 1rem; } .footer-section p { color: #d1d5db; margin-bottom: 1rem; } .social-links { display: flex; gap: 1rem; } .social-link { display: inline-block; width: 40px; height: 40px; background: #374151; border-radius: 8px; text-align: center; line-height: 40px; text-decoration: none; transition: background 0.3s ease; } .social-link:hover { background: #60a5fa; } .footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid #374151; color: #9ca3af; } .footer-bottom a { color: #60a5fa; text-decoration: none; } /* Responsive Design */ @media (max-width: 768px) { .nav-menu { position: fixed; left: -100%; top: 80px; flex-direction: column; background-color: white; width: 100%; text-align: center; transition: 0.3s; box-shadow: 0 10px 27px rgba(0,0,0,0.05); padding: 2rem 0; } .nav-menu.active { left: 0; } .hamburger { display: flex; } .hamburger.active .bar:nth-child(2) { opacity: 0; } .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); } .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); } .hero-title { font-size: 2.5rem; } .hero-buttons { flex-direction: column; align-items: center; } .hero-stats { grid-template-columns: repeat(2, 1fr); } .tracking-content { grid-template-columns: 1fr; gap: 2rem; } .calculator-container { grid-template-columns: 1fr; gap: 2rem; } .about-content { grid-template-columns: 1fr; gap: 2rem; } .about-stats { grid-template-columns: repeat(2, 1fr); } .contact-content { grid-template-columns: 1fr; gap: 2rem; } .footer-content { grid-template-columns: 1fr; gap: 2rem; text-align: center; } .tracking-form { flex-direction: column; align-items: center; } .dimension-inputs { grid-template-columns: 1fr; } h1 { font-size: 2.5rem; } h2 { font-size: 2rem; } h3 { font-size: 1.5rem; } } @media (max-width: 480px) { .hero-stats { grid-template-columns: 1fr; } .services-grid { grid-template-columns: 1fr; } .testimonials-grid { grid-template-columns: 1fr; } .about-stats { grid-template-columns: 1fr; } .hero-title { font-size: 2rem; } .stat h3 { font-size: 2rem; } } /* Loading States */ .loading { opacity: 0.6; pointer-events: none; } .btn:disabled { opacity: 0.6; cursor: not-allowed; } /* Animation Classes */ .fade-in { animation: fadeIn 0.5s ease-in; } @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .slide-up { animation: slideUp 0.5s ease-out; } @keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } } /* Form Validation Styles */ .form-input.error { border-color: #ef4444; } .form-input.success { border-color: #10b981; } .error-message { color: #ef4444; font-size: 0.875rem; margin-top: 0.25rem; } .success-message { color: #10b981; font-size: 0.875rem; margin-top: 0.25rem; } === assets/js/main.js === // DOM Elements const hamburger = document.querySelector('.hamburger'); const navMenu = document.querySelector('.nav-menu'); const navLinks = document.querySelectorAll('.nav-link'); // Mobile Navigation Toggle hamburger.addEventListener('click', () => { hamburger.classList.toggle('active'); navMenu.classList.toggle('active'); }); // Close mobile menu when clicking on a link navLinks.forEach(link => { link.addEventListener('click', () => { hamburger.classList.remove('active'); navMenu.classList.remove('active'); }); }); // Smooth scrolling for navigation links document.querySelectorAll('a[href^="#"]').forEach(anchor => { anchor.addEventListener('click', function (e) { e.preventDefault(); const target = document.querySelector(this.getAttribute('href')); if (target) { target.scrollIntoView({ behavior: 'smooth', block: 'start' }); } }); }); // Header scroll effect window.addEventListener('scroll', () => { const header = document.querySelector('.header'); if (window.scrollY > 100) { header.style.backgroundColor = 'rgba(255, 255, 255, 0.95)'; header.style.backdropFilter = 'blur(10px)'; } else { header.style.backgroundColor = '#ffffff'; header.style.backdropFilter = 'none'; } }); // Track Package Function function trackPackage() { const trackingInput = document.getElementById('trackingInput'); const trackingNumber = trackingInput.value.trim(); if (!trackingNumber) { alert('Please enter a tracking number'); return; } // Simulate tracking lookup trackingInput.value = ''; document.getElementById('trackingNumber').value = trackingNumber; // Scroll to tracking section document.getElementById('track').scrollIntoView({ behavior: 'smooth' }); // Show tracking results after a brief delay setTimeout(() => { showTrackingResults(); }, 500); } // Show Tracking Results function showTrackingResults() { const trackingNumber = document.getElementById('trackingNumber').value.trim(); if (!trackingNumber) { alert('Please enter a tracking number'); return; } // Update the tracking number in results document.getElementById('resultTrackingNumber').textContent = trackingNumber; // Show results with animation const results = document.getElementById('trackingResults'); results.style.display = 'block'; results.classList.add('fade-in'); // Scroll to results results.scrollIntoView({ behavior: 'smooth', block: 'center' }); } // Calculate Shipping Cost function calculateShipping() { const fromCountry = document.getElementById('fromCountry').value; const toCountry = document.getElementById('toCountry').value; const weight = parseFloat(document.getElementById('weight').value); const length = parseFloat(document.getElementById('length').value); const width = parseFloat(document.getElementById('width').value); const height = parseFloat(document.getElementById('height').value); const serviceType = document.getElementById('serviceType').value; // Validation if (!fromCountry || !toCountry || !weight || !length || !width || !height || !serviceType) { alert('Please fill in all required fields'); return; } if (weight <= 0 || length <= 0 || width <= 0 || height <= 0) { alert('Please enter valid positive numbers for weight and dimensions'); return; } // Calculate volumetric weight (L×W×H/5000 for international) const volumetricWeight = (length * width * height) / 5000; const chargeableWeight = Math.max(weight, volumetricWeight); // Base rates per kg by service type const rates = { 'overnight': 15.99, 'express': 12.99, 'standard': 8.99, 'economy': 6.99 }; // International multiplier const isInternational = fromCountry !== toCountry; const internationalMultiplier = isInternational ? 2.5 : 1; // Calculate costs const baseRate = rates[serviceType] * chargeableWeight; const internationalFee = isInternational ? 25 : 0; const fuelSurcharge = (baseRate + internationalFee) * 0.12; const insurance = Math.max(5, baseRate * 0.02); const totalCost = baseRate + internationalFee + fuelSurcharge + insurance; // Update quote display document.getElementById('quoteFrom').textContent = getCountryName(fromCountry); document.getElementById('quoteTo').textContent = getCountryName(toCountry); document.getElementById('quoteWeight').textContent = `${weight} kg (${chargeableWeight.toFixed(1)} kg chargeable)`; document.getElementById('quoteService').textContent = getServiceName(serviceType); document.getElementById('shippingCost').textContent = `$${baseRate.toFixed(2)}`; document.getElementById('fuelSurcharge').textContent = `$${fuelSurcharge.toFixed(2)}`; document.getElementById('insuranceCost').textContent = `$${insurance.toFixed(2)}`; document.getElementById('totalCost').textContent = `$${totalCost.toFixed(2)}`; // Update delivery time const deliveryTimes = { 'overnight': '1 Business Day', 'express': '2-3 Business Days', 'standard': '5-7 Business Days', 'economy': '7-10 Business Days' }; document.querySelector('.delivery-time strong').textContent = `Estimated Delivery: ${deliveryTimes[serviceType]}`; // Show results const results = document.getElementById('quoteResults'); results.style.display = 'block'; results.classList.add('fade-in'); // Scroll to results results.scrollIntoView({ behavior: 'smooth', block: 'nearest' }); } // Helper function to get country names function getCountryName(code) { const countries = { 'US': 'United States', 'UK': 'United Kingdom', 'CA': 'Canada', 'DE': 'Germany', 'FR': 'France', 'JP': 'Japan', 'AU': 'Australia', 'CN': 'China', 'IN': 'India', 'BR': 'Brazil' }; return countries[code] || code; } // Helper function to get service names function getServiceName(code) { const services = { 'overnight': 'Overnight Delivery', 'express': 'Express Delivery', 'standard': 'Standard Delivery', 'economy': 'Economy Delivery' }; return services[code] || code; } // Contact Form Handler document.getElementById('contactForm').addEventListener('submit', function(e) { e.preventDefault(); const formData = new FormData(this); const data = Object.fromEntries(formData); // Basic validation if (!data.name || !data.email || !data.subject || !data.message) { alert('Please fill in all required fields'); return; } if (!isValidEmail(data.email)) { alert('Please enter a valid email address'); return; } // Simulate form submission const submitBtn = this.querySelector('button[type="submit"]'); const originalText = submitBtn.textContent; submitBtn.textContent = 'Sending...'; submitBtn.disabled = true; setTimeout(() => { alert('Thank you for your message! We will get back to you within 24 hours.'); this.reset(); submitBtn.textContent = originalText; submitBtn.disabled = false; }, 1500); }); // Email validation helper function isValidEmail(email) { const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; return emailRegex.test(email); } // Add loading animation to buttons function addLoadingState(button) { button.classList.add('loading'); button.disabled = true; } function removeLoadingState(button) { button.classList.remove('loading'); button.disabled = false; } // Scroll animations function addScrollAnimations() { const observer = new IntersectionObserver((entries) => { entries.forEach(entry => { if (entry.isIntersecting) { entry.target.classList.add('fade-in'); } }); }, { threshold: 0.1, rootMargin: '0px 0px -50px 0px' }); // Observe elements for animation const animateElements = document.querySelectorAll('.service-card, .testimonial-card, .about-feature, .stat-card'); animateElements.forEach(el => observer.observe(el)); } // Initialize animations when DOM is loaded document.addEventListener('DOMContentLoaded', function() { addScrollAnimations(); // Add form validation styling const inputs = document.querySelectorAll('.form-input, .form-select, input, select, textarea'); inputs.forEach(input => { input.addEventListener('blur', validateField); input.addEventListener('input', clearFieldError); }); }); // Field validation function validateField(e) { const field = e.target; const value = field.value.trim(); // Remove existing classes field.classList.remove('error', 'success'); // Check if field is required if (field.hasAttribute('required') && !value) { field.classList.add('error'); return false; } // Email validation if (field.type === 'email' && value && !isValidEmail(value)) { field.classList.add('error'); return false; } // Number validation if (field.type === 'number' && value && (isNaN(value) || parseFloat(value) < 0)) { field.classList.add('error'); return false; } // If validation passed and field has value if (value) { field.classList.add('success'); } return true; } // Clear field error on input function clearFieldError(e) { const field = e.target; if (field.classList.contains('error')) { field.classList.remove('error'); } } // Add keyboard navigation support document.addEventListener('keydown', function(e) { // ESC key closes mobile menu if (e.key === 'Escape') { hamburger.classList.remove('active'); navMenu.classList.remove('active'); } // Enter key triggers button actions if (e.key === 'Enter' && e.target.classList.contains('btn')) { e.target.click(); } }); // Add tooltip functionality for service cards document.querySelectorAll('.service-card').forEach(card => { card.addEventListener('mouseenter', function() { this.style.transform = 'translateY(-5px) scale(1.02)'; }); card.addEventListener('mouseleave', function() { this.style.transform = 'translateY(0) scale(1)'; }); }); // Add real-time tracking simulation function simulateTrackingUpdate() { const progressBar = document.querySelector('.progress-fill'); if (progressBar) { let currentWidth = parseInt(progressBar.style.width) || 60; setInterval(() => { if (currentWidth < 100) { currentWidth += Math.random() * 5; if (currentWidth > 100) currentWidth = 100; progressBar.style.width = currentWidth + '%'; } }, 30000); // Update every 30 seconds } } // Initialize tracking simulation document.addEventListener('DOMContentLoaded', function() { simulateTrackingUpdate(); }); // Add search functionality for tracking function addTrackingSearch() { const trackingInput = document.getElementById('trackingInput'); if (trackingInput) { trackingInput.addEventListener('keypress', function(e) { if (e.key === 'Enter') { trackPackage(); } }); } } // Initialize tracking search document.addEventListener('DOMContentLoaded', addTrackingSearch); // Add print functionality for quotes function printQuote() { const quoteResults = document.getElementById('quoteResults'); if (quoteResults && quoteResults.style.display !== 'none') { const printWindow = window.open('', '_blank'); printWindow.document.write(` Shipping Quote - GlobalShip

GlobalShip - Shipping Quote

${quoteResults.innerHTML} `); printWindow.document.close(); printWindow.print(); } } // Add print button to quote results (optional enhancement) function addPrintButton() { const results = document.getElementById('quoteResults'); if (results) { const printBtn = document.createElement('button'); printBtn.textContent = '🖨️ Print Quote'; printBtn.className = 'btn btn-secondary'; printBtn.style.marginTop = '1rem'; printBtn.onclick = printQuote; results.appendChild(printBtn); } } // Call addPrintButton when results are shown const originalShowTrackingResults = showTrackingResults; showTrackingResults = function() { originalShowTrackingResults(); // Add print functionality after results are shown setTimeout(addPrintButton, 100); }; console.log('GlobalShip website initialized successfully! 🚢'); console.log('Features loaded: Navigation, Tracking, Calculator, Contact Form, Animations'); // Add some helpful console messages for developers console.log('Available functions:'); console.log('- trackPackage() - Track a shipment'); console.log('- calculateShipping() - Get shipping quote'); console.log('- printQuote() - Print shipping quote'); // Export functions for potential module use if (typeof module !== 'undefined' && module.exports) { module.exports = { trackPackage, calculateShipping, printQuote }; }