.projects-section {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  background: #1c1c1c;
  position: relative;
  overflow: hidden;
}

.projects-container {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 200px;
}

.projects-parent {
  width: 100%;
}

.portfolio-title {
  color: #3dcfb6;
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0%;
  margin-bottom: 20px;
  font-family: var(--font-main);
}

.featured-title {
  width: 100%;
  max-width: 730px;
  font-family: var(--font-code);
  font-size: 6.4rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -3%;
  color: #3dcfb6;
  margin-bottom: 24px;
}

.featured-text {
  display: block;
  max-width: 450px;
  font-family: var(--font-main);
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0%;
  color: #ffffff;
  margin-bottom: 60px;
}

.projects-list {
  width: 100%;
  max-width: 880px;
  display: flex;
  flex-direction: column;
}

.project-item {
  width: 100%;
  transition: all 0.3s ease-in-out;
}

.project-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 0;
  cursor: pointer;
}

.project-name {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-code);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0%;
  color: #ffffff;
  transition: all 0.3s ease;
}

.project-tech {
  font-family: var(--font-code);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0%;
  text-align: right;
  color: rgba(255, 255, 255, 0.7);
  margin-right: 20px;
}

.project-divider {
  height: 1px;
  background-color: #3dcfb6;
  width: 100%;
}

.project-title-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: 20px;
}

.pipe {
  color: #3dcfb6;
  margin: 0 5px;
  font-weight: bold;
}

.projects-content-flex {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  width: 100%;
  gap: 40px;
}

.project-preview-container {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
  min-height: 100%;
}

.project-preview-container.align-top {
  align-items: flex-start;
}

.project-preview-container.align-center {
  align-items: center;
}

.project-preview-container.align-bottom {
  align-items: flex-end;
}

.image-frame {
  position: relative;
  width: 295px;
  height: 192px;
  display: inline-block;
  cursor: pointer;
  overflow: visible;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.image-frame.visible {
  opacity: 1;
}

#project-preview-img {
  width: 295px;
  height: 192px;
  border-radius: 16px;
  position: relative;
  z-index: 10;
  transition: all 0.3s ease-in-out;
  border: 1px solid rgba(61, 207, 182, 0.2);
}

.hover-arrow {
  color: #ffffff;
  font-size: 32px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s ease;
  transform: rotate(315deg);
  stroke-width: 5px;
}

.project-item:hover .hover-arrow {
  opacity: 1;
}

