/* ===================================
   CSS OTIMIZADO - SOFT PROJETOS
   Versão Melhorada - Performance + Visual
   =================================== */

/* ===== VARIÁVEIS GLOBAIS ===== */
:root {
  --bg-primary: #0b0f14;
  --bg-secondary: #121318;
  --text-color: #e9eef6;
  --accent-color: #ff4d4d;
  --accent-green: #25D366;
  --card-bg: #15171a;
  --radius: 12px;
  --font-primary: 'Poppins', sans-serif;
  --transition-fast: all 0.2s ease;
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET BÁSICO ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== BODY E LAYOUT GERAL ===== */
body {
  font-family: var(--font-primary);
  background: radial-gradient(900px 500px at 20% 10%, rgba(255,0,0,0.06), transparent 60%),
              radial-gradient(700px 420px at 80% 0%, rgba(255,255,255,0.04), transparent 55%),
              var(--bg-primary);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

.container#conteudo-principal {
  padding-top: 8px;
}

/* ===== HEADER MODERNO ===== */
.site-header {
  background: linear-gradient(90deg, var(--bg-secondary), #1a1d22);
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* Logo e Marca */
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.brand:hover {
  transform: scale(1.02);
}

.logo-img {
  height: 40px;
  width: auto;
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--text-color);
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Navegação Principal */
.nav-links {
  flex: none;
  margin-left: 1rem;
}

.nav-main {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-link {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: var(--transition-smooth);
}

.nav-link:hover {
  background: var(--accent-color);
  color: #fff;
  transform: translateY(-2px);
}

/* Submenu */
.has-sub {
  position: relative;
}

.submenu {
  display: none;
  position: absolute;
  top: calc(100% - 5px);
  left: 0;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  padding: 1rem 0.5rem 0.5rem 0.5rem;
  list-style: none;
  z-index: 1000;
  min-width: 240px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}

/* Área de tolerância MAIOR - evita fechar o menu */
.has-sub::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -10px;
  right: -10px;
  height: 15px;
  background: transparent;
  z-index: 999;
}

.has-sub:hover .submenu,
.submenu:hover {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.submenu li {
  margin: 0;
}

.submenu a {
  text-decoration: none;
  color: var(--text-color);
  padding: 0.6rem 1rem;
  display: block;
  border-radius: 8px;
  transition: var(--transition-smooth);
  font-size: 0.9rem;
  font-weight: 500;
}

.submenu a:hover {
  background: var(--accent-color);
  color: #fff;
  transform: translateX(5px);
}

/* Botão "Softwares" (dropdown toggle) */
.sub-toggle {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  padding: 0.65rem 1.4rem;
  border-radius: 10px;
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  background: linear-gradient(135deg, rgba(255, 77, 77, 0.12), rgba(255, 77, 77, 0.08));
  border: 1.5px solid rgba(255, 77, 77, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
  transition: var(--transition-fast);
}

.sub-toggle:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--accent-color), #ff6666);
  color: #fff;
  border-color: var(--accent-color);
  box-shadow: 0 6px 16px rgba(255, 77, 77, 0.3);
}

.sub-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 77, 77, 0.3);
}

.sub-toggle .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.sub-toggle:hover .icon {
  transform: rotate(180deg);
}

/* Header Actions (WhatsApp, Telegram, PayPal) - MELHORADOS */
.header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-cta img.icon {
  width: 20px;
  height: 20px;
}

.nav-cta.wa {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
}

.nav-cta.tg {
  background: linear-gradient(135deg, #229ED9, #1b7fc2);
  color: #fff;
}

.nav-cta.donate {
  background: linear-gradient(135deg, #FFC439, #FFB020);
  color: #003087;
  font-weight: 800;
}

.nav-cta:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  filter: brightness(1.15);
  transform: translateY(-3px);
}

/* Botão Suporte Online - MELHORADO */
.nav-cta.support {
  background: rgba(255,255,255,0.06);
  color: var(--text-color);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}

.online-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00ff00;
  margin-right: 8px;
  animation: pulse-green 2s infinite;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

@keyframes pulse-green {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

/* ===== TÍTULO DO CATÁLOGO ===== */
.catalog-title {
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 900;
  letter-spacing: 0.5px;
  margin: 1.5rem 0;
  text-align: center;
  position: relative;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.catalog-title::after {
  content: "";
  display: block;
  width: 120px;
  height: 4px;
  margin: 0.8rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  opacity: 0.9;
}

/* ===== GRID DE PRODUTOS ===== */
.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  justify-content: center;
  max-width: 1400px;
  margin: 0 auto;
}

/* ===== CARDS DE PRODUTOS - MELHORADOS ===== */
.product-card {
  background: linear-gradient(180deg, #141821, #0d1116);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition-smooth);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  will-change: transform;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 77, 77, 0.25);
  box-shadow: 0 12px 30px rgba(255, 77, 77, 0.15);
}

.product-img {
  width: 100%;
  max-width: 200px;
  height: 200px;
  object-fit: contain;
  display: block;
  margin: 0 auto 1rem;
  padding: 0.5rem;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
  transition: transform 0.2s ease;
}

.product-card:hover .product-img {
  transform: scale(1.05);
}

.product-title {
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.3px;
  margin-bottom: 1rem;
  color: var(--text-color);
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.product-btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 12px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-color), #ff6666);
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 6px 16px rgba(255, 77, 77, 0.3);
  font-size: 0.95rem;
}

.product-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255, 77, 77, 0.5);
  filter: brightness(1.1);
}

/* ===== PÁGINAS DE PRODUTOS INDIVIDUAIS ===== */
.product-image {
  text-align: center;
  margin: 2rem 0 1rem;
}

.product-hero-img {
  width: 100%;
  max-width: 220px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.product-hero-img:hover {
  transform: scale(1.05);
}

/* ===== DESCRIÇÃO DO PRODUTO - MELHORADA ===== */
.product-description {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.desc-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.desc-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.8rem;
  border-radius: 10px;
  transition: var(--transition-smooth);
}

.desc-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.desc-bullet {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #28a745, #34d058);
  margin-top: 0.4rem;
  box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

.desc-text {
  flex: 1;
  color: var(--text-color);
  line-height: 1.7;
  font-size: 1rem;
}

/* ===== PRINCIPAIS RECURSOS - MELHORADOS ===== */
.product-features {
  max-width: 900px;
  margin: 2.5rem auto;
}

.features-title {
  font-size: 1.5rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.features-list {
  display: grid;
  gap: 1rem;
}

.features-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--transition-smooth);
}

.features-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 77, 77, 0.3);
  transform: translateX(5px);
}

