/* ==========================================================================
   5G SERRALHERIA - DESIGN SYSTEM & MAIN STYLESHEET
   Vanilla CSS - Performance & SEO First (Google Core Updates Ready)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties / Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Cores Base & Neutras */
  --bg-primary: #0F1115;
  --bg-alt: #161920;
  --surface: #1E222A;
  --surface-hover: #262B35;
  --border: #2E3440;
  --border-light: rgba(255, 255, 255, 0.08);

  /* Cores de Destaque / Marca */
  --accent-orange: #FF6B00;
  --accent-orange-hover: #E05E00;
  --accent-orange-glow: rgba(255, 107, 0, 0.25);
  
  /* Conversão / WhatsApp */
  --whatsapp-green: #25D366;
  --whatsapp-green-hover: #20BD5A;
  --whatsapp-glow: rgba(37, 211, 102, 0.3);

  /* Tipografia & Cores de Texto */
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --text-main: #F3F4F6;
  --text-muted: #9CA3AF;
  --text-dim: #6B7280;

  /* Espaçamentos & Layout */
  --container-max: 1240px;
  --header-height: 76px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transições & Sombras */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px var(--accent-orange-glow);
}

/* --------------------------------------------------------------------------
   2. Reset Moderno & Regras Globais
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  background: none;
  border: none;
  outline: none;
}

ul, ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   3. Utilitários de Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(20px, 4vw, 48px);
  padding-right: clamp(20px, 4vw, 48px);
}

.section-padding {
  padding-top: clamp(60px, 8vw, 100px);
  padding-bottom: clamp(60px, 8vw, 100px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 107, 0, 0.1);
  border: 1px solid rgba(255, 107, 0, 0.25);
  color: var(--accent-orange);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-orange);
  box-shadow: 0 0 8px var(--accent-orange);
}

.section-header {
  max-width: 680px;
  margin-bottom: 48px;
}

.section-header.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-subtitle {
  color: var(--accent-orange);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-top: 12px;
}

/* --------------------------------------------------------------------------
   4. Botões & Elementos Interativos
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
}

.btn-accent {
  background-color: var(--accent-orange);
  color: #FFFFFF;
  box-shadow: var(--shadow-glow);
}

.btn-accent:hover {
  background-color: var(--accent-orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
}

.btn-whatsapp {
  background-color: var(--whatsapp-green);
  color: #FFFFFF;
  box-shadow: 0 4px 15px var(--whatsapp-glow);
}

.btn-whatsapp:hover {
  background-color: var(--whatsapp-green-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--whatsapp-glow);
}

.btn-outline {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

/* Botão Flutuante do WhatsApp */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--whatsapp-green);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
  transition: all var(--transition-normal);
  animation: pulse-green 2s infinite;
}

.floating-whatsapp:hover {
  transform: scale(1.1);
  background-color: var(--whatsapp-green-hover);
}

.floating-whatsapp svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* --------------------------------------------------------------------------
   5. Header & Navegação
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: rgba(15, 17, 21, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-img {
  height: 52px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
  transition: transform var(--transition-fast);
}

.logo-img:hover {
  transform: scale(1.03);
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-orange), #D04F00);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 900;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px var(--accent-orange-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-orange);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.phone-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.phone-link:hover {
  color: #FFFFFF;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 24px clamp(20px, 4vw, 48px);
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  z-index: 99;
}

.mobile-menu.open {
  display: flex;
}

/* --------------------------------------------------------------------------
   6. Hero Section
   -------------------------------------------------------------------------- */
.hero {
  padding-top: clamp(40px, 6vw, 80px);
  padding-bottom: clamp(60px, 8vw, 100px);
  background: radial-gradient(circle at top right, rgba(255, 107, 0, 0.08), transparent 50%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #FFFFFF;
  margin-top: 20px;
  margin-bottom: 20px;
}

.hero-content h1 span {
  color: var(--accent-orange);
}

.hero-content p {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #FFFFFF;
}

.stat-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.hero-media {
  position: relative;
}

.hero-img-wrapper {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.hero-img-wrapper img {
  width: 100%;
  height: clamp(320px, 36vw, 480px);
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   7. Seção Diferenciais
   -------------------------------------------------------------------------- */
.diff-section {
  background-color: var(--bg-alt);
}

.diff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.diff-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: all var(--transition-normal);
}

.diff-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-orange);
  box-shadow: var(--shadow-card);
}

