/* =========================================================
   NEO-NIR – MOBILE HERO OPTIMISATION (v2)
   ONLY reduces banner HEIGHT – navigation width stays normal
   Animations remain untouched
   ========================================================= */

/* ---------------------------------------------------------
   HERO / BANNER – reduce HEIGHT only
   --------------------------------------------------------- */
@media (max-width: 767.98px) {

  /* Let the slide size to content + reasonable max */
  .tj-slider-section {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .tj-slider-section .hero-slider,
  .tj-slider-section .hero-slider .swiper-wrapper {
    height: auto !important;
    min-height: 0 !important;
  }

  .tj-slider-section .hero-slider .swiper-slide.tj-slider-item {
    height: auto !important;
    min-height: 0 !important;
    max-height: 100dvh !important;   /* never taller than screen */
    max-height: 100svh !important;
  }

  /* Much smaller vertical padding – this is the main height fix */
  .tj-slider-section .hero-slider .swiper-slide .slider-wrapper {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 100px 20px 70px !important;   /* reduced from 170/280 */
    box-sizing: border-box !important;
  }

  .tj-slider-section .hero-slider .swiper-slide .slider-content {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Title – readable size, not huge */
  .tj-slider-section .hero-slider .slider-title {
    font-size: 30px !important;
    line-height: 1.18 !important;
    letter-spacing: -0.6px !important;
    margin-bottom: 12px !important;
  }

  /* Description */
  .tj-slider-section .hero-slider .slider-desc {
    font-size: 14.5px !important;
    line-height: 1.45 !important;
    margin-bottom: 18px !important;
    max-width: 100% !important;
  }

  /* Button – full width, good tap size */
  .tj-slider-section .hero-slider .slider-btn {
    width: 100% !important;
  }

  .tj-slider-section .hero-slider .slider-btn a.tj-primary-btn {
    display: flex !important;
    width: 100% !important;
    min-height: 50px !important;
    padding: 12px 18px !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }

  .tj-slider-section .hero-slider .slider-btn .btn-text span {
    font-size: 14px !important;
    line-height: 1.3 !important;
    white-space: normal !important;
  }

  .tj-slider-section .hero-slider .slider-btn .btn-icon {
    flex: 0 0 34px !important;
    width: 34px !important;
    height: 34px !important;
  }
}

/* Very small phones */
@media (max-width: 389.98px) {
  .tj-slider-section .hero-slider .slider-title {
    font-size: 26px !important;
  }
  .tj-slider-section .hero-slider .slider-desc {
    font-size: 13.5px !important;
  }
  .tj-slider-section .hero-slider .swiper-slide .slider-wrapper {
    padding: 90px 16px 60px !important;
  }
}

/* Landscape phones */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
  .tj-slider-section .hero-slider .swiper-slide .slider-wrapper {
    padding: 60px 20px 50px !important;
  }
  .tj-slider-section .hero-slider .slider-title {
    font-size: 24px !important;
    margin-bottom: 8px !important;
  }
  .tj-slider-section .hero-slider .slider-desc {
    font-size: 13px !important;
    margin-bottom: 12px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* ---------------------------------------------------------
   HEADER / NAV – restore comfortable size
   (do NOT shrink the logo or make the bar narrow)
   --------------------------------------------------------- */
@media (max-width: 991.98px) {
  .header-area.header-2 .header-wrapper {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  /* Keep logo at a good readable size */
  .header-area .site_logo img {
    max-width:90px !important;   /* was reduced too much before */
    height: auto !important;
  }

  .header-area .mobile_menu_bar {
    width: 46px !important;
    height: 46px !important;
  }
}

/* ---------------------------------------------------------
   Optional light homepage polish (height only)
   --------------------------------------------------------- */
@media (max-width: 767.98px) {
  .tj-client-section .client-content.style-2 .sec-title {
    font-size: 26px !important;
    line-height: 1.25 !important;
  }

  .case-study-section .case-study-card {
    min-height: 380px !important;
  }
}

/* =========================================================
   FIX: Button text appearing twice on mobile
   Disable the text-shadow slide animation on small screens
   ========================================================= */
@media (max-width: 767.98px) {

  .tj-primary-btn .btn-text {
    overflow: hidden !important;
  }

  .tj-primary-btn .btn-text span {
    text-shadow: none !important;          /* removes the duplicate text */
    transform: none !important;
    display: block !important;
    line-height: 1.3 !important;
  }

  /* Keep hover clean */
  .tj-primary-btn:hover .btn-text span {
    transform: none !important;
  }
}

/* Neo-Nir: focused mobile corrections for homepage only.
   Append to assets/css/neo-nir-mobile-optim.css. */
@media (max-width: 767.98px) {
  /* Hero: all 4 slides, prevent long words spilling off screen */
  body .tj-slider-section .hero-slider .swiper-slide .slider-content .slider-title {
    font-size: clamp(24px, 7vw, 30px) !important;
    line-height: 1.16 !important;
    letter-spacing: -0.5px !important;
    max-width: 100% !important;
    overflow-wrap: break-word;
    word-break: normal;
  }
  body .tj-slider-section .hero-slider .swiper-slide .slider-content {
    min-width: 0 !important;
    max-width: 100% !important;
  }
  /* Hero button: suppress theme's text-shadow duplicate and hover shift */
  body .tj-slider-section .hero-slider .slider-btn .tj-primary-btn .btn-text {
    overflow: hidden !important;
    min-width: 0 !important;
    flex: 1 1 auto;
    text-align: left;
  }
  body .tj-slider-section .hero-slider .slider-btn .tj-primary-btn .btn-text span,
  body .tj-slider-section .hero-slider .slider-btn .tj-primary-btn:hover .btn-text span {
    text-shadow: none !important;
    -webkit-transform: none !important;
    transform: none !important;
    -webkit-transition: none !important;
    transition: none !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
  /* About Us: stack text and photo, both full width */
  body .tj-about-section .about-content-area-2 {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 20px !important;
  }
  body .tj-about-section .about-content-area-2 .about-content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-inline: 0 !important;
  }
  body .tj-about-section .about-content-area-2 .video-img {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  body .tj-about-section .about-content-area-2 .video-img img {
    display: block;
    width: 100%;
    height: 300px;
    max-width: 100%;
    object-fit: cover;
  }
}



/* CLIENT LOGO SLIDER - MOBILE ONLY */

@media screen and (max-width: 575px) {

    .tj-client-section .client-slider .swiper-slide.client-item {
        width: 150px !important;
        margin-right: 12px !important;
    }

    .tj-client-section .client-slider .client-logo {
        width: 100%;
        padding: 12px 8px;
    }

    .tj-client-section .client-slider .client-logo img {
        width: 85%;
        max-width: 130px;
        height: auto;
        object-fit: contain;
    }

}
