/* ===============================
   RESET
================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  color: #333;
  font-family: "Quantico", sans-serif;
}


/* ===============================
   HEADER
================================ */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(46, 125, 50, 0.92);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 50px;
  z-index: 1000;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

header h1 {
  font-family: "Alfa Slab One", serif;
  color: #ffeb3b;
  font-weight: 400;
  letter-spacing: 1px;
  text-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

nav a {
  color: #fff;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  font-family: "Fugaz One", sans-serif;
  transition: 0.2s;
}

nav a:hover,
nav a.ativo {
  background: rgba(255,255,255,0.12);
  color: #ffeb3b;
}

/* padrão que você pediu */
.menu-btn {
  display: none;
  font-size: 30px;
  cursor: pointer;
  color: #ffeb3b;
}


/* ===============================
   MAIN
================================ */
main {
  flex: 1;
  padding: 120px 18px 80px;
  max-width: 1200px;
  margin: auto;
}


/* ===============================
   SECTION BASE
================================ */
.section {
  background: #fff;
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.06);
}

.scan-section {
  max-width: 760px; /* ✅ mais largo no PC */
  margin: 0 auto;
}

.section h2 {
  font-family: "Alfa Slab One", serif;
  color: #2E7D32;
  text-align: center;
  font-weight: 400;
  letter-spacing: 0.6px;
}

.descricao-scan {
  text-align: center;
  margin-top: 8px;
  margin-bottom: 20px;
  color: #555;
}

.aviso-legal{
  width: 100%;
  max-width: 980px;
  margin: 14px auto 22px;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(46,125,50,0.10), rgba(46,125,50,0.04));
  border: 1px solid rgba(46,125,50,0.22);
  box-shadow: 0 10px 26px rgba(0,0,0,0.06);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.aviso-icone{
  min-width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: "Fugaz One", sans-serif;
  font-size: 18px;
  background: rgba(46,125,50,0.16);
  border: 1px solid rgba(46,125,50,0.25);
  color: #1b5e20;
}

.aviso-conteudo{
  flex: 1;
}

.aviso-titulo{
  font-family: "Fugaz One", sans-serif;
  letter-spacing: 0.5px;
  font-size: 0.95rem;
  color: #1b5e20;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.aviso-texto{
  margin: 0 0 8px;
  color: #2b2b2b;
  line-height: 1.55;
  font-size: 0.95rem;
}

.aviso-mini{
  margin-top: 6px;
  font-size: 0.85rem;
  color: #4a4a4a;
  opacity: 0.95;
}

@media (max-width: 768px){
  .aviso-legal{
    padding: 14px 14px;
    border-radius: 14px;
    gap: 12px;
  }
  .aviso-texto{
    font-size: 0.92rem;
  }
  .aviso-mini{
    font-size: 0.82rem;
  }
}


/* ===============================
   SCAN CONTAINER
================================ */
.scan-container {
  display: grid;
  gap: 16px;
  width: 100%;
}

