/*
================================================================================
  ANZOIT - COMPREHENSIVE RESPONSIVE DESIGN SYSTEM
  Targeting: Extra-Small Phones (320px - 480px),
             Standard Mobile Phones (481px - 767px),
             Tablets & iPads (768px - 991px),
             Small Desktops / Laptops (992px - 1200px)
================================================================================
*/

/* --- 1. GLOBAL LAYOUT & OVERFLOW PROTECTION --- */
html,
body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  position: relative;
  -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

/* Prevent horizontal scroll from any containers */
.container,
.container-fluid {
  max-width: 100% !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
}

@media (min-width: 576px) {
  .container {
    max-width: 540px !important;
  }
}
@media (min-width: 768px) {
  .container {
    max-width: 720px !important;
  }
}
@media (min-width: 992px) {
  .container {
    max-width: 960px !important;
  }
}
@media (min-width: 1200px) {
  .container {
    max-width: 1140px !important;
  }
}
@media (min-width: 1400px) {
  .container {
    max-width: 1320px !important;
  }
}

/* --- 2. HEADER & MOBILE NAVIGATION DRAWER --- */
@media (max-width: 991px) {
  .vl-header-sticky.sticky {
    padding: 10px 0 !important;
  }
  
  .vl-header-action-item {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
  }
  
  .vl-header-action-item button {
    font-size: 20px !important;
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
  }

  .vl-offcanvas {
    width: min(380px, 85vw) !important;
    padding: 30px 24px !important;
  }

  .vl-offcanvas-header {
    margin-bottom: 30px !important;
  }

  .vl-offcanvas-close button {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }
}

/* --- 3. HOMEPAGE HERO SECTION (hero4-section-area) --- */
@media (max-width: 991px) {
  .hero4-section-area {
    padding: 130px 0 60px !important;
    overflow: hidden !important;
  }

  /* Hide huge absolute 3D decorative sculptures on mobile & tablet to stop obscuring text and button */
  .hero4-section-area .elements27,
  .hero4-section-area .elements28,
  .hero4-section-area .hero-header-area .elements30,
  .hero4-section-area .elements1,
  .hero4-section-area .others-img1 {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .hero4-section-area .hero-header-area {
    margin-bottom: 20px !important;
  }

  .hero4-section-area .hero-header-area h5 {
    font-size: clamp(12px, 3.4vw, 15px) !important;
    line-height: 1.3 !important;
    letter-spacing: 0.5px !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.12);
  }

  .hero4-section-area .hero-header-area h5 img {
    max-height: 14px;
    width: auto;
  }

  .hero4-section-area .hero-header-area h1 {
    font-size: clamp(30px, 8vw, 44px) !important;
    line-height: 1.12 !important;
    letter-spacing: -0.5px !important;
    word-break: break-word;
    white-space: normal !important;
    margin-bottom: 12px !important;
  }

  .hero4-section-area .hero-header-area .btn-area1 a {
    font-size: clamp(14px, 3.8vw, 17px) !important;
    line-height: 1.2 !important;
    padding: 15px 28px !important;
    max-width: 100% !important;
    white-space: normal !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 8px !important;
    letter-spacing: 0.2px !important;
  }
}

@media (max-width: 480px) {
  .hero4-section-area {
    padding: 110px 0 45px !important;
  }

  .hero4-section-area .hero-header-area h1 {
    font-size: clamp(26px, 8vw, 34px) !important;
  }

  .hero4-section-area .hero-header-area .btn-area1 a {
    width: 100% !important;
    padding: 14px 20px !important;
  }
}

/* --- 4. MARQUEE BANNER SECTIONS (slider4, slider5, slider6, slider1, slider2) --- */
@media (max-width: 991px) {
  /* Flatten rotated marquee so no black corners or horizontal scrollbars occur */
  .slider4-section-area {
    transform: none !important;
    margin: 10px 0 !important;
    width: 100% !important;
    overflow: hidden !important;
  }

  .slider4-section-area .marquee-wrap .marquee-text,
  .slider6-section-area .marquee-wrap .marquee-text {
    padding: 14px 0 !important;
  }

  .slider4-section-area .marquee-wrap .marquee-text .brand-single-box h3,
  .slider6-section-area .marquee-wrap .marquee-text .brand-single-box h3 {
    font-size: clamp(15px, 4vw, 20px) !important;
    line-height: 1.2 !important;
  }

  .slider2-section-area .marquee-wrap .marquee-text .brand-single-box h3 a,
  .slider2-section-area .brand-single-box h3 .item-box {
    font-size: 16px !important;
    line-height: 20px !important;
    padding: 6px 18px 6px 6px !important;
  }

  .slider2-section-area .marquee-wrap .marquee-text .brand-single-box h3 a img,
  .slider2-section-area .brand-single-box h3 .item-box img {
    height: 36px !important;
    width: 36px !important;
  }
}

