html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  width: 100%;
  min-width: 320px;
  overflow-x: clip;
}

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

img {
  height: auto;
}

.container,
.container-fluid {
  min-width: 0;
}

.row > * {
  min-width: 0;
}

/* Keep long text and form controls within the viewport. */
h1, h2, h3, h4, h5, h6, p, a, li, label {
  overflow-wrap: anywhere;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

/* Tablet and smaller laptop layouts. */
@media (max-width: 991.98px) {
  .custom-navbar {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .custom-navbar .navbar-brand {
    font-size: clamp(1.35rem, 3.2vw, 1.8rem);
    line-height: 1.25;
    white-space: normal;
  }

  .custom-navbar .navbar-collapse {
    padding-top: 12px;
  }

  .custom-navbar .custom-navbar-nav {
    margin-left: 0 !important;
    margin-right: 0 !important;
    gap: 2px;
  }

  .custom-navbar .custom-navbar-nav li {
    margin-left: 0;
    margin-right: 0;
  }

  .custom-navbar .custom-navbar-nav li a {
    display: block;
    padding: 10px 8px;
    opacity: .9;
  }

  .custom-navbar .custom-navbar-nav li a:before {
    display: none;
  }

  .custom-navbar .custom-navbar-nav li.active > a {
    opacity: 1;
    border-left: 3px solid #87CEEB;
    padding-left: 12px;
  }

  .custom-navbar .custom-navbar-cta {
    margin: 8px 0 0 !important;
    gap: 8px;
  }

  .hero {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .hero .intro-excerpt {
    max-width: 100%;
  }

  .hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.15;
  }

  .hero .hero-img-wrap {
    margin-top: 1.75rem;
  }

  .hero .hero-img-wrap img {
    position: relative;
    display: block;
    top: auto;
    right: auto;
    left: auto;
    width: 100%;
    max-width: 100%;
    max-height: 460px;
    object-fit: contain;
    object-position: center;
  }

  .hero .hero-img-wrap:after {
    right: 0;
    max-width: 35%;
    pointer-events: none;
  }

  .product-section,
  .why-choose-section,
  .we-help-section,
  .blog-section,
  .untree_co-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .before-footer-section {
    padding: 4rem 0 6rem !important;
  }

  .footer-section {
    padding: 4rem 0 2rem;
  }

  .footer-section .sofa-img {
    position: relative;
    top: auto;
    right: auto;
    margin: 0 auto 1.5rem;
    text-align: center;
  }

  .footer-section .sofa-img img {
    width: min(100%, 280px);
    max-width: 100%;
  }

  .footer-section .subscription-form {
    margin-top: 1rem;
  }

  .we-help-section .imgs-grid {
    max-width: 100%;
  }
}

/* Phones and narrow tablets. */
@media (max-width: 767.98px) {
  .container {
    padding-left: 18px;
    padding-right: 18px;
  }

  .custom-navbar .container {
    align-items: center;
  }

  .custom-navbar .navbar-brand {
    max-width: calc(100% - 64px);
    font-size: clamp(1.15rem, 5vw, 1.5rem);
  }

  .custom-navbar .navbar-toggler {
    flex: 0 0 auto;
    padding: 6px 8px;
  }

  .custom-navbar .navbar-collapse {
    flex-basis: 100%;
  }

  .custom-navbar .custom-navbar-nav li.active > a {
    border-left: 3px solid #87CEEB;
  }

  .hero {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .hero .row {
    row-gap: 1.25rem;
  }

  .hero h1 {
    margin-bottom: 1rem;
    font-size: clamp(1.9rem, 8vw, 2.7rem);
    line-height: 1.16;
  }

  .hero p {
    line-height: 1.7;
  }

  .hero .intro-excerpt .btn {
    margin: 0 6px 10px 0 !important;
  }

  .hero .hero-img-wrap {
    margin-top: 1rem;
  }

  .hero .hero-img-wrap:after {
    width: 130px;
    height: 115px;
    top: 0;
    right: 0;
  }

  .btn {
    min-height: 44px;
    padding: 10px 20px;
    white-space: normal;
  }

  .product-section,
  .why-choose-section,
  .we-help-section,
  .blog-section,
  .untree_co-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .section-title {
    line-height: 1.25;
  }

  .product-section .product-item {
    padding-bottom: 38px;
  }

  .product-section .product-item .product-thumbnail {
    max-width: 100%;
    width: auto;
    max-height: 210px;
    object-fit: contain;
  }

  .product-section .product-item:hover .product-thumbnail {
    top: 0;
  }

  .product-section .product-item .icon-cross {
    opacity: 1;
    visibility: visible;
    bottom: 0;
  }

  .product-section .product-item:before {
    height: 55%;
  }

  .why-choose-section .img-wrap {
    margin-top: 1.5rem;
  }

  .why-choose-section .img-wrap:before,
  .we-help-section .imgs-grid:before {
    width: 145px;
    height: 125px;
  }

  .we-help-section .imgs-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    margin-top: 1.5rem;
  }

  .we-help-section .imgs-grid .grid.grid-1,
  .we-help-section .imgs-grid .grid.grid-2,
  .we-help-section .imgs-grid .grid.grid-3 {
    grid-column: auto;
    grid-row: auto;
    padding: 0;
    min-width: 0;
  }

  .we-help-section .imgs-grid .grid.grid-1 {
    grid-column: 1 / -1;
  }

  .we-help-section .imgs-grid .grid img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 260px;
    object-fit: cover;
  }

  .custom-list li {
    width: 100%;
    display: block;
  }

  .testimonial-section,
  .testimonial-slider-wrap {
    min-width: 0;
  }

  .testimonial-block {
    padding-left: 8px;
    padding-right: 8px;
  }

  .footer-section .row {
    row-gap: 1.5rem;
  }

  .footer-section .links-wrap {
    row-gap: 1rem;
  }

  .footer-section .footer-logo-wrap .footer-logo {
    font-size: 1.7rem;
  }

  .footer-section .subscription-form .form-control {
    min-width: 0;
  }

  .footer-section .copyright .row {
    row-gap: .5rem;
  }

  .footer-section .copyright ul {
    justify-content: center;
    padding-left: 0;
  }

  .footer-section .copyright li {
    margin-right: 0 !important;
  }

  .form-control {
    width: 100%;
    min-width: 0;
  }

  textarea.form-control {
    min-height: 130px;
  }
}

/* Small phones. */
@media (max-width: 575.98px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  body {
    font-size: 14px;
    line-height: 1.65;
  }

  .custom-navbar {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .custom-navbar .navbar-brand {
    font-size: 1.1rem;
  }

  .hero {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 8.5vw, 2.25rem);
  }

  .hero .hero-img-wrap img {
    max-height: 320px;
  }

  .product-section .row > [class*="col-"],
  .blog-section .row > [class*="col-"] {
    min-width: 0;
  }

  .product-section .product-item h3 {
    font-size: 14px;
    line-height: 1.4;
  }

  .product-section .product-item strong {
    font-size: 15px !important;
  }

  .footer-section .custom-social li a {
    width: 38px;
    height: 38px;
    line-height: 38px;
  }

  .footer-section .copyright {
    font-size: 12px !important;
  }
}

/* Respect users who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}


/* Back-to-top control: fixed, accessible and styled to complement the existing theme. */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1050;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #3b5d50;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease, background-color .2s ease;
}

.back-to-top i {
  font-size: 21px;
  line-height: 1;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: #2d493e;
  color: #fff;
}

.back-to-top:focus-visible {
  outline: 3px solid #8ecae6;
  outline-offset: 3px;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Keep the design credit visible and legible on every screen size. */
.footer-section .copyright .designed-by-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.footer-section .copyright .designed-by {
  margin: 0;
  color: #3b5d50;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.footer-section .copyright .designed-by a {
  display: inline-block;
  color: #3b5d50;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-section .copyright .designed-by a:hover {
  color: #243c32;
}

@media (max-width: 575.98px) {
  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
  }

  .footer-section .copyright .designed-by {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
  }
}


