/* ESTILOS DA PÁGINA DO PORTFÓLIO (ESTILO ARTSTATION ADAPTADO AO TEMA CLARO DO SITE) */

.portfolio-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  font-family: 'Montserrat', sans-serif;
  color: var(--color-text);
  background-color: transparent;
}

.portfolio-container.portfolio-min-height {
  min-height: calc(100vh - 280px);
  /* Garante que o rodapé fique fixado abaixo em telas grandes com pouco conteúdo */
}


/* HERO SECTION - COMPACTO E CLARO (IGUAL PARA TODAS AS PÁGINAS) */
.portfolio-hero {
  text-align: center;
  padding: 4rem 2rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(43, 184, 252, 0.1), rgba(254, 85, 189, 0.1));
  border: 1px solid rgba(23, 54, 87, 0.08);
  margin-bottom: 3rem;
}

.portfolio-hero h1 {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 0;
  background: linear-gradient(135deg, #2bb8fc, #fe55bd);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  letter-spacing: -0.02em;
}

.portfolio-hero p {
  font-size: 1.15rem;
  max-width: 700px;
  margin: 1.5rem auto 0 auto;
  line-height: 1.6;
  opacity: 0.85;
  font-weight: 500;
}

/* FILTROS - TEMA CLARO */
.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  background-color: rgba(23, 54, 87, 0.03);
  border: 1px solid rgba(23, 54, 87, 0.05);
  color: var(--color-text);
  padding: 0.65rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-btn:hover {
  background-color: rgba(234, 73, 139, 0.06);
  color: var(--color-accent);
  border-color: rgba(234, 73, 139, 0.2);
}

.filter-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, #2bb8fc, #fe55bd);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(43, 184, 252, 0.2);
}

/* GRID COMPACTO DE FOTOS (ESTILO ARTSTATION) */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-auto-rows: 280px;
  gap: 0;
}

.portfolio-item {
  position: relative;
  height: 100%;
  width: 100%;
  background: #ffffff;
  border: none;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  transition: transform 0.3s ease;
  cursor: pointer;
  opacity: 1;
  transform: scale(1);
}

.portfolio-item.portfolio-item-vertical {
  grid-row: span 2;
}

.portfolio-item:hover {
  transform: none;
  box-shadow: none;
}

.portfolio-img-box {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #f6f4f1;
}

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

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

.portfolio-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 1rem 1rem 1rem;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.5) 70%, transparent 100%);
  color: #ffffff;
  transform: translateY(0);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
}

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

.portfolio-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  line-height: 1.3;
}

.portfolio-tag {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #ffffff;
  background: linear-gradient(135deg, #2bb8fc, #fe55bd);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  align-self: flex-start;
  margin-top: 0.25rem;
  box-shadow: 0 2px 5px rgba(254, 85, 189, 0.25);
  letter-spacing: 0.02em;
  display: inline-block;
}

/* LIGHTBOX GALLERY MODAL */
.portfolio-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 11, 13, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content-wrapper {
  position: relative;
  max-width: 90%;
  max-height: 85%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transform: scale(0.97);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-lightbox.active .lightbox-img {
  transform: scale(1);
}

.lightbox-caption {
  color: #ffffff;
  margin-top: 1.5rem;
  text-align: center;
}

.lightbox-caption h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.lightbox-caption .lightbox-tag {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #ffffff;
  background: linear-gradient(135deg, #2bb8fc, #fe55bd);
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  display: inline-block;
  box-shadow: 0 4px 10px rgba(254, 85, 189, 0.2);
}

/* Lightbox controls */
.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 2.5rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  z-index: 100000;
}

.lightbox-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 100000;
  user-select: none;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.05);
}

.lightbox-nav.prev {
  left: 2rem;
}

.lightbox-nav.next {
  right: 2rem;
}

/* RESPONSIVIDADE */
@media (max-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    grid-auto-rows: 220px;
  }
}

@media (max-width: 576px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }
}

@media (max-width: 768px) {
  .portfolio-hero h1 {
    font-size: 2.25rem;
  }

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

  .lightbox-nav {
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
  }

  .lightbox-nav.prev {
    left: 1rem;
  }

  .lightbox-nav.next {
    right: 1rem;
  }

  .lightbox-close {
    top: 1rem;
    right: 1rem;
  }
}

/* ESTILOS ADICIONAIS PARA POSTS DO BLOG */
.portfolio-info h3 a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

.portfolio-info h3 a:hover {
  color: var(--color-accent);
}

.blog-date {
  font-size: 0.8rem;
  opacity: 0.65;
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.blog-desc {
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

/* FORÇAR 3 CARDS POR LINHA NO BLOG */
.blog-grid-override {
  grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 1024px) {
  .blog-grid-override {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .blog-grid-override {
    grid-template-columns: 1fr !important;
  }
}

/* Badge de Link nas Imagens do Portfólio */
.portfolio-item-link-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: rgba(255, 0, 0, 0.85);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s ease;
}

.portfolio-item:hover .portfolio-item-link-badge {
  transform: scale(1.1);
  background-color: rgba(255, 0, 0, 1);
}

.portfolio-item-link-badge .material-symbols-rounded {
  font-size: 1.5rem;
}

/* Botão de Link no Lightbox */
.lightbox-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #ff0055, #ff0000);
  color: #ffffff;
  padding: 0.6rem 1.5rem;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lightbox-link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 0, 0, 0.6);
  color: #ffffff;
}

.lightbox-link-btn:active {
  transform: translateY(0);
}

.lightbox-link-btn .material-symbols-rounded {
  font-size: 1.3rem;
}