.diff-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: rgba(255, 107, 0, 0.12);
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.diff-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #FFFFFF;
}

.diff-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   8. Seção Serviços
   -------------------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-orange);
  box-shadow: var(--shadow-card);
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-orange);
  margin-bottom: 20px;
}

.service-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 10px;
}

.service-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

/* --------------------------------------------------------------------------
   9. Como Funciona
   -------------------------------------------------------------------------- */
.steps-section {
  background-color: var(--bg-alt);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.step-card {
  position: relative;
}

.step-num {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent-orange);
  line-height: 1;
  margin-bottom: 12px;
  display: block;
}

.step-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.step-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   10. Portfólio / Galeria
   -------------------------------------------------------------------------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.portfolio-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.portfolio-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-orange);
  box-shadow: var(--shadow-card);
}

.portfolio-img-box {
  width: 100%;
  height: 230px;
  overflow: hidden;
  background-color: var(--bg-alt);
}

.portfolio-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

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

.portfolio-caption {
  padding: 18px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   11. Depoimentos & Áreas
   -------------------------------------------------------------------------- */
.testimonials-section {
  background-color: var(--bg-alt);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.testimonial-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}

.testimonial-quote {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 24px;
  flex: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
}

.author-info p {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.areas-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.area-tag {
  background-color: var(--surface);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

/* --------------------------------------------------------------------------
   12. FAQ Sanfona
   -------------------------------------------------------------------------- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-btn {
  width: 100%;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  text-align: left;
  cursor: pointer;
  color: #FFFFFF;
  font-size: 1.05rem;
  font-weight: 700;
}

.faq-icon {
  width: 24px;
  height: 24px;
  position: relative;
  flex-shrink: 0;
}

.faq-icon::before, .faq-icon::after {
  content: '';
  position: absolute;
  background-color: var(--accent-orange);
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  transform: translateY(-50%);
  transition: transform var(--transition-fast);
}

.faq-icon::after {
  transform: translateY(-50%) rotate(90deg);
}

.faq-item.active .faq-icon::after {
  transform: translateY(-50%) rotate(0deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
}

.faq-content p {
  padding-bottom: 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   13. Banner Final CTA & Rodapé
   -------------------------------------------------------------------------- */
.cta-banner {
  background: radial-gradient(circle at center, #26160A 0%, var(--bg-alt) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.cta-banner-content {
  max-width: 720px;
  margin: 0 auto;
}

.cta-banner h2 {
  font-size: clamp(2rem, 3.8vw, 2.8rem);
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 16px;
}

.cta-banner p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.footer {
  background-color: #0A0B0E;
  padding-top: 60px;
  padding-bottom: 32px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #FFFFFF;
  margin-bottom: 20px;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-col ul li a:hover {
  color: var(--accent-orange);
}

.footer-bottom {
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   14. Responsividade / Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .nav-links, .header-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }
}

/* Link "Ver detalhes" nos cards de servico */
.service-title a {
  color: inherit;
  text-decoration: none;
}
.service-title a:hover {
  color: var(--accent-orange);
}
.service-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent-orange);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.service-link:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   14. Navegação multi-page — dropdown de Serviços e menu mobile
   -------------------------------------------------------------------------- */
.nav-item-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

/* ponte invisível: evita que o dropdown feche no vão entre item e painel */
.nav-item-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 16px;
}

.nav-item-dropdown > .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.nav-caret {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--transition-fast);
}

.nav-item-dropdown:hover .nav-caret,
.nav-item-dropdown:focus-within .nav-caret {
  transform: rotate(225deg) translate(-2px, -2px);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 268px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
}

.nav-item-dropdown:hover .nav-dropdown,
.nav-item-dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown a {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.nav-dropdown a:hover,
.nav-dropdown a:focus-visible {
  background-color: var(--surface-hover);
  color: var(--accent-orange);
}

.nav-dropdown a.active {
  color: var(--accent-orange);
}

.nav-dropdown-all {
  margin-top: 6px;
  padding-top: 12px !important;
  border-top: 1px solid var(--border);
  font-weight: 700 !important;
  color: var(--accent-orange) !important;
}

/* Menu mobile — rótulos de seção e itens aninhados */
.mobile-menu-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-top: 6px;
}

.mobile-menu .nav-link.sub {
  padding-left: 14px;
  font-size: 0.9rem;
  border-left: 2px solid var(--border);
}

.mobile-menu .mobile-phone {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  text-align: center;
  padding-top: 4px;
}
