/* 
 * Confluência dos Mundos - Estilo do Portfólio
 * Tema: Fantasia Medieval
 */

/* ===== HEADER DO PORTFÓLIO ===== */
.portfolio-header {
  background: linear-gradient(rgba(10, 14, 23, 0.7), rgba(26, 43, 71, 0.7)), url('../assets/images/portfolio-header-bg.jpg');
  background-size: cover;
  background-position: center;
  color: var(--bege-pergaminho);
  padding: 8rem 0 4rem;
  text-align: center;
  position: relative;
  margin-bottom: 3rem;
}

.portfolio-header:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: url('../assets/images/border-bottom.png') repeat-x;
  background-size: auto 100%;
}

.portfolio-header h1 {
  color: var(--dourado-antigo);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  margin-bottom: 1rem;
  font-size: 3rem;
}

.portfolio-header p {
  font-family: var(--fonte-subtitulos);
  font-style: italic;
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.2rem;
}

/* ===== FILTROS DO PORTFÓLIO ===== */
.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 3rem;
  padding: 1.5rem;
  background-color: rgba(26, 43, 71, 0.05);
  border-radius: var(--borda-arredondada);
}

.filter-group {
  flex: 1;
  min-width: 200px;
}

.filter-group h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: var(--azul-profundo);
}

.categories-filter,
.tags-filter {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.categories-filter li a,
.tags-filter li a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: white;
  border-radius: 30px;
  color: var(--azul-profundo);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(26, 43, 71, 0.1);
}

.categories-filter li a:hover,
.tags-filter li a:hover {
  background-color: rgba(201, 165, 92, 0.1);
  border-color: var(--dourado-antigo);
}

.categories-filter li a.active,
.tags-filter li a.active {
  background-color: var(--dourado-antigo);
  color: white;
  border-color: var(--dourado-antigo);
}

/* ===== GRID DO PORTFÓLIO ===== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

/* ===== ITEM DO PORTFÓLIO ===== */
.portfolio-item {
  position: relative;
  border-radius: var(--borda-arredondada);
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  aspect-ratio: 3/4;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(10, 14, 23, 0.9), rgba(10, 14, 23, 0.5) 60%, rgba(10, 14, 23, 0.2));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-item-overlay {
  opacity: 1;
}

.portfolio-item:hover img {
  transform: scale(1.05);
}

.portfolio-item-category {
  display: inline-block;
  background-color: var(--dourado-antigo);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.portfolio-item-title {
  color: white;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.portfolio-item-client {
  color: var(--bege-pergaminho);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

.portfolio-item-link {
  display: inline-block;
  background-color: var(--dourado-antigo);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--borda-arredondada);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  transform: translateY(20px);
  opacity: 0;
}

.portfolio-item:hover .portfolio-item-link {
  transform: translateY(0);
  opacity: 1;
  transition: all 0.3s ease 0.1s;
}

.portfolio-item-link:hover {
  background-color: white;
  color: var(--dourado-antigo);
}

/* ===== PAGINAÇÃO ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 3rem 0;
}

.pagination a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: white;
  border-radius: var(--borda-arredondada);
  color: var(--azul-profundo);
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(26, 43, 71, 0.1);
}

.pagination a:hover {
  background-color: rgba(201, 165, 92, 0.1);
  border-color: var(--dourado-antigo);
}

.pagination a.active {
  background-color: var(--dourado-antigo);
  color: white;
  border-color: var(--dourado-antigo);
}

/* ===== PÁGINA DE TRABALHO INDIVIDUAL ===== */
.trabalho-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.trabalho-navigation {
  margin-bottom: 2rem;
  color: var(--cinza-pedra);
  font-size: 0.9rem;
}

.trabalho-navigation a {
  color: var(--azul-profundo);
  text-decoration: none;
  transition: color 0.3s ease;
}

.trabalho-navigation a:hover {
  color: var(--dourado-antigo);
}

.trabalho-content {
  margin-bottom: 2rem;
}

.trabalho-header {
  margin-bottom: 2rem;
  text-align: center;
}

.trabalho-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--azul-profundo);
}

.trabalho-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.trabalho-category {
  display: inline-block;
  background-color: var(--dourado-antigo);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.9rem;
}

.trabalho-client,
.trabalho-date {
  color: var(--cinza-pedra);
  font-size: 0.9rem;
}

/* ===== GALERIA DO TRABALHO ===== */
.trabalho-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.trabalho-gallery {
  position: relative;
}

.trabalho-main-image {
  margin-bottom: 1rem;
  border-radius: var(--borda-arredondada);
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  aspect-ratio: 4/3;
}

