/* AF Instagram Feed */

.af-ig-feed {
  --af-ig-gap: 16px;
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* Track */
.af-ig-feed .af-ig-track {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  will-change: transform;
  gap: var(--af-ig-gap);
}

/* Einzelnes Item */
.af-ig-feed .af-ig-item {
  flex-shrink: 0;
  position: relative;
}

.af-ig-feed .af-ig-item__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Bild-Container mit Seitenverhältnis */
.af-ig-feed .af-ig-item__image {
  position: relative;
  overflow: hidden;
  background: #f0f0f0;
}

.af-ig-feed .af-ig-item__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.af-ig-feed .af-ig-item__link:hover .af-ig-item__image img {
  transform: scale(1.04);
}

/* Seitenverhältnisse */
.af-ig-ratio-1-1 .af-ig-item__image,
.af-ig-feed .af-ig-ratio--1-1 {
  aspect-ratio: 1 / 1;
}

.af-ig-ratio-4-5 .af-ig-item__image,
.af-ig-feed .af-ig-ratio--4-5 {
  aspect-ratio: 4 / 5;
}

.af-ig-ratio-16-9 .af-ig-item__image,
.af-ig-feed .af-ig-ratio--16-9 {
  aspect-ratio: 16 / 9;
}

/* Overlay */
.af-ig-feed .af-ig-item__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
}

.af-ig-feed .af-ig-item__link:hover .af-ig-item__overlay {
  opacity: 1;
}

/* Overlay-Inhalte */
.af-ig-feed .af-ig-meta {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.af-ig-feed .af-ig-caption {
  color: #fff;
  font-size: 0.8rem;
  line-height: 1.4;
  margin: 8px 0 0;
  max-height: 4.2em;
  overflow: hidden;
}

/* Video-Badge */
.af-ig-feed .af-ig-item__video-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  pointer-events: none;
}

/* Navigation */
.af-ig-feed .af-ig-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: background 0.2s;
}

.af-ig-feed .af-ig-nav:hover {
  background: #fff;
}

.af-ig-feed .af-ig-nav--prev {
  left: 8px;
}

.af-ig-feed .af-ig-nav--next {
  right: 8px;
}

/* Load More */
.af-ig-feed .af-ig-load-more {
  display: block;
  margin: 20px auto 0;
  padding: 10px 28px;
  background: transparent;
  border: 2px solid currentColor;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.af-ig-feed .af-ig-load-more:hover {
  background: currentColor;
  color: #fff;
}

.af-ig-feed .af-ig-load-more:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Mobile */
@media (max-width: 768px) {
  .af-ig-feed .af-ig-nav {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
  }
}
