/* ========================================
   RESET CSS BÁSICO
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #f0f9f7 0%, #e8f7f5 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========================================
   VARIÁVEIS DE COR (ECO-FRIENDLY PALETTE)
   ======================================== */
:root {
  --color-forest-green: #1b5e3f;
  --color-light-green: #2d8659;
  --color-sky-blue: #4da6c7;
  --color-light-blue: #6db8d5;
  --color-white: #ffffff;
  --color-gray-light: #f5f5f5;
  --color-gray-dark: #4a4a4a;
  --color-border: #d0e8e4;
  --color-success: #27ae60;
  --color-shadow: rgba(27, 94, 63, 0.1);
  
  --transition-smooth: all 0.3s ease;
  --border-radius-medium: 12px;
  --border-radius-large: 16px;
}

/* ========================================
   HEADER
   ======================================== */
header {
  background: 
    linear-gradient(135deg, rgba(27, 94, 63, .85) 0%, rgba(45, 134, 89, .85) 100%),
        url('../img/banner.png') center/cover no-repeat;
  padding: 2rem 0;
  box-shadow: 0 4px 12px var(--color-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 200px;
  display: flex;
  align-items: center;
}

header nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.header-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: 1px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* ========================================
   MAIN CONTENT
   ======================================== */
main {
  flex: 1;
  padding: 3rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.container {
  background: var(--color-white);
  border-radius: var(--border-radius-large);
  box-shadow: 0 8px 32px var(--color-shadow);
  padding: 2.5rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--color-border);
}

.hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-forest-green);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--color-gray-dark);
  font-weight: 400;
  max-width: 500px;
  margin: 0 auto;
}

/* ========================================
   CALCULATOR SECTION
   ======================================== */
.calculator-section {
  margin-bottom: 2.5rem;
}

.section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-light-green);
  margin-bottom: 2rem;
  text-align: center;
}

/* ========================================
   FORM STYLES
   ======================================== */
.form-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.form-group label {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-forest-green);
}

.form-group select,
.form-group input {
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--border-radius-medium);
  font-family: 'Roboto', sans-serif;
  background-color: var(--color-white);
  color: var(--color-gray-dark);
  transition: var(--transition-smooth);
  cursor: pointer;
}

.form-group input {
  cursor: text;
}

.form-group select:focus,
.form-group input:focus {
  outline: none;
  border-color: var(--color-light-green);
  box-shadow: 0 0 0 3px rgba(45, 134, 89, 0.1);
  background-color: var(--color-white);
}

.form-group select:hover,
.form-group input:hover {
  border-color: var(--color-sky-blue);
}

.form-group input[type="number"] {
  font-size: 1.1rem;
}

.form-group input[type="number"]::-webkit-outer-spin-button,
.form-group input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.form-group input[type="number"] {
  -moz-appearance: textfield;
}

/* ========================================
   BUTTON STYLES
   ======================================== */
.btn-calculate {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  color: var(--color-white);
  background: linear-gradient(135deg, var(--color-light-green) 0%, var(--color-forest-green) 100%);
  border: none;
  border-radius: var(--border-radius-medium);
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(45, 134, 89, 0.25);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 1rem;
}

.btn-calculate:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 134, 89, 0.35);
}

.btn-calculate:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(45, 134, 89, 0.25);
}

.btn-calculate:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ========================================
   RESULT CONTAINER
   ======================================== */
.result-container {
  margin-top: 2.5rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(45, 134, 89, 0.05) 0%, rgba(77, 166, 199, 0.05) 100%);
  border-left: 5px solid var(--color-light-green);
  border-radius: var(--border-radius-medium);
  animation: slideInUp 0.5s ease-out;
}

.result-container.hidden {
  display: none;
}

.result-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-forest-green);
  margin-bottom: 1.5rem;
  text-align: center;
}

.results-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.result-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.result-label {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: var(--color-gray-dark);
  font-size: 0.95rem;
}

.result-value {
  font-size: 1.1rem;
  color: var(--color-light-green);
  font-weight: 500;
}

.co2-highlight {
  font-family: 'Poppins', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-forest-green);
  text-align: center;
  margin: 1rem 0;
  padding: 1.5rem;
  background: var(--color-white);
  border-radius: var(--border-radius-medium);
  box-shadow: 0 4px 12px var(--color-shadow);
}

.co2-unit {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-light-green);
  margin-left: 0.5rem;
}

.result-message {
  padding: 1.2rem;
  background: var(--color-white);
  border-radius: var(--border-radius-medium);
  border-left: 4px solid var(--color-sky-blue);
  font-size: 0.95rem;
  color: var(--color-gray-dark);
  line-height: 1.6;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
  background: var(--color-forest-green);
  color: var(--color-white);
  padding: 2rem 1rem;
  text-align: center;
  margin-top: auto;
  box-shadow: 0 -4px 12px var(--color-shadow);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

footer p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

.footer-info {
  opacity: 0.85;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   RESPONSIVE DESIGN - TABLET
   ======================================== */
@media (max-width: 768px) {
  .container {
    padding: 2rem 1.5rem;
  }

  main {
    padding: 2rem 1rem;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .section-title {
    font-size: 1.2rem;
  }

  .co2-highlight {
    font-size: 2rem;
  }

  .form-group select,
  .form-group input {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE
   ======================================== */
@media (max-width: 480px) {
  header {
    padding: 1rem 0;
  }

  .logo {
    font-size: 1.4rem;
  }

  main {
    padding: 1.5rem 0.75rem;
  }

  .container {
    padding: 1.5rem 1rem;
    border-radius: 12px;
  }

  .hero-title {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
  }

  .form-container {
    gap: 1.2rem;
  }

  .form-group label {
    font-size: 0.9rem;
  }

  .form-group select,
  .form-group input {
    padding: 0.75rem 0.875rem;
    font-size: 16px;
  }

  .btn-calculate {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    letter-spacing: 0.5px;
  }

  .result-container {
    padding: 1.5rem 1rem;
    margin-top: 2rem;
  }

  .co2-highlight {
    font-size: 1.8rem;
    padding: 1rem;
    margin: 0.75rem 0;
  }

  footer {
    padding: 1.5rem 1rem;
  }

  footer p {
    font-size: 0.9rem;
    margin: 0.4rem 0;
  }
}

/* ========================================
   ACESSIBILIDADE
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-gray-dark: #e0e0e0;
    --color-gray-light: #2a2a2a;
  }

  body {
    background: linear-gradient(135deg, #1a2825 0%, #0d1b18 100%);
    color: #e0e0e0;
  }

  .container {
    background: #1e1e1e;
  }

  .form-group select,
  .form-group input {
    background-color: #2a2a2a;
    color: #e0e0e0;
    border-color: #404040;
  }

  .form-group select:focus,
  .form-group input:focus {
    border-color: var(--color-light-green);
    box-shadow: 0 0 0 3px rgba(45, 134, 89, 0.2);
  }

  .result-container {
    background: linear-gradient(135deg, rgba(45, 134, 89, 0.15) 0%, rgba(77, 166, 199, 0.15) 100%);
  }

  .result-message,
  .co2-highlight {
    background: #2a2a2a;
  }
}
