/* Mapa
 * 1. Escopo e variantes por projeto
 * 2. Layout compartilhado das paginas de projeto
 * 3. Utilitarios migrados de atributos style=""
 * 4. Responsividade
 */

:where(html[class*="projetos-"]) {
  --projeto-accent: #056bf6;
  --projeto-accent-alt: #1bc7fb;
  --projeto-accent-shadow: rgba(5, 107, 246, 0.28);
  --projeto-subtitle-align: justify;
  --projeto-subtitle-align-mobile: left;
}

:where(html.projetos-netmapper),
:where(html.projetos-gerenciador-de-blackouts),
:where(html.projetos-portal-blackout) {
  --projeto-subtitle-align: center;
  --projeto-subtitle-align-mobile: left;
}

:where(html.projetos-portal-ibm-mq-interface),
:where(html.projetos-openpyd),
:where(html.projetos-portal-capacity) {
  --projeto-subtitle-align: justify;
  --projeto-subtitle-align-mobile: center;
}

:where(html.projetos-gotify-zabbix) {
  --projeto-subtitle-align: left;
  --projeto-subtitle-align-mobile: left;
}

:where(html[class*="projetos-"]) .project-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  text-align: center;
  background: linear-gradient(135deg, var(--projeto-accent) 0%, var(--projeto-accent-alt) 100%);
  max-width: 1200px;
  width: calc(100% - 40px);
  margin: 26px auto 40px;
  padding: 64px 28px;
  border-radius: 32px;
  box-shadow: 0 30px 80px var(--projeto-accent-shadow);
}

:where(html[class*="projetos-"]) .project-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.18), transparent 25%),
    radial-gradient(circle at 85% 18%, rgba(255, 255, 255, 0.15), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.12), transparent 28%);
  pointer-events: none;
}

:where(html[class*="projetos-"]) .project-hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
  margin: 0 auto;
  padding: 0;
}

:where(html[class*="projetos-"]) .project-title {
  font-size: 3.5rem;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: projetosFadeInUp 1s ease-out;
}

:where(html[class*="projetos-"]) .project-subtitle {
  font-size: 1rem;
  color: #fff;
  text-align: var(--projeto-subtitle-align);
  margin: 10px auto 0;
  padding: 5px;
  white-space: normal;
  word-spacing: normal;
  letter-spacing: normal;
  word-break: normal;
  overflow-wrap: break-word;
  animation: projetosFadeInUp 1s ease-out 0.2s both;
}

:where(html[class*="projetos-"]) .tech-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0;
  animation: projetosFadeInUp 1s ease-out 0.4s both;
}

:where(html[class*="projetos-"]) .tech-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.3s ease, background 0.3s ease;
}

:where(html[class*="projetos-"]) .tech-badge:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.3);
}

:where(html[class*="projetos-"]) .action-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  animation: projetosFadeInUp 1s ease-out 0.6s both;
}

:where(html[class*="projetos-"]) .btn-primary,
:where(html[class*="projetos-"]) .btn-secondary {
  padding: 14px 28px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

:where(html[class*="projetos-"]) .btn-primary {
  background: #fff;
  color: var(--projeto-accent);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

:where(html[class*="projetos-"]) .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

:where(html[class*="projetos-"]) .btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}

:where(html[class*="projetos-"]) .btn-secondary:hover {
  background: #fff;
  color: var(--projeto-accent);
  transform: translateY(-3px);
}

:where(html[class*="projetos-"]) .feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin: 50px 0;
}

:where(html[class*="projetos-"]) .feature-card {
  background: #fff;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

:where(html[class*="projetos-"]) .feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

:where(html[class*="projetos-"]) .feature-icon {
  font-size: 2.5rem;
  color: var(--projeto-accent);
  margin-bottom: 20px;
}

:where(html[class*="projetos-"]) .feature-title {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: #333;
}

:where(html[class*="projetos-"]) .feature-description {
  color: #666;
  font-size: 1rem;
  line-height: 1.6;
  text-align: left;
  margin: 10px auto 0;
  padding: 5px;
  white-space: normal;
  word-spacing: normal;
  letter-spacing: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

:where(html[class*="projetos-"]) .demo-section {
  background: #f8f9fa;
  padding: 60px 0;
  margin: 50px 0;
}

:where(html[class*="projetos-"]) .demo-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

:where(html[class*="projetos-"]) .demo-video {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

:where(html[class*="projetos-"]) .demo-lead {
  text-align: center;
  margin-bottom: 40px;
}

:where(html[class*="projetos-"]) .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin: 50px 0;
  text-align: center;
}

:where(html[class*="projetos-"]) .stat-item {
  padding: 20px;
}

:where(html[class*="projetos-"]) .stat-number {
  font-size: 3rem;
  font-weight: bold;
  background: linear-gradient(135deg, var(--projeto-accent), var(--projeto-accent-alt));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

:where(html[class*="projetos-"]) .stat-label {
  color: #666;
  font-size: 1.1rem;
}

:where(html[class*="projetos-"]) .pdf-embed {
  width: 100%;
  height: 600px;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

:where(html[class*="projetos-"]) .pdf-fallback {
  text-align: center;
  margin-top: 20px;
  display: none;
}

@keyframes projetosFadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  :where(html[class*="projetos-"]) .project-hero {
    width: calc(100% - 20px);
    padding: 38px 20px;
    margin: 18px auto 30px;
    border-radius: 24px;
  }

  :where(html[class*="projetos-"]) .project-title {
    font-size: 2.5rem;
  }

  :where(html[class*="projetos-"]) .project-subtitle {
    text-align: var(--projeto-subtitle-align-mobile);
    line-height: 1.6;
    animation: projetosFadeInUp 1s ease-out 0.2s both;
  }

  :where(html[class*="projetos-"]) .feature-description {
    line-height: 1.6;
  }

  :where(html[class*="projetos-"]) .action-buttons {
    flex-direction: column;
    align-items: center;
  }

  :where(html[class*="projetos-"]) .tech-badges {
    justify-content: center;
  }

  :where(html[class*="projetos-"]) .feature-grid {
    grid-template-columns: 1fr;
  }
}