/* --- 5. INNER PAGE BANNER (.inner-section-area) --- */
@media (max-width: 991px) {
  .inner-section-area {
    padding: 120px 0 30px !important;
  }

  .inner-section-area .hero-header-area {
    margin-bottom: 24px !important;
    text-align: center !important;
  }

  .inner-section-area .hero-header-area h1 {
    font-size: clamp(30px, 8vw, 48px) !important;
    line-height: 1.15 !important;
  }

  .inner-section-area .hero-header-area h4 {
    font-size: 16px !important;
  }

  .inner-section-area .hero-header-area h4 a,
  .inner-section-area .hero-header-area h4 i {
    font-size: 15px !important;
    line-height: 22px !important;
  }

  .inner-section-area .imges-header {
    margin: 20px auto 0 !important;
    max-width: 260px !important;
  }

  .inner-section-area .elements1,
  .inner-section-area .others-img1 {
    display: none !important;
  }
}

/* --- 6. ABOUT SECTION (about4 & about1) --- */
@media (max-width: 991px) {
  .about4-section-area .images,
  .about1-section-area .images {
    margin-bottom: 35px !important;
    max-width: 100% !important;
  }

  .about4-section-area .images .elements8,
  .about1-section-area .images .elements8 {
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0.3 !important;
  }

  .about4-section-area .about-header,
  .about1-section-area .about-header {
    padding: 0 !important;
    margin-top: 0 !important;
  }

  .about4-section-area .about-header h2,
  .about1-section-area .about-header h2 {
    font-size: clamp(24px, 6vw, 36px) !important;
    line-height: 1.2 !important;
  }
}

/* --- 7. SERVICES SECTION (service4 & service3) --- */
@media (max-width: 991px) {
  .service4-section-area .service-tabs-area .nav {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 12px !important;
    margin-bottom: 30px !important;
  }

  .service4-section-area .service-tabs-area .nav li {
    margin: 0 !important;
  }

  .service4-section-area .service-tabs-area .nav li button {
    margin: 0 !important;
    padding: 12px 18px !important;
  }

  .service4-section-area .service-tabs-area .nav li button .icons {
    height: 48px !important;
    width: 48px !important;
    line-height: 48px !important;
  }

  .service4-section-area .service-tabs-area .nav li button .text {
    font-size: 15px !important;
    line-height: 18px !important;
  }

  /* Hide huge background element decorations that overflow mobile */
  .service4-section-area .service-tabs-area .tab-content .tab-pane .service-images .elements33,
  .service4-section-area .service-tabs-area .tab-content .tab-pane .service-images .elements34,
  .service4-section-area .service-tabs-area .tab-content .tab-pane .service-images .elements35,
  .service4-section-area .service-tabs-area .tab-content .tab-pane .service-images .elements36 {
    display: none !important;
  }

  .service4-section-area .service-tabs-area .tab-content .tab-pane .service-images .img1 img {
    height: auto !important;
    width: 100% !important;
    max-width: 360px !important;
    margin: 0 auto;
    display: block;
  }

  .service4-section-area .service-tabs-area .tab-content .tab-pane .service-heading h2 {
    font-size: clamp(22px, 5.5vw, 30px) !important;
    line-height: 1.25 !important;
  }
}

/* --- 8. PORTFOLIO SECTION (portfolio4) --- */
@media (max-width: 991px) {
  .portfolio4-section-area {
    height: auto !important;
    overflow: hidden !important;
  }

  .portfolio4-section-area .portfolio-slider-area.owl-carousel .owl-stage-outer {
    position: relative !important;
  }

  .portfolio4-section-area .portfolio-slider-area .owl-nav {
    position: relative !important;
    top: 0 !important;
    right: 0 !important;
    margin-top: 24px !important;
    text-align: center !important;
  }

  .portfolio4-section-area .portfolio-slider-area .owl-nav button {
    height: 46px !important;
    width: 46px !important;
    line-height: 46px !important;
  }

  .portfolio4-section-area .portfolio-slider-area .portfolio-boxarea .arrow-content {
    padding: 30px 18px 18px !important;
  }

  .portfolio4-section-area .portfolio-slider-area .portfolio-boxarea .arrow-content .arrow {
    top: -42px !important;
    margin-left: -42px !important;
  }

  .portfolio4-section-area .portfolio-slider-area .portfolio-boxarea .arrow-content .arrow a {
    height: 84px !important;
    width: 84px !important;
    line-height: 70px !important;
  }

  .portfolio4-section-area .portfolio-slider-area .portfolio-boxarea .arrow-content .arrow a span {
    height: 38px !important;
    width: 38px !important;
    line-height: 38px !important;
  }
}

