/* ============================================================
   MOBILE RESPONSIVE ENHANCEMENTS
   ============================================================ */

/* Ensure proper viewport handling */
@-webkit-viewport { width: device-width; scale: 1; }
@-moz-viewport { width: device-width; scale: 1; }
@-ms-viewport { width: device-width; scale: 1; }
@-o-viewport { width: device-width; scale: 1; }
@viewport { width: device-width; scale: 1; }

/* Base mobile optimizations */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Prevent horizontal scroll */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Improve form inputs on mobile */
input, textarea, select, button {
  font-size: 16px !important; /* Prevents iOS zoom on focus */
}

/* Hero Section Mobile */
@media (max-width: 480px) {
  .hero-section {
    min-height: 100vh;
    padding: 60px 0 40px;
  }
  
  .hero-content {
    padding: 80px 16px 60px;
  }
  
  .hero-badge {
    padding: 8px 16px;
    font-size: 0.75rem;
  }
  
  .hero-headline {
    font-size: 1.75rem !important;
    line-height: 1.2;
    margin-bottom: 16px;
  }
  
  .hero-subheading {
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 24px;
  }
  
  .hero-cta-group {
    flex-direction: column;
    gap: 12px;
  }
  
  .hero-cta-group .btn {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
    font-size: 0.9375rem;
  }
  
  .hero-trust {
    flex-direction: column;
    gap: 8px;
  }
  
  .trust-divider {
    display: none;
  }
  
  .trust-item {
    font-size: 0.8125rem;
  }
  
  .scroll-indicator {
    bottom: 20px;
  }
  
  .scroll-indicator span {
    display: none;
  }
}

