/*
 * Carlos Marquez Landing V2
 * Navigation state, neutral mobile menu and carousel spacing.
 */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

main > section[id] {
  scroll-margin-top: 96px;
}

/* Desktop navigation */

.cm-desktop-nav a {
  color: #aaa7a3;
}

.cm-desktop-nav a:hover,
.cm-desktop-nav a:focus-visible,
.cm-desktop-nav a.is-active,
.cm-desktop-nav a[aria-current="location"] {
  color: var(--cm-gold-title);
}

.cm-desktop-nav a.is-active::after,
.cm-desktop-nav a[aria-current="location"]::after {
  right: 0;
}

/* Hamburger */

.cm-menu-toggle {
  border-color: #3a3836;
  background: #151515;
}

.cm-menu-toggle:hover,
.cm-menu-toggle:focus-visible {
  border-color: #8f744b;
  background: #181818;
}

.cm-menu-toggle span {
  height: 2px;
  background: #c5a36f;
  box-shadow: none;
}

/* Tablet and mobile menu */

.nav-modal {
  place-items: start end;
  padding:
    calc(var(--cm-header-mobile, 72px) + 10px)
    14px
    18px;
}

.nav-modal__backdrop {
  background: rgba(5, 5, 5, 0.84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-modal__panel {
  width: min(100%, 390px);
  max-height:
    calc(100vh - var(--cm-header-mobile, 72px) - 28px);
  display: grid;
  gap: 0;
  padding: 50px 18px 18px;
  overflow-y: auto;
  border: 1px solid #303030;
  border-radius: 8px;
  background: #141414;
  background-image: none;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
  transform: translateY(-8px);
}

.is-open .nav-modal__panel {
  transform: translateY(0);
}

.nav-modal__panel a {
  min-height: 50px;
  padding: 13px 12px;
  justify-content: flex-start;
  border: 0;
  border-bottom: 1px solid #292929;
  border-radius: 0;
  background: transparent;
  color: #b8b5b1;
  font-family: var(--font-body);
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  transform: none;
}

.nav-modal__panel a:last-of-type {
  border-bottom: 0;
}

.nav-modal__panel a:hover,
.nav-modal__panel a:focus-visible {
  background: #181818;
  color: var(--cm-gold-title);
  transform: none;
}

.nav-modal__panel a.is-active,
.nav-modal__panel a[aria-current="location"] {
  padding-left: 18px;
  border-left: 2px solid #c5a36f;
  background: #171717;
  color: var(--cm-gold-title);
}

.nav-modal__close {
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid #3a3836;
  border-radius: 4px;
  background: #171717;
  color: #b8b5b1;
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 400;
}

/* Portfolio carousel */

.gallery-shell {
  width: min(100%, 1080px);
  max-width: 1080px;
  margin-top: 34px;
  padding-inline: 48px;
}

.portfolio-slider {
  border-radius: 8px;
}

.portfolio-track .portfolio-card {
  flex: 0 0 calc(100% - 16px);
  margin-inline: 8px;
  overflow: hidden;
  border-radius: 8px;
  box-sizing: border-box;
}

.gallery-arrow {
  width: 40px;
  height: 40px;
  border-color: #55504a;
  background: #141414;
  color: #d0ad70;
}

.gallery-arrow--prev {
  left: 2px;
}

.gallery-arrow--next {
  right: 2px;
}

/* Testimonials carousel */

.testimonial-shell {
  width: min(100%, 1120px);
  max-width: 1120px;
  margin-top: 32px;
  padding-inline: 52px;
}

.testimonial-slider {
  border-radius: 8px;
}

.testimonial-track .testimonial-card {
  flex: 0 0 calc(100% - 16px);
  min-height: 190px;
  margin-inline: 8px;
  padding: 24px 26px;
  box-sizing: border-box;
  border-radius: 8px;
}

.google-review {
  gap: 12px;
}

.testimonial-arrow {
  width: 40px;
  height: 40px;
  border-color: #55504a;
  background: #141414;
  color: #d0ad70;
}

.testimonial-arrow--prev {
  left: 3px;
}

.testimonial-arrow--next {
  right: 3px;
}

.slider-dots,
.slider-dots--testimonials {
  gap: 10px;
  margin-top: 22px;
}

@media (min-width: 820px) {
  .portfolio-track .portfolio-card,
  .testimonial-track .testimonial-card {
    flex-basis: calc((100% / 3) - 18px);
    margin-inline: 9px;
  }
}

@media (min-width: 1180px) {
  .portfolio-track .portfolio-card,
  .testimonial-track .testimonial-card {
    flex-basis: calc((100% / 3) - 20px);
    margin-inline: 10px;
  }
}

@media (max-width: 767px) {
  html {
    scroll-padding-top: 84px;
  }

  main > section[id] {
    scroll-margin-top: 84px;
  }

  .nav-modal {
    padding:
      calc(var(--cm-header-mobile, 72px) + 8px)
      10px
      calc(84px + env(safe-area-inset-bottom));
  }

  .nav-modal__panel {
    width: min(100%, 360px);
    padding-inline: 14px;
  }

  .gallery-shell,
  .testimonial-shell {
    margin-top: 26px;
    padding-inline: 36px;
  }

  .portfolio-track .portfolio-card,
  .testimonial-track .testimonial-card {
    flex-basis: calc(100% - 12px);
    margin-inline: 6px;
  }

  .testimonial-track .testimonial-card {
    min-height: 184px;
    padding: 22px 20px;
  }

  .gallery-arrow,
  .testimonial-arrow {
    width: 34px;
    height: 34px;
  }

  .gallery-arrow--prev,
  .testimonial-arrow--prev {
    left: 0;
  }

  .gallery-arrow--next,
  .testimonial-arrow--next {
    right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .nav-modal,
  .nav-modal__panel,
  .nav-modal__panel a {
    transition: none !important;
  }
}