/**
 * projects.css — Estilos da Seção Projetos (Fundo Branco #FFFFFF Fixo)
 * SETTA Comunicação Visual
 * 
 * Estrutura: Galeria editorial assimétrica, imagens em grande escala,
 * tipografia limpa, amplo espaço negativo e sem cards SaaS genéricos.
 */

#section-projetos {
  background-color: #FFFFFF !important;
  color: var(--setta-navy, #00214D);
  position: relative;
  width: 100%;
  min-height: auto;
  padding-top: clamp(28px, 3.2vw, 40px);
  padding-bottom: clamp(32px, 3.6vw, 46px);
  overflow: visible;
  display: block !important;
}

.projects-wrapper {
  max-width: 1380px;
  width: 90%;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* 1. CABEÇALHO DA SEÇÃO PROJETOS */
.projects-header-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  position: relative;
}

.projects-identifier {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-primary, 'Space Grotesk', sans-serif);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #00214D;
}

.projects-identifier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 7px;
  height: 7px;
  background-color: var(--setta-yellow, #F7D417);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(247, 212, 23, 0.7);
}

.projects-headline-wrapper {
  width: 100%;
  max-width: 1240px;
  margin-top: 4px;
}

.projects-headline {
  font-family: var(--font-headline, 'Syne', sans-serif);
  font-size: clamp(2.3rem, 5.4vw, 4.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 0;
  position: relative;
}

.projects-lead-text {
  max-width: 780px;
  font-family: var(--font-primary, 'Space Grotesk', sans-serif);
  font-size: clamp(1.02rem, 1.35vw, 1.25rem);
  line-height: 1.62;
  font-weight: 400;
  color: #2B2A29;
  letter-spacing: -0.01em;
  margin-top: 2px;
  opacity: 0.9;
}

/* 2. GALERIA EDITORIAL ASSIMÉTRICA (5 CATEGORIAS REAIS) */
.projects-editorial-gallery {
  display: flex;
  flex-direction: column;
  gap: 36px;
  width: 100%;
  margin-top: 10px;
}

.project-entry {
  display: grid;
  grid-template-columns: 56% 40%;
  gap: 4%;
  align-items: center;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(0, 33, 77, 0.08);
}

/* Alternância elegante de posição editorial */
.project-entry.entry-reversed {
  grid-template-columns: 40% 56%;
}

.project-entry.entry-reversed .project-visual {
  order: 2;
}

.project-entry.entry-reversed .project-info {
  order: 1;
}

.project-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: #F4F6F9;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(0, 33, 77, 0.08);
  box-shadow: 
    0 20px 48px -10px rgba(0, 33, 77, 0.1),
    0 4px 12px -2px rgba(0, 33, 77, 0.03);
  cursor: pointer;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.7s var(--ease-cinematic, cubic-bezier(0.25, 1, 0.5, 1));
}

.project-visual:hover .project-img {
  transform: scale(1.028);
}

/* BOTÃO VER IMAGEM COMPLETA ↗ (REVELAÇÃO SUAVE NO HOVER NO DESKTOP) */
.project-zoom-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: rgba(0, 33, 77, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #FFFFFF;
  font-family: var(--font-primary, 'Space Grotesk', sans-serif);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 12;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0, 33, 77, 0.38);
  transition: opacity 0.32s var(--ease-cinematic, cubic-bezier(0.25, 1, 0.5, 1)),
              transform 0.32s var(--ease-cinematic, cubic-bezier(0.25, 1, 0.5, 1)),
              background-color 0.25s ease,
              color 0.25s ease,
              border-color 0.25s ease,
              box-shadow 0.25s ease;
  user-select: none;
  outline: none;
}

