/* ========================================
   THEME V3 - RESPONSIVE DESIGN ENHANCEMENTS
   ENSURING PERFECT MOBILE EXPERIENCE
   ======================================== */

/* ========================================
   MOBILE-FIRST APPROACH
   ======================================== */

/* Base mobile styles (up to 576px) */
@media (max-width: 576px) {
  /* Global adjustments */
  body {
    font-size: 14px;
    line-height: 1.5;
  }

  .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Typography adjustments */
  h1, .h1 {
    font-size: 1.75rem;
    line-height: 1.2;
  }

  h2, .h2 {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  h3, .h3 {
    font-size: 1.25rem;
    line-height: 1.4;
  }

  .lead {
    font-size: 1rem;
  }

  /* Button adjustments */
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 50px;
  }

  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  /* Form adjustments */
  .form-control {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 0.75rem;
    border-radius: 50px;
  }

  .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  /* Card adjustments */
  .card {
    border-radius: 50px;
    margin-bottom: 1rem;
  }

  .card-body {
    padding: 1rem;
  }

  /* Section spacing */
  .section {
    padding: 2rem 0;
  }

  .section-header {
    margin-bottom: 1.5rem;
  }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .section-subtitle {
    font-size: 0.9rem;
  }
}

/* ========================================
   HERO SECTION RESPONSIVE
   ======================================== */
@media (max-width: 576px) {
  .hero-section-new {
    min-height: 60vh;
    padding: 1rem 0;
  }

  .hero-content {
    text-align: center;
    padding: 1rem;
  }

  .hero-title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
  }

  .search-form-overlay {
    position: relative;
    margin-top: 1rem;
  }

  .search-form-new {
    padding: 1rem;
    border-radius: 50px;
  }

  .search-form-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .form-field-container {
    margin-bottom: 0.5rem;
  }

  .field-label {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
  }

  .search-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
  }
}

