/* ==========================================================================
   grid.css — substitui o Bootstrap 3.3.6 do site legado.

   O theme/home.css foi escrito assumindo o box model do Bootstrap 3, então
   isto replica fielmente: grid float-based de 12 colunas, gutter de 15px,
   breakpoint md em 992px. Só as classes que o site realmente usa.
   Custo: ~4 KB no lugar dos ~150 KB do Bootstrap.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
  vertical-align: middle;
}

a {
  text-decoration: none;
}

/* ---------- Grid ---------- */

.row {
  margin-left: -15px;
  margin-right: -15px;
}

.row::after,
.center::after,
.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

[class*='col-xs-'],
[class*='col-md-'] {
  position: relative;
  min-height: 1px;
  padding-left: 15px;
  padding-right: 15px;
}

/* Extra small: sempre empilhado/fluido */
.col-xs-1  { float: left; width: 8.333333%; }
.col-xs-2  { float: left; width: 16.666667%; }
.col-xs-3  { float: left; width: 25%; }
.col-xs-4  { float: left; width: 33.333333%; }
.col-xs-5  { float: left; width: 41.666667%; }
.col-xs-6  { float: left; width: 50%; }
.col-xs-7  { float: left; width: 58.333333%; }
.col-xs-8  { float: left; width: 66.666667%; }
.col-xs-9  { float: left; width: 75%; }
.col-xs-10 { float: left; width: 83.333333%; }
.col-xs-11 { float: left; width: 91.666667%; }
.col-xs-12 { float: left; width: 100%; }

@media (min-width: 992px) {
  .col-md-1  { float: left; width: 8.333333%; }
  .col-md-2  { float: left; width: 16.666667%; }
  .col-md-3  { float: left; width: 25%; }
  .col-md-4  { float: left; width: 33.333333%; }
  .col-md-5  { float: left; width: 41.666667%; }
  .col-md-6  { float: left; width: 50%; }
  .col-md-7  { float: left; width: 58.333333%; }
  .col-md-8  { float: left; width: 66.666667%; }
  .col-md-9  { float: left; width: 75%; }
  .col-md-10 { float: left; width: 83.333333%; }
  .col-md-11 { float: left; width: 91.666667%; }
  .col-md-12 { float: left; width: 100%; }
}

/* ---------- Botões ---------- */

.btn {
  display: inline-block;
  margin-bottom: 0;
  font-family: inherit;
  font-weight: 400;
  text-align: center;
  vertical-align: middle;
  touch-action: manipulation;
  cursor: pointer;
  background-image: none;
  border: 1px solid transparent;
  white-space: nowrap;
  padding: 6px 12px;
  font-size: 14px;
  line-height: 1.42857143;
  border-radius: 4px;
  user-select: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.btn-lg {
  padding: 10px 16px;
  font-size: 18px;
  line-height: 1.3333333;
  border-radius: 6px;
}

.btn-default {
  color: #333;
  background-color: #fff;
  border-color: #ccc;
}

.btn-default:hover,
.btn-default:focus {
  color: #333;
  background-color: #e6e6e6;
  border-color: #adadad;
}

.btn-primary {
  color: #fff;
  background-color: #337ab7;
  border-color: #2e6da4;
}

.btn-primary:hover,
.btn-primary:focus {
  color: #fff;
  background-color: #286090;
  border-color: #204d74;
}

.btn-success {
  color: #fff;
  background-color: #5cb85c;
  border-color: #4cae4c;
}

.btn-success:hover,
.btn-success:focus {
  color: #fff;
  background-color: #449d44;
  border-color: #398439;
}

.btn[disabled],
.btn.disabled {
  opacity: 0.65;
  pointer-events: none;
}

/* ---------- Formulários ---------- */

.form-control {
  display: block;
  width: 100%;
  height: 34px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.42857143;
  color: #555;
  background-color: #fff;
  background-image: none;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: #66afe9;
  outline: 0;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
}

.form-control::placeholder {
  color: #999;
  opacity: 1;
}

textarea.form-control {
  height: auto;
  resize: vertical;
}

.input-lg {
  height: 46px;
  padding: 10px 16px;
  font-size: 18px;
  line-height: 1.3333333;
  border-radius: 6px;
}

.form-group {
  margin-bottom: 15px;
}

/* ---------- Utilitários ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Foco visível em toda navegação por teclado — ausente no legado. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #0d5c63;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
