:root{ 
  --brand-navy: #0a5d91; 
  --brand-red: #e63946; 
  --nav-bg: rgb(10, 93, 145);
  --primary-color: rgb(10, 93, 145);
  --primary-hover: rgb(8, 75, 116);
  --primary-light: rgba(10, 93, 145, 0.1);
  --font-heading: 'Merriweather', serif;
  --font-body: 'Rubik', sans-serif;
}

/* Bootstrap Primary Color Overrides */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white !important;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(10, 93, 145, 0.2);
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: white !important;
  box-shadow: 0 4px 8px rgba(10, 93, 145, 0.3);
  transform: translateY(-1px);
}

.btn-outline-primary {
  color: var(--primary-color) !important;
  border-color: var(--primary-color);
  background-color: white;
  font-weight: 500;
  border-width: 2px;
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color);
  color: white !important;
  box-shadow: 0 4px 8px rgba(10, 93, 145, 0.3);
  transform: translateY(-1px);
}

/* Button Transitions */
.btn {
  transition: all 0.3s ease;
}

/* Danger Button Enhancements */
.btn-danger {
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.btn-danger:hover, .btn-danger:focus, .btn-danger:active {
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
  transform: translateY(-1px);
}

/* Large Button Enhancements */
.btn-lg {
  font-weight: 600;
  letter-spacing: 0.5px;
}

.text-primary {
  color: var(--primary-color) !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.border-primary {
  border-color: var(--primary-color) !important;
}

.link-primary {
  color: var(--primary-color);
}

.link-primary:hover, .link-primary:focus {
  color: var(--primary-hover);
}

/* Custom Primary Elements */
.bg-primary-light {
  background-color: var(--primary-light);
}

/* Improved Text Contrast on Light Backgrounds */
.bg-primary-light .text-muted {
  color: #6c757d !important; /* Darker muted text on light backgrounds */
}

.bg-primary-light strong,
.bg-primary-light .fw-bold {
  color: #212529 !important; /* Ensure strong text is dark on light backgrounds */
}

/* Better text contrast on light backgrounds */
.bg-light .text-muted {
  color: #495057 !important; /* Darker than default muted for better contrast */
}

.bg-light strong,
.bg-light .fw-bold {
  color: #212529 !important;
}

/* Enhanced text contrast for sections */
.py-5.bg-light .text-muted {
  color: #495057 !important;
}

/* Ensure subtitle text has good contrast */
.text-muted {
  color: #495057 !important; /* Darker than Bootstrap default for better readability */
}

/* List Group Primary Styling */
.list-group-item.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* Dropdown Primary Styling */
.dropdown-item.active, .dropdown-item:active {
  background-color: var(--primary-color);
  color: white;
}

/* Badge Primary Styling */
.badge.bg-primary {
  background-color: var(--primary-color) !important;
}

/* Form Focus Styling */
.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(10, 93, 145, 0.25);
}

/* Map and Location Icons */
.bi-geo-alt, .bi-telephone, .bi-envelope {
  color: var(--primary-color);
}

/* Award and Success Icons */
.bi-award {
  color: var(--primary-color);
}

/* Keep success icons green for better UX */
.bi-check-circle-fill.text-success {
  color: #198754 !important;
}

/* Enhanced readability for small text */
.small, small {
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Ensure sufficient contrast for muted text */
.text-muted {
  color: #6c757d !important;
}

.text-secondary {
  color: #495057 !important;
}

/* Arrow icons */
.bi-arrow-right-circle-fill.text-primary {
  color: var(--primary-color) !important;
}

/* Specific icon colors for better visual hierarchy */
.text-primary .bi,
.bi.text-primary {
  color: var(--primary-color) !important;
}

/* Card border primary styling */
.card.border-primary {
  border-color: var(--primary-color) !important;
}

.card.border-primary .card-body .icon-wrap {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

/* Typography Base */
body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: #333;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: #2c3e50;
  margin-bottom: 0.75rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.1rem; }

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: var(--font-heading);
  font-weight: 700;
}

.lead {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Button Typography */
.btn {
  font-family: var(--font-body);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.025em;
}

/* Card Typography */
.card-title {
  font-family: var(--font-heading);
  font-weight: 600;
}

.card-text {
  font-family: var(--font-body);
  font-weight: 400;
}

/* Navigation Styling */
.navbar {
  background-color: var(--nav-bg) !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand, .navbar-nav .nav-link {
  color: white !important;
  font-family: var(--font-body);
}

.navbar-brand {
  font-weight: 600;
  font-size: 1.25rem;
}

.navbar-nav .nav-link {
  font-weight: 500;
  font-size: 0.95rem;
}

.navbar-brand:hover, .navbar-nav .nav-link:hover {
  color: #f8f9fa !important;
}

.navbar-nav .nav-link.active {
  color: #ffc107 !important;
  font-weight: 600;
}

.dropdown-menu {
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dropdown-item.active {
  background-color: var(--nav-bg);
  color: white;
}

/* Hero Section Improvements */
.hero{ 
  min-height: 62vh; 
  position: relative;
  overflow: hidden;
} 

.hero-img{ 
  height: 62vh; 
  width: 100%;
  object-fit: cover; 
  object-position: center;
  filter: saturate(1.05) contrast(1.02); 
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Video Background Styles */
.hero-video {
  height: 62vh;
  width: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.1) contrast(1.05) brightness(0.9);
  transition: opacity 0.5s ease-in-out;
}

.hero-video::-webkit-media-controls {
  display: none !important;
}

.hero-video::-webkit-media-controls-panel {
  display: none !important;
}

.hero-video::-webkit-media-controls-play-button {
  display: none !important;
}

.hero-video::-webkit-media-controls-start-playback-button {
  display: none !important;
}

.hero-overlay{ 
  position: absolute; 
  inset: 0; 
  background: linear-gradient(180deg, rgba(0,0,0,.5), rgba(0,0,0,.4)); 
  z-index: 1;
}

/* Video Controls */
.video-controls {
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero:hover .video-controls {
  opacity: 1;
}

/* Typewriter Effect */
.typewriter-cursor {
  display: inline-block;
  animation: blink 1s infinite;
  font-weight: 400;
  color: #ffffff;
}

@keyframes blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

.typewriter-text {
  overflow: hidden;
  white-space: nowrap;
  display: inline-block;
}

/* Fade-in animation for subtitle */
.fade-in {
  animation: fadeInUp 0.8s ease-out forwards;
}

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

.video-controls .btn {
  backdrop-filter: blur(10px);
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.2);
}

.video-controls .btn:hover {
  background: rgba(0,0,0,0.5);
  border-color: rgba(255,255,255,0.3);
}

/* Hero Content Above Video */
.hero .container {
  z-index: 2;
}

/* Image Quality Improvements */
img {
  max-width: 100%;
  height: auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: optimizeQuality;
}

/* Project Gallery Images */
.project-card img { 
  display: block;
  width: 100%; 
  height: 250px;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
  border-radius: 0.375rem;
}

.project-card img:hover {
  transform: scale(1.05);
}

/* Facility Images */
#facility-images img, #support-images img, #airbag-images img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  border-radius: 0.375rem;
  transition: transform 0.3s ease;
}

#facility-images img:hover, #support-images img:hover, #airbag-images img:hover {
  transform: scale(1.02);
}

/* Logo Improvements */
.navbar-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: brightness(1.1);
}

/* About page images */
.card-body img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 0.375rem;
}

