.hero-portfolio {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: flex-end;
  padding: 12rem 0 2rem;
  padding-bottom: 2rem;
}

.portfolio-title {
  font-size: 4rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
}

.hero-portfolio .lead {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 400;
}

@media (max-width: 767.98px) {
  .hero-portfolio {
    min-height: 40vh;
    padding: 4rem 0 2rem;
  }

  .portfolio-title {
    font-size: 2.5rem;
  }

  .hero-portfolio .lead {
    font-size: 1.1rem;
  }
}

@media (max-width: 575.98px) {
  .hero-portfolio {
    min-height: 35vh;
    padding: 3rem 0 1.5rem;
  }

  .portfolio-title {
    font-size: 2rem;
  }

  .hero-portfolio .lead {
    font-size: 1rem;
  }
}

.content-portfolio {
  margin-top: 8rem;
  margin-bottom: 8rem;
  padding-top: 6rem;
}

.categories-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.category-btn {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  text-decoration: none;
  display: inline-block;
}

.category-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 1);
  border-color: rgba(255, 255, 255, 0.3);
}

.category-btn.active,
.category-btn.router-link-active,
.category-btn.router-link-exact-active {
  background: rgba(157, 124, 255, 0.25) !important;
  border-color: rgba(157, 124, 255, 0.4) !important;
  color: #9D7CFF !important;
}

.category-btn.active:hover,
.category-btn.router-link-active:hover,
.category-btn.router-link-exact-active:hover {
  background: rgba(157, 124, 255, 0.35) !important;
  border-color: rgba(157, 124, 255, 0.5) !important;
  color: #B794F6 !important;
}

.category-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(157, 124, 255, 0.3);
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #9D7CFF;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1.5rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-state p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.empty-portfolio {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
}

.empty-portfolio i {
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 1.5rem;
}

.empty-portfolio p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 4rem;
  justify-items: center;
}

.project-item {
  cursor: pointer;
  transition: transform 0.3s ease;
  width: 100%;
}

.project-item:hover {
  transform: scale(1.02);
}

.project-image-wrapper {
  position: relative;
  background: transparent;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
}

.project-image {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 18px;
}

.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.modal-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: rgba(157, 124, 255, 0.2);
  border: 1px solid rgba(157, 124, 255, 0.4);
  border-radius: 12px;
  color: #9D7CFF;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  z-index: 10001;
}

.modal-close:hover {
  background: rgba(157, 124, 255, 0.35);
}

.modal-image-container {
  position: relative;
  z-index: 10000;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-image {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
}

@media (max-width: 1200px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767.98px) {
  .content-portfolio {
    margin-top: 2rem;
    margin-bottom: 4rem;
    padding-top: 1rem;
  }

  .category-btn {
    padding: 0.65rem 1.2rem;
    font-size: 0.85rem;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
  }

  .project-image {
    max-width: 100%;
    max-height: 300px;
  }

  .image-modal {
    padding: 1rem;
  }

  .modal-close {
    top: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }

  .modal-image-container {
    max-width: 95vw;
    max-height: 85vh;
  }

  .modal-image {
    max-height: 85vh;
  }
}

@media (max-width: 575.98px) {
  .content-portfolio {
    margin-top: 1.5rem;
    margin-bottom: 3rem;
    padding-top: 0.5rem;
  }

  .categories-buttons {
    gap: 0.75rem;
  }

  .category-btn {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    margin-top: 2.5rem;
  }

  .project-image {
    max-width: 100%;
    max-height: 250px;
  }

  .modal-close {
    top: 0.5rem;
    right: 0.5rem;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

