@import url('https://fonts.googleapis.com/css?family=Poppins:400,500,600,700&display=swap');

/* 🎨 PALETA DE CORES */
:root {
  --color-bg-primary: #0a0a0a;
  --color-bg-secondary: #1a1a1a;
  --color-bg-tertiary: #2a2a2a;
  --color-surface: #1e1e1e;
  --color-surface-elevated: #252525;
  
  --color-text-primary: #ffffff;
  --color-text-secondary: #b0b0b0;
  --color-text-muted: #808080;
  
  --color-accent-primary: #25d366;
  --color-accent-secondary: #1fb855;
  --color-accent-tertiary: #00e676;
  
  --color-border: #333333;
  --color-border-light: #404040;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-accent: 0 4px 20px rgba(37, 211, 102, 0.3);
  
  --navbar-height: 84px;
}

/* 🔹 RESET E BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* 🔹 ACESSIBILIDADE */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 🔹 FOCUS VISIBLE */
*:focus-visible {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 4px;
}

/* 🔹 NAVBAR */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  z-index: 1000;
  transition: all 0.3s ease;
  will-change: transform, background;
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.98);
  border-bottom-color: var(--color-accent-primary);
  box-shadow: var(--shadow-lg);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 30px;
  height: var(--navbar-height);
}

.nav-logo a {
  display: block;
  line-height: 0;
}

.nav-logo img {
  height: 60px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(37, 211, 102, 0.3));
  transition: all 0.3s ease;
}

.nav-logo img:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 12px rgba(37, 211, 102, 0.5));
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 30px;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 15px;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  display: block;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--color-accent-primary);
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--color-text-primary);
  background: var(--color-surface-elevated);
  transform: translateY(-2px);
}

.nav-link:hover::after,
.nav-link:focus::after {
  width: 70%;
}

/* 🔹 MENU TOGGLE (MOBILE) */
.nav-toggle {
  display: none;
  flex-direction: column;
  background: transparent;
  border: none;
  cursor: pointer;
  gap: 5px;
  z-index: 1001;
  padding: 8px;
}

.nav-toggle span {
  width: 28px;
  height: 3px;
  background: var(--color-text-primary);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* 🔹 MAIN CONTENT */
main {
  width: 100%;
  padding-top: var(--navbar-height);
}

/* 🔹 SEÇÕES */
.section-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: calc(100vh - var(--navbar-height));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.service-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.service-card {
  background: var(--color-surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all 0.4s ease;
  max-width: 600px;
  width: 100%;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  background: var(--color-surface-elevated);
  border-color: var(--color-accent-primary);
}

.service-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  color: var(--color-accent-primary);
  text-shadow: 0 0 20px rgba(37, 211, 102, 0.4);
}

.service-card h2 {
  font-size: 2rem;
  margin-bottom: 15px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.service-card p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 25px;
  color: var(--color-text-secondary);
}

.service-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 30px;
  background: var(--color-accent-primary);
  color: var(--color-bg-primary);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-accent);
}

.service-btn:hover,
.service-btn:focus {
  background: var(--color-accent-secondary);
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

/* 🔹 SEARCH CONTAINER - CORREÇÃO DO BUG DE MOVIMENTO */
.search-container {
  width: 100%;
  max-width: 600px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  /* CORREÇÃO: Remove position relative que causava o movimento */
  position: static;
}

.search-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  /* CORREÇÃO: Garante que o wrapper não se mova */
  position: static;
}

.search-hint {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 1;
  animation: bounce 2s infinite;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s ease;
}

.search-hint.hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* 🔹 SEARCH BOX - CORREÇÃO PRINCIPAL */
.search-box {
  /* CORREÇÃO: Remove position relative que causava o bug */
  position: static;
  height: 70px;
  width: 70px;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  transition: all 0.5s cubic-bezier(0.68,-0.55,0.265,1.55);
  margin: 0 auto;
  background: var(--color-surface);
  cursor: pointer;
  border: 2px solid var(--color-border);
  /* CORREÇÃO: Adiciona display flex para melhor controle */
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-box::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 211, 102, 0.2), transparent);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: pulse 2s infinite;
  pointer-events: none;
}

.search-box:hover::before {
  opacity: 1;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.1;
  }
}

.search-box.active {
  width: 100%;
  max-width: 600px;
  border-radius: 50px;
  background: var(--color-surface);
  border-color: var(--color-accent-primary);
  cursor: default;
}

.search-box input {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 50px;
  padding: 0 80px 0 20px;
  font-size: 1rem;
  opacity: 0;
  transition: all 0.5s ease;
  background: transparent;
  color: var(--color-text-primary);
  font-family: inherit;
}

.search-box input::placeholder {
  color: var(--color-text-muted);
}

.search-box input.active {
  opacity: 1;
}

.search-box .search-icon {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 70px;
  width: 70px;
  background: var(--color-accent-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--color-bg-primary);
  cursor: pointer;
  box-shadow: var(--shadow-accent);
  transition: all 0.3s ease;
  z-index: 2;
  border: none;
}

.search-box .search-icon:hover,
.search-box .search-icon:focus {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
  background: var(--color-accent-secondary);
}

.search-box .search-icon.active {
  right: 15px;
  height: 60px;
  width: 60px;
  font-size: 22px;
  background: var(--color-accent-primary);
  color: var(--color-bg-primary);
  transform: translateY(-50%);
  box-shadow: var(--shadow-accent);
}

.search-box .cancel-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 25px;
  color: var(--color-text-primary);
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s ease;
  background: transparent;
  border: none;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-box .cancel-icon.active {
  opacity: 1;
  right: 85px;
}

