.instruments-section {
  padding: var(--space-2xl) 0 var(--space-xl);
  background: linear-gradient(180deg, rgba(247, 239, 227, 0.08) 0%, rgba(255, 255, 255, 0) 100%);
}

.instruments-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.instruments-heading {
  text-align: center;
  margin-bottom: 0.2rem;
}

.instruments-intro {
  margin: 0.65rem auto 0;
  max-width: 48rem;
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  line-height: 1.8;
  color: var(--color-text-muted);
}

.instrument-tabs {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  row-gap: 0.5rem;
  padding: 0.35rem 0.1rem 0.25rem;
  overflow: hidden;
  scrollbar-width: none;
}

.instrument-tab-indicator {
  position: absolute;
  top: 0.35rem;
  bottom: 0.35rem;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-accent) 0%, #d8a445 100%);
  box-shadow: 0 10px 24px rgba(183, 125, 35, 0.22);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), width 280ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
}

.instrument-tab {
  position: relative;
  z-index: 1;
  flex: 1 1 min(120px, 20%);
  min-width: 100px;
  max-width: 240px;
  border: 1px solid rgba(183, 125, 35, 0.2);
  background: transparent;
  color: var(--color-text);
  padding: 0.62rem 0.85rem;
  border-radius: 999px;
  font-size: clamp(0.84rem, 1.4vw, 0.98rem);
  font-weight: 700;
  cursor: pointer;
  transition: color 220ms ease, transform 220ms ease, box-shadow 220ms ease, background-color 220ms ease, border-color 220ms ease;
  white-space: nowrap;
  min-height: 2.8rem;
}

.instrument-tab:hover,
.instrument-tab:focus-visible {
  transform: translateY(-1px);
  color: var(--color-accent-dark);
  box-shadow: 0 10px 24px rgba(31, 27, 23, 0.08);
}

.instrument-tab.is-active {
  color: #2f2214;
  transform: translateY(0);
  box-shadow: none;
}

.instruments-carousel-shell {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.instruments-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(0.7rem, 2vw, 1rem);
  overflow-x: auto;
  padding: 0.25rem 0.3rem 0.65rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.instruments-grid.is-dragging {
  cursor: grabbing;
}

.instruments-grid::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.carousel-progress {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0.45rem 0 0;
}

.carousel-progress-track {
  position: relative;
  width: min(100%, 92%);
  max-width: 900px;
  height: 3px;
  border-radius: 999px;
  background: rgba(31, 27, 23, 0.08);
  overflow: hidden;
}

.carousel-progress-thumb {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateX(0) translateY(-50%);
  width: 24%;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-accent) 0%, #d8a445 100%);
  box-shadow: 0 10px 20px rgba(216, 164, 69, 0.18);
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), width 300ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, width;
}

.instruments-grid::-webkit-scrollbar {
  height: 6px;
}

.instruments-grid::-webkit-scrollbar-thumb {
  background: rgba(183, 125, 35, 0.32);
  border-radius: 999px;
}

.instrument-bubble {
  --bubble-size: clamp(78px, 18vw, 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
  min-width: calc(var(--bubble-size) + 1rem);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: center;
  padding: 0.35rem 0.2rem;
  color: var(--color-text);
  scroll-snap-align: center;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  visibility: hidden;
}

.instrument-bubble.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.instrument-bubble.is-hidden {
  opacity: 0;
  transform: translateY(8px) scale(0.95);
  visibility: hidden;
  pointer-events: none;
  flex: 0 0 0;
  min-width: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

.bubble-media {
  width: var(--bubble-size);
  height: var(--bubble-size);
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 3px rgba(183, 125, 35, 0.12);
  border: 2px solid rgba(183, 125, 35, 0.42);
  transform-origin: center center;
  transition: transform 240ms ease, box-shadow 240ms ease;
  will-change: transform;
}

.bubble-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.bubble-name {
  font-weight: 700;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  color: var(--color-text);
  line-height: 1.5;
}

.instrument-bubble:hover .bubble-media,
.instrument-bubble:focus-visible .bubble-media {
  transform: scale(1.05);
  box-shadow: 0 0 0 4px rgba(183, 125, 35, 0.14);
}

.instrument-bubble:active .bubble-media {
  transform: scale(1.02);
}


.instrument-faq {
  margin-top: 1.25rem;
  padding: 1rem 1rem 0;
  border-top: 1px solid rgba(31, 27, 23, 0.08);
}

.instrument-faq h3 {
  margin: 0 0 0.85rem;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--color-accent-dark);
}

.faq-item {
  border-bottom: 1px solid rgba(31, 27, 23, 0.06);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-toggle {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0.85rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: right;
  font-size: clamp(0.92rem, 1.5vw, 1rem);
  color: var(--color-text);
  cursor: pointer;
}

.faq-icon {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  border: 1px solid rgba(183, 125, 35, 0.28);
  position: relative;
  flex: 0 0 auto;
  transition: transform 220ms ease;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  background: currentColor;
  border-radius: 999px;
}

.faq-icon::before {
  width: 0.7rem;
  height: 2px;
}

.faq-icon::after {
  width: 2px;
  height: 0.7rem;
  transition: transform 220ms ease;
}

.faq-item.is-open .faq-icon {
  transform: rotate(45deg);
}

.faq-item.is-open .faq-icon::after {
  transform: translate(-50%, -50%) scaleY(0);
}

.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 220ms ease;
}

.faq-panel > div {
  overflow: hidden;
}

.faq-item.is-open .faq-panel {
  grid-template-rows: 1fr;
}

.faq-panel p {
  margin: 0 0 0.85rem;
  font-size: clamp(0.88rem, 1.4vw, 0.95rem);
  line-height: 1.8;
  color: var(--color-text-muted);
}

.instrument-popup {
  position: fixed;
  inset: 0;
  z-index: 2500;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.instrument-popup.active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 27, 23, 0.6);
}