/* --- 9. TEAM SECTION TOUCHSCREEN & MOBILE OPTIMIZATION --- */
/* On mobile & tablets, cards must display name, role, and social links permanently without requiring impossible hovers */
@media (max-width: 991px) {
  .team4-section-area .team-author-boxarea {
    margin-bottom: 24px !important;
  }

  .team4-section-area .team-author-boxarea::after {
    height: 100% !important;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.82) 75%) !important;
    opacity: 1 !important;
  }

  .team4-section-area .team-author-boxarea .content-area {
    visibility: visible !important;
    opacity: 1 !important;
    transform: scale(1) !important;
    bottom: 14px !important;
    left: 14px !important;
    right: 14px !important;
    padding: 14px 10px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
  }

  .team4-section-area .team-author-boxarea .content-area .content a {
    font-size: 18px !important;
    line-height: 22px !important;
    color: #111 !important;
    font-weight: 700 !important;
  }

  .team4-section-area .team-author-boxarea .content-area .content p {
    font-size: 13px !important;
    line-height: 16px !important;
    color: #555 !important;
    margin-top: 4px !important;
  }

  .team4-section-area .team-author-boxarea .list {
    right: 14px !important;
    top: 14px !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .team4-section-area .team-author-boxarea .list ul li a {
    height: 38px !important;
    width: 38px !important;
    line-height: 38px !important;
    font-size: 15px !important;
    margin-bottom: 6px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
  }
}

/* --- 10. TESTIMONIALS SECTION & MAP BLOWOUT PREVENTION --- */
@media (max-width: 1199px) {
  /* Critical: The map-testimonial slides are hardcoded to left: 1120px and 1160px.
     Hiding them on screens < 1200px completely prevents massive horizontal overflow */
  .testimonials-4 .map-testimonial,
  .testimonials-2 .map-testimonial {
    display: none !important;
  }

  .testimonials-4 .swiper-testimonial-2 .testimonial-boxarea,
  .testimonials-2 .swiper-testimonial-2 .testimonial-boxarea {
    padding: 24px 18px !important;
  }

  .testimonials-4 .swiper-testimonial-2 .testimonial-boxarea p,
  .testimonials-2 .swiper-testimonial-2 .testimonial-boxarea p {
    font-size: 16px !important;
    line-height: 1.5 !important;
  }
}

/* --- 11. CTA BUTTON AREA 6 (BIG GET IN TOUCH BUTTON) --- */
@media (max-width: 991px) {
  .cta-btn-area6 .btn-area {
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
  }

  .cta-btn-area6 .btn-area a {
    font-size: clamp(36px, 8.5vw, 68px) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.5px !important;
    word-break: break-word;
    display: inline-block !important;
    text-align: center !important;
    margin: 0 auto !important;
  }
}

@media (max-width: 480px) {
  .cta-btn-area6 .btn-area a {
    font-size: clamp(28px, 9vw, 42px) !important;
    text-align: center !important;
    margin: 0 auto !important;
  }
}

/* --- 12. SECTION VERTICAL PADDING OPTIMIZATION ON MOBILE --- */
@media (max-width: 767px) {
  .sp1 { padding: 60px 0 !important; }
  .sp2 { padding: 60px 0 40px !important; }
  .sp3 { padding: 60px 0 30px !important; }
  .sp4 { padding: 50px 0 !important; }
  .sp5 { padding: 40px 0 !important; }
  .sp6 { padding: 60px 0 !important; }
  .sp7 { padding: 60px 0 40px !important; }
  .sp8 { padding: 50px 0 0 !important; }
  .sp9 { padding: 60px 0 0 !important; }
  .sp10 { padding: 0 0 50px !important; }

  /* Universal section header font scaling */
  .heading1 h2,
  .heading2 h2,
  .heading3 h2,
  .team-header h2 {
    font-size: clamp(24px, 6.5vw, 36px) !important;
    line-height: 1.2 !important;
  }

  .heading1 h5,
  .heading2 h5,
  .heading3 h5,
  .team-header h5 {
    font-size: clamp(12px, 3.5vw, 15px) !important;
    line-height: 1.3 !important;
  }

  .space-margin60 {
    margin-bottom: 30px !important;
  }

  .vl-footer4-section-area .vl-copyright-area p {
    font-size: 13px !important;
    text-align: center !important;
  }
}

/* --- 13. FOOTER & CTA DIVIDER FIX --- */
.vl-footer4-section-area .vl-copyright-area p {
  border-top: none !important;
}

.cta-btn-area6 {
  padding-bottom: 25px !important;
  text-align: center !important;
}

.cta-btn-area6 .btn-area {
  text-align: center !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
}

.cta-btn-area6 .btn-area a {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
