/* ===================================
   Mobile Optimization CSS
   =================================== */

/* Responsive Typography */
@media (max-width: 576px) {
  html {
    font-size: 14px;
  }

  h1 {
    font-size: 1.75rem !important;
    line-height: 1.2;
  }
  h2 {
    font-size: 1.5rem !important;
    line-height: 1.2;
  }
  h3 {
    font-size: 1.1rem !important;
  }
  h4 {
    font-size: 1rem !important;
  }

  p {
    line-height: 1.6;
    margin-bottom: 0.75rem;
  }

  /* Remove large padding for sections */
  .section-margin {
    padding: 1.5rem 0;
  }
  .section-padding--small {
    padding: 1.5rem 0;
  }
  .pb-85px {
    padding-bottom: 1.5rem !important;
  }

  /* Container padding */
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* Buttons */
  .button {
    padding: 0.6rem 1rem !important;
    font-size: 14px !important;
    min-height: auto;
  }

  .button-header {
    margin: 0 !important;
  }

  /* Forms */
  .form-control,
  .form-group input,
  .form-group textarea {
    font-size: 16px !important; /* Prevents zoom on iOS */
    padding: 0.75rem !important;
    border-radius: 0.25rem;
  }

  .form-group textarea {
    min-height: 100px;
  }

  /* Cards */
  .card {
    margin-bottom: 1rem;
  }
  .card-feature {
    padding: 1rem;
  }

  /* Hero Banner */
  .hero-banner {
    padding: 1rem 0;
  }
  .hero-banner__content {
    padding: 1rem 0.5rem;
  }

  /* Feature section */
  .card-feature__icon {
    font-size: 2.5rem !important;
    margin-bottom: 0.5rem;
  }

  /* Offer cards */
  .offer-single {
    margin-bottom: 0.75rem;
  }
  .offer-single__icon {
    font-size: 2.5rem !important;
  }

  /* Contact info */
  .media {
    margin-bottom: 1.5rem;
  }
  .contact-info__icon {
    font-size: 24px;
    margin-right: 1rem;
  }
  .media-body {
    flex: 1;
  }

  /* Map */
  .embed-responsive-16by9 {
    padding-bottom: 62.5%;
    min-height: 250px;
  }

  /* Navbar */
  .navbar {
    padding: 0.5rem 0;
  }
  .navbar-brand {
    font-size: 18px !important;
  }
  .navbar-nav {
    gap: 0;
  }
  .nav-link {
    padding: 0.5rem 0.75rem !important;
    font-size: 14px;
  }

  /* Remove flex column reverse on extra small */
  .flex-column-reverse {
    flex-direction: column;
  }

  /* Gap utility */
  .g-3 {
    gap: 0.75rem !important;
  }

  /* Alignment for mobile */
  .text-lg-left {
    text-align: center;
  }
  .text-center {
    text-align: center;
  }

  /* Spacing utilities */
  .mb-30px {
    margin-bottom: 1rem;
  }
  .pt-5 {
    padding-top: 1rem !important;
  }
  .pb-4 {
    padding-bottom: 1rem !important;
  }

  /* Images */
  img.img-fluid {
    max-width: 100%;
    height: auto;
    display: block;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767px) {
  .section-margin {
    padding: 2rem 0;
  }
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.75rem;
  }

  .card-feature {
    padding: 1.25rem;
  }
  .button {
    padding: 0.7rem 1.25rem !important;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991px) {
  .card-feature {
    padding: 1.5rem;
  }
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
  /* Increase button size for touch */
  .button {
    min-height: 44px;
    padding: 0.75rem 1.5rem !important;
  }

  /* Increase clickable area for links */
  a {
    padding: 0.25rem 0;
  }

  /* Better spacing for form inputs on mobile */
  .form-control {
    margin-bottom: 1rem;
    padding: 0.875rem !important;
  }

  /* Remove hover effects on touch devices */
  .button:hover {
    transform: none;
  }
}

/* Landscape orientation adjustments */
@media (max-height: 600px) {
  .section-margin {
    padding: 1rem 0;
  }
  .section-padding--small {
    padding: 1rem 0;
  }
}

/* Prevent text zoom on input focus in iOS */
@media (max-width: 767px) {
  input,
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* Flexible Grid for Mobile */
@media (max-width: 576px) {
  .row {
    margin-left: -0.375rem;
    margin-right: -0.375rem;
  }
  .col,
  [class*="col-"] {
    padding-left: 0.375rem;
    padding-right: 0.375rem;
  }

  /* Stack cards vertically */
  .col-md-6,
  .col-lg-4,
  .col-lg-5,
  .col-lg-6,
  .col-lg-7,
  .col-lg-9 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Smooth scrolling for mobile */
html {
  scroll-behavior: smooth;
}

/* Better focus styles for accessibility */
@media (prefers-reduced-motion: no-preference) {
  * {
    scroll-behavior: smooth;
  }
}

/* Loading states for better UX */
button[type="submit"]:active {
  transform: scale(0.98);
}
a:active {
  opacity: 0.8;
}

/* Prevent double tap delay */
@media (hover: none) {
  button,
  a,
  input {
    -webkit-tap-highlight-color: transparent;
  }
}