.scan-preview {
  width: 100%;
  min-height: 320px;           /* ✅ maior no PC */
  background: linear-gradient(180deg, rgba(46,125,50,0.06), rgba(0,0,0,0.02));
  border-radius: 16px;
  border: 1px dashed rgba(46,125,50,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.scan-preview::after {

  position: absolute;
  bottom: 10px;
  left: 12px;
  right: 12px;
  text-align: center;
  font-size: 12px;
  color: rgba(0,0,0,0.55);
  background: rgba(255,255,255,0.70);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 999px;
  padding: 7px 10px;
  backdrop-filter: blur(8px);
}

.scan-preview img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: contain;         /* ✅ não corta */
  border-radius: 14px;
  padding: 14px;
}

/* ==============================
   TUTORIAL: BULA (SEÇÃO SEPARADA)
================================ */
.tutorial-bula{
  width: 100%;
  max-width: 1200px;
  margin: 28px auto 0;
  padding: 22px 16px 10px;
  background: #ffffff;
  border: 1px solid #eaeaea;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
}

.tutorial-topo{
  padding: 2px 6px 12px;
}

.tutorial-topo h3{
  font-family: "Fugaz One", sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
  color: #1b5e20;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.tutorial-subtitulo{
  margin: 0;
  color: #5a5a5a;
  line-height: 1.55;
  font-size: 0.98rem;
  max-width: 900px;
}

.tutorial-grid{
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}


.tutorial-card-grande{
  background: #fff;
  border: 1px solid #e9e9e9;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(0,0,0,0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tutorial-card-grande:hover{
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(0,0,0,0.10);
  border-color: rgba(46,125,50,0.35);
}


.tutorial-img-grande{
  width: 100%;
  height: 260px;
  background: linear-gradient(180deg, rgba(46,125,50,0.08), rgba(46,125,50,0.02));
  border-bottom: 1px solid #efefef;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tutorial-img-grande img{
  width: 100%;
  height: 100%;
  object-fit: contain;     
  display: block;
  border-radius: 12px;
  background: #fff;       
}

/* TEXTO */
.tutorial-info{
  padding: 14px 14px 16px;
}

.tutorial-passo{
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #1b5e20;
  background: rgba(46,125,50,0.12);
  border: 1px solid rgba(46,125,50,0.18);
  margin-bottom: 10px;
}

.tutorial-info h4{
  margin: 0 0 8px;
  font-size: 1.02rem;
  color: #222;
  font-weight: 900;
}

.tutorial-info p{
  margin: 0;
  color: #5a5a5a;
  font-size: 0.95rem;
  line-height: 1.55;
}

/* RESPONSIVO */
@media (max-width: 1050px){
  .tutorial-grid{
    grid-template-columns: repeat(2, 1fr);
  }
  .tutorial-img-grande{
    height: 280px;
  }
}

@media (max-width: 620px){
  .tutorial-bula{
    padding: 18px 12px 10px;
    border-radius: 16px;
  }
  .tutorial-grid{
    grid-template-columns: 1fr;
  }
  .tutorial-img-grande{
    height: 260px;
  }
}
  /* ==============================
   MODAL: AMPLIAR IMAGEM DO TUTORIAL
================================ */
.modal-tutorial{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
}

.modal-tutorial.ativo{
  display: flex;
}

.modal-tutorial img{
  width: min(1100px, 92vw);
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

.modal-fechar{
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease;
}

.modal-fechar:hover{
  background: rgba(255,255,255,0.22);
}
.tutorial-bula .tutorial-img-grande img{
  cursor: zoom-in;
}

.modal-tutorial{
  z-index: 999999;
}



/* ===============================
   AÇÕES (BOTÕES CÂMERA / GALERIA)
================================ */
.scan-acoes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.btn-scan {
  background: linear-gradient(90deg, #1B5E20, #2E7D32);
  color: #fff;
  padding: 13px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-family: "Fugaz One", sans-serif;
  text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
  box-shadow: 0 12px 22px rgba(46,125,50,0.22);
  user-select: none;
}

.btn-scan:hover {
  filter: brightness(1.03);
}

.btn-scan:active {
  transform: scale(0.99);
}

.btn-scan.outline {
  background: #fff;
  border: 2px solid #2E7D32;
  color: #2E7D32;
  box-shadow: 0 10px 20px rgba(0,0,0,0.06);
}


/* ===============================
   SELECT CULTURA
================================ */
.campo-cultura {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(46,125,50,0.04);
}

.campo-cultura label {
  display: block;
  font-size: 0.95em;
  color: #1B5E20;
  font-weight: 900;
  margin-bottom: 8px;
}

.campo-cultura select {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.18);
  background: #fff;
  font-family: "Quantico", sans-serif;
  outline: none;
}

.campo-cultura select:focus {
  border-color: rgba(46,125,50,0.7);
  box-shadow: 0 0 0 4px rgba(46,125,50,0.12);
}


/* ===============================
   BOTÃO ANALISAR
================================ */
.btn-analisar {
  display: none;
  width: 100%;
  border: none;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(90deg, #ffeb3b, #ffd54f);
  color: #1B5E20;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(255,235,59,0.25);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.btn-analisar:hover {
  filter: brightness(1.02);
}

.btn-analisar:active {
  transform: scale(0.99);
}


/* ===============================
   RESULTADO
================================ */
.resultado {
  display: none;
  width: 100%;
  margin-top: 8px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
  border-left: 6px solid #2E7D32;
  border-radius: 14px;
  box-shadow: 0 14px 28px rgba(0,0,0,0.06);
}

.resultado h3 {
  font-family: "Alfa Slab One", serif;
  color: #2E7D32;
  font-weight: 400;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.lista-resultados {
  list-style: none;
  padding: 0;
  margin: 15px 0 0;
  display: grid;
  gap: 12px;
}

/* se você ainda usar .item-resultado em algum lugar */
.item-resultado {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(46,125,50,0.08);
  border: 1px solid rgba(46,125,50,0.25);
  font-family: "Quantico", sans-serif;
}

.item-resultado span {
  font-weight: 700;
}


/* ===============================
   FOOTER
================================ */
footer {
  margin-top: 30px;
  background: #1B5E20;
  color: #fff;
  padding: 16px;
  text-align: center;
  font-family: "Fugaz One", sans-serif;
  font-weight: 400;
  border-top: 1px solid rgba(255,255,255,0.12);
}

footer a {
  color: #fff;
  text-decoration: none;
  
}


/* ===============================
   RESPONSIVO
================================ */
@media (max-width: 980px) {
  header {
    padding: 14px 20px;
  }

  .scan-section {
    max-width: 680px;
  }

  .scan-preview {
    min-height: 300px;
  }
}

@media (max-width: 768px) {
  header {
    padding: 14px 16px;
  }

  .menu-btn {
    display: block;
    z-index: 1100;
  }

  nav {
    position: fixed;
    top: 66px;
    left: 0;
    width: 100%;
    height: calc(100vh - 66px);
    background: rgba(46, 125, 50, 0.97);
    flex-direction: column;
    align-items: center;
    padding-top: 26px;
    gap: 12px;
    transform: translateY(-120%);
    transition: transform 0.3s ease-in-out;
  }

  nav.ativo {
    transform: translateY(0);
  }

  nav a {
    width: calc(100% - 26px);
    max-width: 520px;
    text-align: center;
    font-size: 18px;
    padding: 14px 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
  }

  main {
    padding: 108px 14px 70px;
  }

  .section {
    padding: 18px;
  }

  .scan-preview {
    min-height: 260px;
  }

  .scan-preview img {
    max-height: 360px;
    padding: 10px;
  }

  .scan-acoes {
    grid-template-columns: 1fr;
  }
}

/* Melhor para telas bem baixas quando abre a câmera */
@media (max-height: 720px) and (max-width: 768px) {
  .scan-preview {
    min-height: 220px;
  }
}
