/* ==============================================
   SHEETLA FREIGHT - MODERN TRANSPORT WEBSITE
   Professional CSS Framework
   ============================================== */

/* CSS Custom Properties (Variables) */
:root {
  /* Brand Colors */
  --primary-navy: #0B2D5E;
  --accent-yellow: #FFB400;
  --secondary-gray: #5A6A73;
  --soft-green: #2D9C6A;
  --background-white: #FFFFFF;
  --background-light: #F5F7FA;
  
  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Spacing */
  --section-padding: 80px 0;
  --container-padding: 0 15px;
  
  /* Border Radius */
  --border-radius: 8px;
  --border-radius-lg: 12px;
  
  /* Shadows */
  --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
  --shadow-medium: 0 4px 20px rgba(0,0,0,0.15);
  --shadow-heavy: 0 8px 30px rgba(0,0,0,0.2);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ==============================================
   RESET & BASE STYLES
   ============================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: #333;
  background-color: var(--background-white);
  overflow-x: hidden;
}

/* ==============================================
   TYPOGRAPHY
   ============================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--primary-navy);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--secondary-gray);
}

a {
  color: var(--primary-navy);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--accent-yellow);
}

/* ==============================================
   LAYOUT UTILITIES
   ============================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--container-padding);
}

.section {
  padding: var(--section-padding);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-flex { display: flex; }
.d-grid { display: grid; }
.d-none { display: none; }
.d-block { display: block; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }

.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }

.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }

/* ==============================================
   HEADER & NAVIGATION
   ============================================== */

.header {
  background: var(--background-white);
  box-shadow: var(--shadow-light);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: var(--transition-normal);
}

.header.scrolled {
  box-shadow: var(--shadow-medium);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-navy);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-yellow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-navy);
  font-weight: bold;
}

.nav {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
}

.nav-link {
  color: var(--primary-navy);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-yellow);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-yellow);
  transition: var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tracking-input {
  display: flex;
  gap: 0.5rem;
}

.tracking-input input {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  width: 200px;
}

.contact-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.phone-link {
  color: var(--primary-navy);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary-navy);
  cursor: pointer;
}

/* ==============================================
   BUTTONS
   ============================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 1rem;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--primary-navy);
  color: var(--background-white);
}

.btn-primary:hover {
  background: #0a2549;
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.btn-secondary {
  background: var(--accent-yellow);
  color: var(--primary-navy);
}

.btn-secondary:hover {
  background: #e6a200;
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.btn-outline {
  background: transparent;
  color: var(--primary-navy);
  border: 2px solid var(--primary-navy);
}

.btn-outline:hover {
  background: var(--primary-navy);
  color: var(--background-white);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* ==============================================
   HERO SECTION
   ============================================== */

.hero {
  background: linear-gradient(135deg, var(--primary-navy) 0%, #1a4a7a 100%);
  color: var(--background-white);
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="%23ffffff" opacity="0.1"><path d="M0,0 L1000,100 L1000,0 Z"/></svg>') no-repeat bottom center;
  background-size: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  color: var(--background-white);
  margin-bottom: 1.5rem;
  font-size: 3.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  color: var(--background-white);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero .btn-primary {
  background: var(--accent-yellow);
  color: var(--primary-navy);
}

.hero .btn-primary:hover {
  background: #e6a200;
}

.hero .btn-outline {
  color: var(--background-white);
  border-color: var(--background-white);
}

.hero .btn-outline:hover {
  background: var(--background-white);
  color: var(--primary-navy);
}

/* ==============================================
   CARDS
   ============================================== */

.card {
  background: var(--background-white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-light);
  overflow: hidden;
  transition: var(--transition-normal);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid #eee;
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  background: var(--background-light);
  border-top: 1px solid #eee;
}

.card-icon {
  width: 60px;
  height: 60px;
  background: var(--accent-yellow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: var(--primary-navy);
}

/* ==============================================
   SECTIONS
   ============================================== */

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--secondary-gray);
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

/* ==============================================
   FORMS
   ============================================== */

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary-navy);
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-yellow);
  box-shadow: 0 0 0 3px rgba(255, 180, 0, 0.1);
}

.form-control.error {
  border-color: #dc3545;
}

.error-message {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.form-control.error + .error-message {
  display: block;
}

/* ==============================================
   FOOTER
   ============================================== */

.footer {
  background: var(--primary-navy);
  color: var(--background-white);
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--background-white);
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 0.75rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition-fast);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-section a:hover {
  color: var(--accent-yellow);
  padding-left: 5px;
}

.footer-section p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.footer-section .mt-3 {
  margin-top: 1rem;
}

.footer-section .mr-3 {
  margin-right: 1rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.5;
}

.footer-bottom a {
  color: var(--accent-yellow);
  text-decoration: none;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

/* Footer responsive */
@media (max-width: 768px) {
  .footer {
    padding: 2rem 0 1rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .footer-section h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
}

/* ==============================================
   ANIMATIONS & EFFECTS
   ============================================== */

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.6s ease;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.6s ease;
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.6s ease;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Counter Animation */
.counter {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-navy);
  display: block;
}

/* Statistics Section Styles */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  align-items: center;
}

