/* Global Styles */
body {
  font-family: 'Roboto', sans-serif;
  height: 100%; /* Sørger for at body alltid dekker hele vinduet */
  margin: 0;
  padding: 0;
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  overflow-y: scroll;
}

/* Header Styles */
header {
  background: linear-gradient(90deg, #556b2f, #8b4513);
  color: white;
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

header h1 {
  margin: 0;
  padding: 0.5rem 0;
}

header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

header nav ul li a {
  text-decoration: none;
  color: #f9f9f9;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: background 0.3s;
}

header nav ul li a:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Main Layout */
main {
  display: flex;
  flex-grow: 1;
  
}
section {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtil boks-skygge for fokus */
  padding: 2rem;
  margin: 0 auto; /* Sentraliserer seksjonen */
  line-height: 1.8; /* Gjør teksten mer behagelig å lese */
}
section.intro {

  max-width: 1000px; /* Begrens bredden for bedre lesbarhet */
}

section h2 {
  font-size: 1.5rem;
  color: #2e7d32; /* Bruk en aksentfarge */
  margin-bottom: 1rem;
  text-align: center; /* Sentraliser overskriften */
}

section p {
  margin-bottom: 1.5rem; /* Legg mellomrom mellom avsnittene */
  font-size: 1rem;
  color: #555; /* Dempet grå for teksten */
}

section p strong {
  color: #2e7d32; /* Fremhev navnene med aksentfargen */
}

section p:last-child {
  margin-bottom: 0; /* Ingen margin på siste avsnitt */
}
aside {
  width: 20%;
  background-color: #ffffff;
  padding: 1rem;
  border-right: 1px solid #ddd;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 130px;
  height: calc(100vh - 180px);
  overflow-x: hidden;
  overflow-y: auto;
  max-width: 250px; /* Begrens bredden */
}

aside h2 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

aside h3 {
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}

aside label {
  font-size: 0.8rem;
  display: block;
  margin-bottom: 0.5rem;
}

aside input[type="number"] {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-bottom: 0.5rem;
}

aside button {
  display: block;
  width: 55%;
  padding: 0.5rem;
  margin-bottom: 0.7rem;
  background-color: #6b4226;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

aside button:hover {
  background-color: #8b4513;
}

/* Recipe List */
#recipe-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-template-rows: repeat(auto-fill, minmax(150px, 150px));
  gap: 1rem;
  padding: 1rem;
  width: 60%;
  background-color: #f1f3f5;
}

.recipe-card {
  background-color: #972f2f1e;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  height: 150px;
  min-height: 150px;
  max-height: 150px;
}

.recipe-card:hover {
  transform: scale(1.05);
  background-color: #fabd4c73;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

.recipe-content {
  padding: 1rem;
}

.recipe-content h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  color: #333;
}

.recipe-content p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
}

/* Details Section */
#details-section {
  width: 20%;
  background: #ffffff;
  padding: 1rem;
  border-left: 1px solid #ddd;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 130px;
  height: calc(100vh - 180px);
  overflow-y: auto;
  max-width: 350px; /* Begrens bredden */
}

#details-section h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

/* Random Options */
#random-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#random-options label {
  display: inline-block;
  font-size: 0.9rem;
}

#random-count,
#random-simple {
  width: 50px;
  padding: 0.3rem;
  font-size: 0.9rem;
  text-align: center;
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  background: #6b4226;
  color: white;
  font-size: 0.9rem;
  margin-top: auto; /* Flytter footeren til bunnen når innholdet er lite */
}