.project-zoom-arrow {
  color: var(--setta-yellow, #F7D417);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.25s ease, color 0.25s ease;
}

/* Revelação elegante e fluida no Desktop */
@media (hover: hover) and (pointer: fine) {
  .project-visual:hover .project-zoom-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
  }

  .project-zoom-btn:hover {
    background-color: var(--setta-yellow, #F7D417);
    color: var(--setta-navy, #00214D);
    border-color: var(--setta-yellow, #F7D417);
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 12px 32px rgba(247, 212, 23, 0.4);
  }

  .project-zoom-btn:hover .project-zoom-arrow {
    color: var(--setta-navy, #00214D);
    transform: translate(2px, -2px);
  }
}

/* No celular/toque: toque direto na imagem abre o lightbox */
@media (hover: none) or (max-width: 768px) {
  .project-zoom-btn {
    display: none;
  }
}

/* CONTROLES DE NAVEGAÇÃO DO CARROSSEL DE FOTOS REAIS */
.project-gallery-nav {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 10;
}

.project-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 33, 77, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #FEFEFE;
  font-family: var(--font-primary, 'Space Grotesk', sans-serif);
  font-size: 1.15rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  box-shadow: 0 4px 16px rgba(0, 33, 77, 0.25);
  transition: background-color 0.28s ease, color 0.28s ease, border-color 0.28s ease, transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, background-color;
  outline: none;
}

.project-nav-btn:hover {
  background-color: var(--setta-yellow, #F7D417);
  color: var(--setta-navy, #00214D);
  border-color: var(--setta-yellow, #F7D417);
  transform: scale(1.08);
}

.project-nav-btn:active {
  transform: scale(0.95);
}

/* CONTADOR EDITORIAL DISCRETO (Ex: 01 / 03) */
.project-gallery-counter {
  position: absolute;
  bottom: 14px;
  right: 16px;
  background: rgba(0, 33, 77, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  font-family: var(--font-primary, 'Space Grotesk', sans-serif);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 10;
  user-select: none;
}

.project-gallery-counter .counter-current {
  color: var(--setta-yellow, #F7D417);
}

@media (max-width: 768px) {
  .project-nav-btn {
    width: 44px;
    height: 44px;
    font-size: 1.05rem;
  }
  .project-gallery-nav {
    padding: 0 8px;
  }
}

.project-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-index {
  font-family: var(--font-primary, 'Space Grotesk', sans-serif);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--setta-yellow, #F7D417);
}

.project-title {
  font-family: var(--font-headline, 'Syne', sans-serif);
  font-size: clamp(1.3rem, 2.2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--setta-navy, #00214D);
  margin: 0;
  line-height: 1.15;
}

.project-desc {
  font-family: var(--font-primary, 'Space Grotesk', sans-serif);
  font-size: 0.98rem;
  line-height: 1.6;
  color: #4A4A4A;
  margin: 0;
  max-width: 440px;
}

/* RESPONSIVIDADE EDITORIAL */
@media (max-width: 1100px) {
  .project-entry,
  .project-entry.entry-reversed {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .project-entry.entry-reversed .project-visual {
    order: 1;
  }

  .project-entry.entry-reversed .project-info {
    order: 2;
  }
}

@media (max-width: 768px) {
  #section-projetos {
    padding-top: 28px;
    padding-bottom: 48px;
  }

  .projects-wrapper {
    gap: 24px;
    width: 92%;
  }

  .projects-headline {
    font-size: clamp(1.75rem, 7vw, 2.6rem);
    line-height: 1.12;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .projects-lead-text {
    font-size: clamp(0.96rem, 3.8vw, 1.12rem);
    line-height: 1.58;
  }

  .project-title {
    font-size: clamp(1.2rem, 5.2vw, 1.65rem);
  }

  .project-desc {
    font-size: 0.93rem;
    line-height: 1.55;
  }
}

@media (max-width: 430px) {
  .projects-headline {
    font-size: clamp(1.55rem, 6.6vw, 2.2rem);
  }
  .project-title {
    font-size: clamp(1.15rem, 4.8vw, 1.45rem);
  }
}

/* 4. LIGHTBOX EDITORIAL — VISUALIZAÇÃO AMPLIADA DA FOTO */
.setta-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s linear 0.35s;
}

.setta-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition: visibility 0s linear 0s;
}

/* Fundo escurecido e translúcido cinematográfico para destacar a fotografia */
.setta-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 18, 43, 0.94);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  cursor: zoom-out;
}

/* Container central */
.setta-lightbox-container {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  max-width: 95vw;
  max-height: 95vh;
  outline: none;
  pointer-events: auto;
}

/* Botão Fechar X no canto superior direito */
.setta-lightbox-close {
  position: fixed;
  top: 24px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: background-color 0.25s ease,
              color 0.25s ease,
              border-color 0.25s ease,
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.setta-lightbox-close:hover {
  background-color: var(--setta-yellow, #F7D417);
  color: var(--setta-navy, #00214D);
  border-color: var(--setta-yellow, #F7D417);
  transform: scale(1.08) rotate(90deg);
}

.setta-lightbox-close svg {
  display: block;
}

/* Figura e Imagem ampliada em alta resolução */
.setta-lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  max-height: 100%;
  cursor: default;
}

.setta-lightbox-img {
  max-width: 90vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65), 0 4px 16px rgba(0, 0, 0, 0.3);
  display: block;
  user-select: none;
  background-color: transparent;
  will-change: transform, opacity;
}

/* Legenda editorial discreta */
.setta-lightbox-caption {
  margin-top: 14px;
  font-family: var(--font-primary, 'Space Grotesk', sans-serif);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  gap: 8px;
}

.setta-lightbox-caption::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--setta-yellow, #F7D417);
}

/* Trava scroll do body quando o lightbox estiver aberto */
body.lightbox-open {
  overflow: hidden !important;
}

@media (max-width: 600px) {
  .setta-lightbox-close {
    top: calc(16px + var(--safe-area-top, 0px));
    right: calc(16px + var(--safe-area-right, 0px));
    width: 44px;
    height: 44px;
  }
  .setta-lightbox-container {
    padding: calc(60px + var(--safe-area-top, 0px)) 16px calc(24px + var(--safe-area-bottom, 0px));
  }
  .setta-lightbox-img {
    max-width: 94vw;
    max-height: 75vh;
    max-height: 75dvh;
  }
}