/* About Section Mobile */
@media (max-width: 480px) {
  .about-section {
    padding: 60px 0;
  }
  
  .about-intro {
    font-size: 1rem;
  }
  
  .about-features {
    gap: 16px;
  }
  
  .about-feature-item {
    gap: 12px;
  }
  
  .feature-icon-wrap {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .feature-text h5 {
    font-size: 0.9375rem;
  }
  
  .feature-text p {
    font-size: 0.875rem;
  }
  
  .about-image-wrapper {
    margin-top: 32px;
  }
  
  .about-image {
    height: 250px;
  }
  
  .stats-row {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px;
  }
  
  .stat-item {
    flex: 0 0 calc(50% - 8px);
    min-width: auto;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .stat-suffix {
    font-size: 1rem;
  }
  
  .stat-label {
    font-size: 0.6875rem;
  }
  
  .stat-divider {
    display: none;
  }
}

/* Services Section Mobile */
@media (max-width: 480px) {
  .services-section {
    padding: 60px 0;
  }
  
  .service-card {
    margin-bottom: 0;
  }
  
  .service-card-inner {
    padding: 20px;
  }
  
  .service-icon-wrap {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }
  
  .service-title {
    font-size: 1.125rem;
  }
  
  .service-desc {
    font-size: 0.875rem;
  }
  
  /* Service Modals Mobile */
  .service-modal .modal-content {
    margin: 8px;
    border-radius: 12px;
  }
  
  .service-modal .modal-header {
    padding: 16px;
    flex-wrap: wrap;
  }
  
  .service-modal .modal-icon-wrap {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .service-modal .modal-title {
    font-size: 1.125rem;
    flex: 1;
  }
  
  .service-modal .modal-body {
    padding: 16px;
  }
  
  .service-modal .modal-footer {
    padding: 12px 16px;
  }
}

/* Industries Section Mobile */
@media (max-width: 480px) {
  .industries-section {
    padding: 60px 0;
  }
  
  .industry-card {
    margin-bottom: 16px;
  }
  
  .industry-card-img {
    height: 160px;
  }
  
  .industry-card-body {
    padding: 16px;
  }
  
  .industry-card-body h4 {
    font-size: 1.0625rem;
  }
  
  .industry-card-body p {
    font-size: 0.875rem;
  }
  
  .industry-feature-banner {
    margin-top: 32px;
  }
  
  .industry-banner-img {
    min-height: 200px;
  }
  
  .industry-banner-content {
    padding: 24px 16px;
  }
  
  .industry-banner-content h3 {
    font-size: 1.25rem;
  }
  
  .banner-stats {
    flex-wrap: wrap;
    gap: 16px;
  }
  
  .banner-stats li {
    flex: 0 0 calc(50% - 8px);
  }
  
  .banner-stats strong {
    font-size: 1.25rem;
  }
}

/* Divisions Section Mobile */
@media (max-width: 480px) {
  .divisions-section {
    padding: 60px 0;
  }
  
  .division-card {
    padding: 20px;
    margin-bottom: 16px;
  }
  
  .division-icon {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }
  
  .division-title {
    font-size: 1.125rem;
  }
  
  .division-desc {
    font-size: 0.875rem;
  }
}

/* Testimonials Section Mobile */
@media (max-width: 480px) {
  .testimonials-section {
    padding: 60px 0;
  }
  
  .testimonial-card {
    padding: 24px 16px;
  }
  
  .testimonial-quote-icon {
    font-size: 3rem;
    top: 16px;
    left: 16px;
  }
  
  .testimonial-text {
    font-size: 0.9375rem;
    line-height: 1.6;
  }
  
  .testimonial-author {
    flex-direction: column;
    text-align: center;
  }
  
  .author-info {
    text-align: center;
  }
  
  .carousel-controls {
    margin-top: 24px;
    gap: 12px;
  }
  
  .carousel-control-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .client-logos {
    margin-top: 40px;
  }
  
  .logos-track {
    gap: 24px;
  }
  
  .logo-item span {
    font-size: 0.875rem;
  }
}

/* Contact Section Mobile */
@media (max-width: 480px) {
  .contact-section {
    padding: 60px 0;
  }
  
  .contact-info-panel,
  .contact-form-panel {
    padding: 20px 16px;
  }
  
  .contact-info-title {
    font-size: 1.25rem;
  }
  
  .contact-info-desc {
    font-size: 0.9375rem;
  }
  
  .contact-info-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .form-label {
    font-size: 0.8125rem;
  }
  
  .form-control,
  .form-select {
    padding: 12px;
    font-size: 0.9375rem;
  }
  
  .btn-submit {
    padding: 14px 24px;
    font-size: 0.9375rem;
  }
}

/* Footer Mobile */
@media (max-width: 480px) {
  .main-footer {
    padding: 48px 0 0;
  }
  
  .footer-about {
    margin-bottom: 24px;
  }
  
  .footer-desc {
    font-size: 0.875rem;
  }
  
  .footer-heading {
    font-size: 0.9375rem;
    margin-bottom: 16px;
  }
  
  .footer-links ul li {
    margin-bottom: 8px;
  }
  
  .footer-links a {
    font-size: 0.875rem;
  }
  
  .footer-contact-list li {
    margin-bottom: 12px;
  }
  
  .footer-contact-list span {
    font-size: 0.875rem;
  }
  
  .footer-bottom {
    margin-top: 32px;
    padding: 16px 0;
  }
  
  .copyright {
    font-size: 0.75rem;
    text-align: center;
    margin-bottom: 8px;
  }
  
  .footer-legal {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .footer-legal a {
    font-size: 0.75rem;
  }
}

/* Chat Widget Mobile */
@media (max-width: 480px) {
  .chat-toggle-btn {
    bottom: 16px;
    right: 16px;
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  .chat-window {
    bottom: 76px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    height: calc(100vh - 100px);
    border-radius: 16px;
  }
  
  .chat-header {
    padding: 12px 16px;
  }
  
  .chat-avatar .avatar-circle {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  
  .chat-header-text h4 {
    font-size: 0.9375rem;
  }
  
  .chat-header-text .status-text {
    font-size: 0.6875rem;
  }
  
  .chat-messages {
    padding: 12px;
  }
  
  .message {
    max-width: 90%;
  }
  
  .message-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
  
  .message-content {
    padding: 10px 12px;
  }
  
  .message-content p {
    font-size: 0.875rem;
  }
  
  .quick-suggestions li {
    margin-bottom: 6px;
  }
  
  .quick-btn {
    padding: 8px 12px;
    font-size: 0.8125rem;
  }
  
  .chat-input-area {
    padding: 12px;
  }
  
  .chat-input {
    padding: 10px 12px;
    font-size: 0.875rem;
  }
  
  .btn-send {
    width: 40px;
    height: 40px;
  }
  
  .chat-disclaimer {
    font-size: 0.6875rem;
  }
  
  .api-key-setup {
    padding: 24px 16px;
  }
  
  .api-key-icon {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }
  
  .api-key-setup h5 {
    font-size: 1rem;
  }
  
  .api-key-setup p {
    font-size: 0.8125rem;
  }
  
  .api-key-input-group {
    max-width: 100%;
  }
}

/* Scroll to Top Button Mobile */
@media (max-width: 480px) {
  .scroll-to-top-btn {
    bottom: 80px;
    left: 16px;
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }
}

/* Navbar Mobile */
@media (max-width: 480px) {
  #mainNavbar {
    padding: 8px 0;
  }
  
  #mainNavbar.scrolled {
    padding: 8px 0;
  }
  
  .brand-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  
  .brand-text {
    font-size: 1.25rem;
  }

  .brand-logo {
    max-height: 44px;
    width: auto;
  }
  
  .btn-cta-nav {
    padding: 8px 16px;
    font-size: 0.8125rem;
  }
}

/* Section Titles Mobile */
@media (max-width: 480px) {
  .section-label {
    font-size: 0.75rem;
  }
  
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
  }
  
  .section-subtitle {
    font-size: 0.9375rem;
  }
}

/* Scroll Progress Bar Mobile */
@media (max-width: 480px) {
  #scroll-progress-bar {
    height: 2px;
  }
}

/* Fix for iOS Safari 100vh issue */
@supports (-webkit-touch-callout: none) {
  .hero-section {
    min-height: -webkit-fill-available;
  }
}

/* Landscape mode optimizations */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    min-height: auto;
    padding: 80px 0 40px;
  }
  
  .hero-headline {
    font-size: 1.5rem;
  }
  
  .hero-subheading {
    font-size: 0.875rem;
    margin-bottom: 16px;
  }
  
  .hero-cta-group {
    flex-direction: row;
    gap: 8px;
  }
  
  .hero-cta-group .btn {
    padding: 10px 16px;
    font-size: 0.8125rem;
  }
  
  .scroll-indicator {
    display: none;
  }
}
