

:root {
  /* Bakgrunn */
  --color-bg: hsl(26, 69%, 86%);
  --color-bg-light: hsl(26, 69%, 92%);
  --color-bg-alt: hsl(28, 55%, 80%);
  --color-bg-dark: hsl(27, 17%, 25%);

  /* Tekst */
  --color-text: hsl(0, 0%, 24%);
  --color-text-secondary: hsl(31, 9%, 38%);
  --color-text-light: hsl(39, 42%, 93%);

  /* Primær (unik og elegant hovedfarge) */
  --color-primary: hsl(23, 21%, 45%);
  --color-primary-hover: hsl(24, 22%, 39%);

  /* Aksent */
  --color-accent: hsl(35, 26%, 53%);
  --color-accent-hover: hsl(35, 25%, 43%);
  --color-accent-light: hsl(36, 27%, 71%);

  /* Lenker og interaktive elementer */
  --color-link: hsl(205, 13%, 53%);
  --color-link-hover: hsl(207, 10%, 41%);

  /* Støttefarger */
  --color-sage: hsl(112, 10%, 69%);
  --color-sage-hover: hsl(120, 8%, 59%);
  --color-terra: #C49A88;
  --color-terra-hover: #B07F6A;

  /* Nøytrale */
  --color-neutral-light: hsl(37, 34%, 89%);
  --color-neutral-dark: hsl(30, 16%, 19%);
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
[id]:not([id="active-site"]):not([id="video1"]) {
  padding-top: 40px;
}



html {
  width: 100%;
  overflow-x: hidden;
}

h1, h2, h3, h4{
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5em;
  margin-top: 4vh;
}
section  h1, h2, h3, h4 {
  margin-left: 20px;
}
h5, h6 {
  margin-left: 35px;
  margin-top: 2vh;
  margin-bottom: 0.5em;
}

  

body, p, span, li, a {
  color: var(--color-text-secondary);
  font-family: 'Lora', serif;
  line-height: 1.7;
  margin-bottom: 3vh;
  font-size: 1.2rem;
}

* {
  margin: 0;
  padding: 0;
}

body {
  width: 100%;
  min-height: 100vh;
  
  background-color: var(--color-bg);

  display: grid;
  grid-template-columns: 1fr 5fr;
  grid-template-rows: fit-content 1fr auto;
  grid-template-areas: 
  "navbar navbar"
  "main main"
  "footer footer";
  
  margin-bottom: 0;
}
section {
  scroll-margin-top: 120px;
  margin-bottom: 64px;
  min-height: 73vh;
  align-items: center;
}

section:not(.intro-video) p, section:not(.intro-video) span{
  padding-left: 35px;
  overflow-wrap: break-word;
}
#piano-akademiet, #fellestimer, #elevregelment, #konserter {
  background-color: var(--color-bg-alt);
}

.hidden {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}
.show {
  opacity: 1;
}

.navbar {
  grid-area: navbar;
  background: linear-gradient(
    to bottom,
    rgba(244, 216, 195, 1),
    rgba(244, 216, 195, 1),
    rgba(244, 216, 195, 1),
    rgba(244, 216, 195, 1),
    rgba(244, 216, 195, 1),
    rgba(244, 216, 195, 1),
    rgba(244, 216, 195, 1),
    rgba(244, 216, 195, 1),
    rgba(244, 216, 195, 1),
    rgba(244, 216, 195, 1),
    rgba(244, 216, 195, 1),
    rgba(244, 216, 195, 1),
    rgba(244, 216, 195, 1),
    rgba(244, 216, 195, 0.9),
    rgba(244, 216, 195, 0.5),
    rgba(244, 216, 195, 0.1),
    rgba(244, 216, 195, 0)
  );
  align-items: center;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  margin-bottom: -50px;
}
.nav-links {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  padding-top: 0;
}
.nav-left,
.nav-right {
  height: fit-content;
  display: flex;
  align-items: center;
  list-style: none;
  align-content: center;
}
.nav-menu {
  list-style: none;
  display: flex;
  gap: 20px;
  padding: 0;
  margin: 0;
  align-items: center;
}
.nav-menu li {
  position: relative;
}
.logo_2 {
  display: none;
}
.logo {
  display: flex;
  justify-content: center;
  align-items: center;
  height: fit-content;
  padding: 10px;
  margin: 0;
}
.logo img{
  justify-self: center;
  width: 125px;
  height: auto;
  margin-bottom: 10px;
}

