/* =====================================================================
   MacCode — estilos institucionais compartilhados
   (cabeçalho, botões, títulos de seção, cabeçalho de página, rodapé).
   Usado pela página inicial e pela área de Serviços.
   Ao alterar, aumente o ?v= em todos os <link> que apontam para cá.
   ===================================================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --blue-dark: #0F2A44;
  --blue-deep: #0D1F35;
  --blue-circuit: #1F4E79;
  --blue-tech: #3FA2E5;
  --blue-glow: #5BB8F5;
  --gray-bg: #F5F7FA;
  --gray-light: #EEF2F7;
  --gray-line: rgba(15,42,68,0.08);
  --gray-text: #5E6A78;
  --white: #FFFFFF;
  --success: #1E9E5A;
  --danger: #D64545;
  --gradient-hero: linear-gradient(160deg, #FFFFFF 0%, #EEF2F7 60%, #E6EDF5 100%);
  --gradient-blue: linear-gradient(135deg, #1F4E79, #3FA2E5);
  --shadow-sm: 0 2px 8px rgba(15,42,68,0.06);
  --shadow-md: 0 8px 30px rgba(15,42,68,0.1);
  --shadow-lg: 0 20px 60px rgba(15,42,68,0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; font-size: 16px; scroll-padding-top: 84px; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--gray-text);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

h1, h2, h3, h4, h5, h6 { font-family: 'Poppins', sans-serif; color: var(--blue-dark); line-height: 1.2; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(63,162,229,0.55); outline-offset: 2px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ========== NAVBAR ========== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 14px 0;
  transition: var(--transition);
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(15,42,68,0.07);
}
.navbar.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 1px 20px rgba(15,42,68,0.08);
  padding: 8px 0;
  border-bottom-color: rgba(15,42,68,0.1);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.navbar-logo img { height: 56px; width: auto; transition: var(--transition); }
.navbar.scrolled .navbar-logo img { height: 48px; }

.navbar-links { display: flex; align-items: center; gap: 30px; }
.navbar-links a {
  font-family: 'Poppins', sans-serif; font-size: 0.88rem; font-weight: 500;
  color: var(--gray-text); transition: var(--transition); position: relative; white-space: nowrap;
}
.navbar-links a:hover, .navbar-links a.active { color: var(--blue-tech); }
.navbar-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
  background: var(--blue-tech); transition: var(--transition); border-radius: 2px;
}
.navbar-links a:hover::after, .navbar-links a.active::after { width: 100%; }

.navbar-cta {
  font-size: 0.85rem !important; font-weight: 600 !important;
  padding: 10px 22px; border-radius: 50px;
  background: var(--gradient-blue); color: var(--white) !important;
  box-shadow: 0 4px 15px rgba(63,162,229,0.3);
}
.navbar-cta::after { display: none !important; }
.navbar-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(63,162,229,0.4); }

.menu-toggle {
  display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; z-index: 1001;
  background: none; border: 0;
}
.menu-toggle span { width: 24px; height: 2px; background: var(--blue-dark); border-radius: 2px; transition: var(--transition); }
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ========== BOTÕES ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: 'Poppins', sans-serif; font-size: 0.95rem; font-weight: 600;
  padding: 14px 30px; border-radius: 50px; cursor: pointer;
  transition: var(--transition); border: none; white-space: nowrap;
}
.btn i { font-size: 1.15rem; }
.btn-primary { background: var(--gradient-blue); color: var(--white); box-shadow: 0 4px 20px rgba(63,162,229,0.35); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 35px rgba(63,162,229,0.45); }
.btn-outline { background: transparent; color: var(--blue-dark); border: 1.5px solid rgba(15,42,68,0.18); }
.btn-outline:hover { background: rgba(63,162,229,0.06); border-color: var(--blue-tech); color: var(--blue-circuit); transform: translateY(-3px); }
.btn-light { background: var(--white); color: var(--blue-dark); box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
.btn-light:hover { transform: translateY(-3px); color: var(--blue-circuit); }
.btn-ghost-light { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,0.35); }
.btn-ghost-light:hover { border-color: var(--white); background: rgba(255,255,255,0.08); transform: translateY(-3px); }
.btn-instagram { background: linear-gradient(45deg, #F58529 0%, #DD2A7B 45%, #8134AF 75%, #515BD4 100%); color: var(--white); box-shadow: 0 4px 20px rgba(221,42,123,0.3); }
.btn-instagram:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(221,42,123,0.4); color: var(--white); }
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none; }

/* ========== SEÇÕES ========== */
.section { padding: 100px 0; position: relative; }
.section.alt { background: var(--gray-bg); }
.section-header { text-align: center; max-width: 680px; margin: 0 auto 60px; }
.section-header.left { text-align: left; margin-left: 0; }
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Poppins', sans-serif; font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--blue-tech); margin-bottom: 14px;
}
.section-label::before, .section-label::after { content: ''; width: 24px; height: 1.5px; background: var(--blue-tech); opacity: 0.4; }
.section-header.left .section-label::before { display: none; }
.section-title { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 700; margin-bottom: 16px; letter-spacing: -0.01em; }
.section-title span, .page-hero h1 span {
  background: linear-gradient(135deg, var(--blue-tech), var(--blue-glow));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.section-subtitle { font-size: 1.05rem; line-height: 1.8; }

/* ========== CABEÇALHO DE PÁGINA INTERNA ========== */
.page-hero {
  position: relative; padding: 150px 0 64px; text-align: center; overflow: hidden;
  background: var(--gradient-hero);
  border-bottom: 1px solid var(--gray-line);
}
.page-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(63,162,229,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63,162,229,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 70% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 40%, black 20%, transparent 70%);
}
.page-hero .container { position: relative; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }
.page-hero p { max-width: 620px; margin: 0 auto; font-size: 1.08rem; }

