/* Florida Alignment & Suspension - Main Stylesheet */

/* Custom Properties */
:root {
  --primary-color: #0066cc;
  --secondary-color: #28a745;
  --accent-color: #ffc107;
  --dark-color: #343a40;
  --light-color: #f8f9fa;
  --font-family-sans: 'Open Sans', sans-serif;
  --font-family-serif: 'Roboto Slab', serif;
}

/* Accessibility Styles */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--dark-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  z-index: 10000;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Focus Styles */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.25);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn {
    border: 2px solid;
  }
  
  .card {
    border: 2px solid var(--dark-color);
  }
}

/* Base Styles */
body {
  font-family: var(--font-family-sans);
  line-height: 1.6;
  color: var(--dark-color);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-serif);
  font-weight: 600;
}

/* Navigation */
.navbar {
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.navbar-brand {
  font-family: var(--font-family-serif);
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.navbar-nav .nav-link {
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 8px;
  margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
  background: rgba(255,255,255,0.2);
  color: var(--accent-color) !important;
}

.navbar-toggler {
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.navbar-toggler:hover {
  background: rgba(255,255,255,0.1);
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* Mobile Navigation Enhancements */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: rgba(0, 102, 204, 0.95);
    backdrop-filter: blur(10px);
    margin-top: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    border-radius: 8px;
  }
  
  .navbar-nav .nav-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(10px);
  }
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, #004499 100%);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.hero-section::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 300"><path fill="%23ffffff" fill-opacity="0.05" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,133.3C672,139,768,181,864,181.3C960,181,1056,139,1152,122.7C1248,107,1344,117,1392,122.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom center;
  background-size: cover;
}

.min-vh-75 {
  min-height: 75vh;
}

.text-shadow {
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-features {
  font-size: 0.95rem;
}

.hero-features i {
  width: 20px;
  text-align: center;
}

/* Floating Icons Animation */
.hero-image-container {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo {
  width: 100%;
  max-width: 500px;
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
}

/* Stats Section */
.stat-item {
  padding: 1rem;
}

.stat-item h3 {
  margin-bottom: 0.5rem;
  font-family: var(--font-family-serif);
}

/* Section Dividers */
.section-divider {
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
  margin-top: 1rem;
}

/* Service Cards */
.service-card {
  transition: all 0.4s ease;
  border: none;
  border-radius: 16px;
  background: white;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,102,204,0.15) !important;
}

.service-icon-wrapper {
  position: relative;
}

.service-icon-bg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.service-icon-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-card:hover .service-icon-bg::before {
  opacity: 0.1;
}

.service-icon-bg i {
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.service-card:hover .service-icon-bg i {
  color: var(--primary-color) !important;
  transform: scale(1.1);
}

.service-features {
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.service-actions .btn {
  border-radius: 20px;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}

.service-guarantee {
  background: linear-gradient(135deg, var(--primary-color) 0%, #004499 100%) !important;
  position: relative;
  overflow: hidden;
}

.service-guarantee::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(180deg);
  }
}

/* Testimonial Cards */
.testimonial-card {
  border: none;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.rating {
  color: var(--accent-color);
  font-size: 1.2rem;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--dark-color) 0%, #1a1a1a 100%);
}

/* Forms */
.form-control, .form-select {
  border-radius: 8px;
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

/* Buttons */
.btn {
  border-radius: 8px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

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

.btn-primary:hover {
  background-color: #0052a3;
  border-color: #0052a3;
  transform: translateY(-2px);
}

.btn-warning {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--dark-color);
}

.btn-warning:hover {
  background-color: #e6a900;
  border-color: #e6a900;
  transform: translateY(-2px);
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--dark-color) 0%, #1a1a1a 100%);
}

/* Contact Form Styling */
.contact-hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, #004499 100%);
}

.form-section-title {
  color: var(--dark-color);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e9ecef;
}

.form-label.required::after {
  content: ' *';
  color: #dc3545;
}

.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 1.1rem;
}

.contact-item {
  transition: transform 0.2s ease;
}

.contact-item:hover {
  transform: translateX(5px);
}

.hours-item {
  padding: 0.25rem 0;
}

.faq-item {
  transition: all 0.2s ease;
}

.faq-item:hover {
  background: #f8f9fa;
  padding: 0.5rem;
  border-radius: 8px;
  margin: -0.5rem;
  margin-bottom: 0.5rem;
}

/* Enhanced Form Controls */
.form-control-lg, .form-select-lg {
  border-radius: 12px;
  border: 2px solid #e9ecef;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control-lg:focus, .form-select-lg:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(0, 102, 204, 0.15);
  transform: translateY(-1px);
}

.form-control-lg.is-valid {
  border-color: #28a745;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 1.44 1.44-.94.94-.94-.94'/%3e%3c/svg%3e");
}

.form-control-lg.is-invalid {
  border-color: #dc3545;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='M5.8 4.6 7.2 7.4M7.2 4.6 5.8 7.4'/%3e%3c/svg%3e");
}

/* Animation Enhancements */
.fade-in[data-delay] {
  animation-delay: var(--delay, 0ms);
}

.fade-in[data-delay="100"] { --delay: 100ms; }
.fade-in[data-delay="200"] { --delay: 200ms; }
.fade-in[data-delay="300"] { --delay: 300ms; }
.fade-in[data-delay="400"] { --delay: 400ms; }
.fade-in[data-delay="500"] { --delay: 500ms; }
.fade-in[data-delay="600"] { --delay: 600ms; }

/* Responsive Design */
@media (max-width: 768px) {
  .display-3 {
    font-size: 2.5rem;
  }
  
  .display-4 {
    font-size: 2rem;
  }
  
  .display-5 {
    font-size: 1.75rem;
  }
  
  .hero-section {
    min-height: 80vh;
  }
  
  .hero-section .container {
    text-align: center;
  }
  
  /* Reorder columns on mobile - logo first */
  .hero-section .row {
    display: flex;
    flex-direction: column-reverse;
  }
  
  .floating-icon {
    display: none;
  }
  
  .hero-image-container {
    position: relative;
    height: auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    margin-top: 1rem;
  }
  
  .hero-logo {
    opacity: 1;
    max-width: 85%;
    width: auto;
    height: auto;
    max-height: 300px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  }
  
  .hero-section .col-lg-6 {
    position: relative;
  }
  
  .service-card {
    margin-bottom: 1rem;
  }
  
  .contact-stats .col-md-4 {
    margin-bottom: 1.5rem !important;
  }
}

@media (max-width: 576px) {
  .hero-features .row > div {
    font-size: 0.875rem;
  }
  
  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }
  
  .card-header {
    padding: 1rem !important;
  }
  
  .form-control-lg, .form-select-lg {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
  }
}

/* Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.active {
  opacity: 1;
  transform: translateY(0);
}

/* Loading States */
.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  border: 2px solid #ffffff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Image Lazy Loading */
img.lazy {
  opacity: 0;
  transition: opacity 0.3s ease;
  background-color: #f8f9fa;
}

img.loaded {
  opacity: 1;
}

/* WebP Support */
.webp .hero-bg {
  background-image: url('data:image/webp;base64,');
}

/* Performance Optimizations */
.preload-fonts {
  font-display: swap;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .floating-icon {
    animation: none !important;
  }
}

/* Print Styles */
@media print {
  .navbar, .btn, .cta-section, .error-cta {
    display: none !important;
  }
  
  .container {
    max-width: none !important;
  }
  
  .service-card, .testimonial-card {
    page-break-inside: avoid;
  }
}

/* Utility Classes */
.text-primary-custom {
  color: var(--primary-color) !important;
}

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

.border-radius-10 {
  border-radius: 10px !important;
}

.shadow-custom {
  box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

/* Critical CSS Loading */
.critical-css-loaded .non-critical {
  display: block;
}

.non-critical {
  display: none;
}
