html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

/* Loading spinner overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease-out;
  pointer-events: auto;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.loading-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ffffff;
  animation: loading-bounce 1.4s ease-in-out infinite both;
}

.loading-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-dot:nth-child(2) {
  animation-delay: -0.16s;
}

.loading-dot:nth-child(3) {
  animation-delay: 0s;
}

@keyframes loading-bounce {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.loading-percentage {
  color: #ffffff;
  font-size: 18px;
  font-weight: 300;
  font-family: 'Roboto', sans-serif;
  margin-top: 24px;
  text-align: center;
  letter-spacing: 1px;
}

body {
  overflow-y: auto;
  min-height: 100vh;
}

#app {
  width: 100%;
  height: 100vh;
  background: #000000;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50; /* Aumentado para ficar acima do projects-container na área inicial */
  pointer-events: auto;
  touch-action: pan-y; /* Permite scroll vertical no mobile */
}

/* Garantir que o canvas também permita scroll no mobile */
#app canvas {
  touch-action: pan-y;
}

.hint {
  position: fixed;
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 6px;
  font-family: system-ui, Segoe UI, Roboto, Arial;
}

#word-cloud-container {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

#word-cloud-container.word-cloud-visible {
  opacity: 1;
}

.word-cloud-box {
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  min-width: 200px;
  max-width: 300px;
}

.word-cloud-title {
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  font-size: 16px;
  color: #ffffff;
  margin: 0 0 12px 0;
  padding: 0;
  line-height: 1.4;
}

.word-cloud-content {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.word-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 12px;
  font-family: 'Roboto', sans-serif;
  font-weight: 100;
  white-space: nowrap;
}

/* Esconder word cloud no modo responsivo */
@media (max-width: 768px) {
  #word-cloud-container {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  
  #word-cloud-container.word-cloud-visible {
    display: none !important;
    opacity: 0 !important;
  }
}

.header-gradient-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 145px; /* Altura do título + subtítulo + 100px */
  background: linear-gradient(to bottom, #000000 0%, rgba(0, 0, 0, 0.85) 30%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.3) 70%, rgba(0, 0, 0, 0.1) 85%, transparent 100%);
  z-index: 9999; /* Acima do canvas (50) e abaixo do header (10000) */
  pointer-events: none;
  transition: opacity 0.3s ease; /* Transição suave para fade */
}

.portfolio-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  text-align: center;
  z-index: 10000; /* Acima do loading overlay (9999) para aparecer durante carregamento */
  pointer-events: none;
  padding: 10px 20px 10px 20px; /* Reduzido de 40px/20px para 10px */
  transition: opacity 0.3s ease; /* Transição suave para fade */
  box-sizing: border-box;
}

.portfolio-title,
.portfolio-subtitle {
  pointer-events: none; /* Garantir que não bloqueiem cliques nos cubos */
}

