/* Mobile and Tablet Optimizations */

/* Base Mobile Styles */
@media (max-width: 767px) {
  /* Typography Adjustments */
  h1 {
    font-size: 2rem !important;
    line-height: 1.3 !important;
  }
  
  h2 {
    font-size: 1.75rem !important;
    line-height: 1.3 !important;
  }
  
  h3 {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
  }
  
  .lead {
    font-size: 1rem !important;
    line-height: 1.5 !important;
  }
  
  /* Navigation */
  .navbar-brand {
    font-size: 1.5rem !important;
    padding: 0.5rem 0 !important;
  }
  
  .navbar {
    padding: 0.25rem 0 !important;
  }
  
  .navbar-nav {
    display: flex !important;
    flex-direction: column !important;
    width: 100%;
  }
  
  .navbar-nav .nav-item {
    width: 100%;
  }
  
  .navbar-nav .nav-link {
    width: 100%;
    text-align: left;
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
  }
  
  .navbar-nav .nav-link.active {
    border-bottom: none !important;
    background: #f0f4fa !important;
    color: #0066FF !important;
  }
  
  .navbar-collapse {
    background: #fff !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    border-radius: 0 0 15px 15px;
    margin-top: 0.5rem;
  }
  
  /* Remove large underline on nav links */
  .navbar-nav .nav-link {
    border-bottom: none !important;
  }
  
  /* Reduce top margin on first section */
  section#home, section.hero {
    margin-top: 0 !important;
    padding-top: 3.5rem !important;
  }

  .hero {
    height: auto !important;
    min-height: auto !important;
  }
  
  /* Remove excess whitespace */
  section {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
  
  .navbar-toggler {
    padding: 0.5rem !important;
  }
  
  .navbar-collapse {
    padding: 1rem !important;
  }
  
  .nav-link {
    font-size: 1rem !important;
    padding: 0.75rem 1rem !important;
  }
  
  /* Hero Section */
  .slider-item {
    min-height: 500px !important;
  }
  
  .slider-item .text {
    padding: 2rem 1rem !important;
  }
  
  .slider-item h1 {
    font-size: 2rem !important;
    margin-bottom: 1rem !important;
  }
  
  .slider-item .lead {
    font-size: 1rem !important;
    margin-bottom: 1.5rem !important;
  }
  
  /* Services Section */
  .service-card {
    padding: 1.5rem !important;
    margin-bottom: 1rem !important;
  }
  
  .service-card h4 {
    font-size: 1.25rem !important;
    margin-bottom: 0.75rem !important;
  }
  
  .service-card p {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
  }
  
  /* Testimonials */
  .testimony-wrap {
    padding: 1.5rem !important;
    margin: 1rem !important;
  }
  
  .testimony-wrap .user-img {
    width: 60px !important;
    height: 60px !important;
    font-size: 1.5rem !important;
  }
  
  /* Contact Form */
  .contact-form {
    padding: 1.5rem !important;
  }
  
  .form-control {
    font-size: 1rem !important;
    padding: 0.75rem !important;
  }
  
  .btn {
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
  }
}

/* iPad and Tablet Styles */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Typography */
  h1 {
    font-size: 2.25rem !important;
  }
  
  h2 {
    font-size: 1.875rem !important;
  }
  
  h3 {
    font-size: 1.625rem !important;
  }
  
  .lead {
    font-size: 1.125rem !important;
  }
  
  /* Layout Adjustments */
  .container {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }
  
  /* Service Cards */
  .service-card {
    padding: 2rem !important;
  }
  
  /* Testimonials */
  .testimony-wrap {
    padding: 2rem !important;
  }
  
  /* Gallery */
  .gallery-item {
    margin: 0.5rem !important;
  }
  
  .gallery-item a {
    aspect-ratio: 4/3 !important;
  }
}

/* iPhone 14 Pro Max Specific Optimizations */
@media only screen 
  and (device-width: 428px) 
  and (device-height: 926px) 
  and (-webkit-device-pixel-ratio: 3) {
  
  /* Typography */
  h1 {
    font-size: 1.875rem !important;
  }
  
  h2 {
    font-size: 1.625rem !important;
  }
  
  .lead {
    font-size: 0.9375rem !important;
  }
  
  /* Navigation */
  .navbar-brand {
    font-size: 1.375rem !important;
  }
  
  /* Hero Section */
  .slider-item {
    min-height: 450px !important;
  }
  
  .slider-item .text {
    padding: 1.5rem 1rem !important;
  }
  
  /* Service Cards */
  .service-card {
    padding: 1.25rem !important;
  }
  
  .service-card h4 {
    font-size: 1.125rem !important;
  }
  
  /* Contact Form */
  .contact-form {
    padding: 1.25rem !important;
  }
  
  .form-control {
    font-size: 0.9375rem !important;
  }
}

/* Common Mobile Optimizations */
@media (max-width: 1024px) {
  /* Spacing */
  .section-padding {
    padding: 3rem 0 !important;
  }
  
  /* Images */
  img {
    max-width: 100% !important;
  }
  
  /* Buttons */
  .btn {
    width: auto !important;
    white-space: normal !important;
  }
  
  /* Cards */
  .card {
    margin-bottom: 1.5rem !important;
  }
  
  /* Footer */
  .footer {
    padding: 3rem 0 1.5rem !important;
  }
  
  .footer h3 {
    font-size: 1.25rem !important;
    margin-bottom: 1rem !important;
  }
}

/* Google Translate Mobile Styles */
@media (max-width: 768px) {
    .google-translate-container {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 40px);
        max-width: 300px;
        background: rgba(255, 255, 255, 0.98);
        border-radius: 15px;
        padding: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(0, 0, 0, 0.05);
        z-index: 1031;
    }

    .translate-wrapper {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
    }

    .translate-wrapper i {
        font-size: 1.4rem;
        color: var(--primary-blue);
    }

    .goog-te-gadget .goog-te-combo {
        width: 100%;
        padding: 8px 15px;
        font-size: 15px;
        border-radius: 12px;
        border: 1px solid #ddd;
        background-color: white;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        cursor: pointer;
    }

    /* Ensure the dropdown is visible and properly styled on mobile */
    .goog-te-menu-frame {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
        border-radius: 12px !important;
        margin-top: 10px !important;
    }

    .goog-te-menu2 {
        border-radius: 12px !important;
        overflow: hidden !important;
    }

    .goog-te-menu2-item {
        padding: 12px 15px !important;
        font-size: 15px !important;
    }

    .goog-te-menu2-item:hover {
        background-color: rgba(0, 102, 255, 0.1) !important;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .google-translate-container {
        bottom: 15px;
        width: auto;
        padding: 10px;
    }

    .translate-wrapper i {
        font-size: 1.2rem;
    }

    .goog-te-gadget .goog-te-combo {
        padding: 6px 12px;
        font-size: 14px;
    }
}

/* Landscape Mode */
@media (max-height: 500px) and (orientation: landscape) {
    .google-translate-container {
        top: 10px;
        bottom: auto;
        right: 10px;
        left: auto;
        width: auto;
        transform: none;
    }
} 