body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f9f9f9;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.main-header {
  background: #f9f9f9;
  padding: 40px 20px 20px;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.main-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #3d3d3d;
  margin: 0;
}

.header-underline {
  width: 0;
  height: 3px;
  background-color: #4A154B;
  border-radius: 2px;
  margin: 10px auto 0;
  animation: grow-line 1s ease forwards;
}

@keyframes grow-line {
  to {
    width: 150px;
  }
}

.header-subtitle {
  margin-top: 15px;
  font-size: 16px;
  font-weight: 500;
  color: #666;
}

.simulador-container {
  background: #fff;
  padding: 40px;
  margin: 40px auto;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  max-width: 800px;
  width: 90%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: min-height 0.3s ease;
  min-height: auto;
}

.simulador-container.expandido {
  min-height: 600px;
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
  font-size: 14px;
  color: #444;
}

input[type="text"],
input[type="number"],
input[type="date"] {
  margin-top: 6px;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  background: #fafafa;
  width: 100%;
  box-sizing: border-box;
}

.button-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

button {
  background-color: #4A154B;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
  background-color: #721174;
  transform: scale(1.03);
}

.resultado {
  background-color: #f3f3f3;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  font-size: 16px;
  margin-top: 30px;
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.resultado p {
  margin: 10px 0;
}

.resultado span {
  font-weight: bold;
  color: #2a9d8f;
}

.resultado-destacado {
    font-size: 18px;
    font-weight: 600;
    background-color: #f1ecf4;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
  }

canvas {
  width: 100%;
  height: auto !important;
  margin-top: 30px;
}

section {
  display: none;
  margin-bottom: 20px;
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  animation: slideIn 0.5s ease forwards;
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section:first-child {
  display: block;
}

#resultado {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  animation: slideIn 0.5s ease forwards;
}

/* ======== Navbar ======== */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.navbar-logo img {
    height: 50px;
    width: auto;
    display: block;
}

.navbar-menu {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    align-items: center;
}

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

.navbar-menu li a:hover {
    color: #4CAF50;
}

.navbar-button {
    background-color: #4A154B;
    color: white !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.navbar-button:hover {
    background-color: #710873;
}

header {
    background: #f9f9f9;
    padding: 30px 20px 20px 20px;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#page-title {
    font-size: 28px;
    font-weight: 700;
    color: #3d3d3d;
    margin: 0;
    display: block;
    margin-bottom: 10px;
}

.header-subtitle {
    margin-top: 15px;
}

.header-underline {
    width: 0;
    height: 3px;
    background-color: #4A154B;
    border-radius: 2px;
    margin: auto;
    animation: grow-line 1s ease forwards;
}

@keyframes grow-line {
    to {
        width: 500px;
    }
}
/* ======== Footer ======== */
.main-footer {
    background: #f9f9f9;
    text-align: center;
    padding: 20px;
    font-size: 14px;
    color: #777;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.03);
    height: auto;
    max-height: 100px;
    position: relative;
    bottom: 0;
    width: 100%;
}

.main-footer p {
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.3px;
    line-height: 1.4;
}
.simulador-container.contraido {
    max-height: 500px;
    overflow: hidden;
  }
.simulador-container {
    background: #fff;
    padding: 40px;
    margin: 40px auto;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    max-width: 800px;
    width: 90%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: all 0.4s ease;
  }