.portfolio-title {
  font-family: 'Spartan', sans-serif;
  font-weight: 200; /* Extra Light */
  font-size: 65px; /* Reduzido mais 20% de 81px (81 * 0.8 = 65px) */
  background: linear-gradient(to bottom, #12c2e9, #c471ed);
  background-size: 100% 82px; /* Altura total título (~65px) + subtítulo (~17px) */
  background-position: 0 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin: 0 0 0px 0; /* Removido espaço entre título e subtítulo */
  padding: 0 20px;
  letter-spacing: 2px;
  display: block;
  word-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

.portfolio-subtitle {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 300; /* Light - mais grosso que Thin */
  font-size: 17.28px; /* Diminuído 20% de 21.6px (21.6 * 0.8 = 17.28px) */
  background: linear-gradient(to bottom, #12c2e9, #c471ed);
  background-size: 100% 82px; /* Altura total título (~65px) + subtítulo (~17px) */
  background-position: 0 -65px; /* Offset ajustado para continuar de onde o título termina */
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin: 0;
  padding: 0 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: block;
  word-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

.portfolio-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  padding: 30px 20px;
  z-index: 200; /* Aumentado para ficar acima de todos os elementos */
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s ease-out;
  box-sizing: border-box;
}

.portfolio-footer.hidden {
  opacity: 0;
  pointer-events: none;
}

.portfolio-footer-side {
  position: fixed;
  right: 20px;
  top: calc(50% + 40px); /* 50% (centro do botão) + 20px (metade da altura do botão 40px/2) + 20px (gap) */
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

.portfolio-footer-side.visible {
  opacity: 1;
}

.portfolio-footer-side .social-icon {
  pointer-events: auto;
}

.social-icon {
  pointer-events: auto;
  color: #c471ed;
  font-size: 24px;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.social-icon:hover {
  color: #12c2e9;
  transform: scale(1.2);
}

/* Seção de citação intro */
.intro-quote-section {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

.intro-quote-section.visible {
  opacity: 1;
}

.intro-quote-box {
  max-width: 900px;
  width: 100%;
  background: rgba(20, 20, 20, 0.95);
  border: none;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  position: relative;
  pointer-events: auto;
  outline: none;
  text-align: center;
}

.intro-quote-text {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 300;
  font-size: 24px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  padding: 0;
  letter-spacing: 1px;
  font-style: italic;
}

/* Container de projetos */
.projects-container {
  position: relative;
  z-index: 150;
  pointer-events: none; /* Desabilitado por padrão para não bloquear canvas */
  width: 100%;
  min-height: 100vh;
  padding-top: 100vh; /* Espaço para o canvas Three.js (primeira seção) */
}

/* Seção de citação intro - posicionar logo após o padding-top */
.intro-quote-section {
  margin-top: 0;
  margin-bottom: 50px;
}

/* Seção de projeto */
.project-section {
  min-height: auto; /* Altura automática baseada no conteúdo */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 20px; /* Padding reduzido */
  margin-bottom: 50px; /* Distância de 50px entre seções */
  position: relative;
}

/* Card de projeto */
.project-card {
  max-width: 900px; /* Reduzido para conteúdo mais compacto */
  width: 100%;
  background: rgba(20, 20, 20, 0.95);
  border: none; /* Remover borda completamente */
  border-radius: 12px;
  padding: 40px; /* Reduzido para conteúdo mais compacto */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  position: relative;
  pointer-events: auto; /* Habilitar interação nos cards */
  outline: none; /* Garantir que não há outline */
}

/* Botão voltar (seta no canto direito centralizado) */
.back-to-canvas-btn {
  position: fixed;
  /* Posicionar ao lado direito do container de projetos (max-width: 900px) */
  /* Fórmula: (100% - 900px) / 2 = espaço à esquerda do card, depois subtrai 60px (botão + espaçamento) */
  right: calc((100% - 900px) / 2 - 60px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 12px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
  opacity: 0;
  pointer-events: none; /* Desabilitar interação quando invisível */
}

/* Em telas menores que 980px (900px card + 80px de margem), usar posição fixa no canto */
@media (max-width: 980px) {
  .back-to-canvas-btn {
    right: 20px;
  }
}

.back-to-canvas-btn.visible {
  opacity: 1;
  pointer-events: auto; /* Habilitar interação quando visível */
}

.back-to-canvas-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-50%) translateY(-2px);
}

/* Categoria do projeto */
.project-category {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
  text-align: center;
  border: none; /* Remover qualquer linha de contorno */
}

/* Nome do projeto */
.project-name {
  font-family: 'Spartan', sans-serif;
  font-weight: 400;
  font-size: 36px; /* Reduzido para conteúdo mais compacto */
  color: #ffffff;
  margin: 0 0 40px 0;
  padding: 0;
  line-height: 1.2;
  text-align: center;
}

/* Container de vídeo */
.project-video-container {
  margin: 30px 0; /* Reduzido para conteúdo mais compacto */
  width: 100%;
}

.project-video-container iframe,
.project-video-container video {
  width: 100%;
  height: auto;
  max-height: 80vh; /* Altura máxima para caber na tela (vídeos verticais) */
  min-height: 300px;
  border-radius: 8px;
  border: none;
  object-fit: contain; /* Manter proporção sem cortar */
}

.project-video-container video {
  background: #000;
}

/* Galeria de imagens */
.project-images-gallery {
  margin: 30px 0;
  width: 100%;
}

/* 1 imagem única - sem grid, centralizada */
.project-images-gallery.single-image {
  display: block;
  max-width: 800px;
  margin: 30px auto;
}

.project-images-gallery.single-image img,
.project-images-gallery.single-image a {
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

.project-images-gallery.single-image a {
  display: block;
  width: 100%;
}

/* 2 imagens - grid de 2 colunas */
.project-images-gallery.two-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 300px;
  gap: 15px;
  justify-items: center;
  align-items: stretch;
}

.project-images-gallery.two-images img,
.project-images-gallery.two-images a {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.project-images-gallery.two-images a {
  display: block;
  width: 100%;
  height: 100%;
}

/* 3+ imagens - grid de 3 colunas */
.project-images-gallery.multiple-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Máximo 3 imagens por linha */
  grid-auto-rows: 300px; /* Altura fixa para todas as imagens na mesma linha */
  gap: 15px;
  justify-items: center; /* Centralizar imagens */
  align-items: stretch; /* Esticar para preencher altura da linha */
}

.project-images-gallery.multiple-images img,
.project-images-gallery.multiple-images a {
  width: 100%;
  height: 100%; /* Usar 100% da altura do grid cell */
  object-fit: cover; /* Manter proporção e preencher o espaço */
  border-radius: 8px;
  display: block; /* Remover espaço inline */
}

.project-images-gallery.multiple-images a {
  display: block;
  width: 100%;
  height: 100%;
}

/* Lazy loading styles */
.lazy-image {
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  background-color: rgba(0, 0, 0, 0.05);
}

.lazy-image.loaded {
  opacity: 1;
}

/* Ajustar min-height apenas para single-image para evitar layout shift */
.project-images-gallery.single-image .lazy-image {
  min-height: 300px;
}

/* Responsividade: ajustar grids em telas menores */
@media (max-width: 768px) {
  /* Grids com mais de 3 imagens: 2 colunas */
  .project-images-gallery.multiple-images:not(.three-or-less) {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto; /* Altura automática para acomodar imagens sem crop */
    align-items: start; /* Alinhar ao topo para evitar espaços vazios */
  }
  
  /* Grids com 3 ou menos imagens: 1 coluna */
  .project-images-gallery.single-image,
  .project-images-gallery.two-images,
  .project-images-gallery.multiple-images.three-or-less {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    align-items: start;
  }
  
  /* Remover crop lateral - ajustar pela altura */
  .project-images-gallery.multiple-images img,
  .project-images-gallery.multiple-images a img,
  .project-images-gallery.two-images img,
  .project-images-gallery.two-images a img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 400px; /* Altura máxima para não ficar muito grande */
  }
  
  .project-images-gallery.multiple-images a,
  .project-images-gallery.two-images a {
    width: 100%;
    height: auto;
    display: block;
  }
}

.project-images-gallery img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-images-gallery img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Descrição do projeto */
.project-description {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 300;
  font-size: 16px; /* Reduzido para conteúdo mais compacto */
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
  margin-top: 40px;
  text-align: center;
}

/* Seção de contato */
.contact-section {
  /* Herda estilos de .project-section */
  min-height: 100vh; /* Altura mínima de 100vh para centralização vertical */
  padding-bottom: 50vh; /* Espaço extra para permitir centralização na viewport */
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
}

.contact-photo-container {
  margin-bottom: 40px;
}

.contact-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.contact-social-icons {
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: center;
}

.contact-social-icons .social-icon {
  color: #ffffff;
  font-size: 28px;
  width: 50px;
  height: 50px;
}

.contact-social-icons .social-icon:hover {
  color: #12c2e9;
  transform: scale(1.2);
}

/* Botão hamburger - visível em desktop e mobile */
.mobile-menu-toggle {
  display: flex;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10001;
  background: transparent;
  border: none;
  color: #c471ed;
  padding: 12px;
  width: auto;
  height: auto;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.mobile-menu-toggle:hover {
  color: #12c2e9;
}

/* Overlay do menu - visível em desktop e mobile */
.mobile-menu-overlay {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Container do menu - desktop: parte direita, mobile: tela toda */
.mobile-menu-container {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px; /* Largura fixa para desktop */
  max-width: 90vw; /* Máximo 90% da viewport no mobile */
  height: 100%;
  background: rgba(20, 20, 20, 0.95);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
  transform: translateX(100%); /* Desliza da direita */
  transition: transform 0.3s ease;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
}

.mobile-menu-overlay.active .mobile-menu-container {
  transform: translateX(0);
}


/* Lista de projetos */
.mobile-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  padding-top: 80px;
}

.mobile-menu-list li {
  margin-bottom: 20px;
}

.mobile-menu-list a {
  display: block;
  padding: 10px 20px;
  color: #ffffff;
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 300;
  font-size: 18px;
  text-decoration: none;
  transition: opacity 0.3s ease;
  text-align: left;
}

.mobile-menu-list a:active {
  opacity: 0.7;
}

.mobile-menu-list a:hover {
  opacity: 0.8;
}

/* Item de contato no menu mobile */
.mobile-menu-list .contact-menu-item a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  padding: 10px 20px;
  gap: 15px;
}

.contact-menu-photo {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.contact-menu-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.contact-menu-text {
  color: #ffffff;
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 300;
  font-size: 18px;
}

/* Item de projeto no menu mobile */
.mobile-menu-list .project-menu-item a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  padding: 10px 20px;
  gap: 15px;
}

.project-menu-photo {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

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

.project-menu-icon {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.project-menu-icon i {
  color: #ffffff;
  font-size: 24px;
}

.project-menu-text {
  color: #ffffff;
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 300;
  font-size: 18px;
}

/* Responsividade */
@media (max-width: 768px) {
  /* Ajustar posição do botão hamburger no mobile */
  .mobile-menu-toggle {
    top: 50%;
    transform: translateY(-50%);
  }
  
  /* Menu fullscreen no mobile */
  .mobile-menu-container {
    width: 100%;
    max-width: 100%;
    left: 0;
    right: auto;
    transform: translateX(-100%); /* Desliza da esquerda no mobile */
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.5);
  }
  
  .mobile-menu-overlay.active .mobile-menu-container {
    transform: translateX(0);
  }
  .header-gradient-bar {
    height: 90px; /* Altura ajustada para mobile (título ~36px + subtítulo ~18px + espaço) */
  }
  
  .portfolio-header {
    padding: 30px 15px 15px 15px;
  }
  
  .portfolio-title {
    font-size: 43.2px; /* Aumentado 20% de 36px (36 * 1.2 = 43.2px) */
    letter-spacing: 1px;
    padding: 0 15px;
    background-size: 100% 58px; /* Altura ajustada para mobile: título (~43px) + subtítulo (~14px) */
    background-position: 0 0;
    margin: 0 0 0px 0; /* Removido espaço entre título e subtítulo */
  }
  
  .portfolio-subtitle {
    font-size: 14.4px; /* Diminuído 20% de 18px (18 * 0.8 = 14.4px) */
    letter-spacing: 0.5px;
    padding: 0 15px;
    background-size: 100% 58px; /* Mesma altura total do gradiente */
    background-position: 0 -43px; /* Offset ajustado para continuar do título */
  }
  
  .project-card {
    padding: 40px 20px;
  }
  
  .project-name {
    font-size: 32px;
  }
  
  .intro-message p {
    font-size: 18px;
    padding: 0 20px;
  }
  
  .contact-card {
    padding: 40px 20px;
  }
  
  .contact-photo {
    width: 150px;
    height: 150px;
  }
  
  .contact-social-icons {
    gap: 25px;
  }
  
  .contact-social-icons .social-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
  }
  
  /* Posicionar botão de voltar ao topo no canto inferior direito no mobile */
  .back-to-canvas-btn {
    top: auto;
    bottom: 20px;
    right: 20px;
    transform: none;
  }
  
  
  /* Ícones sociais sempre visíveis no mobile, esconder versão lateral */
  .portfolio-footer {
    opacity: 1 !important;
  }
  
  .portfolio-footer-side {
    display: none;
  }
  
  .social-icon {
    font-size: 26px; /* Aumentado 30% de 20px (20 * 1.3 = 26) */
  }
  
  .portfolio-footer {
    gap: 20px;
    padding: 20px 15px;
  }
}

@media (max-width: 480px) {
  .header-gradient-bar {
    height: 70px; /* Altura ajustada para mobile pequeno (título ~32px + subtítulo ~16px + espaço) */
  }
  
  .portfolio-header {
    padding: 20px 10px 10px 10px;
  }
  
  .portfolio-title {
    font-size: 38.4px; /* Aumentado 20% de 32px (32 * 1.2 = 38.4px) */
    margin: 0 0 0px 0; /* Removido espaço entre título e subtítulo */
    letter-spacing: 0.5px;
    padding: 0 10px;
    background-size: 100% 50px; /* Altura ajustada para mobile pequeno: título (~38px) + subtítulo (~12px) */
    background-position: 0 0;
  }
  
  .portfolio-subtitle {
    font-size: 12.48px; /* Diminuído 20% de 15.6px (15.6 * 0.8 = 12.48px) */
    letter-spacing: 0.5px;
    padding: 0 10px;
    background-size: 100% 50px; /* Mesma altura total do gradiente */
    background-position: 0 -38px; /* Offset ajustado para continuar do título */
  }
  
  .portfolio-footer {
    gap: 15px;
    padding: 15px 10px;
  }
  
  .social-icon {
    font-size: 23.4px; /* Aumentado 30% de 18px (18 * 1.3 = 23.4) */
  }
}

/* ==================== LIGHTBOX STYLES ==================== */
.image-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.image-lightbox.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

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

.lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 40px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
  z-index: 10002;
}

.lightbox-close:hover {
  opacity: 0.7;
}

.lightbox-container .lightbox-image {
  cursor: default;
}

.project-images-gallery .image-clickable {
  cursor: pointer;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
  .lightbox-container {
    max-width: 95vw;
    max-height: 95vh;
    padding: 20px;
  }
  
  .lightbox-image {
    max-height: 85vh;
  }
  
  .lightbox-close {
    top: -35px;
    right: 10px;
    font-size: 35px;
    width: 35px;
    height: 35px;
  }
}