.modal-content {
  background: linear-gradient(35deg, #1c1c1c 40%, #08463b 100%);
  border-radius: 30px;
  padding: 60px;
  max-width: 1248px;
  width: 100%;
  max-height: 80vh;
  height: auto;
  width: 95%;
  color: white;
  position: relative;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  display: none;
}

.modal-flex-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.project-number {
  font-family: var(--font-main);
  font-size: 12.8rem;
  font-weight: 700;
  color: #3dcfb6;
  line-height: 1.1;
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: 10px;
}

.modal-project-title {
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 30px;
  font-family: var(--font-code);
}

.modal-question {
  color: #3dcfb6;
  font-family: var(--font-code);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0%;
  margin-bottom: 15px;
}

.modal-text {
  font-family: var(--font-main);
  font-size: 1.8rem;
  line-height: 1.5;
  max-width: 400px;
  margin-bottom: 30px;
}

.modal-right {
  width: 100%;
  max-width: 520px;
  height: auto;
}

.modal-img-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-img-wrapper img {
  width: 100%;
  height: 100%;
  transition: opacity 0.3s ease;
}

.modal-buttons-container {
  display: flex;
  flex-direction: row;
  gap: 20px;
  margin-top: 40px;
  justify-content: flex-start;
}

.custom-btn {
  display: inline-flex;
  align-items: center;
  gap: -10px;
  font-family: var(--font-main);
  padding: 5px 20px 5px 20px;
  border-radius: 100px;
  border: 1px solid #ffffff;
  color: #ffffff;
  text-decoration: none;
  font-size: 1.8rem;
  font-weight: 400;
  transition: all 0.2s ease;
  background: transparent;
  white-space: nowrap;
}

.arrow img {
  width: 30px;
  height: 30px;
  filter: invert(30%) sepia(21%) saturate(1066%) hue-rotate(120deg)
    brightness(91%) contrast(88%);
  transition: transform 0.3s ease;
  margin-top: 5px;
  transform: rotate(-45deg);
}

.arrow {
  font-size: 20px;
  transition: transform 0.2s ease;
}

.close-modal {
  position: absolute;
  top: 60px;
  right: 60px;
  font-size: 48px;
  font-weight: 200;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.2s;
  z-index: 2001;
}

.next-project-wrapper {
  position: absolute;
  bottom: 40px;
  right: 60px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #3dcfb6;
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1;
  font-family: var(--font-main);
  cursor: pointer;
  transition: color 0.3s ease;
}

.arrow-right img {
  width: 40px;
  height: 40px;
  filter: invert(30%) sepia(21%) saturate(1066%) hue-rotate(120deg)
    brightness(91%) contrast(88%);
  font-size: 24px;
  margin-top: 7px;
  transition: transform 0.2s ease;
}

.modal-tech-icons {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.tech-icon-item img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: invert(30%) sepia(21%) saturate(1066%) hue-rotate(120deg)
    brightness(91%) contrast(88%);
}

.tech-icon-item span {
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0%;
  font-family: var(--font-main);
}

.tech-icon-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Responsive Anpassungen */

@media (max-width: 1600px) {
  .featured-title {
    font-size: 5.6rem;
  }
}

@media (max-width: 1200px) {
  .project-number {
    font-size: 10rem;
  }
}

@media (hover: hover) {
  .project-item:hover .project-name {
    color: #ffffff;
    transform: translateX(10px);
  }

  .project-item:hover .project-divider {
    opacity: 1;
  }

  .project-item:hover .project-row {
    background: linear-gradient(
      90deg,
      rgba(61, 207, 183, 0.376) 0%,
      transparent 100%
    );
  }
  .image-frame::before {
    content: "";
    position: absolute;
    bottom: -15px;
    right: -15px;
    border-radius: 16px;
    width: 295px;
    height: 192px;
    background-image: repeating-linear-gradient(
      135deg,
      #3dcfb6 0px,
      #3dcfb6 2px,
      transparent 2px,
      transparent 15px
    );
    z-index: 1;
    opacity: 0.5;
    transition: all 0.4s ease-in-out;
  }

  .image-frame.visible:hover #project-preview-img {
    transform: translate(5px, -5px);
  }

  .image-frame.visible:hover::before {
    opacity: 1;
    transform: translate(-5px, 5px);
  }

  .custom-btn:hover {
    border-color: #3dcfb6;
    cursor: pointer;
  }

  .custom-btn:hover .arrow {
    transform: translate(3px, -3px);
  }

  .close-modal:hover {
    color: #3dcfb6;
    transform: scale(1.4);
    font-weight: 300;
    transition: ease-in-out 0.2s;
  }

  .next-project-wrapper:hover {
    color: #ffffff;
  }

  .next-project-wrapper:hover .arrow-right img {
    transform: translateX(5px);
  }
}

@media (max-width: 768px) {
  .projects-section {
    padding: 60px 20px;
  }

  .projects-container {
    width: 100%;
  }

  .projects-content-flex {
    gap: 0;
  }

  .image-frame {
    display: none;
  }

  .project-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .project-tech {
    margin-left: 0;
    margin-right: 0;
  }

  .modal-overlay {
    align-items: flex-start;
    padding: 0;
  }

  .modal-content {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    max-width: 100%;
    border-radius: 0;
    padding: 60px 15px 40px;
    overflow-y: auto;
    margin: 0;
  }

  .modal-flex-container {
    flex-direction: column-reverse;
    gap: 30px;
    align-items: flex-start;
  }

  .modal-right,
  .modal-left {
    width: 100%;
    max-width: 100%;
  }

  .project-number {
    font-size: 7.2rem;
  }

  .modal-project-title {
    font-size: 5.6rem;
  }

  .modal-question {
    font-size: 2rem;
  }

  .modal-text {
    font-size: 1.6rem;
  }

  .close-modal {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition:
      transform 0.1s ease,
      opacity 0.1s ease;
  }

  .close-modal:active {
    transform: scale(0.95) translateY(2px);
    opacity: 0.7;
  }

  .custom-btn {
    padding: 5px 15px;
    font-size: 1.6rem;
    transition:
      transform 0.1s ease,
      opacity 0.1s ease;
  }

  .custom-btn:active {
    transform: scale(0.95) translateY(2px);
    opacity: 0.7;
  }

  .project-title-wrapper {
    margin-left: 0;
  }

  .project-row {
    transition:
      transform 0.1s ease,
      opacity 0.1s ease;
  }

  .project-row:active {
    transform: scale(0.95) translateY(2px);
    opacity: 0.7;
  }

  .next-project-wrapper {
    position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom));
    right: 20px;
    transition:
      transform 0.1s ease,
      opacity 0.1s ease;
  }

  .next-project-wrapper:active {
    transform: scale(0.95) translateY(2px);
    opacity: 0.7;
  }

  .arrow-right img {
    width: 30px;
    height: 30px;
  }

  .hover-arrow {
    display: none;
  }
}

@media (max-width: 480px) {
  .next-project-wrapper {
    font-size: 1.6rem;
  }

  .modal-left {
    margin-bottom: 30px;
  }

  .modal-project-title {
    font-size: 4.6rem;
  }
}
