/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(135deg, #e6f2e6, #f4f9f4);
  color: #2e4d2e;
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden; /* Prevê rolagem lateral torta */
  position: relative;
  z-index: 1;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('https://www.transparenttextures.com/patterns/green-dust.png');
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

main {
  padding-top: 100px; /* Compensar o header fixo */
}

/* Navbar */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, #2d6a4f, #40916c);
  padding: 15px 5vw;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.logo {
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.menu {
  list-style: none;
  display: flex;
  z-index: 1001;
  flex-wrap: wrap;
}

.menu li {
  margin: 0 15px;
}

.menu a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.menu a:hover,
.menu a:focus {
  color: #b7e4c7;
  outline: none;
  text-shadow: 0 0 5px #b7e4c7;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

/* Hero Section */
.hero {
  background: url('https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTSPQDgb2aGeTHCPeTHh6oYatyRQFptdvRP2_2dt2naaY8jT9vFiqePEBQ&s=10') no-repeat center center/cover;
  height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #e1f0d9;
  text-shadow: 3px 3px 15px rgba(0,0,0,0.5);
  animation: fadeIn 1s ease-out;
  margin-top: 70px;
  padding: 0 30px;
  text-align: center;
}

.hero h1 {
  font-size: 40px;
  margin-bottom: 10px;
  animation: slideDown 1s ease-out;
  font-weight: 700;
}

.hero p {
  font-size: 20px;
  margin-bottom: 20px;
  animation: slideUp 1s ease-out;
  font-weight: 500;
}

/* Botões */
.btn {
  display: inline-block;
  background: #2d6a4f;
  color: #fff;
  padding: 14px 26px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  box-shadow: 0 4px 8px rgba(46, 77, 46, 0.3);
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover,
.btn:focus {
  background: #52b788;
  box-shadow: 0 6px 15px rgba(82, 183, 136, 0.5);
  transform: scale(1.1);
  outline: none;
  text-shadow: 0 0 8px #a5e3a1;
}

.btn.voltar {
  background: #6c757d;
  margin-top: 40px;
  display: block;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.btn.voltar:hover,
.btn.voltar:focus {
  background: #5a6268;
  box-shadow: 0 6px 15px rgba(90, 98, 104, 0.5);
  outline: none;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 120px 20px 60px;
}

.card {
  background: #fff;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  text-align: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  opacity: 0;
  transform: translateY(30px);
  animation: slideUp 1s ease-out forwards;
}

.card h3 {
  font-size: 24px;
  margin-bottom: 15px;
  color: #2d6a4f;
}

.card p {
  font-size: 17px;
  margin-bottom: 20px;
  color: #555;
}

.card:hover,
.card:focus-within {
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(-10px);
  outline: none;
}

/* Icon Row */
.icon-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 40px 10px;
}

.icon-card {
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  width: 140px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.icon-card img {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
}

.icon-card p {
  font-weight: 600;
  font-size: 16px;
  color: #2d6a4f;
}

.icon-card:hover,
.icon-card:focus {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  outline: none;
}

/* Página de Análise */
.analysis-article {
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.1);
  margin-bottom: 50px;
  position: relative;
}

.analysis-article h3 {
  color: #2d6a4f;
  margin-bottom: 20px;
  font-size: 24px;
  font-weight: 700;
}

.analysis-article p {
  margin-bottom: 20px;
  line-height: 1.75;
  font-weight: 400;
  color: #444;
}

.author-tag {
  position: absolute;
  top: -14px;
  right: 20px;
  background: linear-gradient(135deg, #40916c, #52b788);
  color: white;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 3px 12px rgba(82, 183, 136, 0.7);
}

.image-container {
  margin: 30px 0;
  text-align: center;
}

.analysis-image {
  width: 100%;
  max-width: 600px;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  margin-bottom: 15px;
}

.image-caption {
  font-size: 14px;
  color: #666;
  font-style: italic;
}

/* Graphs */
.graph-explain {
  background: #f1f8f5;
  padding: 24px;
  border-radius: 12px;
  margin: 30px 0;
  border-left: 6px solid #2d6a4f;
}

.graph-explain .author-tag {
  background: #52b788;
  top: -14px;
  right: 15px;
}

.graph-container {
  margin: 20px 0;
  max-height: 400px;
  overflow-x: auto;
  padding: 20px;
  box-sizing: border-box;
}

.graph-container canvas {
  width: 100% !important;
  height: auto !important;
  max-height: 400px;
}

/* Footer */
footer {
  background: linear-gradient(90deg, #2d6a4f, #1b4332);
  color: #fff;
  padding: 20px;
  margin-top: 40px;
  text-align: center;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
  font-weight: 600;
  font-size: 16px;
}

/* Animações */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* Acessibilidade */
:focus {
  outline: 2px solid #2d6a4f;
  outline-offset: 2px;
}

.btn:focus, 
.menu a:focus,
.card:focus-within,
.icon-card:focus {
  transform: scale(1.05);
  outline: none;
}

/* Responsividade */
@media (max-width: 768px) {
  nav {
    padding: 15px;
    flex-wrap: wrap;
  }

  .menu {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 70px;
    left: 0;
    background: #2d6a4f;
    padding: 20px;
  }

  .menu.active {
    display: flex;
  }

  .menu li {
    margin: 10px 0;
  }

  .menu-toggle {
    display: block;
  }

  .hero h1 {
    font-size: 32px;
    padding: 0 10px;
  }

  .hero p {
    font-size: 16px;
    padding: 0 10px;
  }

  .cards {
    padding: 80px 5% 40px;
  }

  .analysis-article {
    padding: 20px 15px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 28px;
  }

  .hero {
    height: 70vh;
  }

  .btn {
    padding: 10px 15px;
    font-size: 16px;
  }

  .author-tag {
    position: static;
    display: inline-block;
    margin-bottom: 15px;
  }

  .icon-card {
    width: 100%;
    max-width: 200px;
  }
}
