/* ============================================
   Mobile Optimization Styles
   ============================================ */

/* Touch-friendly improvements */
* {
  -webkit-tap-highlight-color: rgba(34, 170, 134, 0.2);
  tap-highlight-color: rgba(34, 170, 134, 0.2);
}

/* Ensure minimum touch target size (44x44px recommended by Apple/Google) */
a, button, input[type="submit"], input[type="button"], .ht_btn {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Prevent text size adjustment on iOS */
html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Smooth scrolling for mobile */
html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Mobile-specific font size adjustments */
@media (max-width: 767px) {
  body {
    font-size: 16px;
    line-height: 1.6;
  }
  
  h1 {
    font-size: 28px !important;
    line-height: 1.3;
  }
  
  h2 {
    font-size: 24px !important;
    line-height: 1.3;
  }
  
  h3 {
    font-size: 20px !important;
    line-height: 1.4;
  }
  
  h4 {
    font-size: 18px !important;
    line-height: 1.4;
  }
  
  p {
    font-size: 16px;
    line-height: 1.6;
  }
}

/* Tablet-specific adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
  body {
    font-size: 17px;
  }
  
  h1 {
    font-size: 36px !important;
  }
  
  h2 {
    font-size: 30px !important;
  }
  
  h3 {
    font-size: 24px !important;
  }
}

/* Image optimization for mobile */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Prevent horizontal scroll */
.container, .container-fluid {
  overflow-x: hidden;
}

/* Form inputs mobile optimization */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
textarea,
select {
  font-size: 16px !important; /* Prevents zoom on iOS */
  min-height: 44px;
  padding: 12px 16px;
  border-radius: 4px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Button improvements for mobile */
.ht_btn {
  padding: 14px 28px;
  font-size: 16px;
  min-height: 44px;
  white-space: nowrap;
  touch-action: manipulation;
}

@media (max-width: 767px) {
  .ht_btn {
    padding: 12px 24px;
    font-size: 15px;
    width: 100%;
    max-width: 100%;
  }
}

/* Hero slider mobile optimization */
@media (max-width: 767px) {
  .hero__slider__wrapper {
    min-height: 400px !important;
    padding: 120px 0 80px !important;
  }
  
  .main__title {
    font-size: 28px !important;
    line-height: 1.3;
    margin-bottom: 20px !important;
  }
  
  .sub__title__two {
    font-size: 16px !important;
    line-height: 1.5;
    margin-bottom: 30px !important;
  }
}

/* Page title area mobile optimization */
@media (max-width: 767px) {
  .page-title-area {
    min-height: 300px !important;
    padding: 80px 0 60px !important;
  }
  
  .page-title-wrapper .page-title {
    font-size: 28px !important;
    line-height: 1.3;
  }
  
  .page-title-wrapper h4 {
    font-size: 16px !important;
    line-height: 1.5;
  }
}

/* Navigation mobile improvements */
@media (max-width: 991px) {
  .open-mobile-menu a {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  
  .main-menu {
    display: none !important;
  }
}

/* Footer mobile optimization */
@media (max-width: 767px) {
  .footer__widget {
    margin-bottom: 40px !important;
  }
  
  .footer__contact p {
    font-size: 14px;
    line-height: 1.6;
  }
  
  .social_media a {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  
  .copyright__text {
    text-align: center !important;
    margin-bottom: 20px !important;
  }
  
  .footer__menu {
    text-align: center !important;
  }
}

/* Swiper slider mobile improvements */
@media (max-width: 767px) {
  .swiper-button-prev,
  .swiper-button-next {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }
  
  .swiper-button-prev:after,
  .swiper-button-next:after {
    font-size: 20px;
  }
}

/* Table responsive */
@media (max-width: 767px) {
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
}

/* Prevent zoom on input focus (iOS Safari) */
@media screen and (max-width: 767px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="password"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* Card/box improvements for mobile */
@media (max-width: 767px) {
  .single__services__box,
  .feature__box,
  .single__box {
    margin-bottom: 30px;
    padding: 20px;
  }
}

/* Spacing adjustments for mobile */
@media (max-width: 767px) {
  .pt-120 {
    padding-top: 60px !important;
  }
  
  .pb-140 {
    padding-bottom: 70px !important;
  }
  
  .pt-lg-80 {
    padding-top: 50px !important;
  }
  
  .pb-lg-85 {
    padding-bottom: 50px !important;
  }
  
  .pt-md-150 {
    padding-top: 80px !important;
  }
  
  .pb-md-60 {
    padding-bottom: 40px !important;
  }
}

/* Contact form mobile optimization */
@media (max-width: 767px) {
  .contact-form-one input,
  .contact-form-one textarea {
    font-size: 16px !important;
    padding: 14px 16px;
    margin-bottom: 20px;
  }
  
  .contact-form-one textarea {
    min-height: 120px;
  }
}

/* Logo mobile optimization */
@media (max-width: 767px) {
  .logo-area img {
    max-width: 150px;
    height: auto;
  }
}

/* Hero slider logo mobile */
@media (max-width: 767px) {
  .hero__slider__logo {
    max-width: 120px !important;
    top: 20px !important;
    right: 20px !important;
  }
}

/* Improve readability on mobile */
@media (max-width: 767px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  section {
    padding-left: 0;
    padding-right: 0;
  }
}

/* Prevent layout shift */
img {
  aspect-ratio: attr(width) / attr(height);
}

/* Loading optimization */
@media (max-width: 767px) {
  #preloader {
    background-size: 60px 60px;
  }
}

/* Accessibility improvements for mobile */
@media (max-width: 767px) {
  a:focus,
  button:focus,
  input:focus,
  textarea:focus,
  select:focus {
    outline: 2px solid #22AA86;
    outline-offset: 2px;
  }
}

/* Landscape orientation adjustments */
@media (max-width: 767px) and (orientation: landscape) {
  .hero__slider__wrapper {
    min-height: 300px !important;
    padding: 80px 0 60px !important;
  }
  
  .page-title-area {
    min-height: 250px !important;
    padding: 60px 0 40px !important;
  }
}
