@media screen and (min-width: 1025px) {
  body,
  body.bg-white {
    width: 100% !important;
    max-width: 100%;
    min-width: auto;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
  }

  #header {
    width: 100% !important;
    max-width: 100%;
    position: fixed;
    left: 0;
    right: 0;
    padding: 0 clamp(1rem, 5vw, 3rem) !important;
    box-sizing: border-box;
    z-index: 50;
  }
  #header > .flex:last-child {
    display: flex;
  }

  .container,
  [class*="container"] {
    width: 100% !important;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 2rem);
    box-sizing: border-box;
  }

  section,
  main,
  article {
    width: 100%;
    box-sizing: border-box;
  }

  .row,
  .row-fluid,
  [class*="grid-"],
  [class*="flex-"] {
    box-sizing: border-box;
  }

  img {
    max-width: 100%;
    height: auto;
    display: block;
  }

  header .logo img {
    max-width: 100%;
    width: auto;
    height: auto;
  }
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
  body {
    width: 100% !important;
    max-width: 100%;
    overflow-x: hidden;
  }

  #header {
    width: 100% !important;
    max-width: 100%;
    padding: 1rem clamp(1rem, 4vw, 2rem) !important;
    height: auto;
    flex-wrap: wrap;
  }

  header {
    padding: 1rem clamp(1rem, 4vw, 2rem);
    min-height: 70px;
  }

  nav {
    width: 100%;
    margin-top: 0.5rem;
  }

  .nav-link {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
  }

  .dropdown-menu {
    min-width: 150px;
    font-size: 11px;
  }

  .dropdown-menu li a {
    padding: 8px 12px;
    font-size: 11px;
  }

  section,
  main,
  article {
    padding: clamp(1.5rem, 4vw, 2.5rem);
    width: 100%;
    box-sizing: border-box;
  }

  button,
  a[class*="btn"],
  [class*="button"] {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }

  h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
  }

  h2 {
    font-size: clamp(1.25rem, 3.5vw, 2rem);
  }

  h3 {
    font-size: clamp(1rem, 3vw, 1.5rem);
  }

  h4 {
    font-size: 1rem;
  }

  [class*="col-"],
  [class*="grid-cols-"] {
    width: 100%;
  }

  img {
    max-width: 100%;
    height: auto;
  }

  #featured {
    width: 100%;
    margin-top: 70px;
  }

  .gap-4,
  .gap-6,
  .gap-8 {
    gap: 1rem !important;
  }
}