.dropdown-menu-left {
  position: absolute;
  top: 100%;
  left: 5%;
  background-color: var(--color-bg);
  border: 1px solid var(--color-bg-alt);
  padding: 10px 0;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.dropdown-menu-right {
  position: absolute;
  top: 100%;
  right: 15%;
  background-color: var(--color-bg);
  border: 1px solid var(--color-bg-alt);
  padding: 10px 0;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.dropdown:hover .dropdown-menu-left,
.dropdown:hover .dropdown-menu-right {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu-left li,
.dropdown-menu-right li {
  padding: 5px 12px;
}

.dropdown a {
  color: var(--color-accent);
  background: none;
  font-size: 1.1em;
  text-decoration: none;
  display: inline-block;
  transition: color 0.3s;
  margin: 2vh 3vw;
  border: none;
}

.dropdown-menu-left a,
.dropdown-menu-right a {
  background: none;
  border: none;
  font-size: 1em;
  color: var(--color-accent);
  cursor: pointer;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  transition: color 0.3s;
}

.dropdown-menu-left a:hover,
.dropdown-menu-right a:hover {
  color: var(--color-accent-hover);
  font-weight: bold;
}

#active-site,
#active-site:hover,
nav li a:hover {
  color: var(--color-accent-hover);
}
.hamburger {
  display: none;
  font-size: 2rem;
  cursor: pointer;
}
.Medier-button {
  color: #465876 !important;
}
.Medier-button:hover {
  color: #344b74;
}



main {
  grid-area: main;

  background-color: var(--color-bg);

}
main div {
  margin-bottom: 10px;
}
#velkommen {
  margin-top: 40px
}
#velkommen a {
 margin-left: 35px;
}
h1 {
  margin-bottom: 20px;
}

.intro-video {
  position: relative;
  display: grid;
  place-items: center;
  margin-bottom: 0px;
  height: fit-content;
  padding-top: -50px;
  overflow: hidden;
}
#video1 {
  width: 100vw;
  pointer-events: none;
}
.intro-video video {
  height: 87vh;
  display: block;
  object-fit: cover;
  z-index: 1;
  overflow: hidden;
}

.intro {
  position: absolute;
  bottom: clamp(-180px, -40vw, -800px);
  left: 0;
  top: 0;
  right: auto;
  width: 100%;
  height: 87vh;
  padding: 20px;
  padding-top: 5vh;
  margin: 0;
  height: 100%;
  color: #333;
  z-index: 3;
  background: linear-gradient(
    to right,
    rgba(244, 216, 195, 1),
    rgba(244, 216, 195, 0.8),
    rgba(244, 216, 195, 0.75),
    rgba(244, 216, 195, 0.7),
    rgba(244, 216, 195, 0.7),
    rgba(244, 216, 195, .70),
    rgba(244, 216, 195, 0.70),
    rgba(244, 216, 195, 0.60),
    rgba(244, 216, 195, 0.55),
    rgba(244, 216, 195, 0.5),
    rgba(244, 216, 195, 0.25),
    rgba(244, 216, 195, 0),
    rgba(244, 216, 195, 0),
    rgba(244, 216, 195, 0),
    rgba(244, 216, 195, 0),
    rgba(244, 216, 195, 0),
    rgba(244, 216, 195, 0),
    rgba(244, 216, 195, 0)
  );
  

  border-radius: 0 0 10px 10px;
  text-align: left;
}
.intro p {
  margin-bottom: 20px;
  width: 45vw !important;
}
.intro a {
  background-color: var(--color-terra);
  color: var(--color-text-light);
  border: none;
  padding: 10px 20px;
  font-size: 1.2rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 50px;
  width: 15vw;
  margin-top: 20px;
  margin-right: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.intro a:hover {
  background-color: var(--color-terra-hover);
}

main h1 {
  font-size: clamp(1.5rem, 4.5vw, 3.5rem);
  width: 45vw;
  margin: 0;
}

main p {
  margin: 0 50px;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.05);
}
.merk {
  background-color: var(--color-terra);
  color: var(--color-text-light);
  display: inline-block;
  padding: 0px 10px;
  border-radius: 5px;
  font-size: clamp(0.5rem, 2vw, 1rem);
}
.facebook-button {
  background-color: var(--color-link);
  color: var(--color-text-light);
  border: none;
  padding: 10px 20px;
  font-size: 1.2rem;
  border-radius: 5px;
  margin-left: 35px;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 20px;
  display: inline-block;
  text-decoration: none;
}
.facebook-button:hover {
  background-color: var(--color-link-hover);
}
#fellestimer span {
  font-weight: bold;
  font-size: 1.2rem;
  margin-right: 5px;
  color: var(--color-text-secondary);
  background-color: var(--color-bg-alt);
}
.fellestime-div {
  display: flex;
  justify-content: space-evenly;
  margin-bottom: 10px;
  flex-direction: row;
    align-items: normal;
    flex-wrap: wrap;
}
.elev-fellestime {
  display: block;
  max-width: 30vw;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);;
    margin: 5px;
}
#elevregelment p {
  margin-bottom:  15px;
}

main a {
  text-decoration: none;
}

