/* RESET SIMPLES */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
h1,
h2,
h3,
p,
ul {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  line-height: 1.5;
  color: #111827;
  background-color: #f3f4f6;
}

/* CONTAINERS E LAYOUT GLOBAL */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page {
  padding: 1.5rem 0 3rem;
}

/* HEADER */

.site-header {
  border-bottom: 1px solid #e5e7eb;
  background-color: #ffffff;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
  text-decoration: none;
  color: #111827;
}

.main-nav a {
  margin-left: 1.25rem;
  font-size: 0.9rem;
  text-decoration: none;
  color: #4b5563;
}

.main-nav a:hover {
  color: #111827;
}

/* HERO */

.hero {
  padding: 2.5rem 0 1.5rem;
}

.hero h1 {
  font-size: 2.1rem;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 1rem;
  color: #4b5563;
  max-width: 540px;
}

/* SECTIONS */

.section {
  margin-top: 1.5rem;
}

.section h2 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

.section-intro {
  font-size: 0.95rem;
  color: #4b5563;
  margin-bottom: 1rem;
}

/* CARDS LISTA DE CALCULADORAS */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}

.card {
  display: block;
  background-color: #ffffff;
  border-radius: 0.75rem;
  padding: 1rem 1.1rem;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.card h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
  color: #111827;
}

.card p {
  font-size: 0.9rem;
  color: #4b5563;
}

.card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  border-color: #d1d5db;
}

.card--disabled {
  cursor: default;
  opacity: 0.55;
}

/* PÁGINAS DE CALCULADORA */

.page {
  padding-top: 2rem;
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 2rem;
  align-items: flex-start;
}

.calculator h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.calculator .lead {
  font-size: 0.95rem;
  color: #4b5563;
  margin-bottom: 1.25rem;
}

/* FORMULÁRIO */

#calculator-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
}

.form-field label {
  margin-bottom: 0.15rem;
  color: #374151;
}

.form-field input,
.form-field select {
  border-radius: 0.375rem;
  border: 1px solid #d1d5db;
  padding: 0.45rem 0.55rem;
  font-size: 0.9rem;
  outline: none;
}

.form-field input:focus,
.form-field select:focus {
  border-color: #111827;
}

/* BOTÕES */

.btn-primary {
  grid-column: 1 / -1;
  margin-top: 0.25rem;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  background-color: #111827;
  color: #f9fafb;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #000000;
}

/* RESULTADO */

.result-block {
  margin-top: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  background-color: #111827;
  color: #f9fafb;
  font-size: 0.9rem;
}

.result-block p {
  margin-bottom: 0.35rem;
}

.result-block p:last-child {
  margin-bottom: 0;
}

/* SIDEBAR */

.sidebar {
  font-size: 0.9rem;
}

.sidebar section + section {
  margin-top: 1.25rem;
}

.sidebar h2 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.sidebar p {
  color: #4b5563;
}

/* RELATED */

.related {
  margin-top: 1.25rem;
}

.related h2 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.related ul {
  list-style: none;
}

.related li + li {
  margin-top: 0.15rem;
}

.related a {
  font-size: 0.9rem;
  color: #111827;
  text-decoration: none;
}

.related a:hover {
  text-decoration: underline;
}

/* FOOTER */

.site-footer {
  border-top: 1px solid #e5e7eb;
  padding: 1rem 0 1.5rem;
  font-size: 0.8rem;
  color: #6b7280;
  background-color: #ffffff;
}

/* RESPONSIVO */

@media (max-width: 900px) {
  .calculator-layout {
    grid-template-columns: 1fr;
  }

  #calculator-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  #calculator-form {
    grid-template-columns: 1fr;
  }
}