.search-box .cancel-icon:hover,
.search-box .cancel-icon:focus {
  color: var(--color-accent-primary);
  transform: translateY(-50%) scale(1.1);
}

/* 🔹 SEARCH DATA */
.search-data {
  width: 100%;
  margin-top: 0;
  text-align: center;
}

.result-card-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeIn 0.5s ease forwards;
  margin-bottom: 15px;
}

.result-card {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  font-size: 0.95rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  word-break: break-word;
}

.result-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent-primary);
}

.result-card .key {
  font-weight: 600;
  color: var(--color-text-secondary);
}

.result-card .value {
  text-align: right;
  word-break: break-word;
  color: var(--color-text-primary);
}

.error {
  color: #ff5555;
  font-weight: bold;
  margin-top: 10px;
  padding: 12px;
  background: rgba(255, 85, 85, 0.1);
  border: 1px solid rgba(255, 85, 85, 0.3);
  border-radius: 8px;
}

.action-buttons {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.action-buttons button {
  padding: 10px 20px;
  border: 1px solid var(--color-accent-primary);
  border-radius: 10px;
  background: var(--color-accent-primary);
  color: var(--color-bg-primary);
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  min-width: 130px;
  justify-content: center;
  font-family: inherit;
  font-size: 1rem;
}

.action-buttons button:hover,
.action-buttons button:focus {
  background: var(--color-accent-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}

.action-buttons button:active {
  transform: translateY(0);
}

.whatsapp-icon {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--color-accent-primary);
  color: var(--color-bg-primary);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
  text-decoration: none;
  box-shadow: var(--shadow-accent);
  transition: all 0.3s ease;
  z-index: 999;
}

.whatsapp-icon:hover,
.whatsapp-icon:focus {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
  background: var(--color-accent-secondary);
}

.owner-highlight {
  background: var(--color-surface);
  border: 1px solid var(--color-accent-primary);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.5s ease forwards;
  word-wrap: break-word;
}

.owner-highlight h2 {
  margin-bottom: 8px;
  font-size: 1.1rem;
  color: var(--color-text-primary);
}

.owner-highlight p {
  font-size: 1rem;
  font-weight: 600;
  margin: 5px 0;
}

.owner-highlight .owner-name {
  color: var(--color-accent-tertiary);
  text-shadow: 0 0 10px rgba(0, 230, 118, 0.4);
}

.owner-highlight .owner-cpf {
  color: var(--color-accent-primary);
  font-weight: 500;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 🔹 RESPONSIVIDADE */
@media (max-width: 768px) {
  :root {
    --navbar-height: 70px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: var(--navbar-height);
    left: -100%;
    flex-direction: column;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(10px);
    width: 100%;
    padding: 25px 20px;
    gap: 0;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--color-border);
    transition: left 0.4s ease;
    max-height: calc(100vh - var(--navbar-height));
    overflow-y: auto;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu li {
    width: 100%;
    margin-bottom: 12px;
  }

  .nav-link {
    width: 100%;
    text-align: center;
    padding: 14px 20px;
    font-size: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
  }

  .nav-link:hover,
  .nav-link:focus {
    border-color: var(--color-accent-primary);
    transform: translateY(0);
  }

  .nav-link::after {
    display: none;
  }

  .nav-container {
    padding: 10px 20px;
  }

  .nav-logo img {
    height: 50px;
  }

  .service-section {
    padding: 60px 15px;
    min-height: auto;
  }

  .service-card {
    padding: 30px 20px;
  }

  .service-card h2 {
    font-size: 1.6rem;
  }

  .service-card p {
    font-size: 1rem;
  }

  .service-icon {
    font-size: 3rem;
  }

  .section-content {
    padding: 30px 15px;
  }
}

@media (max-width: 600px) {
  .search-box.active {
    width: 100%;
  }

  .search-box .search-icon.active {
    right: 10px;
  }

  .search-box .cancel-icon.active {
    right: 75px;
  }

  .action-buttons {
    gap: 10px;
  }

  .action-buttons button {
    flex: 1;
    min-width: 110px;
    padding: 10px 15px;
    font-size: 0.9rem;
  }

  .result-card {
    font-size: 0.9rem;
    padding: 10px 14px;
  }

  .owner-highlight h2 {
    font-size: 1rem;
  }

  .owner-highlight p {
    font-size: 0.95rem;
  }

  .owner-highlight {
    padding: 12px;
    margin-bottom: 12px;
  }

  .search-hint {
    font-size: 0.85rem;
  }

  .search-container {
    gap: 20px;
  }
}

@media (max-width: 400px) {
  .search-box input {
    font-size: 0.9rem;
    padding-left: 15px;
    padding-right: 70px;
  }

  .action-buttons button {
    font-size: 0.85rem;
    padding: 8px 12px;
    min-width: 100px;
  }

  .owner-highlight {
    padding: 10px;
  }

  .service-card h2 {
    font-size: 1.4rem;
  }

  .service-card p {
    font-size: 0.95rem;
  }

  .service-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .result-card {
    font-size: 0.85rem;
    padding: 8px 12px;
  }
}

/* 🔹 PERFORMANCE: WILL-CHANGE */
.search-box,
.search-icon,
.cancel-icon,
.nav-link,
.service-card,
.action-buttons button {
  will-change: transform;
}

/* 🔹 PRINT STYLES */
@media print {
  .navbar,
  .whatsapp-icon,
  .action-buttons,
  .search-wrapper {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .result-card,
  .owner-highlight {
    border: 1px solid #000;
    page-break-inside: avoid;
  }
}