.popup-card {
  position: fixed;
  top: max(1rem, calc(env(safe-area-inset-top) + 0.75rem));
  left: 50%;
  transform: translateX(-50%) scale(0.97);
  width: min(92vw, 440px);
  max-height: calc(100dvh - 2rem);
  border-radius: 22px;
  background: var(--color-bg);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 28px 60px rgba(31,27,23,0.14);
  z-index: 2501;
  opacity: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.instrument-popup.active .popup-card {
  transform: translateX(-50%) scale(1);
  opacity: 1;
}

.popup-grabber {
  width: 56px;
  height: 5px;
  border-radius: 999px;
  background: rgba(31, 27, 23, 0.16);
  margin: 0.6rem auto 0;
}

.popup-card-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem 0.75rem;
  background: var(--color-bg);
  border-bottom: 1px solid rgba(31, 27, 23, 0.06);
}

.popup-card-title {
  min-width: 0;
}

.popup-card-title h4 {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.15rem);
  text-align: right;
  line-height: 1.4;
}

.popup-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.popup-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.96);
  color: var(--color-text);
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(31,27,23,0.08);
}

.popup-card-body {
  padding: 1rem 1.1rem 1.2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.popup-media-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.popup-image {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(183, 125, 35, 0.42);
  box-shadow: 0 12px 30px rgba(31,27,23,0.12);
}

.popup-detail-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.popup-row {
  margin: 0;
  color: var(--color-text-muted);
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: clamp(0.9rem, 1.3vw, 0.97rem);
  line-height: 1.75;
}

.popup-row-block {
  display: block;
}

.popup-row-block p {
  margin: 0.25rem 0 0;
  line-height: 1.8;
  color: var(--color-text);
}

.popup-label {
  font-weight: 700;
  min-width: 6.5rem;
  color: var(--color-accent-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.popup-row-with-icon .popup-label {
  min-width: 8rem;
}

.popup-label svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.popup-phone-link,
.contact-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-accent-dark);
  text-decoration: none;
  font-weight: 700;
  margin-top: 0.15rem;
}

.popup-phone-link svg,
.contact-phone-link svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.difficulty-meter {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.difficulty-notes {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.difficulty-note {
  width: 1rem;
  height: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(31, 27, 23, 0.38);
  opacity: 0;
  transform: scale(0.6);
  transition: transform 260ms ease, opacity 260ms ease, color 260ms ease;
}

.difficulty-note.is-active {
  color: var(--color-accent);
}

.difficulty-note.is-ready {
  opacity: 1;
  transform: scale(1);
}

.difficulty-note[data-delay] {
  transition-delay: var(--delay);
}

.difficulty-note svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.difficulty-note:not(.is-active) svg {
  fill: none;
  stroke: rgba(31, 27, 23, 0.38);
  stroke-width: 1.5;
}

.difficulty-label {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.difficulty-note.is-ready {
  transition-delay: 0ms;
}

.difficulty-note[data-delay] {
  transition-delay: var(--delay);
}

.popup-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 44px;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-accent) 0%, #d8a445 100%);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 0.8rem 1rem;
  box-shadow: 0 12px 28px rgba(183, 125, 35, 0.2);
}

.popup-cta svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 768px) {
  .instrument-tabs {
    justify-content: center;
    overflow-x: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

@media (max-width: 767px) {
  .instrument-tabs {
    gap: 0.4rem;
    padding: 0.28rem 0.15rem 0.25rem;
  }

  .instrument-tab {
    padding: 0.6rem 0.75rem;
    font-size: clamp(0.82rem, 2vw, 0.94rem);
  }
}

@media (min-width: 421px) and (max-width: 670px) {
  .instrument-tabs {
    gap: 0.4rem;
    row-gap: 0.45rem;
    padding: 0.25rem 0.15rem 0.2rem;
  }

  .instrument-tab {
    flex: 1 1 calc(50% - 0.2rem);
    min-width: 0;
    max-width: none;
    padding: 0.54rem 0.62rem;
    font-size: clamp(0.78rem, 1.65vw, 0.9rem);
    min-height: 2.45rem;
  }

  .instrument-tab-indicator {
    display: none;
  }
}

@media (max-width: 420px) {
  .instrument-tabs {
    justify-content: center;
    gap: 0.35rem;
    row-gap: 0.45rem;
  }

  .instrument-tab {
    flex: 1 1 42%;
    min-width: 120px;
    max-width: 48%;
    padding: 0.6rem 0.8rem;
    font-size: clamp(0.78rem, 2.6vw, 0.92rem);
  }

  .instrument-tab-indicator {
    display: none;
  }

  .instrument-tab.is-active {
    background: rgba(216, 164, 69, 0.12);
    border-color: rgba(183, 125, 35, 0.25);
    color: var(--color-accent-dark);
    box-shadow: none;
  }
}

@media (max-width: 767px) {
  .popup-card {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    max-height: 85dvh;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }

  .instrument-popup.active .popup-card {
    transform: translateY(0);
  }

  .popup-card-body {
    padding-bottom: calc(1.15rem + env(safe-area-inset-bottom));
  }
}

@media (max-width: 479px) {
  .instrument-tabs {
    padding-inline: 0.1rem;
  }

  .instrument-bubble {
    --bubble-size: clamp(72px, 18vw, 96px);
  }

  .popup-image {
    width: 96px;
    height: 96px;
  }
}

