/* Projekt-Karten: Bewegliche Referenzreihen, 
Browser-Frame-Effekt und Responsive */

.projects-row {
  overflow: hidden;
  margin-bottom: 2.5rem;
  position: relative;
  mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
}

.projects-row-top {
  margin-top: 2rem;
}

.projects-row-bottom {
  margin-bottom: 0;
}

.projects-row-inner {
  display: flex;
  gap: 1.5rem;
  width: fit-content;
  will-change: transform;
  animation: scroll-left 90s linear infinite;
}

.projects-row-reverse {
  animation: scroll-right 90s linear infinite;
}

/* Animation: Bewegung nach links */
@keyframes scroll-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Animation: Bewegung nach rechts */
@keyframes scroll-right {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}

/* Pause Animation bei prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .projects-row-inner {
    animation: none;
  }
}

/* Project Card Link */
.project-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  flex-shrink: 0;
}

/* Project Card */
.project-card {
  background: rgba(22, 27, 34, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 240px;
}

.project-card-link:hover .project-card {
  transform: translateY(-4px);
  border-color: rgba(0, 104, 199, 0.5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Project Card Image Container */
.project-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(13, 17, 23, 0.6);
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.project-preview {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Browser Frame Effect */
.project-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1;
}

/* Browser Dots */
.project-preview::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 18px 0 0 #ffbd2e, 36px 0 0 #28ca42;
  z-index: 2;
}

/* Subtle Pattern Overlay */
.project-card-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.02) 50%, transparent 100%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.01) 2px,
      rgba(255, 255, 255, 0.01) 4px
    );
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

/* 
   FINALE OVERRIDES - FÜR 481px-768px Bereich 
*/
@media (min-width: 481px) and (max-width: 768px) {
  .social-sidebar {
    top: auto !important;
    bottom: 130px !important;
    right: 0 !important;
    gap: 3px !important;
  }
  
  .social-sidebar-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    border-radius: 4px 0 0 4px !important;
    background: rgba(22, 27, 34, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .social-sidebar-btn svg {
    width: 14px !important;
    height: 14px !important;
    stroke: #ffffff !important;
    stroke-width: 2 !important;
    fill: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
  }
  
  .contact-header-btn,
  .contact-header-btn-transparent {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    border-radius: 4px 0 0 4px !important;
    padding: 0 !important;
  }
  
  .contact-header-btn svg,
  .contact-header-btn-transparent svg {
    width: 14px !important;
    height: 14px !important;
  }
  
  .chat-fab-container {
    bottom: 20px !important;
    right: 10px !important;
  }
  
  .chat-fab {
    width: 48px !important;
    height: 48px !important;
  }
  
  .chat-fab svg {
    width: 22px !important;
    height: 22px !important;
  }
}


.project-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  display: block;
}

/* Wenn Screenshot vorhanden, Pattern Overlay reduzieren */
.project-preview:has(img[src]:not([src=""]))::after {
  opacity: 0.1;
}

.project-preview:has(img[src]:not([src=""]))::before {
  opacity: 0.3;
}

/* Project Card Title */
.project-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #e6edf3;
  padding: 1rem;
  margin: 0;
  text-align: center;
  line-height: 1.4;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design für Projects Row */
@media (max-width: 768px) {
  .project-card {
    width: 200px;
  }
  
  .projects-row {
    margin-bottom: 1.75rem;
  }
  
  .projects-row-inner {
    gap: 1rem;
    animation: scroll-left 60s linear infinite !important;
  }

  .projects-row-reverse {
    animation: scroll-right 60s linear infinite !important;
  }
  
  .project-card-title {
    padding: 0.75rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .project-card {
    width: 160px;
  }
  
  .projects-row-inner {
    gap: 0.5rem;
    animation: scroll-left 50s linear infinite !important;
  }

  .projects-row-reverse {
    animation: scroll-right 50s linear infinite !important;
  }
  
  .project-card-title {
    padding: 0.5rem;
    font-size: 0.75rem;
  }
}
