/* ======================================================
   PERRI ENGENHARIA - ESTILOS GERAIS
   ====================================================== */

/* Fonte Inter */
* {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Scroll Suave */
html {
  scroll-behavior: smooth;
}

/* ======================================================
   HERO & FUNDOS
   ====================================================== */

/* Hero Gradient */
.hero-gradient {
  background: linear-gradient(135deg, #000000 0%, #1e3a8a 50%, #3b82f6 100%);
  position: relative;
  overflow: hidden;
}

/* Background Animado */
.hero-gradient::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="400" cy="700" r="120" fill="url(%23a)"/></svg>') no-repeat center center;
  background-size: cover;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

/* Parallax */
.parallax-bg {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.parallax-element {
  transform: translateZ(0);
  will-change: transform;
}

/* Floating Shapes (Formas flutuantes no fundo) */
.floating-shapes {
  position: absolute;
  width: 100%; height: 100%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.shape {
  position: absolute;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 50%;
  animation: floatShapes 15s infinite linear;
}

.shape:nth-child(1) { width: 80px; height: 80px; left: 10%; animation-delay: 0s; }
.shape:nth-child(2) { width: 120px; height: 120px; left: 70%; animation-delay: 5s; }
.shape:nth-child(3) { width: 60px; height: 60px; left: 40%; animation-delay: 10s; }

@keyframes floatShapes {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* ======================================================
   EFEITOS VISUAIS (GLASS, GLOW, TEXT)
   ====================================================== */

.text-glow {
  text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.gradient-text {
  background: linear-gradient(45deg, #3b82f6, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Divisoria de Seção */
.section-divider {
  position: relative;
  overflow: hidden;
}

.section-divider::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #3b82f6, transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Botão Pulsante */
.pulse-animation {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

/* ======================================================
   CARDS DE SERVIÇOS (GRID LAYOUT)
   ====================================================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
  justify-content: center;
  width: 100%;
}

.project-card {
  background: #111827; /* Fundo escuro */
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(59, 130, 246, 0.2);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: #3b82f6;
  box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.15);
}

/* Container da Imagem do Card */
.project-video-container {
  position: relative;
  width: 100%;
  height: 200px;
  background: #000;
  overflow: hidden;
}

.project-video-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-video-thumbnail {
  transform: scale(1.1);
}

/* Overlay Escuro com Ícone (+) */
.video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.project-card:hover .video-overlay {
  opacity: 1;
}

.play-button {
  width: 50px; height: 50px;
  background: #3b82f6;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

/* Informações do Card */
.project-info {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-tag {
  font-size: 0.75rem;
  color: #60a5fa;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}

.project-technologies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tech-tag {
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.1);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ======================================================
   MODAL (Janela que abre ao clicar)
   ====================================================== */

.project-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.project-modal.active {
  opacity: 1;
  visibility: visible;
}

.project-modal-content {
  background: #1f2937;
  width: 95%;
  max-width: 600px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  border: 1px solid #3b82f6;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.project-modal.active .project-modal-content {
  transform: scale(1);
}

.project-modal-close {
  position: absolute;
  top: 15px; right: 15px;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  width: 35px; height: 35px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}

.project-modal-close:hover {
  background: #3b82f6;
}

.project-modal-video-container {
  height: 300px;
  width: 100%;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-img-content {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-modal-info {
  padding: 24px;
}

.project-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #3b82f6;
  margin-bottom: 12px;
}

.project-modal-description {
  color: #d1d5db;
  line-height: 1.6;
}

/* ======================================================
   FORMULÁRIO DE CONTATO (Inputs)
   ====================================================== */
.form-input {
  transition: all 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* ======================================================
   NOVO ESTILO DE CONTATO (VERSÃO FINAL - 600px)
   ====================================================== */

/* Layout Geral */
.contact-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 40px; 
    align-items: start;
    max-width: 1250px; 
    margin: 0 auto;
}

@media (max-width: 991px) {
    .contact-content-wrapper {
        grid-template-columns: 1fr;
    }
}

/* --- 1. Formulário (LARGURA AUMENTADA) --- */
.contact-form-container {
    padding: 24px;
    border-radius: 12px;
    background: #111827;
    border: 1px solid rgba(59, 130, 246, 0.2);
    position: relative;
    width: 100%;
    max-width: 600px; 
    margin: 0 auto;   
}

.contact-form-container h3 {
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    font-weight: 600;
}

.form-input-styled {
    width: 100%;
    padding: 10px 12px; 
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 6px;
    color: white;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-input-styled:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.form-group label {
    font-size: 0.85rem;
    margin-bottom: 4px;
    color: #9ca3af;
}

.form-group {
    margin-bottom: 12px !important;
}

/* Botão de Enviar */
.btn-submit-styled {
    width: 100%;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
    padding: 12px 0;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    cursor: pointer;
    border: none;
}

.btn-submit-styled:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ======================================================
   ESTILO DA MENSAGEM DE SUCESSO (COM FUNDO ANIMADO)
   ====================================================== */

.success-animation {
    position: relative; 
    width: 100%;
    min-height: 480px; 
    height: 100%;
    
    /* MUDANÇA: Gradiente que se mexe (Efeito Aurora) */
    background: linear-gradient(135deg, #0f172a, #1e3a8a, #0f172a);
    background-size: 200% 200%;
    animation: fadeInSuccess 0.5s ease-out forwards, gradientMove 8s ease infinite;
    
    border-radius: 12px;
    /* Borda sutil brilhante */
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5); /* Sombra mais forte */
    
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    overflow: hidden; /* Garante que o brilho não vaze */
}

.success-animation.hidden {
    display: none;
}

/* O gradiente se move lentamente no fundo */
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fadeInSuccess {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* Container do ícone */
.logo-anim-container {
    position: relative; 
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* Adicionei um brilho branco atrás do logo */
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.4); 
    animation: scaleUpCircle 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Mantendo as animações dos ícones */
.icon-step-1 { animation: checkTransition 2.5s ease-in-out forwards; }
.icon-step-2 { opacity: 0; animation: logoAppearance 1.5s ease-out forwards; animation-delay: 1.3s; }

/* Keyframes Mantidos */
@keyframes scaleUpCircle {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes checkTransition {
    0% { opacity: 0; transform: scale(0.5); }
    20% { opacity: 1; transform: scale(1.3); } 
    35% { transform: scale(1); } 
    55% { opacity: 1; transform: scale(1); } 
    100% { opacity: 0; transform: scale(0.5); } 
}

@keyframes logoAppearance {
    0% { opacity: 0; transform: translateY(15px) scale(0.9); filter: blur(5px); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* --- 2. Cards de Contato (Direita) --- */
.contact-info-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* Alinha a largura com o formulário */
    width: 100%;
    max-width: 600px; 
    margin: 0 auto; 
}

.contact-info-cards h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-left: 10px;
    font-weight: 600;
}

.contact-card-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 16px;
    background: #1f2937;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
    text-decoration: none;
}

.contact-card-item:hover:not(.no-hover) {
    transform: translateX(5px);
    background: #252f3e;
    border-color: #3b82f6;
}

.card-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.card-details h4 {
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0;
}

.card-details p {
    color: #d1d5db;
    font-size: 0.85rem;
    line-height: 1.2;
}

.card-details span {
    font-size: 0.75rem;
    color: #60a5fa;
    font-weight: 600;
    text-transform: uppercase;
    display: block;
    margin-top: 2px;
}

/* --- 3. Linha do Tempo (Processo) - CORRIGIDO --- */
/* --- 3. Linha do Tempo (Processo) - AJUSTE "APERTADO" --- */
.process-section {
    margin-top: 60px;
    padding-top: 40px;
}

.process-steps-grid {
    display: flex;
    justify-content: center; /* Centraliza tudo junto */
    align-items: stretch; /* Estica para ficarem na mesma altura */
    gap: 8px; /* AQUI O SEGREDO: Reduzi drasticamente o espaço (era 20px) */
    flex-wrap: wrap;
}

.step-item {
    flex: 1;
    background: #1f2937;
    padding: 20px 15px; /* Padding lateral menor dentro do card */
    border-radius: 10px;
    min-width: 140px; /* Permite que o card encolha mais para aproximar */
    text-align: center;
    border: 1px solid transparent;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.step-item:hover {
    transform: translateY(-5px);
    border-color: #3b82f6;
    z-index: 2; /* Garante que o hover fique por cima */
}

.step-item.highlight {
    background: linear-gradient(180deg, #1f2937, rgba(59, 130, 246, 0.1));
    border-color: rgba(59, 130, 246, 0.4);
}

.step-number {
    font-size: 2rem;
    font-weight: 800;
    color: rgba(59, 130, 246, 0.2);
    line-height: 1;
    margin-bottom: 8px;
}

.step-item h4 {
    color: white;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 8px;
    line-height: 1.2;
}

.step-item p {
    color: #9ca3af;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* SETA AJUSTADA */
.step-arrow {
    padding: 0;
    align-self: center;
    color: rgba(255,255,255,0.15);
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    min-width: 20px; /* A seta ocupa pouco espaço lateral agora */
}

/* MOBILE */
@media (max-width: 768px) {
    .process-steps-grid {
        flex-direction: column;
        gap: 10px; /* Um pouco mais de espaço na vertical */
        align-items: center;
    }
    .step-item {
        width: 100%;
        text-align: left;
        display: flex;
        align-items: center;
        gap: 15px;
    }
    .step-number {
        font-size: 1.8rem;
        margin-bottom: 0;
        width: 50px;
    }
    .step-arrow {
        display: flex !important;
        transform: rotate(90deg); /* Aponta para baixo */
        margin: 5px 0;
    }
}

@media (max-width: 768px) {
    .process-steps-grid {
        flex-direction: column;
        align-items: center;
    }
    .step-item {
        width: 100%;
        text-align: left;
        display: flex;
        align-items: center;
        gap: 15px;
    }
    .step-number {
        font-size: 1.8rem;
        margin-bottom: 0;
        width: 50px;
    }
    
    /* CORREÇÃO DA SETA NO MOBILE */
    .step-arrow {
        display: flex !important; /* Força aparecer (sobrescrevendo o hidden do HTML se houver) */
        transform: rotate(90deg); /* Aponta para baixo */
        margin: 15px 0; /* Espaço entre os cards */
    }
}

/* ======================================================
   ANIMAÇÃO CUSTOMIZADA DE SUCESSO (CHECK -> LOGO)
   ====================================================== */

/* Container do círculo azul */
.logo-anim-container {
    /* Garante que os ícones absolutos fiquem centralizados aqui */
    position: relative; 
    /* Uma entrada suave para o círculo azul */
    animation: scaleUpCircle 0.5s ease-out forwards;
}

/* ANIMAÇÃO DO CHECK (Passo 1) */
.icon-step-1 {
    /* Duração total de 2.5s para o ciclo do check */
    animation: checkTransition 2.5s ease-in-out forwards;
}

/* ANIMAÇÃO DO LOGO (Passo 2) */
.icon-step-2 {
    opacity: 0; /* Começa invisível */
    /* Aparece suavemente */
    animation: logoAppearance 1.5s ease-out forwards;
    /* O segredo: começa a aparecer só depois de 1.3 segundos, quando o check está saindo */
    animation-delay: 1.3s; 
}

