/* projects.css – grid kartica + modal */

.projects-wrapper {
  max-width: 1100px;
  margin: 0 auto;
}

.projects-header {
  text-align: center;
  margin-bottom: 28px;
}

.projects-header .projects-kicker {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.85;
  margin-bottom: 10px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.project-card {
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

.project-card:hover {
  transform: translateY(-3px);
}

.project-card:focus-within {
  outline: 2px solid rgba(71, 127, 139, 0.65);
  outline-offset: 2px;
}

.project-card__image {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  background: rgba(255,255,255,0.06);
}

.project-card__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card__body {
  padding: 16px 16px 18px;
}

.project-card__title {
  font-size: 1.1rem;
  margin: 0 0 8px;
  font-weight: 650;
}

.project-card__short {
  margin: 0;
  opacity: 0.9;
  line-height: 1.55;
}

.project-card__cta {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #bfe2ea;
  opacity: 0.95;
}

/* MODAL */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
}

.project-modal.is-open {
  display: block;
}

.project-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.project-modal__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(980px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  overflow: auto;
  border-radius: 20px;
  background: #0d1b1f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}

.project-modal__close {
  position: sticky;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  padding: 12px;
  background: linear-gradient(to bottom, rgba(13,27,31,0.98), rgba(13,27,31,0));
  z-index: 2;
}

.project-modal__close button {
  border: 0;
  background: rgba(255,255,255,0.1);
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
}

.project-modal__content {
  padding: 0 18px 20px;
}

.project-modal__hero {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
}

.project-modal__hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-modal__title {
  margin: 16px 0 8px;
  font-size: 1.55rem;
}

.project-modal__long {
  margin: 0;
  opacity: 0.92;
  line-height: 1.7;
  white-space: pre-wrap;
}

/* RESPONSIVE */
@media (max-width: 980px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .projects-grid { grid-template-columns: 1fr; }
  .project-card__body { padding: 14px; }
  .project-modal__content { padding: 0 14px 16px; }
}