h2 {
  display: block;
  width: fit-content;
  border-bottom-left-radius: 1px;
  border-bottom-right-radius: 5px;
  position: relative;
}
h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 150px;
  height: 5px;
  border-radius: 1px 2px 2px 1px;
  background-color: var(--color-terra);
}

.lærer-intro {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin: 0 auto;
  max-width: 90vw;
}
.lærer-intro img {
  max-width: 300px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.lærer-tekst {
  flex: 1;
}
.lærer-tekst h2 {
  margin-bottom: 1rem;
}
.vårsemesteret, .høstsemesteret, .semesterpris {
  display: flex;
  flex-direction: column;
  margin-left: 30px;
  margin-right: 5vw;
}
.høstsemesteret p, .vårsemesteret p, .semesterpris li p {
  display:  inline;
}
.høstsemesteret li, .vårsemesteret li, .semesterpris li {
  list-style: none;
}
.semester-left {
  display: inline;
  margin-left: 30px;
  margin-right: 5vw;
}
#kontakt p {
  margin-left: 35px;
}

footer {
  grid-area: footer;
  background-color: var(--color-bg-dark);
}
.ny-linje {
  display: none;
}



@media (max-width: 650px) {

  .ny-linje {
    display: block;
  }
  .navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 !important;
    background: var(--color-bg-alt);
    height: fit-content;
  }

  .hamburger {
    display: block;
    font-size: 2rem;
    cursor: pointer;
    order: 2;
    margin-left: auto;
    margin-right: 10px;
    padding-top: 0 !important;
  }
  .logo_2 {
    display: block;
    cursor: pointer;
    order: 2;
    margin-left: 10px;
    margin-top: 10px;
    padding-top: 0 !important;
  }
  .logo_2 img {
    width: 15vw !important;
  }

 
  .logo {
    display: none;
  }

  
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--color-bg);
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 0 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 200;
  }
  .nav-links.active {
    display: flex;
  }

 
  .nav-left,
  .nav-right {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }
  .nav-menu {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }


  .dropdown-menu-left,
  .dropdown-menu-right {
    display: none !important;
  }

  .dropdown > a {
    display: block;
    width: 100%;
    padding: 12px 24px;
    font-size: 1.1rem;
    margin: 0;
    border-bottom: 1px solid var(--color-bg-alt);
  }

 
  section {
    min-height: auto;
    padding: 16px;
    margin-bottom: 32px;
  }

  section:not(.intro-video) p,
  section:not(.intro-video) span {
    padding-left: 0;
  }
  section #intro {
    overflow: visible;
  }
  
  main p {
    margin: 0 0 1.5rem 0;
  }

  p {
    font-size: clamp(1rem, 2.5vw, 1.125rem);;
  }

  h2 {
    font-size: clamp(1.4rem, 6vw, 2rem);
  }
  h3 {
    font-size: clamp(1.1rem, 5vw, 1.5rem);
  }

  section h1, h2, h3, h4 {
    margin-left: 0;
  }
  h5, h6 {
    margin-left: 0;
    margin-top: 1rem;
  }
  a.les-mer,
  a.kontakt-oss {
   font-size: clamp(0.75rem, 2.5vw, 1.125rem);
  }

  /* Fix semester lists */
  .vårsemesteret,
  .høstsemesteret,
  .semesterpris {
    margin-left: 0;
    margin-right: 0;
  }
  .semester-left {
    margin-left: 0;
    margin-right: 12px;
    min-width: 70px;
    display: inline-block;
  }

  a.facebook-button {
    margin-left: 100px !important;
    display: block;
    width: fit-content;
  }
  #velkommen {
    margin-top: 0;
  }
  #velkommen a {
    margin-left: 0; 
  }
  #kontakt p {
    margin-left: 0;
  }

  .intro-video {
    place-items: initial;
    height: 60vh !important;
    padding: 0;
  }
  .intro-video video {
    width: 100vw;
    height: 60vh;
    object-fit: cover;
  }
  .intro {
    margin-top: 50px;
    padding: 0 16px 16px 16px 16px;
    background: linear-gradient(
      to right,
       rgba(244, 216, 195, 1),
       rgba(244, 216, 195, 0.5)
    );
    overflow: visible;
    height: 70vh;
  }
  .intro p,
  main h1 {
    width: 90% !important;
  }
  .intro a {
    width: auto;
    display: inline-block;
  }

  /* === TEACHER LAYOUT === */
  .lærer-intro {
    flex-direction: column;
    align-items: center;
  }
  .lærer-intro img {
    max-width: 80%;
  }

 
  .fellestime-div {
    flex-direction: row;
    align-items: normal;
    flex-wrap: wrap;
  }
  .elev-fellestime {
    display: block;
    max-width: 40vw;
    height: auto;
    border-radius: 12px;
    margin: 5px;
  }
}
@media (max-width: 411px) {
  .intro-video {
    height: 100vh;
  }
}