/* ==========================================================================
   Brightech Automation - Comprehensive Responsive Stylesheet
   Flawless responsive UI for all devices (Mobile, Tablet & Desktop)
   ========================================================================== */

/* Universal Layout & Overflow Guard (uses clip so sticky header is preserved) */
html, body {
  overflow-x: clip !important;
  max-width: 100%;
  -webkit-text-size-adjust: 100%;
}

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

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

/* Global Sticky Header */
.site-header {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 100000 !important;
  background: #04281a !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
  overflow: visible !important;
}

/* Body lock when mobile menu is open */
body.nav-open {
  overflow: hidden !important;
}

body.nav-open .floating-call,
body.nav-open .floating-whatsapp,
body.nav-open .back-top {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* ==========================================================================
   TABLET & MOBILE BREAKPOINT (<= 900px)
   ========================================================================== */
@media (max-width: 900px) {
  body {
    padding-top: 78px !important;
  }

  /* Fixed header on mobile so it never vanishes during scroll or menu toggle */
  .site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 100000 !important;
  }

  body.nav-open .site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 100000 !important;
  }

  /* Navigation Bar - Increased Size */
  .site-header .nav-wrap {
    padding: 0 16px !important;
    min-height: 78px !important;
    height: 78px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
  }

  .site-header .brand {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-width: 0 !important;
    text-decoration: none !important;
  }

  .site-header .brand img {
    height: 52px !important;
    width: auto !important;
    display: block !important;
    flex-shrink: 0 !important;
  }

  .brand-text {
    display: flex !important;
    flex-direction: column !important;
    line-height: 1 !important;
    font-family: "Montserrat", "Poppins", Arial, sans-serif !important;
  }

  .brand-text b {
    color: #17c35a !important;
    font-weight: 800 !important;
    font-size: 24px !important;
    letter-spacing: 0.01em !important;
    display: block !important;
    line-height: 1 !important;
  }

  .brand-text i {
    color: #ffd60a !important;
    font-style: normal !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    letter-spacing: 0.16em !important;
    margin-top: 2px !important;
    display: block !important;
    line-height: 1 !important;
  }

  .brand-text small {
    color: #ffffff !important;
    font-weight: 500 !important;
    font-size: 8.5px !important;
    letter-spacing: 0.04em !important;
    margin-top: 3px !important;
    white-space: nowrap !important;
    display: block !important;
    line-height: 1 !important;
  }

  /* Hamburger Toggle Button */
  .site-header .nav-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 48px !important;
    height: 48px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 9px !important;
    color: #ffffff !important;
    font-size: 1.65rem !important;
    line-height: 1 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: background 0.2s ease, border-color 0.2s ease !important;
    user-select: none !important;
    z-index: 10002 !important;
  }

  .site-header .nav-toggle:hover,
  .site-header .nav-toggle:focus {
    background: rgba(255, 255, 255, 0.16) !important;
  }

  .site-header .nav-toggle[aria-expanded="true"] {
    background: rgba(255, 214, 10, 0.18) !important;
    color: #ffd60a !important;
    border-color: #ffd60a !important;
  }

  /* Mobile Full-Screen Dropdown Drawer */
  .site-header .nav-links {
    display: none !important;
    position: fixed !important;
    top: 78px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    width: 100vw !important;
    height: calc(100vh - 78px) !important;
    height: calc(100dvh - 78px) !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 20px 20px 48px !important;
    background: #04281a !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    z-index: 999999 !important;
    gap: 4px !important;
    box-sizing: border-box !important;
  }

  .site-header .nav-links.open {
    display: flex !important;
    animation: menu-fade 0.2s ease-out !important;
  }

  @keyframes menu-fade {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  .site-header .nav-links a:not(.nav-cta) {
    display: block !important;
    padding: 13px 14px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #e5f2eb !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: background 0.15s ease, color 0.15s ease !important;
  }

  .site-header .nav-links a:not(.nav-cta):hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
  }

  .site-header .nav-links a:not(.nav-cta).active {
    color: #ffd60a !important;
    background: rgba(255, 214, 10, 0.1) !important;
    font-weight: 700 !important;
    border-left: 3px solid #ffd60a !important;
    padding-left: 12px !important;
  }

  .site-header .nav-links a:not(.nav-cta).active::after {
    display: none !important;
  }

  .site-header .nav-cta {
    margin: 16px 0 0 !important;
    padding: 14px 20px !important;
    justify-content: center !important;
    width: 100% !important;
    font-size: 15px !important;
    box-sizing: border-box !important;
    border-radius: 999px !important;
  }

  /* Homepage Hero on Tablet/Mobile */
  .bt-hero {
    min-height: auto !important;
  }

  .bt-hero__bg::after {
    background: linear-gradient(180deg, rgba(0,14,15,0.92) 0%, rgba(0,14,15,0.78) 100%) !important;
  }

  .bt-hero__inner {
    padding: 36px 16px 44px !important;
    display: flex !important;
    justify-content: center !important;
  }

  .bt-hero__copy {
    text-align: center !important;
    margin: 0 auto !important;
    max-width: 560px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .bt-hero h1 {
    font-size: clamp(26px, 7.2vw, 36px) !important;
    line-height: 1.2 !important;
    text-align: center !important;
    margin: 0 auto !important;
  }

  .bt-hero__bar {
    margin: 14px auto 18px auto !important;
    width: 44px !important;
    height: 4px !important;
    display: block !important;
  }

  .bt-hero p.lead {
    font-size: 14.5px !important;
    line-height: 1.55 !important;
    margin: 0 auto 24px auto !important;
    text-align: center !important;
    max-width: 92% !important;
  }

  .bt-pills {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
    margin: 0 auto 24px auto !important;
    max-width: 440px !important;
    width: 100% !important;
  }

  .bt-pill {
    width: 100% !important;
    font-size: clamp(9.5px, 2.6vw, 11px) !important;
    line-height: 1.2 !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    letter-spacing: -0.01em !important;
  }

  .bt-pill span.ring {
    width: 38px !important;
    height: 38px !important;
    margin: 0 auto 5px auto !important;
    border-width: 1.5px !important;
    flex-shrink: 0 !important;
  }

  .bt-pill svg {
    width: 18px !important;
    height: 18px !important;
  }

  .bt-btn-yellow {
    display: inline-flex !important;
    width: auto !important;
    max-width: fit-content !important;
    margin: 0 auto !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    padding: 6px 18px 6px 6px !important;
    gap: 9px !important;
    border-radius: 999px !important;
    box-shadow: 0 6px 18px rgba(255, 214, 10, 0.28) !important;
    align-items: center !important;
  }

  .bt-btn-yellow i {
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0 !important;
  }

  .bt-btn-yellow svg {
    width: 14px !important;
    height: 14px !important;
  }

  .bt-hero__corner,
  .bt-hero__tag {
    display: none !important;
  }

  /* Service Strip: 2 Compact Columns */
  .bt-strip {
    padding: 24px 0 32px !important;
  }

  .bt-strip__grid {
    padding: 0 16px !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  .bt-chip {
    border-radius: 12px !important;
  }

  .bt-chip img {
    height: 120px !important;
  }

  .bt-chip__row {
    padding: 10px 10px 12px !important;
    min-height: auto !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }

  .bt-chip__icon {
    width: 26px !important;
    height: 26px !important;
  }

  .bt-chip__label {
    font-size: 13.5px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
  }

  .bt-chip__go {
    display: none !important;
  }

  /* Trust Bar: 2x2 Balanced Cards - Centered */
  .bt-trust {
    background: linear-gradient(135deg, #032417 0%, #043825 50%, #021e13 100%) !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
  }

  .bt-trust::before,
  .bt-trust::after {
    display: none !important;
  }

  .bt-trust__inner {
    padding: 24px 16px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }

  .bt-trust__items {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 520px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    flex: 1 1 100% !important;
    justify-content: center !important;
  }

  .bt-trust__item {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: left !important;
    gap: 10px !important;
    padding: 12px 10px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
    transition: background 0.2s ease !important;
  }

  .bt-trust__item svg {
    width: 24px !important;
    height: 24px !important;
    color: #ffd60a !important;
    flex-shrink: 0 !important;
  }

  .bt-trust__label {
    display: block !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    color: #ffffff !important;
    text-align: left !important;
  }

  .bt-trust__label .nowrap,
  .nowrap {
    white-space: nowrap !important;
  }

  .bt-trust__end {
    border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
    padding: 14px 12px 0 !important;
    margin: 2px auto 0 auto !important;
    text-align: center !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 520px !important;
    box-sizing: border-box !important;
    display: flex !important;
  }

  .bt-trust__end span {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #ffd60a !important;
    letter-spacing: 0.02em !important;
    line-height: 1.35 !important;
    display: block !important;
    text-align: center !important;
    margin: 0 auto !important;
  }

  /* Content Containers & Sections */
  .container {
    width: min(100% - 32px, 860px) !important;
    margin: auto !important;
  }

  .section {
    padding: 50px 0 !important;
  }

  .section-sm {
    padding: 38px 0 !important;
  }

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

  .section-head h2 {
    font-size: clamp(1.8rem, 6vw, 2.3rem) !important;
    line-height: 1.18 !important;
  }

  .page-hero {
    padding: 44px 0 38px !important;
  }

  .page-hero:after {
    display: none !important;
  }

  .page-hero h1 {
    font-size: clamp(2.2rem, 7vw, 2.8rem) !important;
    line-height: 1.1 !important;
  }

  .page-hero p {
    font-size: 0.98rem !important;
  }

  /* Grids and Columns */
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .cards {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .split,
  .detail-grid,
  .detail-grid.reverse,
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .detail-image {
    height: 240px !important;
  }

  .detail-copy h2 {
    font-size: 1.5rem !important;
  }

  .feature-list {
    grid-template-columns: 1fr !important;
  }

  .stats {
    grid-template-columns: 1fr !important;
  }

  .stat {
    padding: 16px 14px !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .stat:last-child {
    border-bottom: 0 !important;
  }

  .industries {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .process {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .process:before {
    display: none !important;
  }

  /* CTA Banner */
  .cta {
    padding: 32px 20px !important;
    border-radius: 20px !important;
  }

  .cta:after {
    display: none !important;
  }

  .cta-inner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 20px !important;
  }

  .cta h2 {
    font-size: 1.65rem !important;
  }

  .cta .btn {
    width: 100% !important;
  }

  /* Form Cards */
  .form-card {
    padding: 22px 18px !important;
    border-radius: 18px !important;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .field.full {
    grid-column: auto !important;
  }

  .field input,
  .field textarea,
  .field select {
    font-size: 16px !important;
    padding: 13px !important;
  }

  /* Projects Filter Buttons */
  .filters {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    padding-bottom: 8px !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 8px !important;
  }

  .filter-btn {
    white-space: nowrap !important;
    padding: 8px 14px !important;
    font-size: 0.85rem !important;
    flex-shrink: 0 !important;
  }

  /* Testimonials Section */
  .testimonials-section {
    padding: 50px 0 60px !important;
  }

  .testimonial-card {
    padding: 24px 20px 22px !important;
    border-radius: 16px !important;
  }

  .testimonial-text {
    font-size: 0.93rem !important;
    line-height: 1.62 !important;
    margin: 0 0 20px !important;
  }

  .testimonials-carousel .owl-nav {
    margin-top: 20px !important;
  }

  .testimonials-carousel .owl-nav button.owl-prev,
  .testimonials-carousel .owl-nav button.owl-next {
    width: 40px !important;
    height: 40px !important;
  }

  .client-avatar {
    width: 42px !important;
    height: 42px !important;
    font-size: 0.9rem !important;
  }

  /* Footer on Mobile */
  .footer-main {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    padding: 40px 0 24px !important;
  }

  .footer-brand-logo {
    margin-bottom: 14px !important;
  }

  .footer-brand-logo img {
    height: 46px !important;
    width: auto !important;
  }

  .footer-brand-logo .brand-text b {
    font-size: 20px !important;
  }

  .footer-brand-logo .brand-text i {
    font-size: 14px !important;
  }

  .footer-brand-logo .brand-text small {
    font-size: 7.5px !important;
  }

  .footer-bottom {
    flex-direction: column !important;
    text-align: center !important;
    align-items: center !important;
    gap: 12px !important;
    padding-bottom: 78px !important; /* clearance for floating call & whatsapp */
  }
}

/* ==========================================================================
   EXTRA-SMALL MOBILE SCREENS (<= 420px)
   ========================================================================== */
@media (max-width: 420px) {
  body {
    padding-top: 76px !important;
  }

  .site-header .nav-wrap {
    padding: 0 12px !important;
    min-height: 76px !important;
    height: 76px !important;
  }

  .site-header .brand {
    gap: 10px !important;
  }

  .site-header .brand img {
    height: 50px !important;
    width: auto !important;
  }

  .brand-text b {
    font-size: 22px !important;
    line-height: 1 !important;
  }

  .brand-text i {
    font-size: 15px !important;
    letter-spacing: 0.14em !important;
    line-height: 1 !important;
  }

  .brand-text small {
    display: block !important;
    font-size: 8px !important;
    letter-spacing: 0.03em !important;
    line-height: 1 !important;
  }

  .site-header .nav-toggle {
    width: 46px !important;
    height: 46px !important;
    font-size: 1.6rem !important;
  }

  .site-header .nav-links {
    top: 76px !important;
    height: calc(100vh - 76px) !important;
    height: calc(100dvh - 76px) !important;
    padding: 16px 16px 40px !important;
  }

  .bt-hero__inner {
    padding: 28px 14px 38px !important;
  }

  .bt-hero h1 {
    font-size: 24px !important;
  }

  .bt-hero p.lead {
    font-size: 13.5px !important;
    margin: 0 auto 20px auto !important;
  }

  .bt-pills {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 5px !important;
    max-width: 100% !important;
    margin: 0 auto 20px auto !important;
  }

  .bt-pill span.ring {
    width: 34px !important;
    height: 34px !important;
    margin: 0 auto 4px auto !important;
    border-width: 1.5px !important;
  }

  .bt-pill svg {
    width: 16px !important;
    height: 16px !important;
  }

  .bt-pill {
    font-size: 9.5px !important;
    line-height: 1.15 !important;
  }

  .bt-btn-yellow {
    font-size: 12.5px !important;
    padding: 5px 16px 5px 5px !important;
    gap: 8px !important;
    margin: 0 auto !important;
  }

  .bt-btn-yellow i {
    width: 26px !important;
    height: 26px !important;
  }

  .bt-btn-yellow svg {
    width: 13px !important;
    height: 13px !important;
  }

  .bt-trust__inner {
    padding: 20px 12px 16px !important;
    gap: 14px !important;
    width: 100% !important;
    align-items: center !important;
  }

  .bt-trust__items {
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    justify-content: center !important;
  }

  .bt-trust__item {
    padding: 10px 8px !important;
    gap: 8px !important;
    width: 100% !important;
    justify-content: center !important;
  }

  .bt-trust__item svg {
    width: 22px !important;
    height: 22px !important;
  }

  .bt-trust__label {
    font-size: 11px !important;
    line-height: 1.2 !important;
  }

  .bt-trust__end {
    padding: 12px 6px 0 !important;
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
  }

  .bt-trust__end span {
    font-size: 12.5px !important;
    text-align: center !important;
  }

  .industries {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   ULTRA-COMPACT SCREENS (<= 360px)
   ========================================================================== */
@media (max-width: 360px) {
  .bt-pills {
    gap: 3px !important;
  }

  .bt-pill span.ring {
    width: 30px !important;
    height: 30px !important;
  }

  .bt-pill svg {
    width: 14px !important;
    height: 14px !important;
  }

  .bt-pill {
    font-size: 8.5px !important;
  }
}

/* ==========================================================================
   FLOATING ACTION BUTTONS ON MOBILE (<= 600px)
   ========================================================================== */
@media (max-width: 600px) {
  .floating-call {
    left: 14px !important;
    bottom: 14px !important;
    width: 48px !important;
    height: 48px !important;
  }

  .floating-call svg {
    width: 22px !important;
    height: 22px !important;
  }

  .floating-whatsapp {
    right: 14px !important;
    bottom: 14px !important;
    width: 48px !important;
    height: 48px !important;
  }

  .floating-whatsapp svg {
    width: 26px !important;
    height: 26px !important;
  }

  .back-top {
    right: 14px !important;
    bottom: 70px !important;
    width: 36px !important;
    height: 36px !important;
  }
}