.stat-item {
  text-align: center;
  padding: 2rem 1rem;
}

.stat-number {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-bottom: 1rem;
  gap: 0.25rem;
}

.stat-number .counter {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--background-white);
  line-height: 1;
  margin: 0;
}

.stat-suffix {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-yellow);
  line-height: 1;
}

.stat-content h3 {
  color: var(--background-white);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.stat-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}

/* Responsive stats grid */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .stat-number .counter {
    font-size: 2.5rem;
  }
  
  .stat-suffix {
    font-size: 1.5rem;
  }
  
  .stat-content h3 {
    font-size: 1.25rem;
  }
}

/* CTA Section Styles */
.cta-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.cta-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--background-white);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.cta-description {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2.5rem;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-button-container {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.cta-primary-btn {
  background: var(--accent-yellow);
  color: var(--primary-navy);
  border: none;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  transition: var(--transition-normal);
  box-shadow: 0 4px 15px rgba(255, 180, 0, 0.3);
}

.cta-primary-btn:hover {
  background: #e6a200;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 180, 0, 0.4);
  color: var(--primary-navy);
}

.cta-secondary-btn {
  background: transparent;
  color: var(--background-white);
  border: 2px solid var(--background-white);
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  transition: var(--transition-normal);
}

.cta-secondary-btn:hover {
  background: var(--background-white);
  color: var(--primary-navy);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

/* Responsive CTA */
@media (max-width: 768px) {
  .cta-title {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .cta-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }
  
  .cta-button-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .cta-primary-btn,
  .cta-secondary-btn {
    width: 100%;
    max-width: 300px;
    padding: 1rem 2rem;
  }
}

/* ==============================================
   RESPONSIVE DESIGN
   ============================================== */

@media (max-width: 768px) {
  .header-content {
    flex-wrap: wrap;
  }
  
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--background-white);
    box-shadow: var(--shadow-medium);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
  }
  
  .nav.active {
    display: flex;
  }
  
  .nav-link {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .header-actions {
    gap: 0.5rem;
  }
  
  .tracking-input input {
    width: 150px;
  }
  
  .contact-info {
    display: none;
  }
  
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-actions .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }
  
  .section {
    padding: 60px 0;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .tracking-input {
    flex-direction: column;
  }
  
  .tracking-input input {
    width: 100%;
  }
}

/* ==============================================
   UTILITY CLASSES
   ============================================== */

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 3rem; }

.text-primary { color: var(--primary-navy); }
.text-secondary { color: var(--secondary-gray); }
.text-accent { color: var(--accent-yellow); }
.text-success { color: var(--soft-green); }
.text-white { color: var(--background-white); }

.bg-primary { background-color: var(--primary-navy); }
.bg-secondary { background-color: var(--secondary-gray); }
.bg-accent { background-color: var(--accent-yellow); }
.bg-light { background-color: var(--background-light); }
.bg-white { background-color: var(--background-white); }

/* ==============================================
   LOADING & MODAL STYLES
   ============================================== */

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary-navy);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Modal Container - Fixed z-index management */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  backdrop-filter: blur(2px);
  animation: fadeIn 0.3s ease;
  overflow-y: auto;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-sizing: border-box;
}

.modal-content {
  background: var(--background-white);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
  animation: slideIn 0.3s ease;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  margin: auto;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--secondary-gray);
  z-index: 10000;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: var(--background-light);
  color: var(--primary-navy);
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Modal stacking - ensure only one modal is visible */
.modal:not(.active) {
  display: none !important;
  z-index: -1 !important;
}

/* Multiple modal prevention */
.modal.active + .modal {
  z-index: 9998;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateY(-50px) scale(0.9); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Responsive modal adjustments */
@media (max-width: 768px) {
  .modal.active {
    padding: 1rem;
    align-items: flex-start;
    padding-top: 2rem;
  }
  
  .modal-content {
    max-width: 100%;
    margin: 0;
    max-height: calc(100vh - 2rem);
  }
}

/* Additional modal fixes to prevent overlapping */
.modal {
  pointer-events: auto;
}

.modal:not(.active) {
  pointer-events: none;
}

/* Ensure modal content is properly positioned */
.modal-content {
  position: relative;
  z-index: 10000;
}

/* Fix for any potential stacking issues */
.modal.active {
  z-index: 9999 !important;
}

/* Prevent scroll issues when modal is open */
body.modal-open {
  position: fixed;
  width: 100%;
  overflow: hidden;
}

/* Ensure proper backdrop behavior */
.modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: -1;
}

/* ==============================================
   PRINT STYLES
   ============================================== */

@media print {
  .header,
  .footer,
  .btn,
  .hero-actions {
    display: none;
  }
  
  .hero {
    background: none;
    color: #000;
    padding: 20px 0;
  }
  
  .hero h1 {
    color: #000;
  }
}
