/* Lommeregner styling */
.calculator {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: inline-block;
  padding: 20px;
  margin: 30px auto;
}
.calc-display {
  width: 100%;
  font-size: 2rem;
  margin-bottom: 10px;
  padding: 10px;
  text-align: right;
  direction: ltr; /* force left-to-right so digits appear in natural order */
  border: 1px solid #ccc;
  border-radius: 5px;
  background: #f9f9f9;
}
.calc-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.calc-btn {
  font-size: 1.2rem;
  padding: 15px;
  border: none;
  border-radius: 5px;
  background: #e0e0e0;
  cursor: pointer;
  transition: background 0.2s;
}
.calc-btn:hover {
  background: #bdbdbd;
}
#calc-equals {
  background: #4caf50;
  color: #fff;
  grid-column: span 1;
}
#calc-equals:hover {
  background: #388e3c;
}
#calc-clear {
  background: #f44336;
  color: #fff;
}
#calc-clear:hover {
  background: #b71c1c;
}
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 2rem;
    background: #f0f0f0;
    text-align: center;
  }

/* MS-teknik logo i øverste højre hjørne */
.ms-logo {
  position: fixed;
  top: 12px;
  right: 12px;
  display: inline-block;
  z-index: 1000;
}
.ms-logo img {
  width: 144px;
  height: 144px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Responsive: reduce logo on very small screens */
@media (max-width: 420px) {
  .ms-logo img {
    width: 72px;
    height: 72px;
  }
}
  
  h1 {
    color: #333;
  }
  
  button {
    padding: 10px 20px;
    font-size: 16px;
    margin-top: 20px;
    cursor: pointer;
  }
  
  p {
    margin-top: 20px;
    font-weight: bold;
  }

.nav {
  margin-top: 1.25rem;
}

.back-btn {
  display: inline-block;
  padding: 10px 18px;
  background: #1976d2;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
}

.back-btn:hover {
  background: #1565c0;
}