/* Icon Styling */
.icon-wrap{ 
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #f1f5f9;
  color: var(--primary-color);
  font-size: 1.25rem; 
}

/* Card Effects */
.card-lift{ 
  transition: transform .2s ease, box-shadow .2s ease; 
  border: 1px solid #edf2f7; 
} 

.card-lift:hover{ 
  transform: translateY(-4px); 
  box-shadow: 0 10px 24px rgba(0,0,0,.08); 
}

/* Footer Icons */
footer .bi{ 
  vertical-align: -0.125em; 
}

/* Footer Typography */
footer {
  font-family: var(--font-body);
  font-size: 0.9rem;
}

footer h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
}

/* Form Typography */
.form-label {
  font-family: var(--font-body);
  font-weight: 500;
  color: #495057;
}

.form-control, .form-select {
  font-family: var(--font-body);
  font-weight: 400;
}

/* List Group Typography */
.list-group-item {
  font-family: var(--font-body);
  font-weight: 400;
}

.list-group-item.active {
  font-weight: 500;
}

/* Badge Typography */
.badge {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8rem;
}

/* Responsive Typography */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  h4 { font-size: 1.25rem; }
  
  .display-5 { font-size: 2rem; }
  
  .hero-img, .hero-video {
    height: 40vh;
  }
  
  .hero {
    min-height: 40vh;
  }
  
  .video-controls {
    opacity: 1; /* Always show on mobile */
  }
  
  .project-card img {
    height: 200px;
  }
  
  #facility-images img, #support-images img, #airbag-images img {
    height: 180px;
  }
  
  .navbar-brand {
    font-size: 1.1rem;
  }
  
  .navbar-nav .nav-link {
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  .display-5 { font-size: 1.75rem; }
  
  .lead {
    font-size: 1rem;
  }
}

/* Image Loading Animation */
img {
  transition: opacity 0.3s ease;
}

img:not([src]) {
  opacity: 0;
}

/* Lazy Loading Support */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* High DPI Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}