/* Custom CSS Styles for Car Buying Website */

/* Global Styles */
* {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animation-delay-300 {
  animation-delay: 0.3s;
  opacity: 0;
}

.animation-delay-600 {
  animation-delay: 0.6s;
  opacity: 0;
}

/* Header Scroll Effect */
#header {
  transition: all 0.3s ease;
}

#header.scrolled {
  background-color: rgba(26, 26, 26, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* Hero Section */
#hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  min-height: 100vh;
}

#hero #image-loader {
  transition: opacity 0.3s ease;
  z-index: 5;
}

#hero-image {
  transition: opacity 0.5s ease;
}

#hero .absolute.inset-0.z-0 {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
}

#hero img {
  object-position: center;
  filter: brightness(0.7);
  transition: opacity 0.3s ease;
}

/* Hover Effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Button Animations */
.btn-pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Card Hover Effects */
.card-hover {
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.card-hover:hover {
  border-color: #dc2626;
  box-shadow: 0 15px 30px rgba(220, 38, 38, 0.2);
}

/* Floating Call Button Animation */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Smooth Scrolling for Links */
html {
  scroll-behavior: smooth;
}

/* Cookie Notice Animation */
#cookie-notice.show {
  transform: translateY(0);
}

/* Loading Animation */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: loading 2s infinite;
}

@keyframes loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Responsive Typography */
@media (max-width: 768px) {
  .text-responsive {
    font-size: 1.5rem;
  }
}

@media (max-width: 640px) {
  .text-responsive {
    font-size: 1.25rem;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: #dc2626;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #b91c1c;
}

/* Focus States for Accessibility */
a:focus,
button:focus {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .bg-brand-dark {
    background-color: #000000 !important;
  }

  .bg-brand-gray {
    background-color: #333333 !important;
  }

  .text-gray-300 {
    color: #ffffff !important;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Performance Optimizations */
.will-change-transform {
  will-change: transform;
}

.will-change-opacity {
  will-change: opacity;
}

/* Lazy Loading Placeholder */
img[data-src] {
  filter: blur(5px);
  transition: filter 0.3s;
}

img[data-src].loaded {
  filter: blur(0);
}

/* Custom Grid for Mobile */
@media (max-width: 640px) {
  .mobile-grid-1 {
    grid-template-columns: 1fr;
  }
}

/* Enhanced Button Styles */
.btn-primary {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.3);
}

/* Skeleton Loading for Images */
.skeleton {
  background: linear-gradient(90deg, #2d2d2d 25%, #3d3d3d 50%, #2d2d2d 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

/* Status Indicators */
.status-online {
  position: relative;
}

.status-online::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: #10b981;
  border: 2px solid white;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* Testimonial Styling */
.testimonial-card {
  position: relative;
  padding: 1.5rem;
  background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
  border-left: 4px solid #dc2626;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 4rem;
  color: #dc2626;
  opacity: 0.3;
}

/* CTA Section Styling */
.cta-gradient {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
  position: relative;
  overflow: hidden;
}

.cta-gradient::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(220, 38, 38, 0.1) 0%,
    transparent 70%
  );
  animation: rotate 20s linear infinite;
}

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

/* Enhanced Mobile Experience */
@media (max-width: 768px) {
  .mobile-padding {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .mobile-text-center {
    text-align: center;
  }

  .mobile-full-width {
    width: 100%;
  }
}
