/* =============================================
   ACHEIDOCS — CSS PRINCIPAL
   Aesthetic: Clean civic trust — azul índigo profundo,
   branco gelo, toques âmbar. Editorial + funcional.
   Fonte: Sora (display) + DM Sans (corpo)
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ── Reset & Custom Properties ─────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #0f1f3d;
  --indigo:     #1a3a6b;
  --blue:       #2563eb;
  --blue-light: #3b82f6;
  --sky:        #eff6ff;
  --amber:      #f59e0b;
  --amber-light:#fef3c7;
  --success:    #10b981;
  --danger:     #ef4444;
  --white:      #ffffff;
  --gray-50:    #f8fafc;
  --gray-100:   #f1f5f9;
  --gray-200:   #e2e8f0;
  --gray-400:   #94a3b8;
  --gray-600:   #475569;
  --gray-800:   #1e293b;
  --text:       #1e293b;
  --text-muted: #64748b;

  --ff-display: 'Sora', sans-serif;
  --ff-body:    'DM Sans', sans-serif;

  --shadow-sm:  0 1px 3px rgba(15,31,61,.08), 0 1px 2px rgba(15,31,61,.06);
  --shadow-md:  0 4px 16px rgba(15,31,61,.12), 0 2px 6px rgba(15,31,61,.08);
  --shadow-lg:  0 20px 48px rgba(15,31,61,.16), 0 8px 16px rgba(15,31,61,.1);
  --shadow-xl:  0 32px 64px rgba(15,31,61,.22);
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  22px;
  --radius-xl:  32px;
  --transition: .25s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--ff-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
}

/* ── Typography ─────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--ff-display); line-height: 1.2; }
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 600; }
p  { color: var(--text-muted); }
a  { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--indigo); }

/* ── Navbar ─────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 68px;
  gap: 1rem;
}

#logo {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.03em;
  cursor: default;
}

#logo::after {
  content: '.';
  color: var(--blue);
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: .25rem;
}

.nav-links li a {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .9rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--gray-600);
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}

.nav-links li a:hover {
  background: var(--sky);
  color: var(--blue);
}

.hamburger {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--navy);
  padding: .4rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.hamburger:hover { background: var(--gray-100); }

/* ── Hero / Principal ────────────────────────────── */
.principal {
  background: linear-gradient(135deg, var(--navy) 0%, var(--indigo) 60%, #1e4d9b 100%);
  position: relative;
  overflow: hidden;
  padding: 5rem 1.5rem 6rem;
}

.principal::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(37,99,235,.35) 0%, transparent 70%);
  pointer-events: none;
}

.principal::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(245,158,11,.15) 0%, transparent 70%);
  pointer-events: none;
}

.info {
  max-width: 700px;
  margin: 0 auto 3rem;
  text-align: center;
}

.info h1 {
  color: var(--white);
  margin-bottom: 1rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.18);
}

.info p {
  color: rgba(255,255,255,.82);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto .5rem;
}

/* Hero Search Card */
.principal > section > form,
#form-busca {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem 2rem;
  max-width: 620px;
  margin: 0 auto;
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 2;
}

#form-busca h1 {
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: .5rem;
}

#form-busca p {
  font-size: .9rem;
  margin-bottom: 1.5rem;
}

/* ── Forms (shared) ─────────────────────────────── */
label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: .35rem;
  letter-spacing: .01em;
}

input[type="text"],
input[type="tel"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: .7rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--ff-body);
  font-size: .95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

input::placeholder, textarea::placeholder { color: var(--gray-400); }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

select:disabled { background-color: var(--gray-100); cursor: not-allowed; color: var(--gray-400); }

.campo-lado-a-lado,
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-comment { width: 100%; }
.form-comment textarea { resize: vertical; min-height: 110px; }

/* Field wrapper spacing */
#form-busca label, #form-busca input, #form-busca select,
#form-cadastro label, #form-cadastro input, #form-cadastro select { margin-bottom: .6rem; }

/* ── Buttons ─────────────────────────────────────── */
button[type="submit"],
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .85rem 1.5rem;
  background: var(--blue);
  color: var(--white);
  font-family: var(--ff-display);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  margin-top: .5rem;
  letter-spacing: .02em;
}

button[type="submit"]:hover,
.btn-submit:hover {
  background: var(--indigo);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,99,235,.35);
}

button[type="submit"]:active,
.btn-submit:active { transform: translateY(0); }

/* ── Radio Group ────────────────────────────────── */
.checkbox-group {
  display: flex;
  gap: .75rem;
  margin-bottom: 1.25rem;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .9rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  flex: 1;
  justify-content: center;
  user-select: none;
}

.checkbox-group label:has(input:checked) {
  border-color: var(--blue);
  background: var(--sky);
  color: var(--blue);
}

