/*========CORPO HTML============*/

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

header {
  background-color: #DBDBDB;
  align-items: center;
  justify-content: space-evenly;
  padding: var(--sp-16) var(--sp-32);
}

.navdropdown {
  overflow: hidden;
  background-color: #104E8B;
}

.navdropdown a {
  float: left;
  font-size: 16px;
  color: white;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
}

.subnavdropdown {
  float: left;
  overflow: hidden;
}

.subnavdropdown .subnavdropdownbtn {
  font-size: 16px;
  border: none;
  outline: none;
  color: white;
  padding: 14px 16px;
  background-color: inherit;
  font-family: inherit;
  margin: 0;
  cursor: pointer;
}

.subnavdropdown:hover .subnavdropdownbtn {
  background-color: #0D4578;
}

.subnavdropdown-content {
  display: none;
  position: absolute;
  left: 0;
  background-color: #104E8B;
  width: 100%;
  z-index: 1;
}

.subnavdropdown-content a {
  float: left;
  color: white;
  text-decoration: none;
  padding: 14px 16px;
}

.subnavdropdown-content a:hover {
  background-color: #eee;
  color: black;
}

.subnavdropdown:hover .subnavdropdown-content {
  display: block;
}

/* ===== FIELDSETS E FORMULÁRIOS ===== */
fieldset {
  border: 2px solid #e8ecf4;
  border-radius: 15px;
  padding: 20px;
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  display: block;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}

legend {
  font-weight: 700;
  color: #2c3e50;
  font-size: 22px;
  padding: 0 15px;
  background: linear-gradient(135deg, #1E90FF, #1874CD);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: left;
  margin-bottom: 20px;
  margin-top: 30px;
  display: block;
  width: 100%;
}

legend:first-of-type {
  margin-top: 0;
}

#termo-uso {
  margin: 15px 0;
  width: 100%;
  display: block;
  clear: both;
}

#termo-uso h4 {
  color: #1874CD;
  font-size: 16px;
  margin: 15px 0 8px 0;
  font-weight: 600;
}

#termo-uso p {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 10px;
}

legend {
  font-weight: 700;
  color: #2c3e50;
  font-size: 22px;
  padding: 0 15px;
  background: linear-gradient(135deg, #1E90FF, #1874CD);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: left;
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  margin-top: 10px;
  color: #0D4578;
  font-weight: 600;
  font-size: 18px;
  transition: color 0.3s ease;
  width: 100%;
  clear: both;
}

/* ===== INPUTS ===== */
input[type=text],
input[type=date],
input[type=email],
input[type=tel],
input[type=password] {
  width: 100%;
  max-width: 400px;
  padding: 12px;
  margin: 8px 0;
  box-sizing: border-box;
  border: 2px solid #ccc;
  border-radius: 6px;
  outline: none;
  font-size: 14px;
  transition: all 0.3s ease;
  display: block;
  clear: both;
}

input[type=email]:focus {
  background-color: lightblue;
}

input[type=tel]:focus {
  background-color: lightblue;
}

input[type=text]:focus,
input[type=date]:focus,
input[type=email]:focus,
input[type=tel]:focus,
input[type=password]:focus {
  background-color: #e3f2fd;
  border-color: #104E8B;
  box-shadow: 0 0 0 3px rgba(16, 78, 139, 0.1);
}

/* ===== CHECKBOX ===== */
input[type=checkbox] {
  margin-right: 8px;
  cursor: pointer;
  width: 18px;
  height: 18px;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  margin: 15px 0;
  width: 100%;
  clear: both;
}

.checkbox-wrapper label {
  margin: 0;
  cursor: pointer;
  font-size: 16px;
}

.checkbox-wrapper input[type=checkbox] {
  flex-shrink: 0;
}

/* ===== BOTÕES ===== */
.form-buttons {
  display: flex;
  gap: 10px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 2px solid #e8ecf4;
  width: 100%;
  justify-content: flex-start;
}

.joinBtn {
  width: auto;
  min-width: 150px;
  height: 45px;
  background-color: #00688B;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  padding: 0 20px;
  transition: all 0.3s ease;
}

@media (max-width: 480px) {
  .form-buttons {
    flex-direction: column;
    width: 100%;
  }

  .joinBtn {
    width: 100%;
  }
}

.joinBtn:hover {
  background-color: #005577;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.joinBtn:active {
  transform: translateY(0);
  box-shadow: 2px 2px 5px #fc894d;
}

/* ===== ALERTAS ===== */
.alerta {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: bold;
  z-index: 10000;
  animation: fadeInOut 3s ease forwards;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.alerta.sucesso {
  background-color: #dff0d8;
  color: #3c763d;
  border: 2px solid #d6e9c6;
}

.alerta.erro {
  background-color: #f2dede;
  color: #a94442;
  border: 2px solid #ebccd1;
}

.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: bold;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    bottom: 10px;
  }

  10% {
    opacity: 1;
    bottom: 30px;
  }

  90% {
    opacity: 1;
    bottom: 30px;
  }

  100% {
    opacity: 0;
    bottom: 50px;
  }
}

