@font-face {
  font-family: 'Slenco-Black demo';
  src: url('fonts/Slenco-Black demo.otf') format('opentype');
}

:root{
  --bg-1:#9ecae1;          
  --bg-2:#c8dbef;         
  --card:#eaf2fbcc;       
  --text:#0f172a;
  --muted:#334155;
  --primary:#4A90E2;
  --primary-700:#2563eb;
  --accent:#61718a;
  --white:#ffffff;
  --success:#16a34a;
  --danger:#dc2626;
  --radius:16px;
  --shadow:0 10px 30px rgba(2,8,23,.15);
  --ring:0 0 0 4px rgba(74,144,226,.25);
}

*{ box-sizing:border-box; }

html,body{
  margin:0; padding:0;
  font-family:'Slenco-Black demo', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color:var(--white);
  letter-spacing:.5px;
  scroll-behavior:smooth;
}

body{
  /* fundo com leve gradiente para dar profundidade */
  background: linear-gradient(180deg, var(--bg-1) 0%, #a7c9ea 35%, #b9d3ee 100%);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.4;
  padding-bottom: calc(var(--footer-height,72px) + 10px); /* não tapa conteúdo */
}

/* ========= Header ========= */
header{
  position:fixed; top:0; left:0; right:0; z-index:1000;
  display:flex; justify-content:space-between; align-items:center;
  padding:8px 16px;
  color:var(--white);
  background:rgba(200,219,239,.75);
  backdrop-filter:saturate(120%) blur(8px);
  box-shadow:0 2px 14px rgba(15,23,42,.15);
  min-height:56px;
}

.logo-container{ display:flex; align-items:center; margin-left:clamp(16px,4vw,100px); }
.logo{ width:clamp(72px,10vw,100px); transition: transform .25s ease; }
.logo:hover, .logo:focus{ transform: translateY(-2px) scale(1.06); outline:none; }

nav{
  display:flex; align-items:center; justify-content:center; flex-grow:1;
  margin-top:6px; flex-wrap: wrap; gap:8px;
  padding-inline: 8px;
}
nav a{
  padding:10px 16px;
  font-size: clamp(14px, 2.2vw, 20px);
  font-weight:700;
  color:#00264d;
  text-decoration:none;
  background: rgba(255,255,255,.7);
  border-radius:999px;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
nav a:hover, nav a:focus{
  background:#deebf7;
  transform: translateY(-1px);
  outline:none;
  box-shadow: var(--shadow);
}
nav a.active-link{
  background: #deebf7;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.social-icons{ display:flex; align-items:center; margin:0 clamp(12px,4vw,65px) 0 auto; gap:8px; }
.social-icon{ display:inline-flex; padding:6px; border-radius:12px; transition: transform .2s ease, background .2s ease; }
.social-icon img{ max-width:50px; height:auto; }
.social-icon:hover, .social-icon:focus{ transform: translateY(-2px); background: rgba(255,255,255,.25); outline:none; }

/* Botão hamburger */
.menu-toggle{
  display:none; /* desktop */
  background: rgba(255,255,255,.7);
  border-radius:12px;
  padding:8px 10px;
  line-height:0;
  box-shadow: var(--shadow);
  border: none;
  cursor: pointer;
}
.menu-toggle .menu-bar{
  display:block; width:22px; height:3px; margin:4px 0;
  background:#0f172a; border-radius:2px;
  transition: transform .2s ease, opacity .2s ease;
}

/* Estado "aberto" vira ícone de X */
.menu-toggle.is-open .menu-bar:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open .menu-bar:nth-child(2){ opacity:0; }
.menu-toggle.is-open .menu-bar:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* Dropdown do nav no mobile */
@media (max-width: 768px){
  .menu-toggle{ display:inline-flex; align-items:center; justify-content:center; }

  nav#site-nav{
    position:absolute; top:100%; left:0; right:0;
    display:none; /* fechado por padrão */
    flex-direction:column; gap:6px;
    padding:10px;
    background: rgba(200,219,239,.95);
    backdrop-filter: saturate(120%) blur(8px);
    box-shadow: 0 8px 22px rgba(15,23,42,.25);
  }
  nav#site-nav.is-open{ display:flex; }
  nav#site-nav a{
    width:100%; text-align:center;
    padding:12px 16px;
    font-size: clamp(16px, 4.5vw, 18px);
  }
}


/* ================= Formulário ================= */
.container-form{
  width: min(100%, 1040px);
  margin: 140px auto 40px auto; /* resguarda o header fixo */
  padding: 16px;
}

.well.form-horizontal fieldset{
  background: var(--card);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(16px, 3vw, 28px);
  color:#0f172a;
}

/* título do card */
legend{
  width:100%;
  margin:0 0 12px 0;
  padding:0;
  text-align:center;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height:1.1;
  background: linear-gradient(180deg,#0f172a 0%, #1e3a8a 70%, #0f172a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 10px 30px rgba(2,8,23,.18);
    letter-spacing:1px;
}


/* grupos */
.form-group{ margin:14px 0; }
label{
  display:block; margin:0 0 6px 2px;
  font-size:16px; color:#0b1220; font-weight:700;
}

/* inputs */
input, select, textarea{
  width:100%;
  padding:14px 14px;
  font-size:16px;
  border:1px solid rgba(15,23,42,.15);
  border-radius:12px;
  background:#f8fafc;
  color:#0f172a;
  transition:border-color .2s ease, box-shadow .2s ease, transform .06s ease;
}
input:focus, select:focus, textarea:focus{
  outline:none; border-color:var(--primary);
  box-shadow: var(--ring);
}

/* states nativos de validação (sem JS) */
input:required:invalid{ border-color:rgba(220,38,38,.55); }
input:required:invalid:focus{ box-shadow:0 0 0 4px rgba(220,38,38,.2); }
input:required:valid{ border-color:rgba(22,163,74,.45); }

/* file input mais bonito */
input[type="file"]{
  padding:10px 12px;
  background:#f1f5f9;
}
input[type="file"]::file-selector-button{
  margin-right:10px;
  padding:10px 14px;
  border:0; border-radius:10px;
  background:var(--primary); color:#fff; font-weight:700;
  cursor:pointer; transition:transform .15s ease, opacity .2s ease;
}
input[type="file"]::file-selector-button:hover{ transform:translateY(-1px); opacity:.95; }

/* linhas lado-a-lado existentes */
.codnif-flex{
  display:grid; grid-template-columns:1fr 1fr; gap:16px; align-items:start;
}
.codnif-flex .half-width{ width:100%; }
@media (max-width: 900px){
  .codnif-flex{ grid-template-columns:1fr; }
}

/* blocos de gerente (gerados por JS) */
.gerente-bloco{
  margin:14px 0;
  padding:14px 16px;
  border:1px dashed rgba(2,8,23,.18);
  border-left:4px solid var(--accent);
  border-radius:12px;
  background: #f8fbff;
  color:#0f172a;
}

/* ================= Botões ================= */
button{
  appearance:none;
  border:0; border-radius:12px;
  width:100%;
  padding:14px 16px; font-size:16px; font-weight:800;
  background: linear-gradient(180deg, var(--accent) 0%, #7e8ea8 100%);
  color:#fff; cursor:pointer;
  transition: transform .06s ease, filter .2s ease, box-shadow .2s ease;
  box-shadow: 0 6px 16px rgba(2,8,23,.18);
}
button:hover{ transform: translateY(-1px); filter: brightness(1.03); }
button:active{ transform: translateY(0); }

#calcular-container{ display:flex; gap:10px; }
#calcular-container button{ flex:1; }

/* quando o JS troca o texto do botão para "Enviar" ele adiciona a classe .enviar */
button.enviar{
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-700) 100%);
  box-shadow: 0 8px 22px rgba(37,99,235,.35);
}

/* ================= Resultados / Tabela ================= */
.resultado-box{
  margin-top:20px;
  color:#0f172a;
  animation: fadeIn .25s ease both;
}
@keyframes fadeIn{ from{opacity:0; transform:translateY(4px)} to{opacity:1; transform:translateY(0)} }

table{
  width:100%; border-collapse:separate; border-spacing:0;
  margin-top:12px; background:#ffffff;
  color:#0f172a; border-radius:12px; overflow:hidden;
  box-shadow: var(--shadow);
}
thead th{
  background: #f1f5f9;
  color:#0b1220; font-weight:800; text-align:left;
  border-bottom:1px solid #e2e8f0;
  padding:12px 14px;
}
tbody td{ padding:12px 14px; border-bottom:1px solid #eef2f7; }
tbody tr:nth-child(even){ background:#f8fafc; }
tbody tr:last-child td{ border-bottom:0; }

/* link da tabela de preços */
.resultado-box a{
  color:#0b1220; text-decoration: underline; font-weight:800;
}
.resultado-box h3, .resultado-box h4{
  margin:8px 0;
}

:root{
  --glass-bg: rgba(200,219,239,.75);    /* igual ao header */
  --glass-bg-strong: rgba(200,219,239,.9);
  --ink: #00264d;                       /* links/ícones escuros, coerente com nav */
  --frost-blur: 8px;                    /* igual ao header */
  --frost-saturate: 120%;
  --border-glow: 0 -4px 18px rgba(15,23,42,.18);
}

.preco-destaque {
  background: linear-gradient(135deg, #c7e9c0 0%, #a3d9a5 100%);
  color: #2f4f2f; /* verde escuro para melhor contraste */
  font-weight: 900;
  padding: 6px 12px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(199, 233, 192, 0.6);
  display: inline-block;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 4px 12px rgba(199,233,192,0.6); }
  50% { transform: scale(1.05); box-shadow: 0 6px 16px rgba(163,217,165,0.8); }
  100% { transform: scale(1); box-shadow: 0 4px 12px rgba(199,233,192,0.6); }
}
/* ===== Footer ===== */
.footer{
  z-index: 1000;
  min-height: var(--footer-h);
  position: fixed; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  background: var(--glass-bg);
  -webkit-backdrop-filter: saturate(var(--frost-saturate)) blur(var(--frost-blur));
  backdrop-filter: saturate(var(--frost-saturate)) blur(var(--frost-blur));
  /* contorno discreto para separar do conteúdo */
  border-top: 1px solid rgba(255,255,255,.35);
  box-shadow: var(--border-glow);

  color: #0f172a; /* texto principal um pouco mais escuro para contraste */
  text-align: center; padding: 8px 12px;
  font-size: clamp(14px, 2.2vw, 18px);


  opacity: 0; transform: translateY(8px);
  transition: opacity .45s ease, transform .45s ease, background .25s ease, backdrop-filter .25s ease;
}
.footer.is-ready{ will-change: opacity, transform; }
.footer.is-visible{ pointer-events: auto; opacity: 1; transform: translateY(0); }

.footer .footer-nav{
  opacity: .95;
}
.footer .footer-nav a{
  padding: 0; margin: 0 .2rem;
  font-size: clamp(12px, 1.6vw, 14px);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  border-radius: 0; box-shadow: none; transform: none;
  transition: color .2s ease, text-shadow .2s ease;
}
.footer .footer-nav a:hover,
.footer .footer-nav a:focus{
  color: #0b3a73;
  text-shadow: 0 0 1px rgba(255,255,255,.45);
  outline: none;
}

/* Ícones sociais — coerentes com o header */
.footer .footer-social{ display:flex; align-items:center; justify-content:center; gap: 10px; }
.footer .footer-social img{
  width: 28px; height: 28px; display:block; object-fit: contain;
  filter: drop-shadow(0 1px 4px rgba(2,8,23,.15));
  transition: transform .2s ease, filter .2s ease;
}
.footer .footer-social a:hover img,
.footer .footer-social a:focus img{
  transform: translateY(-1px) scale(1.03);
  filter: drop-shadow(0 3px 8px rgba(2,8,23,.25));
}
@media (min-width: 768px){
  .footer .footer-social img{ width: 44px; height: 44px; }
}

/* Estado "forte" opcional (ex.: quando o conteúdo por baixo for muito contrastado) */
.footer.is-strong{
  background: var(--glass-bg-strong);
}

/* (Opcional) compensação de layout para conteúdo não ficar escondido pelo footer fixo
   — use apenas se notar sobreposição.  
   body{ padding-bottom: var(--footer-h); } 
*/

/* --- Sombra leve aplicada aos textos do resultado --- */
#resultados h3,
#resultados h4,
#resultados a {
  text-shadow: 3px 2px 10px rgba(0, 0, 0, 0.30);
}