.checkbox-group input[type="radio"] {
  accent-color: var(--blue);
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
}

/* ── Cadastro Section ────────────────────────────── */
.cadastro {
  background: var(--gray-50);
  padding: 5rem 1.5rem;
}

.importancia {
  max-width: 640px;
  margin: 0 auto 3.5rem;
  text-align: center;
}

.importancia h2 { color: var(--navy); margin-bottom: .75rem; }

.cadastro > section > div.cadastro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}

#form-cadastro {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-md);
}

#form-cadastro h3 {
  color: var(--navy);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

#form-cadastro h3 i { color: var(--blue); }

/* Image grid */
.col-lg-6 { display: flex; align-items: center; }
.row.g-3 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; width: 100%; }
.row.g-3 img {
  width: 340px;
  max-width: 40vw;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  object-fit: cover;
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity .7s ease, transform .7s ease;
}
.row.g-3 img:hover { transform: scale(1.04); box-shadow: var(--shadow-lg); }

/* ── Tabela Section ─────────────────────────────── */
.tabela {
  padding: 5rem 1.5rem;
  background: var(--white);
}

.table-responsive { max-width: 1100px; margin: 0 auto; }

.contador-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: .5rem;
}

.contador-container h2 { color: var(--navy); font-size: 1.5rem; }

.contador-container > * {
  font-size: .9rem;
  color: var(--text-muted);
}

#contador-registros {
  font-weight: 700;
  color: var(--blue);
  font-size: 1rem;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

thead th {
  background: var(--navy);
  color: var(--white);
  font-family: var(--ff-display);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 1rem 1.25rem;
  text-align: left;
}

tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition);
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--sky); }

tbody td {
  padding: .9rem 1.25rem;
  font-size: .9rem;
  color: var(--text);
  vertical-align: middle;
}

tbody tr:nth-child(even) td { background: rgba(248,250,252,.6); }

/* Status badges */
tbody td:last-child {
  font-weight: 600;
  font-size: .8rem;
}

/* ── Pagination ─────────────────────────────────── */
#navegacao {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

#navegacao button {
  padding: .55rem 1.3rem;
  font-family: var(--ff-display);
  font-size: .875rem;
  font-weight: 600;
  color: var(--blue);
  background: transparent;
  border: 1.5px solid var(--blue);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  width: auto;
  margin: 0;
}

#navegacao button:hover:not(:disabled) {
  background: var(--blue);
  color: var(--white);
  transform: none;
  box-shadow: none;
}

#navegacao button:disabled {
  opacity: .4;
  cursor: not-allowed;
  border-color: var(--gray-300);
  color: var(--gray-400);
}

#pagina-atual {
  font-size: .875rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Feedback Section ────────────────────────────── */
.feedback {
  background: linear-gradient(135deg, var(--sky) 0%, #e0eaff 100%);
  padding: 5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  overflow: hidden;
}

.feedback-img {
  width: 340px;
  max-width: 40vw;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  object-fit: cover;
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity .7s ease, transform .7s ease;
}

.feedback-img.fade-in-left  { opacity: 1; transform: translateX(0); }
.feedback-img.fade-out-left { opacity: 0; transform: translateX(-40px); }

.feedback-section { flex: 1; max-width: 560px; }

.feedback-container {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-md);
}

.feedback-container h3 {
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
}

.feedback-container h3 i { color: var(--blue); }
.feedback-container > p { font-size: .9rem; margin-bottom: 1.5rem; }

#feedback-form {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity .7s ease .15s, transform .7s ease .15s;
}

#feedback-form.fade-in-right  { opacity: 1; transform: translateX(0); }
#feedback-form.fade-out-right { opacity: 0; transform: translateX(40px); }

/* ── FAQ Section ─────────────────────────────────── */
.faq-section {
  padding: 5rem 1.5rem;
  max-width: 820px;
  margin: 0 auto;
}

.faq-title {
  text-align: center;
  color: var(--navy);
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
}

.faq-title i { color: var(--blue); }

.faq-item { margin-bottom: .75rem; }

.accordion-item {
  border: 1.5px solid var(--gray-200) !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.accordion-item:hover { box-shadow: var(--shadow-md); }

.accordion-button {
  font-family: var(--ff-display) !important;
  font-size: .95rem !important;
  font-weight: 600 !important;
  color: var(--navy) !important;
  background: var(--white) !important;
  padding: 1.1rem 1.4rem !important;
}

.accordion-button:not(.collapsed) {
  color: var(--blue) !important;
  background: var(--sky) !important;
  box-shadow: none !important;
}

.accordion-button::after {
  filter: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M2 4l5 6 5-6' stroke='%232563eb' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}

.accordion-body {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.7;
  padding: 1rem 1.4rem 1.25rem !important;
  background: var(--gray-50) !important;
}

/* ── Popups ─────────────────────────────────────── */
.popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,31,61,.55);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
  animation: fadeInBackdrop .25s ease;
}

