/**
 * Vidratek mobile redesign (≤767px)
 * Goals: readable hierarchy, consistent spacing, safe overflow,
 * usable tap targets, SEO-visible H1, lighter carousels.
 */

@media (max-width: 767.98px) {
  /* ---------- Global shell ---------- */
  html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
  }

  body {
    overflow-x: clip;
  }

  .container,
  .container-fluid {
    padding-left: 16px !important;
    padding-right: 16px !important;
    max-width: 100% !important;
  }

  img,
  video,
  iframe,
  svg {
    max-width: 100%;
    height: auto;
  }

  /* Undo Elementor desktop “bleed” margins that break mobile */
  .elementor-15 .elementor-element.elementor-element-f410517 > .elementor-widget-container,
  .elementor-15 .elementor-element.elementor-element-3f7062a > .elementor-widget-container {
    margin: 0 !important;
    padding: 0 !important;
    background-image: none !important;
  }

  .elementor-15 .elementor-element.elementor-element-18696f4,
  .elementor-15 .elementor-element.elementor-element-cb61b4b,
  .elementor-15 .elementor-element.elementor-element-2d95d43 {
    border: 0 !important;
    box-shadow: none !important;
    --padding-top: 0px !important;
    --padding-bottom: 0px !important;
  }

  .elementor-15 .elementor-element.elementor-element-d2dce3d {
    --padding-top: 48px !important;
  }

  /* Show the hero on mobile (was elementor-hidden-mobile) — critical for SEO H1 */
  .elementor .elementor-hidden-mobile.elementor-widget-hero-banner,
  .elementor .elementor-hidden-mobile.elementor-widget-hero-banner .elementor-widget-container {
    display: block !important;
  }

  /* ---------- Header / meanmenu ---------- */
  .top-header-area {
    display: none !important;
  }

  .mobile-menu-area {
    background: #050a1e;
  }

  .mean-container .mean-bar {
    background: #050a1e !important;
    padding: 10px 16px !important;
    min-height: 56px;
    /* Theme forces content-box on the bar: width 100% + side padding
       overflowed the viewport (cutting the hamburger) and the 56px
       min-height + vertical padding left a 20px dead strip below. */
    box-sizing: border-box !important;
    width: 100% !important;
  }

  /* Same height and vertical alignment as the EN/VI language buttons. */
  .mean-container a.meanmenu-reveal {
    top: 14px !important;
    right: 12px !important;
    width: 40px !important;
    height: 36px !important;
    padding: 0 9px !important;
    box-sizing: border-box;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
  }

  .mean-container a.meanmenu-reveal span {
    height: 2px !important;
    margin: 2px 0 !important;
  }

  .mobile-lang-switcher {
    top: 10px !important;
    right: 64px !important;
  }

  .mobile-lang-switcher .lang-btn {
    min-width: 40px;
    height: 36px !important;
    font-size: 13px;
  }

  /* ---------- Typography scale ---------- */
  h1,
  .hero-contant h1,
  .hero-area.style-three .hero-contant h1,
  .hero-area.style-three .hero-contant h1 span {
    font-size: clamp(1.5rem, 6.2vw, 1.875rem) !important;
    line-height: 1.25 !important;
    word-break: break-word;
  }

  h2,
  .section-main-title,
  h2.section-main-title {
    font-size: clamp(1.35rem, 5.5vw, 1.75rem) !important;
    line-height: 1.3 !important;
    word-break: break-word;
  }

  h3,
  .service-title,
  .faq-title,
  .cs_accordian_head {
    font-size: 1.05rem !important;
    line-height: 1.4 !important;
  }

  p,
  .section-title-descr,
  .section-title-descr p,
  .testi-text,
  .faq-description,
  .about-text p,
  .service-des,
  .service-des p {
    font-size: 0.95rem !important;
    line-height: 1.65 !important;
    color: #4a4f5c;
  }

  span.section-sub-title {
    font-size: 12px !important;
    line-height: 1.2 !important;
    padding: 5px 14px !important;
    margin-bottom: 14px !important;
    max-width: 100%;
  }

  span.section-sub-title::before {
    left: -6px !important;
    width: 18px !important;
    height: 5px !important;
    top: 11px !important;
  }

  /* ---------- Section rhythm (~48–64px mobile) ---------- */
  .about-area,
  .sservice-area,
  .service-area,
  .testimonial-area,
  .faq-area,
  .contact-area,
  .blog-area,
  .team-area,
  .process-area,
  .working-proces-area {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
    overflow: hidden;
  }

  .section-title {
    margin-bottom: 28px !important;
  }

  .section-title.text-center,
  .section-title.text-left {
    text-align: left !important;
  }

  .cs_height_150,
  .cs_height_120,
  .cs_height_xl_130,
  .cs_height_xl_100,
  .cs_height_lg_80,
  .cs_height_lg_60 {
    height: 32px !important;
  }

  /* ---------- Hero (mobile-first, SEO-visible) ---------- */
  .hero-area.style-three {
    height: auto !important;
    min-height: 0 !important;
    padding: 20px 0 36px !important;
    display: block;
    align-items: stretch !important;
  }

  /* Extra slides hidden by mobile.js (avoid !important so inline/class hide works) */
  .hero-active.is-mobile-static .hero-area.is-hidden-slide {
    display: none !important;
  }

  .hero-area.style-three .container {
    padding-top: 8px;
  }

  .hero-area.style-three .row.hero {
    margin: 0;
  }

  .hero-area.style-three .row.hero > [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding-left: 0;
    padding-right: 0;
  }

  .hero-area.style-three .hero-contant {
    padding: 8px 0 0 !important;
    margin: 0 !important;
  }

  .hero-area.style-three .hero-contant .hero-eyebrow {
    /* Own line — the hero h1 is display:inline and would flow next to it. */
    display: table;
    font-size: 13px !important;
    line-height: 1.3 !important;
    margin: 0 0 10px 44px !important;
  }

  /* The theme's dash offsets (-57px/-33px) assume the desktop 58px
     indent; rescale them so both dashes stay inside the viewport. */
  .hero-area.style-three .hero-contant .hero-eyebrow::before {
    top: 6px !important;
    left: -44px !important;
    width: 14px !important;
    height: 5px !important;
  }

  .hero-area.style-three .hero-contant .hero-eyebrow::after {
    top: 6px !important;
    left: -25px !important;
    width: 19px !important;
    height: 5px !important;
  }

  .hero-area.style-three .hero-contant p {
    margin: 12px 0 20px !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .hero-area.style-three .solutek-btn {
    margin: 0 0 16px !important;
  }

  .hero-area.style-three .solutek-btn .btn-2,
  .solutek-btn .btn-2,
  .solutek-btn a.cs_btn,
  a.btn-2 {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px !important;
    font-size: 14px !important;
    border-radius: 8px;
  }

  .hero-area.style-three .hero-btn-3 {
    margin-top: 8px;
  }

  .hero-area.style-three .hero-left-side,
  .hero-area.style-three .hero-thumb-shape,
  .hero-area.style-three .hero-left-shape {
    display: none !important;
  }

  .hero-area.style-three .hero-thumb-3 {
    margin-top: 20px;
  }

  .hero-area.style-three .hero-img {
    margin-top: 0;
    max-height: 220px;
    overflow: hidden;
    border-radius: 12px;
  }

  .hero-area.style-three .hero-img img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 220px;
    object-fit: cover;
    object-position: top center;
    margin: 0 !important;
    border-radius: 12px;
  }

  .hero-area.style-three .hero-contant p {
    color: rgba(255, 255, 255, 0.82) !important;
  }

  /* Owl nav: keep usable, off content */
  .hero-active.owl-carousel .owl-nav {
    position: static;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 12px;
    padding: 0 4px;
  }

  .hero-active.owl-carousel .owl-nav button {
    position: static !important;
    transform: none !important;
    width: auto !important;
    height: 36px !important;
    min-width: 64px;
    padding: 0 14px !important;
    font-size: 12px !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
  }

  /* When JS collapses carousel to a single slide */
  .hero-active.is-mobile-static {
    display: block !important;
    width: 100%;
  }

  .hero-active.is-mobile-static .owl-nav,
  .hero-active.is-mobile-static .owl-dots {
    display: none !important;
  }

  /* ---------- About / image-text ---------- */
  .about-area .about-thumb {
    margin-bottom: 20px;
  }

  .about-area .about-thumb img {
    width: 100%;
    height: auto;
    border-radius: 12px;
  }

  .about-area .about-shape {
    display: none !important;
  }

  .about-area .about-box {
    margin: 16px 0 8px;
  }

  .about-area .solutek-btn {
    margin-top: 16px;
  }

  div.about-title {
    display: none !important;
  }

  /* ---------- Services cards ---------- */
  .sservice-area .single-service-box,
  .service-area .single-service-box {
    margin-bottom: 16px !important;
  }

  .sservice-area .service-box-inner,
  .service-area .service-box-inner {
    padding: 22px 18px !important;
  }

  /* ---------- Testimonials: stack, no clip ---------- */
  .testimonial-area {
    overflow: hidden;
  }

  .testimonial-area .section-main-title {
    color: inherit;
  }

  .testimonial-area.style-three .testi_inner.owl-carousel,
  .testimonial-area .testi_inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100% !important;
    margin: 0 !important;
    transform: none !important;
  }

  .testimonial-area .testi_inner .owl-stage-outer,
  .testimonial-area .testi_inner .owl-stage {
    transform: none !important;
    width: 100% !important;
    display: block !important;
  }

  .testimonial-area .testi_inner .owl-item {
    width: 100% !important;
    margin: 0 0 14px !important;
    float: none !important;
    opacity: 1 !important;
  }

  .testimonial-area .testi_inner .owl-nav,
  .testimonial-area .testi_inner .owl-dots {
    display: none !important;
  }

  .testimonial-area .testi-box,
  .testimonial-area .testi-single-box {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box;
  }

  .testimonial-area .testi-content {
    padding: 18px 16px !important;
  }

  .testimonial-area .testi-text {
    overflow-wrap: anywhere;
    word-break: break-word;
    color: rgba(255, 255, 255, 0.92) !important;
    font-size: 0.95rem !important;
    margin-bottom: 12px !important;
  }

  .testimonial-area .test-user-img {
    display: none !important; /* avatar often empty / decorative on mobile */
  }

  .testimonial-area .testi-icon img {
    width: 36px !important;
    height: auto !important;
    margin-bottom: 8px;
  }

  .testimonial-area.style-three .testi-single-box {
    border-radius: 14px;
  }

  /* Mobile: show max 2 cards to keep page short */
  .testimonial-area.is-mobile-compact .owl-item:nth-child(n + 3),
  .testimonial-area.is-mobile-compact .testi_inner > .col-lg-12:nth-child(n + 3) {
    display: none !important;
  }

  /* ---------- FAQ ---------- */
  .faq-area,
  .faq-area .container,
  .faq-area .row,
  .faq-area .row > [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: auto !important;
    right: auto !important;
  }

  .faq-area .row > [class*="col-"] {
    flex: 0 0 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .faq-area .section-title.text-left {
    margin-left: 0 !important;
    margin-bottom: 20px !important;
  }

  .faq-area .faq-thumb,
  .faq-area .faq-shape,
  .faq-area .faq-shape2 {
    display: none !important;
  }

  .faq-area .tab_container,
  .faq-area .feq-content {
    width: 100% !important;
    max-width: 100% !important;
  }

  .faq-area .cs_accordian {
    margin-bottom: 10px !important;
  }

  .faq-area .cs_accordian_head {
    min-height: 48px;
    padding: 14px 16px !important;
    display: flex;
    align-items: center;
  }

  .faq-area .cs_accordian_body {
    padding: 0 16px 14px !important;
  }

  /* ---------- Contact ---------- */
  .contact-area .row > [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }

  .contact-area .contact-thumb,
  .contact-area .contact-image,
  .contact-area img[class*="contact"] {
    margin-top: 24px;
    border-radius: 12px;
  }

  .contact-area input,
  .contact-area textarea,
  .contact-area select,
  .wpcf7 input,
  .wpcf7 textarea {
    min-height: 48px;
    font-size: 16px !important; /* prevents iOS zoom */
    border-radius: 10px !important;
  }

  .contact-area textarea,
  .wpcf7 textarea {
    min-height: 120px;
  }

  .contact-area .solutek-btn a,
  .contact-area input[type="submit"],
  .wpcf7-submit {
    min-height: 48px;
    width: 100%;
    border-radius: 10px !important;
  }

  /* ---------- Blog teaser cards ---------- */
  .blog-area .single-blog-box {
    margin-bottom: 18px !important;
  }

  .blog-area.style-two .single-blog-thumb img,
  .blog-area .single-blog-thumb img {
    height: 200px !important;
    width: 100% !important;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
  }

  .blog-area .blog-box-content {
    padding: 16px 14px 20px !important;
  }

  .blog-area .blog-box-content h3,
  .blog-area .blog-box-content h3 a {
    font-size: 1.05rem !important;
    line-height: 1.4 !important;
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
  }

  .blog-area .blog-button .btn-2 {
    min-height: 44px;
    padding: 10px 18px !important;
  }

  /* ---------- CTA / call bar ---------- */
  .call-do-action-area,
  .call-do-action {
    padding: 36px 16px !important;
    text-align: center;
  }

  .call-do-action a,
  .call-do-action .btn-2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 20px !important;
  }

  /* ---------- Red address bar above footer ---------- */
  /* Theme's responsive.css breaks the boxes into display:block with a
     floated phone button; restore a tidy centered stack instead. */
  .address-area {
    margin: 0 !important;
    padding: 28px 16px !important;
    border-radius: 24px 24px 0 0;
  }

  .address-area .address-box,
  .address-area .address-box2 {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    float: none !important;
    gap: 16px;
    margin: 0 !important;
    text-align: left;
  }

  .address-area .address-box2 {
    margin-top: 22px !important;
  }

  .address-area .address-icon {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    line-height: 54px;
    margin: 0 !important;
  }

  .address-area .address-icon::before {
    width: 54px;
    height: 54px;
  }

  .address-area .address-icon img {
    max-width: 26px;
  }

  .address-area .address-title h3 {
    font-size: 1.05rem !important;
    line-height: 1.4 !important;
  }

  .address-area .solutek-btn {
    margin: 0;
  }

  .address-area .solutek-btn a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 24px;
    font-size: 15px;
  }

  /* ---------- Footer ---------- */
  .footer-area {
    padding-top: 28px !important;
    padding-bottom: 12px !important;
    margin-bottom: 0 !important;
  }

  /* Theme: .row.footer { padding: 118px 0 101px } — way too tall on mobile. */
  .footer-area .row.footer {
    padding: 0 0 8px !important;
  }

  .footer-area .row.footer > [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    margin-bottom: 0;
  }

  .footer-area .cs_footer_widget,
  .footer-area .mb-50 {
    margin-bottom: 18px !important;
  }

  .footer-area .row.footer > [class*="col-"]:last-child .cs_footer_widget {
    margin-bottom: 8px !important;
  }

  .footer-area .widget_media_image img {
    max-width: 200px;
    height: auto;
  }

  .footer-area .cs_footer_widget_title,
  .footer-area .widget-title {
    margin-bottom: 10px !important;
    font-size: 1.05rem !important;
  }

  .footer-area .menu li a,
  .footer-area ul li a {
    display: inline-block;
    padding: 5px 0;
    min-height: 36px;
    line-height: 1.4;
  }

  .footer-area .subscribe-form,
  .footer-area .mc4wp-form {
    display: flex;
    gap: 8px;
    align-items: stretch;
  }

  .footer-area .subscribe-form input,
  .footer-area input[type="email"] {
    flex: 1;
    min-height: 48px;
    font-size: 16px !important;
  }

  .footer-area .subscribe-button {
    min-width: 48px;
    min-height: 48px;
  }

  .footer-area .row.copyright {
    padding: 14px 0 18px !important;
    text-align: left;
  }

  .footer-area .row.copyright a {
    display: inline-block;
    padding: 8px 12px 8px 0;
    min-height: 40px;
  }

  /* ---------- Scroll-top FAB ---------- */
  #scrollUp {
    right: 14px !important;
    bottom: 14px !important;
    width: 44px !important;
    height: 44px !important;
    z-index: 90 !important;
    box-shadow: 0 4px 14px rgba(229, 57, 53, 0.35);
  }

  /* ---------- Inner pages ---------- */
  .cs-page_heading {
    padding: 72px 0 40px !important;
  }

  .cs-page_heading_in .cs-page_title {
    font-size: clamp(1.5rem, 6vw, 2rem) !important;
    line-height: 1.25 !important;
  }

  .tg-page-area {
    padding: 28px 0 !important;
  }

  .blog-sidebar {
    margin-top: 36px;
  }

  .blog-sidebar .blog-widget {
    margin-bottom: 24px;
  }

  .sidebar-search-form input {
    min-height: 48px;
    font-size: 16px !important;
  }

  .sidebar-search-form button {
    min-width: 48px;
    min-height: 48px;
  }

  /* Page heading breadcrumbs wrap */
  .cs-page_heading .breadcrumb,
  .cs-page_heading .cs-page_heading_in {
    overflow-wrap: anywhere;
  }
}

/* Extra-small phones */
@media (max-width: 379.98px) {
  .container {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  span.section-sub-title {
    padding: 5px 12px !important;
  }
}

/* Prefer reduced motion */
@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-active.owl-carousel .owl-stage,
  .testi_inner .owl-stage {
    transition: none !important;
  }
}
