/* ===== SEÇÃO PROJETOS DE REFERÊNCIA ===== */
.projetos-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--color-gray-dark) 0%, var(--color-black) 100%);
  position: relative;
  overflow: hidden;
  border-top: 1px solid transparent;
  background-clip: padding-box;
}

.projetos-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--color-primary) 50%, transparent 100%);
  z-index: 1;
}

.projetos-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(6, 88, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 191, 0, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(6, 88, 246, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.projetos-header {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
  z-index: 2;
}

.projetos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-bottom: 50px;
  position: relative;
  z-index: 2;
}

.projeto-card.featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(6, 88, 246, 0.15), rgba(255, 191, 0, 0.1));
  border: 2px solid rgba(6, 88, 246, 0.4);
}

.projeto-card.featured .projeto-icon {
  background: var(--color-primary);
  width: 60px;
  height: 60px;
  font-size: 28px;
}

.projeto-card.featured .projeto-title {
  font-size: 1.6rem;
}

.projeto-card.featured .projeto-description {
  font-size: 1.1rem;
}

.projeto-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-xl);
  padding: var(--spacing-2xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.projeto-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition-normal);
}

.projeto-card:hover::before {
  transform: scaleX(1);
}

.projeto-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(6, 88, 246, 0.3);
  box-shadow: var(--shadow-xl);
}

.projeto-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.projeto-icon {
  width: 50px;
  height: 50px;
  background: var(--color-primary);
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--color-white);
  flex-shrink: 0;
}

/* Garantir que ícones de fallback tenham o tamanho correto */
.projeto-icon .iconify,
.projeto-icon i {
  font-size: 24px !important;
  color: var(--color-white) !important;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Fallback específico para ícones que não carregaram */
.projeto-icon .iconify:empty::before {
  content: "⚙️";
  font-size: 20px;
}

/* Fallback mais robusto para mobile */
@media (max-width: 768px) {
  .projeto-icon .iconify:not([data-loaded="true"]) {
    position: relative;
  }
  
  .projeto-icon .iconify:not([data-loaded="true"])::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-white);
    border-radius: 4px;
    opacity: 0.9;
  }
  
  /* Fallbacks específicos por tipo de projeto */
  .projeto-icon .iconify[data-icon="mdi:cog-outline"]:not([data-loaded="true"])::before {
    content: "⚙️";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    font-size: 20px;
  }
  
  .projeto-icon .iconify[data-icon="mdi:truck-delivery"]:not([data-loaded="true"])::before {
    content: "🚚";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    font-size: 20px;
  }
  
  .projeto-icon .iconify[data-icon="mdi:web"]:not([data-loaded="true"])::before {
    content: "🌐";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    font-size: 20px;
  }
  
  .projeto-icon .iconify[data-icon="mdi:food-fork-drink"]:not([data-loaded="true"])::before {
    content: "🍽️";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    font-size: 20px;
  }
  
  .projeto-icon .iconify[data-icon="mdi:cellphone"]:not([data-loaded="true"])::before {
    content: "📱";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    font-size: 20px;
  }
}

.projeto-card.featured .projeto-icon .iconify,
.projeto-card.featured .projeto-icon i {
  font-size: 28px !important;
  width: 28px;
  height: 28px;
}

.projeto-title {
  font-size: var(--font-xl);
  font-weight: 700;
  color: var(--color-white);
  margin: 0;
  line-height: 1.3;
}

.projeto-subtitle {
  font-size: var(--font-base);
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.projeto-description {
  color: var(--color-gray-light);
  line-height: 1.6;
  margin-bottom: 20px;
  font-size: var(--font-base);
}

.projeto-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.projeto-tag {
  background: rgba(6, 88, 246, 0.2);
  color: var(--color-primary);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius-full);
  font-size: var(--font-sm);
  font-weight: 500;
  border: 1px solid rgba(6, 88, 246, 0.3);
}

.projetos-cta {
  text-align: center;
  position: relative;
  z-index: 2;
}

/* Animações de entrada */
.projeto-card {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

.projeto-card:nth-child(1) { animation-delay: 0.1s; }
.projeto-card:nth-child(2) { animation-delay: 0.2s; }
.projeto-card:nth-child(3) { animation-delay: 0.3s; }
.projeto-card:nth-child(4) { animation-delay: 0.4s; }
.projeto-card:nth-child(5) { animation-delay: 0.5s; }
.projeto-card:nth-child(6) { animation-delay: 0.6s; }

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

/* Responsividade */
@media (max-width: 768px) {
  .projetos-section {
    padding: 60px 0;
  }
  
  .projetos-header {
    margin-bottom: 40px;
  }
  
  .projetos-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
  }
  
  .projeto-card.featured {
    grid-column: 1;
  }
  
  .projeto-card.featured .projeto-icon {
    width: 55px;
    height: 55px;
    font-size: 26px;
  }
  
  .projeto-card.featured .projeto-title {
    font-size: 1.4rem;
  }
  
  .projeto-card.featured .projeto-description {
    font-size: 1rem;
  }
  
  .projeto-card {
    padding: 25px;
  }
  
  .projeto-header {
    gap: 12px;
    margin-bottom: 15px;
  }
  
  .projeto-icon {
    width: 45px;
    height: 45px;
    font-size: 22px;
  }
  
  .projeto-title {
    font-size: 1.2rem;
  }
  
  .projeto-subtitle {
    font-size: 0.9rem;
    margin-bottom: 12px;
  }
  
  .projeto-description {
    font-size: 0.95rem;
    margin-bottom: 15px;
  }
  
  .projeto-tag {
    font-size: 0.8rem;
    padding: 5px 10px;
  }
}

@media (max-width: 480px) {
  .projetos-section {
    padding: 50px 0;
  }
  
  .projeto-card {
    padding: 20px;
  }
  
  .projeto-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .projeto-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  
  .projeto-title {
    font-size: 1.1rem;
  }
}