.trabalho-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.trabalho-main-image:hover img {
  transform: scale(1.02);
}

.trabalho-thumbnails {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.trabalho-thumbnail {
  border-radius: var(--borda-arredondada);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.3s ease;
  aspect-ratio: 1/1;
}

.trabalho-thumbnail:hover,
.trabalho-thumbnail.active {
  opacity: 1;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.trabalho-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== INFORMAÇÕES DO TRABALHO ===== */
.trabalho-info {
  background-color: white;
  border-radius: var(--borda-arredondada);
  padding: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.trabalho-info h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--azul-profundo);
}

.trabalho-info h3 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--azul-profundo);
}

.trabalho-info p {
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.technologies-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 2rem;
  padding: 0;
  list-style: none;
}

.technologies-list li {
  background-color: rgba(26, 43, 71, 0.05);
  padding: 0.5rem 1rem;
  border-radius: 30px;
  font-size: 0.9rem;
}

.trabalho-info ul:not(.technologies-list),
.trabalho-info ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.trabalho-info ul:not(.technologies-list) li,
.trabalho-info ol li {
  margin-bottom: 0.5rem;
}

.trabalho-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(26, 43, 71, 0.1);
}

.trabalho-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.trabalho-tags span {
  font-weight: 700;
  color: var(--azul-profundo);
}

.trabalho-tags a {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background-color: rgba(26, 43, 71, 0.05);
  border-radius: 30px;
  color: var(--azul-profundo);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.trabalho-tags a:hover {
  background-color: rgba(201, 165, 92, 0.1);
  color: var(--dourado-antigo);
}

/* ===== NAVEGAÇÃO ENTRE TRABALHOS ===== */
.trabalho-navigation-links {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3rem;
}

.prev-trabalho,
.next-trabalho {
  color: var(--azul-profundo);
  text-decoration: none;
  transition: color 0.3s ease;
  max-width: 45%;
}

.prev-trabalho:hover,
.next-trabalho:hover {
  color: var(--dourado-antigo);
}

/* ===== TRABALHOS RELACIONADOS ===== */
.related-trabalhos {
  margin-bottom: 3rem;
}

.related-trabalhos h3 {
  margin-bottom: 1.5rem;
  color: var(--azul-profundo);
  font-size: 1.5rem;
}

.related-trabalhos-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 14, 23, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lightbox-close:hover {
  color: var(--dourado-antigo);
  transform: scale(1.1);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 1rem;
  transition: all 0.3s ease;
}

.lightbox-prev {
  left: -60px;
}

.lightbox-next {
  right: -60px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--dourado-antigo);
  transform: translateY(-50%) scale(1.1);
}

/* ===== MENSAGENS DE ERRO ===== */
.error-message {
  background-color: rgba(255, 0, 0, 0.1);
  color: #d32f2f;
  padding: 1rem;
  border-radius: var(--borda-arredondada);
  margin: 1rem 0;
  text-align: center;
}

.no-results {
  text-align: center;
  padding: 3rem;
}

.no-results h3 {
  margin-bottom: 1rem;
  color: var(--azul-profundo);
}

.no-results p {
  margin-bottom: 1.5rem;
  color: var(--cinza-pedra);
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(201, 165, 92, 0.3);
  border-radius: 50%;
  border-top-color: var(--dourado-antigo);
  animation: spin 1s linear infinite;
}

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

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 992px) {
  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .trabalho-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .trabalho-header h1 {
    font-size: 2rem;
  }
  
  .lightbox-prev {
    left: 10px;
  }
  
  .lightbox-next {
    right: 10px;
  }
}

@media (max-width: 768px) {
  .portfolio-header {
    padding: 6rem 0 3rem;
  }
  
  .portfolio-header h1 {
    font-size: 2.5rem;
  }
  
  .trabalho-info {
    padding: 1.5rem;
  }
  
  .trabalho-info h2 {
    font-size: 1.8rem;
  }
  
  .trabalho-info h3 {
    font-size: 1.3rem;
  }
  
  .related-trabalhos-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .portfolio-header h1 {
    font-size: 2rem;
  }
  
  .portfolio-header p {
    font-size: 1rem;
  }
  
  .trabalho-header h1 {
    font-size: 1.8rem;
  }
  
  .trabalho-thumbnails {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .trabalho-navigation-links {
    flex-direction: column;
    gap: 1rem;
  }
  
  .prev-trabalho,
  .next-trabalho {
    max-width: 100%;
  }
}

