:root{
  --claro-red:#E30613;
  --bg-top:#EAF6FF;
  --bg:#FFFFFF;
  --text:#111827;
  --muted:#4B5563;
  --border:#E5E7EB;
  --chip-border:#DCE7F6;
  --chip-bg:#FFFFFF;
  --chip-active-bg:#FDE2E4;
  --chip-active-border:#F5B5B9;
  --card-shadow: 0 10px 24px rgba(17,24,39,0.06);
  --radius-xl:22px;
  --radius-lg:18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size:15px;
  line-height:1.55;
  color:var(--text);
  background: linear-gradient(180deg, var(--bg-top) 0%, #fff 240px);
}

a{color:var(--claro-red); text-decoration:none}
a:hover{text-decoration:underline}

.container{
  max-width:1120px;
  margin:0 auto;
  padding:22px 22px 90px;
}

.header{
  position:relative;
  padding:20px 0 8px;
  text-align:center;
}

.logo-wrap{
  position:absolute;
  left:0;
  top:0;
  display:flex;
  align-items:center;
  gap:10px;
}

.logo{
  width:62px;
  height:62px;
  object-fit:contain;
}

.header h1{
  margin:14px 0 10px;
  font-size:52px;
  font-weight:850;
  letter-spacing:-0.02em;
}

.subtitle{
  margin:0 auto;
  max-width:900px;
  color:var(--muted);
  font-size:15px;
}

.controls{
  margin-top:26px;
  display:flex;
  gap:14px;
  align-items:stretch;
  flex-wrap:wrap;
}

.search{
  flex: 1 1 520px;
  min-width:260px;
}

.search input{
  width:100%;
  padding:16px 18px;
  border-radius:16px;
  border:1px solid var(--border);
  background:#fff;
  font-size:15px;
  outline:none;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}

.search input:focus{
  border-color:#C7D2FE;
  box-shadow: 0 0 0 4px rgba(99,102,241,0.10);
}

.select{
  flex: 0 0 250px;
  min-width:220px;
}

.select select{
  width:100%;
  padding:16px 18px;
  border-radius:16px;
  border:1px solid var(--border);
  background:#fff;
  font-size:15px;
  outline:none;
}

.chips{
  margin-top:14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:center;
}

.chip{
  border:1px solid var(--chip-border);
  background:var(--chip-bg);
  color:#1F2937;
  padding:10px 14px;
  border-radius:999px;
  font-size:14px;
  cursor:pointer;
  transition: transform .05s ease, background .15s ease, border-color .15s ease;
  user-select:none;
}

.chip:hover{
  transform: translateY(-1px);
}

.chip.active{
  background:var(--chip-active-bg);
  border-color:var(--chip-active-border);
  color:var(--claro-red);
  font-weight:650;
}

.section{
  margin-top:26px;
  text-align:left;
}

.section h2{
  margin:22px 0 14px;
  font-size:30px;
  font-weight:850;
  letter-spacing:-0.02em;
}

.section .results-meta{
  margin-top:-6px;
  color:var(--muted);
  font-size:13px;
}

.faq-card{
  margin-top:14px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius-xl);
  overflow:hidden;
  box-shadow:var(--card-shadow);
}

.faq-item{
  border-top:1px solid var(--border);
  scroll-margin-top:120px;
}

.faq-item:first-child{border-top:none}

.faq-question{
  width:100%;
  background:transparent;
  border:none;
  padding:18px 18px;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:10px;
  cursor:pointer;
  text-align:left;
}

.question-text{
  flex:1 1 auto;
  font-size:16px;
  font-weight:750;
  line-height:1.35;
}

.chevron{
  color:#374151;
  margin-top:2px;
  transition: transform .18s ease;
  flex:0 0 auto;
}

.faq-item.open .chevron{ transform: rotate(180deg); }

.faq-answer{
  padding:0 18px 18px;
  color:#374151;
}

.faq-meta{
  display:flex;
  gap:8px;
  align-items:center;
  margin:2px 0 10px;
  font-size:12px;
  color:#6B7280;
}

.meta-pill{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid #F3D1D3;
  background:#FFF1F2;
  color:#9F1239;
  font-weight:650;
}

.meta-sep{
  opacity:.7;
}

.faq-answer p{
  margin:10px 0 0;
}

.answer-list{
  margin:10px 0 0 18px;
}

.answer-list li{ margin:6px 0; }

.answer-step{
  margin:10px 0 0;
}

.no-results{
  padding:24px 18px;
  color:var(--muted);
  font-size:14px;
}