/* ===== VALIDAÇÃO DE FORMULÁRIO ===== */
.campo-valido {
  border: 2px solid #28a745 !important;
  background-color: #f0fff4 !important;
  padding-right: 40px !important;
}

.campo-invalido {
  border: 2px solid #dc3545 !important;
  background-color: #fff5f5 !important;
  padding-right: 40px !important;
  animation: shake 0.3s ease;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

.erro-validacao {
  color: #dc3545;
  font-size: 14px;
  font-weight: 600;
  margin-top: 5px;
  padding: 8px 12px;
  background-color: #fff5f5;
  border-left: 4px solid #dc3545;
  border-radius: 4px;
  display: flex;
  align-items: center;
  animation: slideDown 0.3s ease;
}

.erro-validacao::before {
  content: "⚠ ";
  margin-right: 8px;
  font-size: 16px;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== GRID DO FORMULÁRIO ===== */
.Frm-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}

.col-1 {
  grid-column: span 1;
}

.col-2 {
  grid-column: span 2;
}

.col-3 {
  grid-column: span 3;
}

.col-4 {
  grid-column: span 4;
}

.col-5 {
  grid-column: span 5;
}

.col-6 {
  grid-column: span 6;
}

.col-7 {
  grid-column: span 7;
}

.col-8 {
  grid-column: span 8;
}

.col-9 {
  grid-column: span 9;
}

.col-10 {
  grid-column: span 10;
}

.col-11 {
  grid-column: span 11;
}

.col-12 {
  grid-column: span 12;
}

/* Grid responsivo */
@media (max-width: 768px) {
  .Frm-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 10px;
  }

  [class*="col-"] {
    grid-column: span 1;
  }

  fieldset {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .Frm-grid {
    padding: 10px;
    gap: 10px;
  }

  fieldset {
    padding: 10px;
  }
}

/* ===== PASSOS DE DOAÇÃO ===== */
.passosDoacao {
  font-size: 18px;
  line-height: 1.8;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  margin: 15px 0;
}

/* ===== BLOCKQUOTES ===== */
blockquote {
  display: block;
  font-style: normal;
  color: #0D4578;
  border-left: 4px solid #00008B;
  border-radius: 12px;
  background-color: #d1d0d0;
  padding: 15px 20px;
  position: relative;
  margin: 20px 0;
  transition: all 0.3s ease;
}

blockquote:hover {
  background-color: #00008B;
  transform: scale(1.02);
  color: white;
  font-size: 18px;
}

blockquote::before {
  content: "Depoimento";
  position: absolute;
  top: -10px;
  left: 15px;
  background-color: #00008B;
  color: white;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
}

/* ===== TÍTULOS ===== */
h2 {
  font-size: 200%;
  color: #00688B;
}

h3 {
  font-size: 150%;
  color: #1E90FF;
}

h4 {
  font-size: 150%;
  color: #1874CD;
}

p {
  color: black;
  font-size: 120%;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* ===== FOOTER ===== */
.footer {
  background-color: #B8B8B8;
  padding: 5px;
  text-align: left;
  color: black;
  font-size: 20px;
}

.footer p {
  font-size: 20px;
  margin-bottom: 0;
}

/* ===== RESPONSIVO - MOBILE (max-width: 320px) ===== */
@media screen and (max-width: 320px) {
  body {
    background-color: #F0F0F0;
  }

  header {
    background-color: #DBDBDB;
    display: flex;
  }

  h1 {
    display: none;
  }

  p {
    font-size: 100%;
  }

  .navdropdown {
    display: none;
  }

  .container {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
  }

  .containerIMG {
    background-color: #104E8B;
    border: 1px solid black;
    width: 280px;
    margin: 10px 0;
  }

  .card {
    background-color: #104E8B;
    padding: 15px;
    margin: 10px 0;
    width: 100%;
  }

  .footer {
    background-color: #B8B8B8;
    padding: 5px;
    text-align: left;
    color: black;
    font-size: 18px;
  }

  /* MENU HAMBURGUER */
  #menu__toggle {
    opacity: 0;
  }

  #menu__toggle:checked+.menu__btn>span {
    transform: rotate(45deg);
  }

  #menu__toggle:checked+.menu__btn>span::before {
    top: 0;
    transform: rotate(0deg);
  }

  #menu__toggle:checked+.menu__btn>span::after {
    top: 0;
    transform: rotate(90deg);
  }

  #menu__toggle:checked~.menu__box {
    left: 0 !important;
  }

  .menu__btn {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 26px;
    height: 26px;
    cursor: pointer;
    z-index: 1001;
  }

  .menu__btn>span,
  .menu__btn>span::before,
  .menu__btn>span::after {
    display: block;
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: #616161;
    transition-duration: .25s;
  }

  .menu__btn>span::before {
    content: '';
    top: -8px;
  }

  .menu__btn>span::after {
    content: '';
    top: 8px;
  }

  .menu__box {
    display: block;
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    height: 100%;
    margin: 0;
    padding: 80px 0;
    list-style: none;
    background-color: #ECEFF1;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, .4);
    transition-duration: .25s;
    z-index: 1000;
  }

  .menu__item {
    display: block;
    padding: 12px 24px;
    color: #333;
    font-family: 'Roboto', sans-serif;
    font-size: 20px;
    font-weight: 600;
    text-decoration: none;
    transition-duration: .25s;
  }

  .menu__item:hover {
    background-color: #CFD8DC;
  }
}

