/* ANAV — CSS moderno, layout fiel ao original */

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

:root {
  --blue: #014991;
  --panel-w: 45rem;
}

html {
  height: 100%;
  font-size: 14pt;
}

body {
  height: 100%;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-weight: 300;
  color: #333;
  background: url('../css/images/bg.jpg') center/cover no-repeat fixed;
  overflow-y: scroll;
}

/* Background overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('../css/images/overlay.png');
  z-index: 0;
  pointer-events: none;
}

/* ---- Nav ---- */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.2rem 0;
  z-index: 100;
}

#nav a {
  position: relative;
  color: #fff;
  text-decoration: none;
  opacity: 0.4;
  transition: opacity .2s;
  line-height: 1;
}

#nav a svg {
  width: 1.8rem;
  height: 1.8rem;
  display: block;
}

#nav a:hover { opacity: 1; }
#nav a.active { opacity: 1; }

/* Tooltip */
#nav a::before {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  font-size: 0.65rem;
  padding: 4px 10px;
  border-radius: 3px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
#nav a:hover::before { opacity: 1; }

/* Active indicator arrow — aponta para baixo em direção ao painel */
#nav a.active::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #fff;
}

/* ---- Main wrapper ---- */
#main {
  position: relative;
  width: min(var(--panel-w), 100%);
  margin: 5.5rem auto 0;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.25);
  min-height: 20rem;
  overflow: hidden;
}

/* ---- Panels ---- */
.panel {
  display: none;
  padding: 3rem 2.5rem;
  animation: fadeIn .3s ease;
}

.panel.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(1rem); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ---- Home panel ---- */
#home {
  padding: 0;
  position: relative;
  height: 20rem;
}

#home header {
  position: absolute;
  top: 50%;
  left: 2.5rem;
  transform: translateY(-50%);
}

#home header img {
  width: 375px;
  height: auto;
}

#home .pic {
  position: absolute;
  top: 0; right: 0;
  height: 100%;
  display: block;
  text-decoration: none;
  overflow: hidden;
}

#home .pic img {
  height: 100%;
  width: auto;
  object-fit: cover;
  display: block;
  transition: filter .3s;
}

#home .pic:hover img { filter: brightness(.85); }

#home .arrow {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  background: rgba(0,0,0,.7);
  color: #fff;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  line-height: 1;
  transition: width .15s, background .15s;
  z-index: 1;
}

#home .pic:hover .arrow {
  width: 3rem;
  background: rgba(0,0,0,.85);
}

/* ---- Contact panel ---- */
#contato header { margin-bottom: 1.5rem; }
#contato h2 {
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--blue);
  letter-spacing: -.015em;
}

.row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.col { flex: 1; }
.col.full { flex: 0 0 100%; }

input, textarea {
  width: 100%;
  background: #f0f0f0;
  border: none;
  padding: .65rem .75rem;
  font-family: inherit;
  font-size: .9rem;
  color: #333;
  border-radius: 2px;
  transition: background .2s;
}
input:focus, textarea:focus {
  outline: none;
  background: #e8e8e8;
}
input::placeholder, textarea::placeholder { color: #999; }
textarea { height: 8rem; resize: vertical; }

/* Honeypot — fora da tela, invisível para humanos */
.hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.aviso {
  padding: .75rem 1rem;
  border-radius: 3px;
  margin-bottom: 1rem;
  font-size: .85rem;
}
.aviso.ok    { background: #e6f4ea; color: #2d6a3f; }
.aviso.erro  { background: #fdecea; color: #a93226; }

button[type="submit"] {
  width: 100%;
  background: #222;
  color: #fff;
  border: none;
  padding: .7rem 1.5rem;
  font-family: inherit;
  font-size: .9rem;
  cursor: pointer;
  border-radius: 2px;
  transition: background .2s;
}
button[type="submit"]:hover { background: #333; }

/* ---- Footer ---- */
#footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.5rem 0 2rem;
  color: rgba(255,255,255,.45);
  font-size: .75rem;
}

#footer ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .25rem 1rem;
  list-style: none;
}

#footer li + li::before {
  content: '•';
  margin-right: 1rem;
  opacity: .5;
}

#footer a {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  transition: color .2s;
}
#footer a:hover { color: #fff; }

/* ---- Mobile ---- */
@media (max-width: 700px) {
  html { font-size: 12pt; }

  #nav { padding: .9rem 0; gap: 2rem; }
  #nav a svg { width: 1.6rem; height: 1.6rem; }

  #main { margin-top: 4.5rem; min-height: 0; }

  /* Home: logo em cima, foto embaixo */
  #home {
    height: auto;
    display: flex;
    flex-direction: column;
  }

  #home header {
    position: static;
    transform: none;
    display: flex;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: #fff;
  }

  #home header img { width: 220px; }

  #home .pic {
    position: static;
    height: 140px;
    width: 100%;
  }

  #home .pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
  }

  #home .arrow { display: none; }

  /* Formulário */
  .panel { padding: 1.5rem 1rem; }
  .row { flex-direction: column; gap: .6rem; }
}
