:root {
  /* Cores da marca (placeholder — troque pelas cores da Fortrex) */
  --amarelo: #FCD800;        /* amarelo institucional */
  --amarelo-escuro: #E6C400;
  --azul: #00416B;           /* azul institucional (logo, títulos) */
  --azul-escuro: #01325A;
  --azul-btn: #2b5da0;       /* azul do botão / ícones */
  --azul-btn-hover: #234e88;
  --ink: #2b2b2b;
  --muted: #6b7280;
  --line: #d9d9d9;
  --bg: #ffffff;
  --cinza-form: #e8e8ec;     /* fundo da caixa do formulário */
  --cinza-acess: #e9e9e9;    /* barra de acessibilidade */
  --ok: #1f8a3b;
  --erro: #c1272d;
  --shadow: 0 1px 3px rgba(0,0,0,.10), 0 8px 24px rgba(0,0,0,.06);
  --container: 1120px;
}

* {
  box-sizing: border-box;
  /* Fonte de sistema (stack Trebuchet MS) */
  font-family: "Trebuchet MS", "arial", "helvetica", "Open Sans", sans-serif;
}
[hidden] { display: none !important; }
html, body { margin: 0; }

body {
  font-family: "Trebuchet MS", "arial", "helvetica", "Open Sans", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  /* Sem os banners a página encurtou e o rodapé passou a flutuar no meio
     da tela, com branco embaixo. Coluna flex empurra ele para o fim. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
.rodape { flex-shrink: 0; }
a { color: var(--azul); }

/* Skip links */
.skip-links { list-style: none; margin: 0; padding: 0; }
.skip-links a {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--azul);
  color: #fff;
  padding: 8px 14px;
  z-index: 200;
}
.skip-links a:focus { left: 8px; }

/* Barra de acessibilidade */
.acessibilidade-bar {
  background: var(--cinza-acess);
  border-bottom: 1px solid #d5d5d5;
  font-size: 14px;
}
.acessibilidade-inner {
  padding: 5px 24px;
  display: flex;
  align-items: center;
  position: relative;
}
.acess-toggle {
  background: none;
  border: 0;
  color: var(--azul);
  cursor: pointer;
  font-size: 14px;
  padding: 3px 2px;
}
.acess-toggle:hover { text-decoration: underline; }
.acess-menu {
  position: absolute;
  top: 100%;
  left: 20px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 4px;
  min-width: 170px;
  z-index: 40;
  display: flex;
  flex-direction: column;
}
.acess-menu a {
  padding: 10px 14px;
  text-decoration: none;
  color: var(--azul);
  font-size: 14px;
}
.acess-menu a:hover { background: #f2f2f2; }

/* Cabeçalho */
.topo {
  background: #fffef7;
  border-bottom: 3px solid var(--amarelo);
  position: sticky;
  top: 0;
  z-index: 30;
}
.topo-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
}
.menu-btn {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  color: var(--azul);
}
.menu-btn img, .menu-btn svg { width: 26px; height: 26px; display: block; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.logo img { height: 40px; width: auto; display: block; }
.logo-mark { display: block; flex-shrink: 0; }
.logo-text { font-size: 22px; font-weight: 400; color: var(--azul); letter-spacing: .2px; }
.logo-text strong { font-weight: 800; }

.entrar {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
}
.entrar-ico { display: inline-flex; }
.entrar:hover { text-decoration: underline; }

/* Menu lateral */
.menu-lateral { background: var(--azul); border-bottom: 4px solid var(--amarelo); }
.menu-lateral ul {
  max-width: var(--container);
  margin: 0 auto;
  padding: 8px 24px;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 26px;
}
.menu-lateral a { color: #fff; text-decoration: none; font-size: 14px; padding: 8px 0; display: inline-block; }
.menu-lateral a:hover { text-decoration: underline; }

/* Breadcrumb */
.breadcrumb { background: #fff; }
.breadcrumb-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 20px 6px;
  font-size: 15px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.breadcrumb-inner a { color: var(--azul); text-decoration: none; }
.breadcrumb-inner a:hover { text-decoration: underline; }
.breadcrumb-inner span { color: var(--muted); }

/* Main */
main { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* Busca / Rastreamento */
.busca { padding: 4px 0 20px; }
.busca h1 {
  margin: 0 0 10px;
  font-size: 27px;
  font-weight: 700;
  color: var(--azul);
}

#trackForm {
  background: var(--cinza-form);
  border-radius: 4px;
  padding: 16px 22px 20px;
}
.lead { display: block; margin-bottom: 8px; font-size: 15px; line-height: 1.25; }
.lead strong { color: var(--ink); font-weight: 700; }
.lead span { display: block; color: var(--ink); }

#codigo {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #9e9e9e;
  border-radius: 4px;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
#codigo::placeholder { color: #9aa0a6; }
#codigo:focus {
  outline: none;
  border-color: var(--azul-btn);
  box-shadow: 0 0 0 3px rgba(43,93,160,.18);
}
.hint { font-size: 14px; color: var(--ink); margin: 5px 2px 0; }

/* Captcha */
.captcha-row {
  display: flex;
  gap: 40px;
  margin-top: 16px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.captcha-left { display: flex; align-items: center; gap: 12px; }
#captchaCanvas {
  background: #fff;
  border: 1px solid #cfcfcf;
  border-radius: 2px;
  display: block;
  max-width: 100%;
  height: auto;
  min-width: 0;
}
.captcha-actions { display: flex; flex-direction: column; gap: 10px; }
.captcha-actions button {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--azul-btn);
  padding: 2px;
  display: inline-flex;
}
.captcha-actions button:hover { color: var(--azul-btn-hover); }

.captcha-right {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 2px;
}
.captcha-right label { font-size: 15px; color: var(--ink); }
#captcha {
  width: 100%;
  padding: 12px 12px;
  border: 1px solid #9e9e9e;
  border-radius: 4px;
  font-size: 16px;
  background: #fff;
}
#captcha:focus {
  outline: none;
  border-color: var(--azul-btn);
  box-shadow: 0 0 0 3px rgba(43,93,160,.18);
}