@media screen and (max-width: 480px) {
  body {
    width: 100% !important;
    max-width: 100%;
    overflow-x: hidden !important;
    padding: 0;
    margin: 0;
  }

  html,
  body {
    width: 100%;
  }

  * {
    max-width: 100%;
  }

  #header {
    width: 100% !important;
    max-width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: auto;
    min-height: 60px;
    padding: 0.75rem 1rem !important;
    z-index: 50;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    box-sizing: border-box;
  }

  header {
    padding: 0.75rem 1rem;
    width: 100%;
  }

  header .logo,
  .ImgLogo {
    width: auto;
  }

  header .logo img {
    width: 100px;
    max-width: 100%;
    height: auto;
  }

  nav,
  .nav-menu {
    display: none !important;
    visibility: hidden;
  }

  nav.active,
  nav.is-visible,
  .nav-menu.active,
  .nav-menu.is-visible {
    display: flex !important;
    visibility: visible !important;
  }

  .hamburger-btn,
  [class*="hamburger"],
  [class*="menu-toggle"] {
    display: block !important;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 51;
    margin-left: auto;
  }

  .button-container,
  [class*="quote-button"] {
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }

  a[href="quote"],
  a.bg-brand-dark {
    padding: 0.5rem 1rem !important;
    font-size: 0.75rem !important;
    white-space: nowrap;
  }

  .mobile-nav-menu,
  nav[class*="mobile"],
  [class*="drawer"],
  [class*="offcanvas"] {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - 60px);
    background: white;
    border-bottom: 1px solid #e5e7eb;
    display: none;
    flex-direction: column;
    overflow-y: auto;
    z-index: 49;
    box-sizing: border-box;
    padding: 1rem;
  }

  .mobile-nav-menu.active,
  nav[class*="mobile"].active {
    display: flex !important;
  }

  .mobile-nav-menu a,
  nav[class*="mobile"] a {
    padding: 0.75rem 0 !important;
    border-bottom: 1px solid #f3f4f6;
    display: block;
    color: #1f2937;
    text-decoration: none;
    font-size: 0.875rem;
  }

  .mobile-nav-menu a:hover,
  nav[class*="mobile"] a:hover {
    color: #e62923;
  }

  .dropdown-menu-wrapper,
  .dropdown-menu {
    position: static !important;
    display: none !important;
    width: 100% !important;
    float: none !important;
    box-shadow: none;
    background: #f9fafb;
    margin: 0;
    padding-left: 1rem;
  }

  .dropdown-menu.active,
  .dropdown-menu-wrapper.active {
    display: block !important;
  }

  .dropdown-menu li {
    margin: 0;
    padding: 0;
  }

  .dropdown-menu li a {
    color: #374151;
    font-size: 0.8125rem;
    padding: 0.625rem 0.75rem !important;
    border-bottom: 1px solid #e5e7eb;
  }

  .dropdown-menu li a:hover {
    background-color: #fee8e7;
    color: #e62923;
  }

  section,
  main,
  article {
    width: 100%;
    padding: 1rem !important;
    margin-top: 0;
    box-sizing: border-box;
  }

  #featured,
  [id*="content"],
  [id*="bottom"] {
    margin-top: 60px;
    width: 100%;
  }

  h1 {
    font-size: 1.5rem;
    margin: 1rem 0 0.5rem;
  }

  h2 {
    font-size: 1.25rem;
    margin: 0.875rem 0 0.375rem;
  }

  h3 {
    font-size: 1rem;
    margin: 0.75rem 0 0.25rem;
  }

  h4 {
    font-size: 0.9375rem;
  }

  h5,
  h6 {
    font-size: 0.875rem;
  }

  p {
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0.5rem 0;
  }

  body,
  body.bg-white {
    font-size: 0.875rem;
  }

  button,
  a[class*="btn"],
  input[type="submit"],
  input[type="button"],
  [class*="button"] {
    display: inline-block;
    width: auto;
    padding: 0.625rem 1rem !important;
    font-size: 0.8125rem !important;
    min-height: 44px;
    box-sizing: border-box;
  }

  .cta,
  .big-cta button,
  form button,
  a.bg-brand-dark,
  a.bg-brand-red {
    width: 100%;
    box-sizing: border-box;
  }

  form {
    width: 100%;
  }

  input[type="text"],
  input[type="email"],
  input[type="number"],
  input[type="search"],
  textarea,
  select {
    width: 100% !important;
    padding: 0.625rem !important;
    font-size: 1rem !important;
    box-sizing: border-box;
    margin-bottom: 0.75rem;
  }

  textarea {
    min-height: 120px;
    resize: vertical;
  }

  label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
  }

  img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }

  picture,
  figure {
    width: 100%;
    max-width: 100%;
  }

  .row,
  .row-fluid,
  [class*="row"],
  [class*="grid"],
  [class*="flex"] {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-sizing: border-box;
  }

  [class*="col"],
  [class*="col-"],
  [class*="grid-cols"],
  [class*="w-1/2"],
  [class*="w-1/3"],
  [class*="w-2/3"],
  [class*="w-3/4"] {
    width: 100% !important;
    flex: 1 1 100%;
  }

  .gap-4,
  .gap-6,
  .gap-8,
  .gap-12 {
    gap: 0.75rem !important;
  }

  .mb-4,
  .mb-6,
  .mb-8 {
    margin-bottom: 0.75rem !important;
  }

  .mt-4,
  .mt-6,
  .mt-8 {
    margin-top: 0.75rem !important;
  }

  .px-4,
  .px-6,
  .px-8 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .py-4,
  .py-6,
  .py-8 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }

  table {
    width: 100%;
    font-size: 0.75rem;
    overflow-x: auto;
    display: block;
    box-sizing: border-box;
  }

  thead {
    display: block;
  }

  tbody {
    display: block;
    width: 100%;
  }

  tr {
    display: block;
    margin-bottom: 0.5rem;
    border: 1px solid #e5e7eb;
  }

  td,
  th {
    display: block;
    text-align: left;
    padding: 0.5rem;
    word-break: break-word;
  }

  [class*="card"],
  [class*="box"],
  article {
    width: 100%;
    box-sizing: border-box;
  }

  .video-container,
  .map-container,
  .embed-container,
  iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    box-sizing: border-box;
  }

  .headnav {
    display: none !important;
  }

  .nav-item {
    display: block;
    width: 100%;
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: 0.75rem 0 !important;
    font-size: 0.875rem;
  }

  .nav-link::after {
    display: none;
  }

  .carousel,
  .slider,
  [class*="slider"],
  [class*="carousel"] {
    width: 100%;
    overflow-x: hidden;
  }

  .slide,
  .carousel-item {
    width: 100%;
  }

  ul.team-detail,
  ul.clients,
  [class*="team"],
  [class*="client"] {
    flex-direction: column;
    width: 100%;
  }

  ul.team-detail li,
  ul.clients li {
    width: 100%;
  }

  .hidden-top {
    width: 100%;
    height: 0 !important;
    overflow: hidden;
  }

  .hidden-top.toggle-link-open {
    height: auto !important;
    max-height: 100vh;
  }

  .hidden-mobile,
  [class*="hidden-sm"],
  .d-none,
  .display-none {
    display: none !important;
  }

  .visible-mobile,
  [class*="visible-sm"],
  .d-inline,
  .display-inline {
    display: block !important;
  }

  #header {
    width: 100vw !important;
    max-width: 100%;
    left: 0;
    right: 0;
    padding: 0.75rem 1rem !important;
    height: auto;
    min-height: 60px;
  }

  .row,
  .row-fluid,
  [class*="row"],
  [class*="grid"],
  [class*="flex"] {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    box-sizing: border-box;
  }

  #header .flex:first-child {
    flex: 1;
  }
  #header > .flex:last-child {
    display: none !important;
  }
}

