/* =========================================================
   Codli Software — Responsive & Polish Overrides
   Loaded AFTER css/style.css (and any inline <style> blocks)
   on every page. Purpose: fix mobile/tablet layout issues
   without touching the generated Bootstrap build.
   ========================================================= */

/* ---------- Global safety net ---------- */
html {
  overflow-x: hidden;
}
body {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}
img {
  max-width: 100%;
  height: auto;
}
* {
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Navbar ---------- */
.navbar-brand img {
  height: 100px !important;
  width: auto;
  transition: height .3s ease;
}
.navbar .navbar-toggler {
  border: 1px solid rgba(0,0,0,.15);
  padding: 8px 10px;
}
.navbar .navbar-toggler:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(21,101,192,.25);
}

@media (max-width: 991.98px) {
  .navbar-brand img {
    height: 56px !important;
  }
  .navbar-collapse {
    max-height: 80vh;
    overflow-y: auto;
    padding-top: 10px;
  }
  .navbar-light .navbar-nav .nav-link {
    padding: 12px 4px;
    border-bottom: 1px solid rgba(0,0,0,.06);
  }
  .navbar-light .navbar-nav .nav-link:last-child {
    border-bottom: none;
  }
  .navbar-nav.border-right {
    padding-right: 0 !important;
  }
  /* "Call anytime" block: show under the menu on mobile instead of hiding */
  .navbar-collapse .d-none.d-lg-flex {
    display: flex !important;
    padding: 14px 4px 6px !important;
    border-top: 1px solid rgba(0,0,0,.06);
    margin-top: 6px;
  }
}

@media (max-width: 575.98px) {
  .navbar-brand img {
    height: 46px !important;
  }
}

/* ---------- Hero / Page header ---------- */
@media (max-width: 767.98px) {
  .container-fluid.bg-primary.py-5 h1.display-2 {
    font-size: calc(1.6rem + 3vw);
    line-height: 1.25;
  }
  .page-header {
    min-height: 240px !important;
    height: auto !important;
    padding: 40px 20px;
  }
  .page-header h1.display-3 {
    font-size: calc(1.5rem + 3vw);
  }
}

@media (max-width: 575.98px) {
  .display-1, .display-2, .display-3, .display-4 {
    word-break: break-word;
  }
}

/* ---------- Buttons on small screens ---------- */
@media (max-width: 575.98px) {
  .btn.py-3.px-5 {
    padding: 14px 28px !important;
    font-size: .9rem;
    width: 100%;
    max-width: 340px;
  }
  .cta-section .btn.py-3.px-5,
  .container-fluid.bg-primary .btn.py-3.px-5 {
    display: inline-block;
  }
}

/* ---------- About / stat & tech grids ---------- */
@media (max-width: 575.98px) {
  .counter-item .counter-number,
  .counter-box .counter {
    font-size: 2.1rem !important;
  }
  .tech-item {
    padding: 18px 10px;
  }
  .tech-item i {
    font-size: 2.4rem !important;
  }
  .process-step {
    padding: 24px 16px;
  }
  .pricing-card {
    padding: 26px 18px !important;
  }
}

/* ---------- Portfolio filter buttons ---------- */
#portfolio-flters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
#portfolio-flters li {
  margin: 0 !important;
}
@media (max-width: 575.98px) {
  #portfolio-flters li {
    padding: 8px 16px !important;
    font-size: .85rem;
  }
}

/* ---------- Team & testimonial carousels ---------- */
@media (max-width: 767.98px) {
  .team-carousel {
    padding-left: 10px !important;
  }
  .team-carousel .owl-nav {
    display: none;
  }
  .testimonial-carousel .owl-item.center .testimonial-item::before {
    left: -10px;
    right: -10px;
  }
}

/* ---------- FAQ ---------- */
@media (max-width: 575.98px) {
  .faq-item .faq-question {
    padding: 14px 16px;
  }
  .faq-item .faq-answer {
    padding: 0 16px 16px;
  }
}

/* ---------- CTA section ---------- */
@media (max-width: 767.98px) {
  .cta-section {
    padding: 45px 0;
    text-align: center;
  }
  .cta-section .col-lg-4.text-lg-right {
    text-align: center !important;
    margin-top: 10px;
  }
}

/* ---------- Contact form / map ---------- */
@media (max-width: 991.98px) {
  .container-fluid.py-5.px-0 .row[style*="height: 500px"],
  .container-fluid.py-5.px-0 > .row.mt-5.mx-0 .col-12[style*="height: 500px"] {
    height: 380px !important;
  }
  .row.mx-0.justify-content-center[style*="margin-top: -200px"] {
    margin-top: -140px !important;
  }
  .contact-form {
    padding: 30px 22px !important;
  }
}
@media (max-width: 575.98px) {
  .row.mx-0.justify-content-center[style*="margin-top: -200px"] {
    margin-top: -90px !important;
  }
  .contact-form {
    padding: 24px 16px !important;
  }
  .contact-form .form-control {
    padding: 14px !important;
  }
}

/* ---------- Footer ---------- */
@media (max-width: 767.98px) {
  .container-fluid.bg-dark.text-white-50.py-5 {
    text-align: center;
  }
  .container-fluid.bg-dark.text-white-50.py-5 .navbar-brand {
    justify-content: center;
  }
  .container-fluid.bg-dark.text-white-50.py-5 .d-flex.justify-content-start {
    justify-content: center !important;
  }
  .container-fluid.bg-dark.text-white-50.py-5 .d-flex.flex-column.justify-content-start {
    align-items: center;
  }
  .container-fluid.bg-dark.text-white-50.py-5 p i.mr-2 {
    margin-right: 6px;
  }
}

/* ---------- Back to top button (avoid overlapping content on tiny screens) ---------- */
@media (max-width: 575.98px) {
  .back-to-top {
    right: 16px;
    bottom: 16px;
  }
}

/* ---------- Misc iframe safety ---------- */
iframe {
  max-width: 100%;
}
