.references {
  background: #f7f4ef;
  padding: clamp(48px, 6vw, 96px) 0 clamp(64px, 8vw, 120px);
  color: #2b2b2b;
  position: relative;
  overflow: hidden;
}

.references-page .menu-overlay-structural {
  background: #8d6437;
}

.references-section {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 65px;
  position: relative;
}

.references-section::before {
  content: "";
  position: absolute;
  inset: -80px;
  background-image:
    radial-gradient(circle, rgba(141, 100, 55, 0.18) 1.2px, transparent 1.2px),
    linear-gradient(180deg, rgba(247, 244, 239, 0.95) 0%, rgba(247, 244, 239, 0.6) 35%, rgba(247, 244, 239, 0.15) 100%);
  background-size: 24px 24px, 100% 100%;
  background-position: 0 0, 0 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
}

.references-header {
  margin-bottom: 32px;
}

.references-header h2 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 2.4vw, 2.4rem);
  letter-spacing: 0.02em;
}

.references-header p {
  margin: 0;
  font-size: 1rem;
  color: #5b5b5b;
}

.references-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  position: relative;
  z-index: 1;
}

.reference-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 280px;
  background: #b7b0a3;
  box-shadow: 0 18px 40px rgba(36, 27, 15, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.reference-media {
  position: absolute;
  inset: 0;
}

.reference-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 0.4s ease;
}

.reference-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 16, 14, 0) 40%, rgba(17, 16, 14, 0.7) 100%);
}

.reference-content {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  color: #fff;
  z-index: 2;
}

.reference-content h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
}

.reference-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

.reference-link {
  position: absolute;
  inset: 0;
  z-index: 3;
  text-indent: -9999px;
}

.reference-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(36, 27, 15, 0.18);
}

.reference-card:hover .reference-video {
  transform: scale(1.05);
}

.reference-card:hover .reference-arrow {
  color: #fff;
}

@media (max-width: 980px) {
  .references-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1000px) {
  .references-section {
    padding: 0 60px;
  }
}

@media (max-width: 768px) {
  .references-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .reference-card {
    min-height: 240px;
  }
}

@media (max-width: 650px) {
  .references-section {
    padding: 0 35px;
  }
}

@media (max-width: 520px) {
  .references-section::before {
    inset: -36px;
  }

  .reference-card {
    min-height: 220px;
    border-radius: 14px;
  }

  .reference-content {
    left: 14px;
    right: 14px;
    bottom: 14px;
    gap: 12px;
  }

  .reference-content h3 {
    font-size: 1rem;
  }
}