@keyframes fadeInBackdrop { from { opacity: 0; } to { opacity: 1; } }

.popup-content {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  animation: slideUpPopup .3s cubic-bezier(.34,1.56,.64,1);
  position: relative;
}

@keyframes slideUpPopup {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.popup-content h2 {
  color: var(--navy);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.popup-content p {
  margin-bottom: .75rem;
  font-size: .925rem;
}

.popup-content ul {
  padding-left: 1.25rem;
  margin-bottom: .75rem;
}

.popup-content ul li { margin-bottom: .6rem; font-size: .9rem; color: var(--text-muted); }
.popup-content ul li strong { color: var(--text); }

.thank-you { color: var(--success); font-size: 1.1rem; margin: 1rem 0; }

#pix-copy {
  background: var(--amber-light);
  color: var(--amber);
  font-weight: 700;
  padding: .15rem .5rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: monospace;
  font-size: .95rem;
  transition: background var(--transition);
  border: 1px dashed var(--amber);
}

#pix-copy:hover { background: #fde68a; }

.close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.25rem;
  padding: .65rem 1.75rem;
  background: var(--gray-100);
  color: var(--gray-600);
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: .9rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  width: auto;
}

.close-btn:hover { background: var(--gray-200); color: var(--navy); transform: none; box-shadow: none; }

/* ── Footer ─────────────────────────────────────── */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,.65);
  text-align: center;
  padding: 2rem 1rem;
  font-size: .875rem;
}

/* ── Scroll Animations ──────────────────────────── */
.zoom-in-top {
  animation: zoomInTop .6s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes zoomInTop {
  from { opacity: 0; transform: scale(.85) translateY(-20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.fade-in { animation: fadeIn .5s ease both; }
.fade-out { animation: fadeOut .3s ease both; }

@keyframes fadeIn  { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

.zoom-in  { animation: zoomIn .4s ease both; }
.zoom-out { animation: zoomOut .3s ease both; }

@keyframes zoomIn  { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }
@keyframes zoomOut { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(.95); } }

/* ── Bootstrap Overrides ────────────────────────── */
.accordion { --bs-accordion-border-color: transparent; }
.table-striped > tbody > tr:nth-of-type(odd) > * { background-color: transparent; }
.container { max-width: 1100px; }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 900px) {
  .cadastro > section > div.cadastro { grid-template-columns: 1fr; }
  .col-lg-6 { display: none; } /* esconde imagens em mobile para simplificar */
  .feedback { flex-direction: column; gap: 2rem; }
  .feedback-img { max-width: 100%; width: 100%; }
  .campo-lado-a-lado, .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: .75rem 1rem;
    box-shadow: var(--shadow-md);
    gap: .25rem;
  }
  .nav-links.active { display: flex; }
  .hamburger { display: block; }
  .principal { padding: 3.5rem 1rem 4rem; }
  .cadastro, .tabela, .feedback, .faq-section { padding: 3.5rem 1rem; }
  .popup-content { padding: 1.75rem 1.25rem; }
  thead th { font-size: .72rem; padding: .75rem .9rem; }
  tbody td { font-size: .82rem; padding: .75rem .9rem; }
  .checkbox-group { flex-direction: column; }
}

/* ── Política de Privacidade ────────────────────── */
.politicaP {
  max-width: 820px;
  margin: 3rem auto;
  padding: 2.5rem 2rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.politicaP h2 {
  color: var(--navy);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--gray-200);
}

.section-title {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--blue);
  margin: 2rem 0 .75rem;
}

.content p { font-size: .95rem; margin-bottom: .5rem; }
.content ul { padding-left: 1.5rem; }
.content ul li { margin-bottom: .5rem; font-size: .95rem; color: var(--text-muted); }

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 2rem;
  padding: .75rem 1.5rem;
  background: var(--blue);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-family: var(--ff-display);
  transition: background var(--transition), transform var(--transition);
}

.btn-download:hover { background: var(--indigo); color: var(--white); transform: translateY(-2px); }

.btn-voltar {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .9rem;
  background: var(--sky);
  color: var(--blue);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .875rem;
  transition: background var(--transition);
}

.btn-voltar:hover { background: #dbeafe; color: var(--indigo); }

/* Scroll-to-top (caso habilitado) */
#scrollToTopBtn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
  z-index: 900;
  width: auto;
  border-radius: 50%;
}

#scrollToTopBtn:hover { background: var(--indigo); transform: translateY(-3px); }
