/* === 1. RESET === */

*,
*::before,
*::after {
  font-family: Arial, sans-serif !important;
}


* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: Arial, sans-serif;
  background-color: white;
  color: black;
}

/* === 2. NAVBAR === */
.navbar {
  background: #d9daed;
  padding: 12px 0;
  width: 100%;
  position: fixed;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1.5em;
}

/* VENSTRE SIDE */
.nav-left {
  display: flex;
  align-items: center;
  gap: 2.5em;
}

.nav-logo img {
  height: 75px;
  width: 75px;
  object-fit: cover;
  border-radius: 6px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2em;
}

.nav-links a {
  text-decoration: none;
  color: black;
  font-size: 18px;
}

/* DROPDOWN */
/* Sørg for at dropdown-menu er “inne” i li og vises korrekt */
.dropdown {
  position: relative; /* beholder referansen for absolute */
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%; /* plasserer rett under li */
  left: 0;
  background: white;
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
  min-width: 150px;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  display: block;
}

/* Lenkene inni dropdown */
.dropdown-menu a {
  display: block;
  padding: 10px 14px;
  color: black;
  text-decoration: none;
}

.dropdown-menu a:hover {
  background-color: #f0f0f0;
}


/* HØYRE SIDE */
.nav-right {
  display: flex;
  align-items: center;
  gap: 2em;
}

.nav-search input {
  padding: 6px 10px;
  border: 1px solid gray;
  border-radius: 5px;
}

.nav-search button {
  padding: 6px 12px;
  border: none;
  background: #002a80;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

/* BRUKER / LOGIN / LOGOUT */
.login-btn, .register-btn, .logout-btn {
  padding: 8px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 16px;
  transition: 0.2s;
}

.login-btn { background: #bcdfff; color: #002a80; }
.register-btn { background: #002a80; color: #bcdfff; }
.logout-btn { background: #ff4d4d; color: white; }

.login-btn:hover { opacity: 0.8; }
.register-btn:hover { opacity: 0.8; }
.logout-btn:hover { background: #cc0000; }

.user-info {
  display: flex;
  align-items: center;
  gap: 1em;
  white-space: nowrap;
}

/* === 4. FOOTER === */
.footer-bunn {
  width: 100%;
  background-color: darkblue;
  padding: 2em;
  color: white;
}

.footer-logo img {
  width: 50px;
  height: auto;
}

#grid-container {
  display: grid;
  grid-template-columns: repeat(5, auto);
  gap: 1em;
  padding-top: 2%;
}

.big-font {
  font-weight: bold;
  font-size: 20px;
  padding-bottom: 5%;
}

.small-font {
  font-size: 16px;
}

/* === FLASH MESSAGES === */
.flash-container {
  position: fixed;
  top: 120px;
  right: 20px;
  z-index: 2000;
}

.flash {
  background-color: #e0e0e0;
  padding: 1em;
  border-radius: 8px;
  margin-bottom: 10px;
  color: black;
}

.flash.success { background-color: #4CAF50; color: white; }
.flash.error { background-color: #f44336; color: white; }


/* dsiofhfosdihofiahdioas lgoing org srsegister knappone */

.login {
    background-color: lightblue;
    border: none;
    color: navy;
    padding: 12px 26px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    margin-right: 20px;
    margin-left: 25px;
    margin-bottom: 20px;
    margin-top: 2.5vh;
}

.registrer {
    background-color: navy;
    border: none;
    color: lightblue;
    padding: 12px 26px;
    text-align: center;
    text-decoration: none;  
    display: inline-block;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    margin-right: -10%;
    margin-bottom: 20px;
    margin-top: 2.5vh;
}


.form-container {
    background-color: #f9f9f9;
    max-width: 400px;
    margin: 150px auto;  /* sentrering og spacing */
    padding: 2em;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 1.5em;
}

.form-container label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: bold;
}

.form-container input {
    width: 100%;
    padding: 10px;
    margin-bottom: 1em;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.btn-primary {
    width: 100%;
    background-color: navy;
    color: white;
    border: none;
    padding: 12px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
}

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

.form-container p {
    text-align: center;
    margin-top: 1em;
}

/* === 0. FLEX LAYOUT FOR STICKY FOOTER === */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* hele skjermhøyden */
}

/* MAIN tar all tilgjengelig plass mellom navbar og footer */
main {
    flex: 1;
    padding-top: calc(75px + 12px*2); /* logo + navbar padding */
}

/* ============================= */
/* DASHBOARD LAYOUT */
/* ============================= */

.layout {
  display: flex;
  min-height: calc(100vh - 100px); /* navbar space */
}

/* SIDEBAR */

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  padding-top: 30px;
}

/* MAIN CONTENT AREA */

.layout > *:not(.sidebar) {
  flex: 1;
  padding: 50px 60px;
  background: #f6f8fb;
}
