.projects-section {
  padding: 40px 0 60px 0;
  background: transparent;
}

.projects-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px 0;
}

.projects-controls {
  display: none;
  gap: 10px;
}

.projects-control {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0, 195, 255, 0.65);
  background: rgba(3, 32, 76, 0.55);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.projects-control:hover {
  transform: translateY(-1px);
  background: rgba(3, 32, 76, 0.75);
}

.projects-slider {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 86%;
  gap: 16px;
  overflow-x: auto;
  align-items: stretch;
  scroll-snap-type: x mandatory;
  scroll-padding: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.projects-slider::-webkit-scrollbar {
  display: none;
}

.project-card {
  scroll-snap-align: start;
  border-radius: 14px;
  padding: 22px 16px;
  border: 1px solid #00C3FF;
  background: rgba(3, 32, 76, 0.30);
  box-sizing: border-box;
  min-height: 260px;
  display: flex;
  flex-direction: column;
}

.project-title {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 700;
  color: #00C3FF;
  letter-spacing: 0.01em;
}

.project-short {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #e8eef8;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.project-term {
  margin-top: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #00C3FF;
  letter-spacing: 0.02em;
}

.project-details {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 195, 255, 0.25);
}

.project-details summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.project-details summary::-webkit-details-marker {
  display: none;
}

.project-details summary .chevron {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 136, 229, 0.14);
  border: 1px solid rgba(45, 111, 237, 0.25);
  color: rgba(255, 255, 255, 0.9);
  transition: transform 0.25s ease, background 0.25s ease;
  flex-shrink: 0;
  font-size: 0;
  line-height: 0;
}

.project-details summary .chevron::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  box-sizing: border-box;
}

/* Поворот стрелки при открытии */
.project-details[open] summary .chevron {
  transform: rotate(180deg);
}

.project-meta {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  line-height: 1.6;
}

.project-meta strong {
  color: #ffffff;
  font-weight: 700;
}

.project-achievements {
  margin: 10px 0 0 18px;
  padding: 0;
}

.project-achievements li {
  margin: 6px 0;
}

.project-link {
  margin-top: 10px;
}

.project-link a {
  color: #00C3FF;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-link a:hover {
  color: #ffffff;
}

@media (max-width: 767px) {
  .projects-slider {
    grid-auto-flow: row;
    grid-auto-columns: unset;
    grid-template-columns: 1fr;
    overflow-x: visible;
    scroll-snap-type: none;
  }

  .project-card {
    scroll-snap-align: unset;
    min-height: auto;
  }
}

@media (min-width: 768px) {
  .projects-controls {
    display: inline-flex;
  }

  .projects-slider {
    grid-auto-columns: calc((100% - 32px) / 3);
    gap: 16px;
  }

  .project-card {
    padding: 26px 18px;
    min-height: 320px;
  }

  .project-title {
    font-size: 19px;
  }
}

@media (min-width: 1440px) {
  .projects-slider {
    grid-auto-columns: calc((100% - 50px) / 4);
    gap: 16px;
  }
}