.features-bullet {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00ff96, #00b34f);
  margin-top: 0.4rem;
  box-shadow: 0 0 10px rgba(0, 255, 150, 0.5);
}

.features-text {
  flex: 1;
  color: var(--text-color);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ===== BOTÕES DE AÇÃO - MELHORADOS ===== */
.product-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.btn-action,
.btn-download,
.btn-tutorial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.8rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.3px;
  border: none;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  transition: var(--transition-smooth);
  font-size: 1rem;
  cursor: pointer;
}

.btn-download {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
}

.btn-tutorial {
  background: linear-gradient(135deg, var(--accent-color), #d92f2f);
  color: #fff;
}

.btn-download:hover,
.btn-tutorial:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.4);
  filter: brightness(1.15);
}

/* ===== SEÇÃO DE CONFIANÇA - MELHORADA ===== */
.trust-section {
  background: linear-gradient(135deg, #0f1419, #1a1d24);
  border-radius: 24px;
  padding: 3rem 2rem;
  margin: 4rem auto;
  max-width: 1100px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(40, 167, 69, 0.2);
  position: relative;
}

.trust-section h3 {
  color: #28a745;
  margin-bottom: 2.5rem;
  font-size: 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.trust-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.trust-item {
  text-align: center;
  padding: 2rem 1.5rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  transition: var(--transition-smooth);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.trust-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(40, 167, 69, 0.2);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(40, 167, 69, 0.25);
}

.trust-item i {
  color: #28a745;
  margin-bottom: 1rem;
  display: block;
}

.trust-item h4 {
  color: #fff;
  margin-bottom: 0.8rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.trust-item p {
  color: #ccc;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* ===== BOTÃO FLUTUANTE WHATSAPP - OTIMIZADO ===== */
.whatsapp-float {
  position: fixed !important;
  right: 20px !important;
  bottom: 20px !important;
  width: 70px !important;
  height: 70px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--accent-green) !important;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4) !important;
  z-index: 9999 !important;
  transition: var(--transition-fast) !important;
  cursor: pointer !important;
}

.whatsapp-float:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5) !important;
}

.whatsapp-float img,
.whatsapp-float .whatsapp-icon,
.whatsapp-icon {
  width: 40px !important;
  height: 40px !important;
  object-fit: contain !important;
  position: relative;
  z-index: 1;
}

/* ===== FOOTER - MELHORADO ===== */
.site-footer {
  background: linear-gradient(180deg, var(--bg-secondary), #0a0c0f);
  padding: 2rem 1rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
  color: #999;
  font-size: 0.9rem;
}

html {
  margin: 0;
  padding: 0;
}

body {
  margin: 0 !important;
  padding: 0 !important;
}

.site-footer a {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--transition-smooth);
  font-weight: 600;
}

.site-footer a:hover {
  color: #ff6666;
  text-decoration: underline;
}

/* ===== RESPONSIVIDADE - MELHORADA ===== */
@media (max-width: 1024px) {
  .row {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-links {
    margin-left: 0;
  }
  
  .header-actions {
    width: 100%;
    justify-content: center;
  }
  
  .row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .trust-items {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .product-card {
    padding: 1.2rem;
  }
  
  .product-img {
    max-width: 180px;
    height: 180px;
  }
  
  .catalog-title {
    font-size: 1.4rem;
  }
  
  .trust-section {
    padding: 2rem 1rem;
  }
  
  .trust-section h3 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 12px;
  }
  
  .site-header {
    padding: 0.5rem 0;
  }
  
  .logo-img {
    height: 32px;
  }
  
  .logo-text {
    font-size: 1rem;
  }
  
  .nav-cta {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
  
  .whatsapp-float {
    width: 60px !important;
    height: 60px !important;
    right: 15px !important;
    bottom: 15px !important;
  }
  
  .whatsapp-float img,
  .whatsapp-icon {
    width: 35px !important;
    height: 35px !important;
  }
  
  .product-title {
    font-size: 1.1rem;
  }
  
  .btn-download,
  .btn-tutorial {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}

/* Acessibilidade - Redução de movimento */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Melhorias de Performance */
.product-card,
.trust-item,
.nav-link,
.btn-download,
.btn-tutorial {
  will-change: transform;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Seleção de texto */
::selection {
  background: var(--accent-color);
  color: #fff;
}

::-moz-selection {
  background: var(--accent-color);
  color: #fff;
}