@media (min-width: 577px) and (max-width: 768px) {
  .hero-section-new {
    min-height: 70vh;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .search-form-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (min-width: 769px) and (max-width: 992px) {
  .hero-section-new {
    min-height: 80vh;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .search-form-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================================
   FLEET SECTION RESPONSIVE
   ======================================== */
@media (max-width: 576px) {
  .fleet-section-new {
    padding: 2rem 0;
  }

  .fleet-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .fleet-card {
    border-radius: 50px;
    overflow: hidden;
  }

  .fleet-card-image {
    height: 180px;
  }

  .fleet-card-content {
    padding: 1rem;
  }

  .fleet-card-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }

  .fleet-card-description {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
  }

  .fleet-card-stats {
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .stat-item {
    text-align: center;
  }

  .stat-number {
    font-size: 1.1rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .fleet-card-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .fleet-features {
    padding: 1.5rem;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .feature-item {
    text-align: center;
  }

  .feature-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
    margin: 0 auto 0.75rem;
  }

  .feature-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .feature-description {
    font-size: 0.85rem;
  }
}

@media (min-width: 577px) and (max-width: 768px) {
  .fleet-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .fleet-features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 769px) and (max-width: 992px) {
  .fleet-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .fleet-features {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================================
   BOOKING STEPS SECTION RESPONSIVE
   ======================================== */
@media (max-width: 576px) {
  .booking-steps-section-new {
    padding: 2rem 0;
  }

  .booking-steps-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .step-card {
    padding: 1rem;
    border-radius: 50px;
    text-align: center;
  }

  .step-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    margin: 0 auto 0.75rem;
  }

  .step-number {
    width: 25px;
    height: 25px;
    font-size: 0.8rem;
    top: -5px;
    right: -5px;
  }

  .step-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }

  .step-description {
    font-size: 0.85rem;
  }

  .step-arrow {
    display: none;
  }

  .quick-booking-form {
    padding: 1.5rem;
  }

  .booking-form-card {
    padding: 1rem;
    border-radius: 50px;
  }

  .form-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  .booking-benefits {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
  }

  .benefit-item {
    text-align: center;
  }

  .benefit-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
    margin: 0 auto 0.75rem;
  }

  .benefit-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .benefit-description {
    font-size: 0.85rem;
  }
}

@media (min-width: 577px) and (max-width: 768px) {
  .booking-steps-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .booking-benefits {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 769px) and (max-width: 992px) {
  .booking-steps-container {
    grid-template-columns: repeat(3, 1fr);
  }

  .booking-benefits {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================================
   HEADER RESPONSIVE ENHANCEMENTS
   ======================================== */
@media (max-width: 576px) {
  .header-v3 {
    position: relative;
  }

  .header-top {
    padding: 0.75rem 0;
    min-height: auto;
  }

  .header-top .container {
    padding: 0 15px;
    flex-direction: column;
    gap: 0.75rem;
  }

  .header-top-left,
  .header-top-right {
    width: 100%;
    justify-content: center;
  }

  .contact-info {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .contact-info li {
    font-size: 0.8rem;
  }

  .social-links {
    justify-content: center;
    gap: 0.5rem;
  }

  .social-links li a {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .language-selector {
    justify-content: center;
    gap: 0.5rem;
  }

  .language-selector a {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
  }

  .header-main {
    padding: 0.75rem 0;
  }

  .header-main .container {
    padding: 0 15px;
  }

  .logo img {
    max-height: 40px;
  }

  .logo h1 {
    font-size: 1.25rem;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .mobile-menu-toggle {
    width: 30px;
    height: 30px;
    padding: 0;
  }

  .mobile-menu-toggle span {
    height: 2px;
    margin: 3px 0;
  }

  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .mobile-menu.active {
    transform: translateX(0);
  }

  .mobile-menu-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 0;
  }

  .mobile-nav {
    padding: 2rem 1rem;
  }

  .mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .mobile-menu-list li {
    margin-bottom: 1rem;
  }

  .mobile-menu-list a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 0.75rem 0;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-menu-list li.active a {
    color: var(--primary-color);
  }

  .mobile-logout-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.1rem;
    padding: 0.75rem 0;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

@media (min-width: 577px) and (max-width: 768px) {
  .header-top .container {
    padding: 0 20px;
  }

  .contact-info {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .social-links {
    gap: 0.75rem;
  }

  .header-main .container {
    padding: 0 20px;
  }
}

/* ========================================
   FOOTER RESPONSIVE ENHANCEMENTS
   ======================================== */
@media (max-width: 576px) {
  .footer-section {
    padding: 2rem 0 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-widget {
    margin-bottom: 1.5rem;
  }

  .footer-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  .footer-description {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .footer-menu {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-menu a {
    font-size: 0.9rem;
    padding: 0.5rem 0;
  }

  .contact-info p {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
  }

  .social-links {
    justify-content: center;
    gap: 1rem;
  }

  .social-link {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .footer-bottom {
    padding: 1rem 0;
    text-align: center;
  }

  .footer-copyright {
    font-size: 0.8rem;
  }
}

@media (min-width: 577px) and (max-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (min-width: 769px) and (max-width: 992px) {
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================================
   TABLET OPTIMIZATIONS
   ======================================== */
@media (min-width: 768px) and (max-width: 1024px) {
  .container {
    max-width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-section-new {
    min-height: 85vh;
  }

  .hero-title {
    font-size: 3rem;
  }

  .search-form-row {
    grid-template-columns: repeat(4, 1fr);
  }

  .fleet-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .booking-steps-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================
   LARGE SCREEN OPTIMIZATIONS
   ======================================== */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }

  .hero-section-new {
    min-height: 90vh;
  }

  .hero-title {
    font-size: 4rem;
  }

  .section-title {
    font-size: 2.5rem;
  }

  .fleet-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .booking-steps-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========================================
   LANDSCAPE MOBILE OPTIMIZATIONS
   ======================================== */
@media (max-width: 768px) and (orientation: landscape) {
  .hero-section-new {
    min-height: 50vh;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 0.8rem;
  }

  .search-form-overlay {
    margin-top: 0.5rem;
  }

  .section {
    padding: 1.5rem 0;
  }
}

/* ========================================
   HIGH DPI DISPLAYS
   ======================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .fleet-card-image img,
  .hero-slide img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* ========================================
   TOUCH DEVICE OPTIMIZATIONS
   ======================================== */
@media (hover: none) and (pointer: coarse) {
  .btn:hover,
  .fleet-card:hover,
  .step-card:hover {
    transform: none;
  }

  .btn:active,
  .fleet-card:active,
  .step-card:active {
    transform: scale(0.98);
  }

  .fleet-card-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.3);
  }

  .search-btn {
    min-height: 44px; /* iOS touch target minimum */
  }

  .mobile-menu-toggle {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ========================================
   MOBILE DEVICE SPECIFIC STYLES
   ======================================== */
.mobile-device .btn,
.mobile-device .fleet-card,
.mobile-device .step-card {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mobile-device .touch-active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

.mobile-device .fleet-card-overlay {
  opacity: 1 !important;
  background: rgba(0, 0, 0, 0.3) !important;
}

/* ========================================
   MOBILE MENU ENHANCEMENTS
   ======================================== */
body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

.mobile-menu {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.mobile-menu-list a,
.mobile-logout-btn {
  position: relative;
  overflow: hidden;
}

.mobile-menu-list a::before,
.mobile-logout-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.mobile-menu-list a:hover::before,
.mobile-logout-btn:hover::before {
  left: 100%;
}

/* ========================================
   MOBILE FORM ENHANCEMENTS
   ======================================== */
@media (max-width: 576px) {
  .form-control:focus {
    font-size: 16px !important; /* Prevents zoom on iOS */
  }
  
  .search-form-new {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  }
  
  .search-btn {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  }
  
  .search-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }
}

/* ========================================
   MOBILE ANIMATION OPTIMIZATIONS
   ======================================== */
@media (max-width: 768px) {
  .animate-fade-in-up,
  .animate-fade-in-left,
  .animate-fade-in-right,
  .animate-scale-in {
    animation-duration: 0.3s !important;
  }
  
  .hero-section-new {
    will-change: transform;
  }
  
  .fleet-card,
  .step-card {
    will-change: transform;
  }
}

/* ========================================
   MOBILE SCROLL OPTIMIZATIONS
   ======================================== */
@media (max-width: 768px) {
  html {
    scroll-behavior: smooth;
  }
  
  .hero-section-new {
    -webkit-overflow-scrolling: touch;
  }
  
  .fleet-section-new,
  .booking-steps-section-new {
    -webkit-overflow-scrolling: touch;
  }
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  .hero-section-new,
  .fleet-card,
  .step-card,
  .btn {
    animation: none;
    transition: none;
  }
}

@media (prefers-contrast: high) {
  .btn {
    border: 2px solid currentColor;
  }

  .fleet-card,
  .step-card {
    border: 2px solid var(--dark-color);
  }
}

/* ========================================
   RTL RESPONSIVE SUPPORT
   ======================================== */
[dir="rtl"] @media (max-width: 576px) {
  .contact-info {
    text-align: right;
  }

  .social-links {
    justify-content: center;
  }

  .mobile-menu-list a,
  .mobile-logout-btn {
    text-align: right;
  }

  .step-number {
    right: auto;
    left: -5px;
  }

  .fleet-card-stats {
    flex-direction: column;
  }
}

/* ========================================
   PRINT OPTIMIZATIONS
   ======================================== */
@media print {
  .header-v3,
  .mobile-menu,
  .search-form-overlay,
  .step-arrow {
    display: none !important;
  }

  .hero-section-new {
    min-height: auto;
    padding: 1rem 0;
    background: white !important;
  }

  .fleet-card,
  .step-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .btn {
    background: white !important;
    color: black !important;
    border: 1px solid #ddd !important;
  }
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */
@media (max-width: 576px) {
  /* Reduce animations on mobile for better performance */
  .animate-fade-in-up,
  .animate-fade-in-left,
  .animate-fade-in-right,
  .animate-scale-in {
    animation-duration: 0.3s;
  }

  /* Optimize images for mobile */
  .fleet-card-image img,
  .hero-slide img {
    object-fit: cover;
    object-position: center;
  }
}

/* ========================================
   SAFE AREA SUPPORT (iOS)
   ======================================== */
@supports (padding: max(0px)) {
  .header-v3 {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }

  .mobile-menu {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
    padding-top: max(0px, env(safe-area-inset-top));
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }
} 