/* CSS específico da página Projetos (/projetos) — carregado só por projetos.php, ver AGENTS.md § CSS.
   Página estática (sem SIG/banco, mesmo padrão de servicos.php/sobre.php): conteúdo fixo em
   projetos.php, texto conferido literalmente em https://eletricminas.com.br/projetos/. Tokens de
   escala (--text-*, --radius-*, --spacing etc.) e utilitários (.ct-h1-display, .ct-lead,
   .hero--dark, .stat-card) vêm de css/style-base.css (Fase 1) — aqui só o que é específico desta
   página. Hero e cards usam foto real (ver print de referência) — os arquivos ainda não existem
   no repositório, apontam para imagens/projetos/ (ver aviso nos comentários de projetos.php). */

/* ============ ESPAÇAMENTO DE SEÇÃO ============ */
.projetos-filtros,
.projetos-grid,
.projetos-stats,
.projetos-cta {
  margin-block: 0;
}

.projetos-filtros {
  padding-block: calc(var(--spacing) * 10);
}

.projetos-grid,
.projetos-stats,
.projetos-cta {
  padding-block: calc(var(--spacing) * 16);
}

/* ============ HERO (foto de fundo real + gradiente escuro, igual à referência) ============ */
.projetos-hero-wrap {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--secondary-color);
  color: #fff;
}

.projetos-hero-wrap__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.projetos-hero-wrap__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to right,
    var(--secondary-color) 0%,
    rgba(23, 23, 23, 0.95) 55%,
    rgba(23, 23, 23, 0.6) 100%
  );
}

.projetos-hero {
  position: relative;
  padding-top: 9rem;
  padding-bottom: 4rem;
}

.projetos-hero-wrap .bread {
  background: transparent;
  padding-top: 0;
  margin-bottom: 0;
}

.projetos-hero__title {
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-medium);
  line-height: 1.15;
  letter-spacing: var(--tracking-tight);
  color: #fff;
}

@media (min-width: 768px) {
  .projetos-hero__title {
    font-size: var(--text-5xl);
  }
}

.projetos-hero__lead {
  color: rgba(255, 255, 255, 0.7);
}

/* Eyebrow do hero — mesma fórmula de contraste já validada em .bread--dark #breadcrumb
   .bread__column.active (pílula translúcida + texto var(--bs-primary), legível sobre fundo
   escuro); a referência usa esse badge com contraste ruim (texto quase invisível), não repetir. */
.projetos-hero__eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(var(--bs-primary-rgb), 0.15);
  border: 1px solid rgba(var(--bs-primary-rgb), 0.3);
  color: var(--bs-primary);
  border-radius: 50rem;
  padding: 0.25rem 0.75rem;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

.projetos-hero__eyebrow-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background-color: var(--bs-primary);
}

/* ============ FILTROS ============ */
.projetos-filtros__btn {
  border: 1px solid var(--bs-border-color);
  background-color: #fff;
  color: var(--secondary-color-light);
  border-radius: 50rem;
  padding: 0.5rem 1.25rem;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  transition: var(--transition);
}

.projetos-filtros__btn:hover {
  border-color: rgba(var(--bs-primary-rgb), 0.4);
  color: var(--bs-primary);
}

.projetos-filtros__btn.is-active {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}

/* ============ GALERIA DE PROJETOS (card vertical: foto em cima, conteúdo embaixo, "Ver
   detalhes" abre modal — ver print de referência) ============ */
.projetos-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  background-color: #fff;
  border: 1px solid var(--bs-border-color);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  transition-property: transform, box-shadow;
}

.projetos-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft-lg);
}

.projetos-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
}

.projetos-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.projetos-card__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1;
  background-color: var(--bs-primary);
  color: #fff;
  border-radius: 50rem;
  padding: 0.25rem 0.75rem;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

.projetos-card__body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 1.5rem;
}

.projetos-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: var(--text-xs);
  color: var(--bs-secondary-color);
}

.projetos-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.projetos-card__title {
  margin: 0.75rem 0 0;
  font-size: var(--text-lg);
  font-weight: var(--font-weight-bold);
  line-height: 1.35;
  color: var(--secondary-color);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.projetos-card__desc {
  margin: 0.75rem 0 0;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--bs-secondary-color);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.projetos-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.projetos-card__tag {
  display: inline-flex;
  align-items: center;
  border-radius: 50rem;
  background-color: var(--color-surface-alt);
  border: 1px solid var(--bs-border-color);
  padding: 0.25rem 0.75rem;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--secondary-color);
}

.projetos-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  align-self: flex-start;
  margin-top: auto;
  padding-top: 1.25rem;
  border: 0;
  background: none;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--bs-primary);
  transition: var(--transition);
}

.projetos-card__link:hover {
  color: var(--bs-primary-hover);
  gap: 0.5rem;
}

/* ============ MODAL DE DETALHES (Bootstrap .modal nativo, mesmo padrão de servicos.php) ============ */
.projetos-modal .modal-content {
  border: 0;
  border-radius: var(--radius-3xl);
  max-height: 90vh;
  overflow-y: auto;
}

.projetos-modal__media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-3xl) var(--radius-3xl) 0 0;
  overflow: hidden;
}

.projetos-modal__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.projetos-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  background-color: #fff;
  border-radius: 50%;
  padding: 0.5rem;
}

.projetos-modal__body {
  padding: 1.5rem 2rem 2rem;
}

.projetos-modal__title {
  margin: 0.75rem 0 0;
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--secondary-color);
}

.projetos-modal__desc {
  margin: 0.75rem 0 0;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--bs-secondary-color);
}

/* ============ ESTATÍSTICAS (foto de fundo real + overlay escuro, igual ao hero) ============ */
.projetos-stats {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--secondary-color);
  color: #fff;
}

.projetos-stats__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.projetos-stats__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: rgba(23, 23, 23, 0.884);
}

.projetos-stats__subtitle {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: rgba(255, 255, 255, 0.55);
}

.projetos-stats__number {
  font-size: var(--text-5xl);
}
