/* Hero Section Styles */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}

.hero-slide {
  height: 100vh;
  min-height: 600px;
  background-size: cover;
  background-position: center;
  position: relative;
  animation: kenburns 20s ease-out infinite;
}

@keyframes kenburns {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 40, 80, 0.8) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.hero-content {
  position: absolute;
  top: 80px;
  right: 50px;
  z-index: 10;
}

.vehicle-badge {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 12px 30px;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero-text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  width: 100%;
  padding: 0 20px;
}

.hero-text-overlay h1 {
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease-out;
}

.hero-text-overlay .slogan {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease-out 0.15s both;
  opacity: 0.9;
}

.hero-text-overlay p {
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease-out 0.2s both;
  max-width: 700px;
  margin: 0 auto 1.5rem auto;
}

.hero-text-overlay .btn {
  animation: fadeInUp 1s ease-out 0.4s both;
}

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

/* Carousel Fade Transition - Extended Duration */
.carousel-fade .carousel-item {
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.carousel-fade .carousel-item.active {
  opacity: 1;
}

.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
  opacity: 1;
}

.carousel-fade .active.carousel-item-start,
.carousel-fade .active.carousel-item-end {
  opacity: 0;
}

/* Carousel Controls Styling */
.carousel-control-prev,
.carousel-control-next {
  width: 60px;
  height: 60px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  border-radius: 50%;
  margin: 0 20px;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.25);
}

.carousel-indicators {
  bottom: 30px;
}

.carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 6px;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.carousel-indicators button.active {
  opacity: 1;
  transform: scale(1.2);
}

/* Button Enhancements */
.btn-primary {
  background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
  border: none;
  padding: 12px 30px;
  font-weight: 500;
  transition: all 0.3s ease;
}

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

.btn-outline-light {
  border-width: 2px;
  padding: 12px 30px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-outline-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

/* Card Styles */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Blockquote Styles */
blockquote {
  border-left: 5px solid #0066cc;
  padding-left: 20px;
  font-style: italic;
  background: #f8f9fa;
  padding: 20px 20px 20px 25px;
  border-radius: 0 8px 8px 0;
}

/* Navbar */
.navbar {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4));
  -webkit-transition: background-color 0.3s ease;
  -moz-transition: background-color 0.3s ease;
  -o-transition: background-color 0.3s ease;
  transition: background-color 0.3s ease;
  z-index: 1000;
}

.navbar.scrolled {
  background: rgba(0, 0, 0, 0.95) !important;
}

.navbar-brand {
  font-weight: bold;
  font-size: 1.5rem;
}

/* Section Headers */
section h2 {
  margin-bottom: 2rem;
  font-weight: 700;
  color: #1a1a1a;
}

