/* ============================================================
   Mobile Optimization Enhancements
   Enhanced responsive design and performance tweaks
   ============================================================ */

/* ---- Tech Stack Logo Responsive Sizing ---- */
.tech-stack-logo {
  width: 100px;
  height: 100px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Scale larger logos proportionally */
.tech-stack-item:nth-child(7) .tech-stack-logo,
.tech-stack-item:nth-child(8) .tech-stack-logo,
.tech-stack-item:nth-child(9) .tech-stack-logo,
.tech-stack-item:nth-child(10) .tech-stack-logo {
  width: 150px;
  height: 150px;
}

/* ---- Video Background Mobile Optimization ---- */
@media (max-width: 1024px) {
  .body-overlay {
    display: none !important;
  }
}

/* ---- Form Mobile Optimization ---- */
@media (max-width: 767px) {
  .fiel-mail,
  .fiel-phone,
  .fiel-text {
    margin-bottom: 16px;
  }

  input[type="email"],
  input[type="tel"],
  textarea {
    min-height: 44px;
    font-size: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    -webkit-appearance: none;
    appearance: none;
  }

  textarea {
    min-height: 120px;
    resize: vertical;
  }

  .pricing-list.list-choose {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 20px 0;
  }

  .pricing-list.list-choose .item {
    width: 100%;
    padding: 12px 16px;
    text-align: center;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
  }

  .bot-btn.send-wrap button {
    min-height: 48px;
    font-size: 16px;
    
  }
}

/* ---- Right Navigation Mobile Optimization ---- */
@media (max-width: 1150px) {
  .right-nav {
    bottom: 20px;
    right: 20px;
  }

  .right-nav a {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  .right-nav .tooltip {
    display: none;
  }
}

/* ---- Left Sidebar Mobile Optimization ---- */
@media (max-width: 767px) {
  .left-sidebar {
    position: relative;
    margin-bottom: 30px;
    max-width: 100%;
    padding: 20px 15px;
    left: auto;
    top: auto;
    transform: none;
  }

  .left-sidebar .image {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
  }

  .left-sidebar .image .avatar {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 0;
    max-width: 200px;
    width: 100%;
    height: auto;
  }

  .left-sidebar .image .avatar img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .left-sidebar .bot-button {
    min-height: 48px;
    width: 100%;
  }
}

/* ---- Text Sizing Improvements for Mobile ---- */
@media (max-width: 767px) {
  h1,
  .h1 {
    font-size: 32px !important;
    line-height: 40px !important;
  }

  h2,
  .h2 {
    font-size: 24px !important;
    line-height: 32px !important;
  }

  .text-display-2 {
    font-size: 32px !important;
    line-height: 40px !important;
  }

  .text-body-1 {
    font-size: 15px;
    line-height: 24px;
  }

  .text-body-2 {
    font-size: 14px;
    line-height: 22px;
  }
}

/* ---- Touch Target Optimization ---- */
@media (max-width: 991px) {
  a,
  button,
  .btn-links,
  .scroll-to,
  [role="button"] {
    min-width: 44px;
    min-height: 44px;
    padding: 12px 16px;
  }

  .accordion-head {
    padding: 16px 12px;
    min-height: 48px;
  }
}

/* ---- Image Optimization for Mobile ---- */
@media (max-width: 767px) {
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }

  .works-item .image img {
    min-height: 280px;
    object-fit: cover;
  }

  .slider-playground .swiper-slide img,
  .slider-partners .swiper-slide img {
    width: 100%;
    height: auto;
  }
}

/* ---- Banner Slider Mobile ---- */
@media (max-width: 767px) {
  .banner-slider {
    margin-bottom: 20px;
  }

  .banner-text {
    font-size: 24px !important;
    line-height: 32px !important;
  }
}

/* ---- Services Accordion Mobile ---- */
@media (max-width: 767px) {
  .services-wrap .heading {
    flex-direction: column;
    gap: 12px;
  }

  .services-wrap .heading .icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .services-wrap .heading .title {
    font-size: 20px !important;
  }

  .accordion-head {
    padding: 16px 12px;
  }

  .list-text {
    padding: 12px;
    gap: 8px;
  }
}

/* ---- Indicators Mobile ---- */
@media (max-width: 767px) {
  .indicators-wrap {
    flex-direction: column;
    gap: 20px;
  }

  .indicators-item {
    width: 100%;
  }

  .indicators-title {
    font-size: 14px;
  }

  .odometer {
    font-size: 32px !important;
  }
}

/* ---- Pricing Table Mobile ---- */
@media (max-width: 767px) {
  .pricing-item {
    margin-bottom: 20px;
  }

  .pricing-item .top {
    padding: 20px 15px;
  }

  .pricing-item .top .title {
    font-size: 18px;
  }

  .pricing-item .top .price .number {
    font-size: 32px !important;
  }

  .pricing-item .list-desc {
    padding: 0 15px 20px;
  }

  .menu-tab {
    flex-wrap: wrap;
    gap: 8px;
  }

  .menu-tab .item {
    flex: 1;
    min-width: 170px;
    padding: 10px 12px;
    font-size: 14px;
    text-align: center;
  }
}

/* ---- FAQ Accordion Mobile ---- */
@media (max-width: 767px) {
  .accordion-head {
    padding: 14px 12px;
    font-size: 14px;
    line-height: 20px;
  }

  .accordion-head .icon {
    width: 24px;
    height: 24px;
  }

  .accordion-collapse {
    padding: 12px;
  }

  .accordion-collapse p,
  .accordion-collapse ul {
    font-size: 14px;
    line-height: 22px;
  }

  .accordion-collapse ul {
    margin-left: 16px;
  }

  .accordion-collapse ul li {
    margin-bottom: 12px;
  }
}

/* ---- Contact Form Mobile ---- */
@media (max-width: 767px) {
  .section-contact-inner {
    padding: 20px 15px 30px;
  }

  .section-contact-inner .heading {
    margin-bottom: 24px;
    font-size: 28px;
    line-height: 36px;
  }

  .form-contact {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .form-contact fieldset {
    margin-bottom: 0;
  }

  .form-contact label {
    font-size: 13px;
    margin-bottom: 6px;
    display: block;
  }

  .form-contact input,
  .form-contact textarea {
    width: 100%;
  }
}

/* ---- Swiper Carousel Mobile ---- */
@media (max-width: 767px) {
  .swiper-slide {
    padding: 0 8px;
  }

  .slider-process .swiper-slide {
    margin-right: 8px;
  }

  .process-item {
    padding: 20px 15px;
  }

  .process-item .content {
    gap: 12px;
  }

  .process-item .image {
    display: none;
  }
}

/* ---- Safe Area Support for Notch Devices ---- */
@supports (padding: max(0px)) {
  @media (max-width: 767px) {
    body {
      padding-left: max(12px, env(safe-area-inset-left));
      padding-right: max(12px, env(safe-area-inset-right));
    }

    .left-sidebar {
      padding-left: max(20px, env(safe-area-inset-left));
    }

    .right-nav {
      right: max(20px, env(safe-area-inset-right));
      bottom: max(20px, env(safe-area-inset-bottom));
    }
  }
}

/* ---- High Contrast Mode Support ---- */
@media (prefers-contrast: more) {
  input,
  textarea,
  button {
    border-width: 2px;
  }

  .right-nav a {
    border: 2px solid currentColor;
  }
}

/* ---- Reduced Motion Support ---- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .body-overlay {
    animation: none;
  }
}

/* ---- Landscape Orientation Optimization ---- */
@media (max-height: 600px) and (orientation: landscape) {
  .section-hero {
    padding: 20px 0 40px;
  }

  .left-sidebar {
    margin-bottom: 20px;
  }

  .indicators-wrap {
    flex-direction: row;
    gap: 30px;
  }

  .main-title {
    margin-bottom: 30px;
  }

  h1 {
    font-size: 28px !important;
    line-height: 32px !important;
  }
}

/* ---- Print Optimization ---- */
@media print {
  .right-nav,
  .left-sidebar,
  .bot-button,
  video.body-overlay {
    display: none !important;
  }

  body {
    background-color: white;
  }
}
