/* ===== Carsegur – CSS Consolidado ===== */
:root {
  --brand-dark: #1B2D8A;   /* azul Carsegur */
  --brand-red: #E30613;    /* vermelho Carsegur */
  --brand-light: #E30613;  /* destaque principal = vermelho */
  --accent: #1B2D8A;
  --text: #1F2937;
  --muted: #6B7280;
  --bg: #F6F8FB;
  --white: #FFFFFF;
  --radius: 10px;
  --shadow: 0 8px 22px rgba(0,0,0,.06);
}

* {
  box-sizing: border-box;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  line-height: 1.45;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  margin-bottom: 50px;
}

/* ===== Navegação ===== */
nav {
  background-color: #1B2D8A;
  display: flex;
  align-items: center;
  padding: 10px;
}

.logo {
  height: 48px;
  width: auto;
  margin-right: 40px;
  background: #fff;
  padding: 4px 10px;
  border-radius: 6px;
}

nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

nav li {
  float: left;
  border-right: 1px solid rgba(255,255,255,.35);
}

nav li:last-child {
  border-right: none;
}

nav li a {
  display: block;
  color: rgb(255, 255, 255);
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-weight: bold;
  font-size: 25px;
  transition: color .2s ease;
}

nav li a:hover {
  color: #ffb3b8;
}

/* Header alternativo (site-header) */
.site-header {
  background: #fff;
  box-shadow: var(--shadow);
  margin: 0 0 18px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 10px;
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-header .logo {
  height: 34px;
  width: auto;
}

.mainnav ul {
  display: flex;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.mainnav a {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--brand-dark);
  font-weight: 700;
  background: rgba(227, 6, 19, .10);
  transition: background .2s ease;
}

.mainnav a:hover {
  background: rgba(227, 6, 19, .18);
}

/* ===== Títulos ===== */
h1 {
  background-color: #1B2D8A;
  font-size: 40px;
  color: white;
  text-align: center;
  margin: 0;
  padding: 20px;
}

h2 {
  text-align: left;
  padding-left: 50px;
  color: rgb(0, 0, 0);
  font-size: 20px;
  opacity: 0.6;
  transition: opacity .2s ease, box-shadow .2s ease;
}

h2:hover {
  box-shadow: inset 0 0 0 25px #fde7e9;
  opacity: 1;
}

h2.h2-termo {
  text-align: left;
  padding-left: 50px;
  color: rgb(0, 0, 0);
  font-size: 20px;
  opacity: 0.6;
}

/* ===== Dropdown ===== */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  padding: 16px;
  font-size: 20px;
  border: none;
  cursor: pointer;
  background: none;
  text-align: left;
  padding-left: 50px;
  color: rgb(0, 0, 0);
  font-size: 20px;
  opacity: 0.6;
  transition: opacity .2s ease, box-shadow .2s ease;
}

.dropdown:hover .dropbtn {
  box-shadow: inset 0 0 0 25px #fde7e9;
  opacity: 1;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  transition: background .2s ease;
}

.dropdown-content a:hover {
  background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* ===== Links Gerais ===== */
a {
  text-decoration: none;
  color: inherit;
}

main a {
  text-decoration: none;
  color: black;
}

#p-ia {
  text-align: center;
  font-size: 18px;
  color: #1B2D8A;
  font-weight: bold;
  transition: color .2s ease, box-shadow .2s ease;
}

#p-ia:hover {
  color: var(--brand-red);
  box-shadow: inset 0 0 0 25px #fde7e9;
}

#ia-img {
  width: 1%;
}

/* ===== Footer ===== */
footer {
  font-weight: bold;
  background-color: #1B2D8A;
  color: #fff;
  text-align: center;
  position: fixed;
  bottom: 0;
  width: 100%;
}

#p-footer {
  color: rgb(228, 228, 228);
  font-size: 12px;
  margin: 5px 0;
  transition: color .2s ease;
}

#p-footer:hover {
  text-decoration: underline;
  color: #cfcfcf;
}

hr {
  margin: 15px 0;
  border: none;
  border-top: 1px solid #ddd;
}

/* ===== Formulários ===== */
.form-card, form {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 18px;
}

label {
  display: block;
  font-weight: 600;
  margin: 14px 0 6px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  font-size: 14px;
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(227, 6, 19, .18);
}

textarea {
  margin-bottom: 20px;
  background-color: #fff5f6;
  resize: vertical;
}

/* Radios de gênero */
.genero {
  margin-top: 6px;
}

#genero label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 14px;
  margin-bottom: 10px;
  font-weight: 500;
}

/* ===== Containers ===== */
.container, .page, .main, #app, .brClubeContainer {
  max-width: 920px;
  margin: 28px auto 80px;
  padding: 0 16px;
}

.brClubeContainer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 10px;
  width: 45%;
  float: left;
  padding-left: 35px;
}

/* ===== Botões ===== */
button {
  border: 0;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .05s ease-in, box-shadow .2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
  font-size: 14px;
  font-family: inherit;
}

button:active {
  transform: translateY(1px);
}

button[onclick*="enviarFormulario"] {
  background: var(--brand-red);
  color: #fff;
}

.btn-secondary {
  background: var(--brand-dark);
  color: #fff;
}

/* Ações do formulário */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.form-actions button:focus-visible {
  outline: 2px solid var(--brand-light);
  outline-offset: 2px;
}

/* ===== Mensagem Gerada ===== */
#texto-container {
  margin-top: 22px;
}

#texto {
  display: block;
  background: var(--white);
  border-left: 5px solid var(--brand-light);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 18px 16px 16px;
  line-height: 1.6;
}

#texto b {
  color: #0F172A;
}

#texto small {
  color: var(--muted);
}

#texto a {
  color: var(--brand-dark);
  font-weight: 700;
  text-decoration: underline;
}

#texto a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

#texto .msg-title {
  font-size: 22px;
  margin: 0 0 10px;
}

#texto .section {
  margin: 14px 0;
}

#texto .section-title {
  font-weight: 800;
  color: #0F172A;
  margin: 6px 0 6px;
  border-left: 4px solid var(--brand-light);
  padding-left: 10px;
}

#texto .list {
  margin: 8px 0 0 0;
  padding-left: 20px;
  list-style: disc;
}

#texto .list li {
  margin: 6px 0;
}

#texto .note {
  margin-top: 6px;
}

/* ===== IA ===== */
#ia {
  text-align: center;
  margin: 20px 0;
}

#ia a {
  text-decoration: none;
}

/* ===== Responsivo ===== */
@media (max-width: 780px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .mainnav ul {
    flex-wrap: wrap;
  }

  nav {
    flex-direction: column;
    gap: 10px;
  }

  .logo {
    margin-right: 0;
  }

  nav ul {
    width: 100%;
  }

  .brClubeContainer {
    width: 100%;
    float: none;
    padding-left: 0;
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    padding-left: 20px;
  }
}

@media (max-width: 680px) {
  form .row {
    display: block;
  }

  input, select, textarea {
    font-size: 16px;
  }

  .form-actions {
    justify-content: stretch;
    flex-direction: column;
    align-items: stretch;
  }

  .form-actions button {
    flex: 1;
    width: 100%;
  }

  nav ul {
    gap: 6px 10px;
  }

  nav li a {
    padding: 10px 12px;
    font-size: 14px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    padding-left: 15px;
    font-size: 18px;
  }

  #p-ia {
    font-size: 14px;
  }

  .container, .page, .main, #app {
    margin: 16px auto 60px;
  }
}