.footer{
  margin-top:28px;
  text-align:center;
  color:var(--muted);
  font-size:14px;
}

.footer .email{
  font-weight:650;
}

.footer .disclaimer{
  margin:10px auto 0;
  max-width: 980px;
  font-size:12px;
  line-height:1.45;
  color:var(--muted);
}

/* --- Chatbot (offline) --- */
.chatbot{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:9999;
}

.chat-toggle{
  display:flex;
  align-items:center;
  gap:10px;
  height:58px;
  padding:0 18px 0 12px;
  border-radius:999px;
  border:none;
  background:var(--claro-red);
  color:#fff;
  cursor:pointer;
  box-shadow:0 16px 34px rgba(17,24,39,0.22);
  user-select:none;
}
.chat-toggle:active{ transform: translateY(1px); }

.chat-toggle-icon{
  width:40px;
  height:40px;
  border-radius:999px;
  background: rgba(255,255,255,0.22);
  display:flex;
  align-items:center;
  justify-content:center;
}
.chat-toggle-icon svg{ width:22px; height:22px; }
.chat-toggle-text{
  font-weight:850;
  font-size:16px;
  letter-spacing:.2px;
}

.chat-window{
  position:absolute;
  right:0;
  bottom:74px; /* abre acima do botão */
  width:390px;
  max-width: calc(100vw - 48px);
  height: min(560px, 70vh);
  max-height: calc(100vh - 140px);
  background:#fff;
  border:1px solid var(--border);
  border-radius:26px;
  box-shadow:0 24px 60px rgba(17,24,39,0.22);
  overflow:hidden;
  display:none;
}
.chat-window.open{ display:flex; flex-direction:column; }