/* ===== RESPONSIVO - TABLET (321px - 768px) ===== */
@media screen and (min-width: 321px) and (max-width: 768px) {
  body {
    background-color: #F0F0F0;
  }

  header {
    background-color: #DBDBDB;
    display: flex;
    width: auto;
  }

  h1 {
    font-size: var(--sp-48);
    color: #00008B;
    text-align: center;
  }

  .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 15px;
  }

  .containerIMG {
    background-color: #104E8B;
    border: 1px solid black;
    max-width: 45%;
  }

  .card {
    background-color: #104E8B;
    flex-wrap: wrap;
    max-width: 100%;
    height: auto;
    margin: 10px 0;
    padding: 15px;
  }

  .footer {
    background-color: #B8B8B8;
    padding: 5px;
    text-align: left;
    color: black;
    font-size: 18px;
  }

  .hamburger-menu {
    display: none;
  }
}

/* ===== RESPONSIVO - DESKTOP SMALL (769px - 1024px) ===== */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  body {
    background-color: #F0F0F0;
  }

  header {
    background-color: #DBDBDB;
    display: flex;
    width: auto;
  }

  h1 {
    font-size: var(--sp-64);
    color: #00008B;
    text-align: center;
  }

  .container {
    display: flex;
    justify-content: space-around;
    gap: 20px;
  }

  .containerIMG {
    background-color: #104E8B;
    border: 1px solid black;
    max-width: 30%;
  }

  .card {
    background-color: #104E8B;
    max-width: 100%;
    height: auto;
    margin: 15px 0;
    padding: 20px;
  }

  .footer {
    background-color: #B8B8B8;
    padding: 5px;
    text-align: center;
    color: black;
    font-size: 18px;
  }

  .hamburger-menu {
    display: none;
  }
}

/* ===== RESPONSIVO - DESKTOP LARGE (1025px+) ===== */
@media screen and (min-width: 1025px) {
  body {
    background-color: #F0F0F0;
  }

  header {
    background-color: #DBDBDB;
    display: flex;
    width: auto;
  }

  h1 {
    font-size: var(--sp-64);
    color: #00008B;
    text-align: center;
  }

  .container {
    display: flex;
    width: auto;
    justify-content: space-around;
    gap: 20px;
    padding: 20px 0;
  }

  .containerIMG {
    background-color: #104E8B;
    border: 1px solid black;
    width: 280px;
  }

  .card {
    background-color: #104E8B;
    max-width: 100%;
    height: auto;
    margin: 15px 0;
    padding: 20px;
  }

  .footer {
    background-color: #B8B8B8;
    padding: 5px;
    text-align: left;
    color: black;
    font-size: 20px;
  }

  .hamburger-menu {
    display: none;
  }
}