@media screen and (max-width: 320px) {
  h1 {
    font-size: 1.25rem;
  }

  h2 {
    font-size: 1rem;
  }

  h3 {
    font-size: 0.875rem;
  }

  p,
  body {
    font-size: 0.8125rem;
  }

  #header {
    padding: 0.5rem 0.75rem !important;
    min-height: 50px;
  }

  header .logo img {
    width: 80px;
  }

  input,
  textarea,
  select {
    font-size: 16px !important; 
  }
}

@media screen and (min-width: 481px) and (max-width: 767px) {
  body {
    width: 100% !important;
    max-width: 100%;
  }

  #header {
    width: 100% !important;
    max-width: 100%;
    padding: 0.875rem 1.25rem !important;
  }

  header {
    padding: 0.875rem 1.25rem;
    min-height: 65px;
  }

  header .logo img {
    width: 120px;
  }

  section,
  main,
  article {
    padding: 1.25rem;
    width: 100%;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.375rem;
  }

  h3 {
    font-size: 1.125rem;
  }

  .gap-4,
  .gap-6 {
    gap: 1rem !important;
  }

  button,
  a[class*="btn"] {
    padding: 0.625rem 1rem !important;
    font-size: 0.8125rem !important;
  }
}

@media print {
  #header,
  header,
  nav,
  .hamburger-btn,
  .mobile-nav-menu,
  [class*="sticky"],
  [class*="fixed"] {
    display: none !important;
  }

  body {
    width: 100%;
    margin: 0;
  }

  a {
    text-decoration: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  body {
    background-color: white;
    color: black;
  }

  a {
    text-decoration: underline;
  }
}