.crumbs {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px;
  font-family: 'Poppins', sans-serif; font-size: 0.82rem; font-weight: 500; margin-bottom: 22px;
}
.crumbs a { color: var(--blue-circuit); transition: var(--transition); display: inline-flex; align-items: center; gap: 6px; }
.crumbs a:hover { color: var(--blue-tech); }
.crumbs .sep { opacity: 0.45; }
.crumbs [aria-current] { color: var(--gray-text); }

/* Selo "seus arquivos ficam no seu dispositivo" */
.trust-pill {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 24px;
  padding: 8px 16px; border-radius: 50px; font-size: 0.85rem; font-weight: 500;
  background: rgba(30,158,90,0.08); color: #17784A; border: 1px solid rgba(30,158,90,0.2);
}
.trust-pill i { font-size: 1.05rem; }

/* ========== FAIXA DE CHAMADA ========== */
.cta-band {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  padding: 56px; color: rgba(255,255,255,0.8);
  background:
    radial-gradient(500px 260px at 100% 0%, rgba(91,184,245,0.35), transparent 60%),
    linear-gradient(135deg, #0F2A44 0%, #1F4E79 100%);
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.cta-band::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, transparent, black 60%);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 60%);
}
.cta-band > * { position: relative; }
.cta-band h2 { color: var(--white); font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 8px; }
.cta-band p { max-width: 560px; }
.cta-band-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ========== RODAPÉ ========== */
.footer { background: var(--blue-deep); color: rgba(255,255,255,0.55); padding: 72px 0 28px; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1.6fr 1.3fr; gap: 44px;
  padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 26px;
}
.footer-logo img { height: 54px; filter: brightness(0) invert(1) opacity(0.92); margin-bottom: 18px; }
.footer-brand p { font-size: 0.92rem; line-height: 1.75; max-width: 320px; }
.footer-col h4 {
  color: var(--white); font-size: 0.82rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 18px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul.footer-cols { display: grid; grid-template-columns: repeat(2, max-content); gap: 10px 32px; }
.footer-col a { font-size: 0.92rem; color: rgba(255,255,255,0.55); transition: var(--transition); display: inline-flex; align-items: center; gap: 8px; }
.footer-col a:hover { color: var(--blue-glow); }
.footer-col a i { font-size: 1.05rem; color: var(--blue-glow); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 0.82rem; color: rgba(255,255,255,0.35);
}
.footer-bottom a { color: rgba(255,255,255,0.35); transition: var(--transition); }
.footer-bottom a:hover { color: var(--blue-glow); }

/* ========== WHATSAPP FLUTUANTE ========== */
.whatsapp-fab {
  position: fixed; bottom: 28px; right: 28px; width: 58px; height: 58px; z-index: 999;
  background: #25D366; border-radius: 50%; color: var(--white); font-size: 1.7rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4); transition: var(--transition);
  animation: pulse-whatsapp 2.4s ease-in-out infinite;
}
.whatsapp-fab:hover { transform: scale(1.08); }
@keyframes pulse-whatsapp {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
  50% { box-shadow: 0 4px 20px rgba(37,211,102,0.4), 0 0 0 12px rgba(37,211,102,0.1); }
}

/* ========== ANIMAÇÕES ========== */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.spin { animation: spin-360 1s linear infinite; display: inline-block; }
@keyframes spin-360 { to { transform: rotate(360deg); } }

/* ========== RESPONSIVO ========== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  .navbar-links {
    position: fixed; top: 0; right: -100%; width: 78%; max-width: 320px; height: 100vh;
    background: var(--white); flex-direction: column; align-items: flex-start;
    padding: 100px 36px 40px; gap: 22px;
    transition: right 0.4s ease; box-shadow: -10px 0 40px rgba(0,0,0,0.12);
    overflow-y: auto;
  }
  .navbar-links.open { right: 0; }
  .navbar-links a { font-size: 1.02rem; }
  .navbar-cta { margin-top: 12px; }
  .menu-toggle { display: flex; }
}

@media (max-width: 768px) {
  .section { padding: 72px 0; }
  .page-hero { padding: 120px 0 48px; }
  .cta-band { padding: 36px 28px; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .cta-band-actions, .cta-band-actions .btn { width: 100%; }
  .whatsapp-fab { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