/* Botão Consultar */
.submit-btn {
  align-self: center;
  margin-top: 8px;
  background: var(--azul-btn);
  color: #fff;
  border: 0;
  padding: 12px 40px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.submit-btn:hover { background: var(--azul-btn-hover); }

.form-error {
  color: var(--erro);
  font-size: 14px;
  margin: 10px 0 0;
  min-height: 0;
}

/* Resultados / timeline (mock) */
.results {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 12px 0 24px;
  box-shadow: none;
  margin: 38px 0 28px;
}
.result-head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.result-code { font-size: 18px; font-weight: 700; color: var(--azul); }
.result-status { font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.status-delivered { background: #dcfce7; color: #166534; }
.status-transit { background: #e0f2fe; color: var(--azul); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 19px;
  top: 20px;
  bottom: 40px;
  width: 2px;
  background: var(--amarelo);
}
.timeline.single-event::before { display: none; }
.timeline li { position: relative; display: flex; gap: 14px; padding: 0 0 28px 0; }
.timeline li:first-child::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 19px;
  top: -20px;
  height: 40px;
  width: 2px;
  background: var(--amarelo);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: none;
}
.timeline li:last-child::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 19px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--bg);
}
.event-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf1f3;
  border: 1px solid #d5dde1;
  padding: 5px;
  position: relative;
  z-index: 1;
}
.event-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.event-content { min-width: 0; padding-top: 1px; line-height: 1.28; }
.event-title { font-weight: 700; color: var(--azul); }
.event-description { font-weight: 700; color: #202020; }
.event-place, .event-date { display: block; font-size: 13px; color: #202020; }
.event-description { font-size: 14px; }
.event-description span { display: block; }
.event-date { margin-top: 1px; }
.event-route { display: flex; flex-direction: column; font-size: 13px; color: #202020; }

/* Banners (carrossel) */
.carousel { position: relative; margin: 8px 0 40px; }
.carousel-viewport { overflow: hidden; border-radius: 0; box-shadow: var(--shadow); }
.carousel-track { list-style: none; margin: 0; padding: 0; display: flex; transition: transform .5s ease; }
.carousel-slide { min-width: 100%; flex: 0 0 100%; }
.carousel-slide a { display: block; }
.carousel-slide img { width: 100%; height: auto; display: block; }
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 52px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,.55);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: transform .15s;
  z-index: 2;
}
.carousel-arrow:hover { background: transparent; transform: translateY(-50%) scale(1.08); }
.carousel-arrow.prev { left: 12px; }
.carousel-arrow.next { right: 12px; }
.carousel-dots { display: none; }
.carousel-dots button {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: #c9c9c9;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.carousel-dots button.active { background: var(--azul); transform: scale(1.15); }

/* Rodapé */
.rodape {
  background-color: #ffe600;
  background-image: linear-gradient(135deg, var(--amarelo) 0%, var(--amarelo-escuro) 100%);
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: auto 100%;
  margin-top: 32px;
}
.rodape-inner { max-width: var(--container); margin: 0 auto; padding: 22px 20px 26px; }
.rodape-grupo h2 { margin: 0 0 13px; color: var(--azul); font-size: 20px; line-height: 24px; }
.rodape-grupo + .rodape-grupo { margin-top: 28px; }
.rodape-grupo ul { list-style: none; margin: 0; padding: 0; }
.rodape-grupo a { display: flex; align-items: center; gap: 7px; padding: 4px 0; text-decoration: none; color: var(--azul); font-size: 12px; line-height: 15px; }
.footer-icon { width: 10px; flex: 0 0 10px; color: #0071ad; font-size: 12px; text-align: center; }
.rodape-grupo a:hover { text-decoration: underline; }
.rodape-copy {
  margin: 29px 0 0;
  padding: 0;
  border: 0;
  font-size: 11px;
  color: #202020;
  text-align: center;
}

/* ================= Responsivo / Mobile ================= */
@media (max-width: 720px) {
  .acessibilidade-bar {
    display: block;
    height: 25px;
    border: 0;
    background: #f1f1f1;
    font-size: 12px;
    line-height: 16px;
  }
  .acessibilidade-inner { height: 25px; padding: 3px 13px; }
  .acess-toggle { padding: 0; font-size: 12px; line-height: 16px; }

  /* Cabeçalho: menu à esquerda, logo centralizada, fundo cinza claro */
  .topo {
    position: static;
    background: #f1f1f1;
    border-top: 0;
    border-bottom: 1px solid #f4ca16;
  }
  .topo-inner {
    position: relative;
    justify-content: center;
    min-height: 35px;
    padding: 5px 14px 4px;
  }
  .menu-btn {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
  }
  .entrar { display: none; }
  .logo img { height: 22px; }

  .breadcrumb {
    display: block;
    background: #fff;
  }
  .breadcrumb-inner {
    height: 33px;
    padding: 7px 31px 6px;
    font-size: 12px;
    line-height: 16px;
  }
  .breadcrumb-back { color: #202124; }
  .breadcrumb-back span { color: #0071ad; font-size: 22px; vertical-align: -2px; }

  /* Conteúdo */
  main {
    width: calc(100% - clamp(48px, 14vw, 62px));
    max-width: none;
    margin: 0 auto;
    padding: 0;
  }
  .busca { padding: 2px 0 0; }
  .busca h1 {
    margin-bottom: 7px;
    color: #00416b;
    font-size: 19px;
    line-height: 24px;
  }

  #trackForm {
    min-height: 297px;
    padding: 7px 6px 12px;
    background: #e9ecef;
    border-radius: 5px;
  }
  .lead { margin-bottom: 5px; font-size: 12px; line-height: 12px; }
  .lead strong { font-weight: 400; }
  #codigo {
    height: 33px;
    padding: 5px 11px;
    border-color: #807569;
    border-radius: 5px;
    font-size: 12px;
  }
  .hint { margin: 1px 0 2px; font-size: 12px; line-height: 14px; }

  .results {
    margin: 16px 0 12px;
    padding: 5px 0 8px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }
  .result-head {
    display: block;
    margin: 0 0 14px;
    padding: 0;
    border: 0;
  }
  .result-code { font-size: 15px; }
  .result-status { display: none; }
  .timeline { padding-top: 2px; }
  .timeline::before { left: 16px; top: 17px; bottom: 34px; }
  .timeline li:first-child::after { left: 16px; top: -18px; height: 35px; }
  .timeline li:last-child::before { left: 16px; }
  .timeline li { gap: 9px; padding-bottom: 18px; }
  .event-icon { width: 34px; height: 34px; flex-basis: 34px; }
  .event-content { line-height: 1.22; }
  .event-title, .event-description { font-size: 12px; }
  .event-place, .event-date, .event-route { font-size: 11px; }

  .captcha-row { flex-direction: column; gap: 3px; margin-top: 2px; }
  .captcha-left { width: 100%; gap: 5px; }
  #captchaCanvas { width: 80%; flex: 0 0 80%; border: 0; border-radius: 0; }
  .captcha-actions { gap: 1px; }
  .captcha-actions button { padding: 0; }
  .captcha-actions svg { width: 16px; height: 16px; }
  .captcha-right { width: 100%; min-width: 0; gap: 3px; padding-top: 0; }
  .captcha-right label { font-size: 12px; line-height: 15px; }
  #captcha {
    height: 33px;
    padding: 5px 11px;
    border-color: #807569;
    border-radius: 5px;
    font-size: 12px;
  }
  .submit-btn {
    margin-top: 4px;
    padding: 5px 11px;
    min-width: 76px;
    min-height: 31px;
    background: #0071ad;
    font-size: 14px;
    font-weight: 600;
  }

  .carousel { margin-top: 4px; margin-bottom: 75px; }
  .carousel-viewport { box-shadow: none; }
  .carousel-arrow { width: 42px; height: 48px; font-size: 32px; }

  .rodape { margin-top: 0; }
  .rodape-inner { padding: 18px 11px 22px; }
  .rodape-grupo h2 { font-size: 18px; line-height: 22px; }
}