/* ===== VARIÁVEIS CSS ===== */
:root {
  --sp-8: 8px;
  --sp-16: 16px;
  --sp-24: 24px;
  --sp-32: 32px;
  --sp-48: 48px;
  --sp-64: 64px;
}

/* ===== UTILITÁRIOS ===== */
.a {
  color: rgb(249, 249, 249);
}

.p {
  color: rgb(249, 249, 249);
}

.headerIMG {
  box-shadow: var(--sp-8) var(--sp-8) 0 #949494;
  background-color: #104E8B;
  border-radius: 10px;
}

.corpo {
  padding: 20px;
}

/* ===== ACESSIBILIDADE ===== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #104E8B;
  color: #fff;
  padding: 10px 20px;
  text-decoration: none;
  z-index: 10000;
  font-weight: bold;
  border-radius: 0 0 8px 0;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid #FFD700;
  outline-offset: 2px;
}

/* Focus apenas para inputs e botões de formulário */
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button[type="submit"]:focus-visible,
button[type="reset"]:focus-visible {
  outline: 3px solid #ff9800;
  outline-offset: 4px;
}

/* Badge de força da senha */
.senha-forca {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  margin-top: 5px;
  transition: all 0.3s ease;
}

.senha-fraca {
  background-color: #dc3545;
  color: white;
}

.senha-media {
  background-color: #ffc107;
  color: #000;
}

.senha-forte {
  background-color: #28a745;
  color: white;
}

/* Responsivo para mensagens de erro */
@media (max-width: 768px) {
  .erro-validacao {
    font-size: 12px;
    padding: 6px 10px;
  }
  .campo-valido,
  .campo-invalido {
    background-size: 16px;
    background-position: right 8px center;
    padding-right: 35px !important;
  }

  /* Remove outline dos links e botões de navegação */
  .navdropdown a:focus,
  .navdropdown a:focus-visible,
  .menu__item:focus,
  .menu__item:focus-visible,
  .subnavdropdownbtn:focus,
  .subnavdropdownbtn:focus-visible {
    outline: none;
  }
}

/* ---------- BOTÃO DE ACESSIBILIDADE ----------- */
.a11y-toggle {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 10050;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #104E8B;
  color: #fff;
  border: none;
  box-shadow: 0 6px 16px rgba(16, 78, 139, 0.35);
  cursor: pointer;
  font-size: 22px;
  transition: background 0.3s;
}
.a11y-toggle:hover {
  background: #0c3e70;
}
.a11y-toggle:focus {
  outline: 3px solid #ffb74d;
  outline-offset: 3px;
}

/* Painel de opções */
.a11y-panel {
  position: fixed;
  right: 16px;
  bottom: 82px;
  z-index: 10050;
  background: #fff;
  color: #111;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  padding: 12px;
  display: none;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}
.a11y-panel[data-open="true"] {
  display: flex;
}

/* Linha de opção */
.a11y-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Toggle switch */
.a11y-option input[type="checkbox"] {
  width: 36px;
  height: 20px;
  appearance: none;
  -webkit-appearance: none;
  background: #ccc;
  border-radius: 20px;
  position: relative;
  cursor: pointer;
  outline: none;
}
.a11y-option input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.a11y-option input[type="checkbox"]:checked {
  background: #104E8B;
}
.a11y-option input[type="checkbox"]:checked::after {
  transform: translateX(16px);
}

/* Texto auxiliar */
.a11y-panel small {
  color: #555;
  font-size: 12px;
}

/* Mensagem oculta para leitores de tela */
.a11y-announcer {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- TEMAS ---------- */
:root {
  --bg: #f5f5f5;
  --text: #111;
  --primary: #104E8B;
}

/* Modo escuro */
body.dark-mode {
  --bg: #0f1720;
  --text: #e6eef8;
  --primary: #5fb0ff;
  background-color: var(--bg) !important;
  color: var(--text) !important;
}

/* Alto contraste (fundo escuro e letras claras) */
body.high-contrast {
  --bg: #000;
  --text: #fff;  /* letras claras */
  --primary: #00ffff;
  background-color: var(--bg) !important;
  color: var(--text) !important;
}

/* Aplicar variáveis em partes principais */
body, main, header, footer {
  background-color: var(--bg);
  color: var(--text);
}

a, .menu__item {
  color: var(--primary);
}

body.high-contrast a {
  text-decoration: underline;
}

body.high-contrast :focus {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}
