.aa-references {
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 20px;
  text-align: center;
}

.aa-header h2 {
  font-size: 46px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 50px;
  color: #222;
}

.aa-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 60px;
}

.filter-btn {
  border: 1px solid #cfcfcf;
  border-radius: 40px;
  padding: 8px 20px;
  background: none;
  color: #000;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: #fce94e;
  border-color: #fce94e;
}

.aa-grid {
  display: flex;
  flex-direction: row;
  gap: 25px;
  margin-bottom: 80px;
  min-height: 400px;
  align-items: center;
  justify-content: center;
}

.aa-grid-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

@media (max-width: 992px) {
  .aa-grid {
    gap: 20px;
  }
  .aa-grid-column:nth-child(3) {
    display: none;
  }
  
  /* Remove all spacing on mobile */
  .aa-item {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
}

@media (max-width: 600px) {
  .aa-grid-column:nth-child(2),
  .aa-grid-column:nth-child(3) {
    display: none;
  }
  
  /* Remove all spacing on mobile */
  .aa-item {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
}

.aa-item {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-bottom: 0;
  margin-top: 0;
}

.aa-image-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-top: 0;
}

.aa-image-link {
  display: block;
  width: 100%;
  position: relative;
}

.aa-image-link img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.aa-item:hover .aa-image-link img {
  transform: scale(1.03);
}

/* Hover Overlay */
.aa-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(252, 233, 78, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0 !important;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.aa-item:hover .aa-overlay,
.aa-image-link:hover .aa-overlay {
  opacity: 1 !important;
  visibility: visible;
  pointer-events: auto;
}

/* Ensure overlay stays hidden on touch devices */
@media (hover: none) {
  .aa-overlay {
    opacity: 0 !important;
    visibility: hidden !important;
  }
}

.aa-overlay-button {
  display: inline-block;
  padding: 12px 30px;
  border: 1px solid #000;
  background: transparent;
  color: #000;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.aa-overlay-button:hover {
  background: #000;
  color: #fff;
}

/* Portfolio Caption */
.aa-caption {
  margin-top: 15px;
  font-size: 14px;
  line-height: 1.6;
  color: #222;
  text-align: left;
}

/* Werkliste Section */
.aa-werkliste {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px 0;
  text-align: left;
}

.aa-werkliste-title {
  font-size: 32px;
  font-weight: 700;
  color: #222;
  margin-bottom: 40px;
  line-height: 1.2;
}

.aa-werkliste-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.aa-werkliste-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  font-size: 15px;
  line-height: 1.6;
  color: #222;
}

.aa-werkliste-number {
  font-weight: 600;
  flex-shrink: 0;
}

.aa-werkliste-text {
  flex: 1;
}

.loading {
  text-align: center;
  color: #999;
  width: 100%;
  padding: 40px 20px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}