/* styles.css */

/* 1) CSS Variables */
:root {
  --primary:        #fe7709;
  --bg-header:      #fff;
  --bg-hero:        #E6E6E6;
  --bg-footer:      #161616;
  --text:           #222;
  --spacing:        1rem;
  --max-width:      1200px;
  --header-height:  60px;
  --card-radius:    15px;
}

/* 2) Reset Global */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  height: 100%;
}
body {
  display: flex;
  flex-direction: column;
  font-family: 'Poppins', Arial, sans-serif;
  color: var(--text);
}

/* 3) Base Layout */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}
main {
  flex: 1;
  background: var(--bg-hero);
}

/* 4) Header & Nav */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--bg-header);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  z-index: 1000;
  overflow: visible;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 var(--spacing);
}
.logo img {
  height: 40px;
}
.menu-toggle {
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* desktop nav */
.site-nav ul {
  list-style: none;
  display: flex;
}
.site-nav li {
  margin-left: var(--spacing);
}
.site-nav a.nav-link {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  padding: 0 var(--spacing);
}

.site-nav a.nav-link.active {
  background: var(--primary);
  color: #fff;
  border-radius: 4px;
  padding: 0.5rem 1rem;    /* ajuste para o tamanho que ficar melhor */
  transition: background 0.2s;
  border-radius: 30px;
}
.site-nav a.nav-link.active:hover {
  background: #e66300;
}


/* 5) Mobile nav */
.site-nav {
  position: fixed;
  top: var(--header-height);
  left: 0; right: 0;
  background: var(--bg-header);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  text-align: center;
  z-index: 999;
  overflow: visible;
}
.site-nav.open {
  transform: translateY(0);
}
.site-nav.open ul {
  display: flex;
  flex-direction: column;
}
.site-nav.open li {
  margin: var(--spacing) 0;
}

/* 6) Dropdown menus */
.dropdown-menu {
  display: none;
  position: absolute;
  top: var(--header-height);
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: var(--max-width);
  background: var(--bg-header);
  padding: calc(var(--spacing)*2) var(--spacing);
  border-bottom-left-radius: var(--card-radius);
  border-bottom-right-radius: var(--card-radius);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 1001;
  max-height: 80vh;
  overflow-y: auto;
}
.dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-title {
  display: none;
  position: absolute;
  top: var(--header-height);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-header);
  padding: 0.5rem 1rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  border-bottom-left-radius: var(--card-radius);
  border-bottom-right-radius: var(--card-radius);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 1001;
}

/* 2) Quando o dropdown estiver aberto, mostra o título */
.dropdown.open ~ .dropdown-title {
  display: block;
}


/* dropdown content */
.section-title {
  font-size: 1.75rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: var(--spacing);
}
.sobre-content {
  line-height: 1.6;
  color: #333;
  margin-bottom: var(--spacing);
}
.funciona-list {
  list-style: none;
  counter-reset: step;
  padding: 0;
}
.funciona-list li {
  position: relative;
  padding: var(--spacing) var(--spacing) var(--spacing) calc(var(--spacing)*4);
  margin-bottom: var(--spacing);
  border-radius: 4px;
  background: #fafafa;
  transition: background 0.3s, transform 0.2s;
}
.funciona-list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: var(--spacing);
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: #fff;
  width: 2rem;
  height: 2rem;
  line-height: 2rem;
  text-align: center;
  border-radius: 50%;
  font-weight: 600;
}
.funciona-list li:hover {
  background: rgba(254,119,9,0.1);
  transform: translateY(-2px);
}

/* 7) Hero Section */
.hero {
  margin-top: var(--header-height);
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--spacing)*4) 0;
}
.hero h1 {
  font-size: 3.5rem;
  font-weight: 600;
  margin-bottom: var(--spacing);
}
.subtitle {
  color: #444;
  font-size: 1.1rem;
  margin-bottom: calc(var(--spacing)*2);
}

/* 8) Buttons */
.btn {
  display: inline-block;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-weight: 500;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.3s, transform 0.2s;
}
.btn-primary:hover {
  background: #e66300;
  transform: scale(1.05);
}

.chat-close-button {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
  z-index: 1002;
}

/* Botão flutuante */
.chat-toggle-button {
  position: fixed;
  bottom: calc(var(--header-height) + 20px);
  right: 20px;
  width: 60px; height: 60px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1000;
}
.chat-toggle-button img {
  width: 100%; height: 100%;
}

/* ===== chat-wrapper ===== */
.chat-wrapper.hide {
  display: none;
}
.chat-wrapper.show {
  display: flex;
  position: fixed;
  bottom: 120px;
  right: 20px;
  width: 90vw; max-width: 360px;
  height: 60vh; max-height: 600px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  flex-direction: column;
  overflow: hidden;
  z-index: 1001;
}

/* BotUI já insere .botui-container, mas garantimos scroll/padding */
.botui-container {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
}

#botui-app .botui-messages-container {
  height: 60vh; max-height: 400px;
  overflow-y: auto;
}

/* BotUI button overrides */
.botui-actions-buttons-button {
  background: var(--primary) !important;
  color: #fff !important;
  border-radius: 30px !important;
  font-weight: 600 !important;
  margin: 0.25rem !important;
  transition: background 0.3s, transform 0.2s !important;
}
.botui-actions-buttons-button:hover {
  background: #e66300 !important;
  transform: scale(1.05) !important;
}

/* 9) Footer */
.site-footer {
  background: var(--bg-footer);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.site-footer p {
  font-size: 0.9rem;
  color: #bbb;
}

/* 10) Responsividade */
@media (max-width: 767px) {
  .site-nav ul { display: none; }
  .site-nav.open ul { display: flex; }
  .dropdown-menu { width: 100%; left: 0; transform: none; }
}
@media (min-width: 768px) {
  .menu-toggle { display: none; }
  .site-nav { position: static; transform: none; }
  .site-nav ul { display: flex; }
  .dropdown-menu { position: absolute; top: 100%; }
}

/* ============================= */
/* Ajustes Mobile (≤767px)       */
/* ============================= */
@media (max-width: 767px) {
  /* 1) Ajuste geral de tamanho de fonte */
  html {
    font-size: 14px;           /* base menor para device */
  }
  body {
    font-size: 0.9rem;         /* texto padrão */
  }
  h1 {
    font-size: 2.5rem;         /* antes 3.5rem */
  }
  h2, .section-title {
    font-size: 1.5rem;         /* antes 1.75rem */
  }
  .subtitle {
    font-size: 1rem;           /* antes 1.1rem */
  }
  .site-nav a.nav-link {
    font-size: 0.9rem;         /* links do menu */
  }
  .site-footer p {
    font-size: 0.8rem;         /* rodapé */
  }

  /* 2) Centralizar logo e reposicionar menu-toggle */
  .site-header .container {
    justify-content: center;   /* força logo no centro */
    position: relative;        /* para posicionar o toggle */
  }
  .menu-toggle {
    position: absolute;        /* tira do fluxo flex */
    right: var(--spacing);     /* fixa à direita */
    top: 50%;
    transform: translateY(-50%);
  }

  /* Se você quer esconder o nav-list e mostrar só o toggle */
  .site-nav ul {
    display: none;
  }
  .site-nav.open ul {
    display: flex;
    flex-direction: column;
  }
}