.chat-header{
  background:var(--claro-red);
  color:#fff;
  padding:14px 16px;
  display:flex;
  align-items:center;
  gap:12px;
}
.chat-header .badge{
  width:40px;
  height:40px;
  border-radius:14px;
  background: rgba(255,255,255,0.20);
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}
.chat-header h3{
  margin:0;
  font-size:16px;
  font-weight:850;
  line-height:1.1;
}
.chat-header p{
  margin:3px 0 0;
  font-size:12px;
  opacity:.85;
}
.chat-close{
  width:40px;
  height:40px;
  border-radius:14px;
  border:none;
  background: rgba(255,255,255,0.18);
  color:#fff;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}
.chat-close:hover{ background: rgba(255,255,255,0.26); }
.chat-close:active{ transform: translateY(1px); }

.chat-banner{
  background:#EFF6FF;
  border-bottom:1px solid #DBEAFE;
  color:#1E3A8A;
  font-size:12.5px;
  padding:10px 12px;
  display:flex;
  gap:8px;
  align-items:flex-start;
}
.chat-banner svg{ flex:0 0 auto; margin-top:1px; }

.chat-body{
  flex:1 1 auto;
  background:#F9FAFB;
  overflow:auto;
  padding:14px 14px 10px;
}

.chat-msg{ display:flex; margin:10px 0; }
.chat-msg.user{ justify-content:flex-end; }
.chat-msg.assistant{ justify-content:flex-start; }

.chat-bubble{
  max-width:85%;
  padding:12px 12px;
  border-radius:18px;
  font-size:14px;
  line-height:1.35;
  box-shadow:0 2px 10px rgba(17,24,39,0.06);
  white-space:pre-wrap;
}
.chat-msg.user .chat-bubble{
  background:var(--claro-red);
  color:#fff;
  border-radius:18px 18px 6px 18px;
}
.chat-msg.assistant .chat-bubble{
  background:#fff;
  color:#111827;
  border:1px solid #E5E7EB;
  border-radius:18px 18px 18px 6px;
}

.chat-actions{
  margin-top:10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.chat-action{
  border:1px solid #E5E7EB;
  background:#F3F4F6;
  color:#111827;
  font-size:12px;
  padding:7px 10px;
  border-radius:999px;
  cursor:pointer;
  white-space:nowrap;
}
.chat-action:hover{ background:#E5E7EB; }

.chat-suggestions{
  padding:10px 12px;
  background:#fff;
  border-top:1px solid #F3F4F6;
  display:flex;
  gap:8px;
  overflow:auto;
}
.chat-suggestions .suggestion{
  border:1px solid #E5E7EB;
  background:#F3F4F6;
  color:#111827;
  font-size:12px;
  padding:7px 10px;
  border-radius:999px;
  cursor:pointer;
  white-space:nowrap;
  flex:0 0 auto;
}
.chat-suggestions .suggestion:hover{ background:#E5E7EB; }

.chat-input{
  padding:12px 12px 14px;
  border-top:1px solid var(--border);
  background:#fff;
}
.chat-input .row{
  display:flex;
  gap:8px;
  align-items:center;
  background:#fff;
  padding:8px 10px;
  border-radius:999px;
  border:2px solid rgba(227,6,19,0.18);
  transition: box-shadow .15s ease, border-color .15s ease;
}
.chat-input .row:focus-within{
  border-color: rgba(227,6,19,0.35);
  box-shadow: 0 0 0 4px rgba(227,6,19,0.10);
}
.chat-input input{
  flex:1 1 auto;
  border:none;
  background:transparent;
  outline:none;
  padding:8px 10px;
  font-size:14px;
  color:#111827;
}
.send-btn{
  width:42px;
  height:42px;
  border-radius:999px;
  border:none;
  background:var(--claro-red);
  color:#fff;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 10px 22px rgba(227,6,19,0.18);
}
.send-btn:active{ transform: translateY(1px); }
.send-btn:disabled{
  background:#D1D5DB;
  color:#6B7280;
  box-shadow:none;
  cursor:not-allowed;
}

.chat-footer{
  margin-top:10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:10px;
  color:#9CA3AF;
  text-transform:uppercase;
  letter-spacing:0.12em;
  padding:0 6px;
}

@media (max-width: 520px){
  .chatbot{ right:16px; bottom:16px; }
  .chat-window{
    width: calc(100vw - 32px);
    height: 72vh;
    max-height: 72vh;
  }
}

@media (max-width: 420px){
  /* Em telas bem pequenas, o chat abre em tela cheia */
  .chat-window{
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    bottom: auto;
    right: auto;
  }
  .chatbot{ right:16px; bottom:16px; }
  body.chat-open .chat-toggle{ display:none; }
}


/* --- Theme sections --- */
.theme-section{ margin: 10px 0 28px; }
.theme-section:last-of-type{ margin-bottom: 10px; }

/* --- FAQ question layout (with subject pill) --- */
.q-main{
  display:flex;
  align-items:flex-start;
  gap:12px;
}
.q-meta{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

/* === Ajuste de tamanho e disposição (busca + seleção) === */
.controls{
  margin-top:28px;
  display:grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap:18px;
  align-items:stretch;
}

@media (max-width: 980px){
  .controls{
    grid-template-columns: 1fr;
  }
}

.search-wrap, .select-wrap{
  width:100%;
  position:relative;
}

.search-wrap::before{
  content:"";
  position:absolute;
  left:22px;
  top:50%;
  transform:translateY(-50%);
  width:20px;
  height:20px;
  background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%236B7280%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Ccircle%20cx%3D%2711%27%20cy%3D%2711%27%20r%3D%277%27/%3E%3Cline%20x1%3D%2721%27%20y1%3D%2721%27%20x2%3D%2716.65%27%20y2%3D%2716.65%27/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-size:contain;
  opacity:.95;
  pointer-events:none;
}

.search-wrap input.search{
  height:72px;
  padding:0 22px 0 56px;
  border-radius:22px;
  font-size:17px;
  text-align:left;
}

.search-wrap input.search::placeholder{
  color:#6B7280;
}

.search-wrap input.search:focus{
  border-color:#C7D2FE;
  box-shadow: 0 0 0 4px rgba(99,102,241,0.10);
}

.select-wrap::after{
  content:"";
  position:absolute;
  right:22px;
  top:50%;
  transform:translateY(-50%);
  width:18px;
  height:18px;
  background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2020%2020%27%20fill%3D%27none%27%3E%3Cpath%20d%3D%27M5%207.5l5%205%205-5%27%20stroke%3D%27%236B7280%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-size:contain;
  pointer-events:none;
  opacity:.95;
}

.select-wrap select.select{
  width:100%;
  height:72px;
  padding:0 54px 0 22px;
  border-radius:22px;
  border:1px solid var(--border);
  background:#fff;
  font-size:17px;
  outline:none;
  text-align:left;
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}

.select-wrap select.select:focus{
  border-color:#C7D2FE;
  box-shadow: 0 0 0 4px rgba(99,102,241,0.10);
}

@media (max-width: 520px){
  .search-wrap input.search,
  .select-wrap select.select{
    height:66px;
    border-radius:20px;
    font-size:16px;
  }
  .search-wrap::before{ left:18px; }
  .select-wrap::after{ right:18px; }
  .search-wrap input.search{ padding-left:52px; }
  .select-wrap select.select{ padding-right:50px; }
}