/* Footer */
footer p {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

footer a {
  transition: opacity 0.3s ease;
}

footer a:hover {
  opacity: 0.8;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero-section,
  .hero-slide {
    height: 80vh;
    min-height: 500px;
  }
  
  .hero-text-overlay h1 {
    font-size: 2rem;
  }
  
  .hero-text-overlay p {
    font-size: 1rem;
  }
  
  .hero-content {
    top: 70px;
    right: 15px;
  }
  
  .vehicle-badge {
    font-size: 0.9rem;
    padding: 8px 20px;
  }
  
  .carousel-control-prev,
  .carousel-control-next {
    width: 40px;
    height: 40px;
    margin: 0 10px;
  }
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Section Padding */
section {
  scroll-margin-top: 70px;
}

/* Service Cards Enhanced */
.service-card {
  border-radius: 12px;
  overflow: hidden;
  -webkit-transition: transform 0.3s ease, box-shadow 0.3s ease;
  -moz-transition: transform 0.3s ease, box-shadow 0.3s ease;
  -o-transition: transform 0.3s ease, box-shadow 0.3s ease;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  -webkit-transform: translateY(-8px);
  -moz-transform: translateY(-8px);
  -ms-transform: translateY(-8px);
  -o-transform: translateY(-8px);
  transform: translateY(-8px);
}

.service-icon {
  color: #0066cc;
  -webkit-transition: transform 0.3s ease;
  -moz-transition: transform 0.3s ease;
  -o-transition: transform 0.3s ease;
  transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
  -webkit-transform: scale(1.1);
  -moz-transform: scale(1.1);
  -ms-transform: scale(1.1);
  -o-transform: scale(1.1);
  transform: scale(1.1);
}

/* Accordion Styles for Mobile */
.accordion {
  border-radius: 12px;
  overflow: hidden;
}

.accordion-item {
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-button {
  font-weight: 600;
  padding: 18px 20px;
  background-color: #fff;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
  background-color: #0066cc;
  color: #fff;
  box-shadow: none;
}

.accordion-button:focus {
  border-color: transparent;
  box-shadow: none;
}

.accordion-button::after {
  -webkit-transition: transform 0.3s ease;
  -moz-transition: transform 0.3s ease;
  -o-transition: transform 0.3s ease;
  transition: transform 0.3s ease;
}

.accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-body {
  padding: 15px 20px;
  background-color: #f8f9fa;
}

.accordion-collapse {
  -webkit-transition: height 0.35s ease;
  -moz-transition: height 0.35s ease;
  -o-transition: height 0.35s ease;
  transition: height 0.35s ease;
}

/* Cross-Browser Prefixes for Animations */
@-webkit-keyframes kenburns {
  0% { -webkit-transform: scale(1); transform: scale(1); }
  50% { -webkit-transform: scale(1.1); transform: scale(1.1); }
  100% { -webkit-transform: scale(1); transform: scale(1); }
}

@-webkit-keyframes fadeInUp {
  from {
    opacity: 0;
    -webkit-transform: translateY(30px);
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

/* Additional Mobile Optimizations */
@media (max-width: 768px) {
  .hero-text-overlay .slogan {
    font-size: 1rem;
    letter-spacing: 2px;
  }
  
  .hero-text-overlay .btn {
    display: block;
    width: 80%;
    max-width: 250px;
    margin: 0 auto 10px auto;
  }
  
  .hero-text-overlay .btn:last-child {
    margin-bottom: 0;
  }
  
  section {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  section h2 {
    font-size: 1.75rem;
  }
}

/* Touch-friendly for mobile */
@media (hover: none) {
  .card:hover,
  .service-card:hover {
    -webkit-transform: none;
    -moz-transform: none;
    -ms-transform: none;
    -o-transform: none;
    transform: none;
  }
  
  .btn:hover {
    -webkit-transform: none;
    transform: none;
  }
}

/* iOS Safari fixes */
@supports (-webkit-touch-callout: none) {
  .hero-section {
    height: -webkit-fill-available;
  }
}

/* Form improvements for mobile */
input, textarea, select, button {
  font-size: 16px; /* Prevents zoom on iOS */
}

.form-control:focus {
  border-color: #0066cc;
  box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

/* Better tap targets for mobile */
.nav-link {
  padding: 12px 16px !important;
}

.accordion-button {
  min-height: 56px;
}

/* Improved contrast for accessibility */
.text-muted {
  color: #5a6268 !important;
}

/* Owner Photo Styling */
.owner-photo {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border: 5px solid #0066cc;
  box-shadow: 0 8px 25px rgba(0, 102, 204, 0.3);
  -webkit-transition: transform 0.3s ease;
  -moz-transition: transform 0.3s ease;
  -o-transition: transform 0.3s ease;
  transition: transform 0.3s ease;
}

.owner-photo:hover {
  -webkit-transform: scale(1.05);
  -moz-transform: scale(1.05);
  -ms-transform: scale(1.05);
  -o-transform: scale(1.05);
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .owner-photo {
    width: 180px;
    height: 180px;
  }
}

/* Comprehensive Mobile Optimizations */
@media (max-width: 576px) {
  /* Hero Section Mobile */
  .hero-section,
  .hero-slide {
    height: 70vh;
    min-height: 450px;
  }
  
  .hero-text-overlay h1 {
    font-size: 1.75rem;
    line-height: 1.2;
  }
  
  .hero-text-overlay .slogan {
    font-size: 0.85rem;
    letter-spacing: 1px;
  }
  
  .hero-text-overlay .lead {
    font-size: 0.9rem;
    padding: 0 10px;
  }
  
  .hero-text-overlay .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  /* Hide carousel controls on small screens */
  .carousel-control-prev,
  .carousel-control-next {
    display: none;
  }
  
  .carousel-indicators {
    bottom: 15px;
  }
  
  .carousel-indicators button {
    width: 8px;
    height: 8px;
  }
  
  /* About Section Mobile */
  .owner-photo {
    width: 150px;
    height: 150px;
    border-width: 3px;
  }
  
  #about h3 {
    font-size: 1.25rem;
    text-align: center;
  }
  
  #about .lead {
    font-size: 1rem;
  }
  
  #about p {
    font-size: 0.95rem;
  }
  
  #about .badge {
    font-size: 0.75rem !important;
    display: block;
    text-align: center;
  }
  
  /* Testimonials Mobile */
  blockquote {
    padding: 15px;
    font-size: 0.95rem;
  }
  
  /* Contact Section Mobile */
  #contact h2 {
    text-align: center;
  }
  
  .contact-info {
    text-align: center;
  }
  
  /* Footer Mobile */
  footer {
    text-align: center;
  }
  
  footer p {
    flex-direction: column;
    gap: 5px;
  }
  
  /* General Mobile Typography */
  body {
    font-size: 15px;
  }
  
  section h2 {
    font-size: 1.5rem;
    text-align: center;
  }
  
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Extra small devices (phones in portrait) */
@media (max-width: 375px) {
  .hero-text-overlay h1 {
    font-size: 1.5rem;
  }
  
  .hero-text-overlay .slogan {
    font-size: 0.75rem;
  }
  
  .owner-photo {
    width: 120px;
    height: 120px;
  }
  
  .accordion-button {
    font-size: 0.9rem;
    padding: 14px 16px;
  }
}

/* Landscape mode optimizations */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-section,
  .hero-slide {
    height: 100vh;
    min-height: 300px;
  }
  
  .hero-text-overlay {
    top: 45%;
  }
  
  .hero-text-overlay h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  .hero-text-overlay .slogan {
    display: none;
  }
  
  .hero-text-overlay .lead {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
  }
}

/* Safe area insets for notched phones */
@supports (padding: max(0px)) {
  .navbar {
    padding-top: max(0.5rem, env(safe-area-inset-top));
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
  
  footer {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

/* Smooth scrolling with reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  .hero-slide {
    -webkit-animation: none;
    animation: none;
  }
  
  .carousel-fade .carousel-item {
    -webkit-transition: none;
    transition: none;
  }
  
  * {
    -webkit-transition: none !important;
    transition: none !important;
  }
}
