/* Layout changes for the front page only. */
body.home > header > .container,
body.home > section.container,
body.home > main.container,
body.home > footer .container {
  width: 100%;
  max-width: none;
  padding-right: clamp(16px, 2.5vw, 56px);
  padding-left: clamp(16px, 2.5vw, 56px);
}

body.home header .d-logo img {
  width: 100%;
  max-width: 300px;
  height: auto;
}

body.home header .nav-links {
  flex-wrap: wrap;
  justify-content: flex-end;
}

body.home .home-main,
body.home .home-main > section {
  min-width: 0;
}

body.home .home-main .border-search {
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

body.home .home-search {
  width: 100%;
  max-width: 1360px;
  margin-right: auto;
  margin-left: auto;
}

body.home .home-search .card-body {
  padding: clamp(16px, 2vw, 32px);
}

body.home .home-search form .col-md-9 {
  min-width: 0;
}

body.home .home-search .form-control,
body.home .home-search .btn-success {
  min-height: 44px;
}

body.home .home-shelf {
  --home-card-width: 100%;
  position: relative;
  padding: 0 48px;
}

body.home .home-shelf .carousel-main {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  width: 100% !important;
  margin: 0 !important;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

body.home .home-shelf .carousel-main::-webkit-scrollbar {
  display: none;
}

body.home .home-shelf .carousel-main > .carousel-card {
  display: block !important;
  position: relative !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  z-index: auto !important;
  flex: 0 0 var(--home-card-width);
  width: var(--home-card-width);
  max-width: var(--home-card-width);
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  transform: none !important;
  visibility: visible !important;
  transition: none !important;
  scroll-snap-align: start;
}

body.home .home-shelf .carousel-card > .card {
  height: 100%;
}

body.home .home-shelf .carousel-card .img-height {
  width: 100%;
  height: clamp(240px, 22vw, 320px);
  object-fit: contain;
  background: #f6f8f8;
}

body.home .home-shelf .carousel-prev,
body.home .home-shelf .carousel-next {
  top: 50%;
  bottom: auto;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
}

body.home .home-shelf .carousel-prev {
  left: 0;
}

body.home .home-shelf .carousel-next {
  right: 0;
}

body.home .home-shelf .carousel-prev.is-disabled,
body.home .home-shelf .carousel-next.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

body.home .home-video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  width: 100% !important;
  margin: 0 !important;
}

body.home .home-video-grid > .carousel-card {
  display: block !important;
  position: relative !important;
  width: auto;
  max-width: none;
  margin: 0 !important;
  padding: 0 !important;
}

body.home .home-video-grid > .carousel-card > .card {
  height: 100%;
}

body.home .contadores .row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

body.home .contadores .col {
  min-width: 0;
  max-width: none;
}

body.home footer.footer img {
  max-width: 100%;
  height: auto;
}

body.home footer.footer a {
  overflow-wrap: anywhere;
}

body.home .modal-body {
  overflow-x: auto;
}

@media (min-width: 576px) {
  body.home .home-shelf {
    --home-card-width: calc((100% - 16px) / 2);
  }
}

@media (min-width: 768px) {
  body.home .home-shelf {
    --home-card-width: calc((100% - 32px) / 3);
  }

  body.home .home-search form .col-md-9 {
    flex: 1 1 0;
    max-width: none;
  }

  body.home .home-search form .col-md-3 {
    flex: 0 0 200px;
    max-width: 200px;
  }
}

@media (min-width: 992px) {
  body.home .home-video-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  body.home .home-shelf {
    --home-card-width: calc((100% - 48px) / 4);
  }

  body.home .home-video-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.home header .bg-icon .nav-link {
    margin: 0 0.5rem;
  }

  body.home header .nav-links .nav-link {
    padding: 0.5rem 0.65rem;
    font-size: clamp(0.95rem, 0.9vw, 1.1rem);
  }
}

@media (min-width: 1600px) {
  body.home .home-shelf {
    --home-card-width: calc((100% - 64px) / 5);
  }
}

@media (min-width: 2100px) {
  body.home .home-shelf {
    --home-card-width: calc((100% - 80px) / 6);
  }
}

@media (max-width: 1199.98px) {
  body.home > header > .container > .row {
    position: relative;
    align-items: center;
  }

  body.home header .d-logo {
    order: 1 !important;
    flex: 0 0 auto;
    max-width: calc(100% - 72px);
    padding-top: 12px;
    padding-bottom: 12px;
  }

  body.home header .d-logo img {
    max-width: 240px;
  }

  body.home header .btn-mobile {
    display: block;
    position: absolute;
    top: 50%;
    right: 15px;
    z-index: 1101;
    width: 44px;
    height: 44px;
    transform: translateY(-50%);
  }

  body.home header .col-md-9.order-1 {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 1200;
    width: min(380px, 100vw);
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding: 64px 16px 24px !important;
    overflow-y: auto;
    background: var(--color-success);
    box-shadow: -12px 0 32px rgba(0, 0, 0, 0.18);
  }

  body.home header .col-md-9.order-1 > .d-flex {
    align-items: stretch !important;
    height: auto !important;
  }

  body.home header .col-md-9.order-1 .nav.bg-icon,
  body.home header .col-md-9.order-1 .nav-links {
    position: static !important;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100% !important;
    margin: 0 !important;
    padding: 0;
    border: 0 !important;
    background: transparent;
  }

  body.home header .col-md-9.order-1 .nav-links {
    margin-top: 16px !important;
  }

  body.home header .col-md-9.order-1 .bg-icon::before {
    display: none;
  }

  body.home header .col-md-9.order-1 .nav-item {
    width: 100%;
  }

  body.home header .col-md-9.order-1 .nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 11px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff !important;
    font-size: 1rem;
  }

  body.home header .col-md-9.order-1 .nav-link .text-dark {
    color: #fff !important;
  }

  body.home header .col-md-9.order-1 .dropdown-menu {
    position: static !important;
    float: none;
    width: 100%;
    margin: 0;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
  }

  body.home header .col-md-9.order-1 .dropdown-item {
    color: #fff;
    white-space: normal;
  }

  body.home header .btn-mobile-close {
    display: block;
    position: fixed;
    top: 8px;
    right: 12px;
    z-index: 1201;
    color: #fff;
    background: transparent !important;
  }

  body.home footer.footer > .container > .row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  body.home footer.footer > .container > .row > .col-lg-3 {
    max-width: none;
    padding: 0;
  }
}

@media (max-width: 991.98px) {
  body.home .home-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  body.home .home-search form .col-md-9,
  body.home .home-search form .col-md-3 {
    width: 100%;
    max-width: 100%;
  }

  body.home .contadores .row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.home .contadores {
    padding-top: 24px;
    padding-bottom: 32px;
    font-size: 1rem;
  }

  body.home .contadores i {
    font-size: 30px;
  }

  body.home .contadores span {
    font-size: 24px;
  }
}

@media (max-width: 575.98px) {
  body.home .home-shelf {
    padding: 0 0 52px;
  }

  body.home .home-shelf .carousel-prev,
  body.home .home-shelf .carousel-next {
    top: auto;
    bottom: 0;
    transform: none;
  }

  body.home .home-shelf .carousel-prev {
    left: calc(50% - 52px);
  }

  body.home .home-shelf .carousel-next {
    right: calc(50% - 52px);
  }

  body.home .home-video-grid,
  body.home footer.footer > .container > .row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.home .home-shelf .carousel-main {
    scroll-behavior: auto;
  }
}
