/* Reset and base styles */
* {
  box-sizing: border-box;
}

body {
  font-size: 11pt;
  margin: 0;
  padding: 0;
  background-color: #1a1a1a;
  font-family: 'tahoma', arial, tahoma, sans-serif;
}

/* Container - responsive width */
#container {
  margin: 0 auto;
  padding: 15px 15px 0;
  max-width: 850px;
  width: 100%;
  position: relative;
  background-color: #333;
}

/* Header - responsive */
#header {
  margin: 15px auto;
  width: 100%;
  max-width: 800px;
  height: 300px;
  background: transparent url('Eikesdalsvatnet.png') top left no-repeat;
  background-size: cover;
  background-position: center;
  position: relative;
}

.headtitle {
  position: absolute;
  font-family: 'tahoma', arial, tahoma, sans-serif;
  font-size: 36pt;
  font-weight: bold;
  color: #FFF;
  bottom: 70px;
  left: 20px;
  right: 15px;
}

/* Dropdown Menu - always fixed to viewport */
#menu {
  position: fixed;
  top: 30px;
  z-index: 1000;
  /* right position will be calculated by JavaScript */
}

/* Menu toggle button */
.menu-toggle {
  background-color: #333;
  color: #FDFDFD;
  border: none;
  padding: 12px 15px;
  font-size: 12pt;
  font-family: 'tahoma', arial, tahoma, sans-serif;
  font-weight: bold;
  cursor: pointer;
  border-radius: 0px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-toggle:hover {
  background-color: #2e7578;
  transform: translateY(-1px);
}

.menu-toggle:active {
  transform: translateY(0);
}

/* Hamburger icon */
.menu-icon {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.menu-icon span {
  width: 20px;
  height: 2px;
  background-color: #FDFDFD;
  transition: all 0.3s ease;
  border-radius: 0px;
}

/* Dropdown menu container */
.menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #333;
  border-radius: 0px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  margin-top: 8px;
}

/* Show dropdown when active */
.menu-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#menu ul {
  margin: 0;
  padding: 10px 10px;
  list-style: none;
  display: flex;
  flex-direction: column;
}

#menu ul li {
  list-style: none;
  display: block;
}

#menu ul li a:link, 
#menu ul li a:active, 
#menu ul li a:visited {
  color: #FDFDFD;
  padding: 12px 15px;
  font-size: 11pt;
  font-family: 'tahoma', arial, tahoma, sans-serif;
  font-weight: bold;
  text-decoration: none;
  display: block;
  transition: all 0.3s ease;
  border-bottom: 1px solid #444;
}

#menu ul li:last-child a {
  border-bottom: none;
}

#menu ul li a:hover {
  background-color: #2e7578;
  color: #FDFDFD;
  padding-left: 20px;
}

/* Content - responsive layout */
#content {
  min-height: 390px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background-color: #FDFDFD;
}

#insidecontent {
  padding: 25px;
  padding-top: 0px;
  width: 100%;
}

  #insidecontent p {
    font-size: 11pt;    /* Increased from 1.3em */
    line-height: 150%;   /* Increased line spacing */
  }

#insidecontent p {
  margin: 0 0 1em 0;
  color: #767676;
  font-family: 'tahoma', arial, tahoma, sans-serif;
  font-size: 11pt;
  line-height: 150%;
}

.hanging {
  margin-left: 0px;
  padding-left: 36px;
  text-indent: -36px;
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Float images on larger screens */
@media (min-width: 768px) {
  img:not(.center):not(.centerImage) {
    float: right;
    margin-left: 5px;
    margin-bottom: 15px;
    max-width: 40%;
  }
}

.center {
  display: block;
  margin: 20px auto;
  width: 95%;
  max-width: 100%;
}

.centerImage {
  display: block;
  margin: 20px auto;
  max-height: 150px;
  max-width: 165px;
  width: auto;
  height: auto;
}

/* Links */
a {
  color: #143B7D;
}

a:visited { color: purple; }
a:focus { color: #143B7D; }
a:hover { color: #2e7578; }
a:active { color: #143B7D; }

/* Responsive typography */
h1 {
  margin: 0 0 1rem 0;
  font-weight: normal;
  color: #2e7578;
  font-size: 30pt;
  font-family: 'tahoma', arial, tahoma, sans-serif;
  line-height: 1.2;
}

h2 {
  margin: 0 0 0.8rem 0;
  font-weight: normal;
  color: #2e7578;
  font-size: 24pt;
  font-family: 'tahoma', arial, tahoma, sans-serif;
  line-height: 1.3;
}

h3 {
  margin: 0 0 0.6rem 0;
  font-size: 20pt;
  font-weight: normal;
  font-family: 'tahoma', arial, tahoma, sans-serif;
  color: #2e7578;
  line-height: 1.2;
}

h4 {
  margin: 0 0 0.6rem 0;
  font-size: 16pt;
  font-family: 'tahoma', arial, tahoma, sans-serif;
  font-weight: normal;
  color: #3E628A;
  line-height: 1.2;
}

h5 {
  margin: 0 0 0.6rem 0;
  font-size: 14pt;
  font-family: 'tahoma', arial, tahoma, sans-serif;
  font-weight: normal;
  color: #3E628A;
  line-height: 1.2;
}

/* Footer - responsive */
#footer {
  margin: 0 auto;
  width: 100%;
  max-width: 750px;
  min-height: 39px;
  padding: 0 15px;
}

#footer span {
  display: block;
  font-family: 'tahoma', arial, tahoma, sans-serif;
  font-size: 10pt;
  padding: 10px;
  color: #767676;
  text-align: center;
}

/* Mobile-first responsive breakpoints */

/* Small tablets and large phones */
@media (max-width: 768px) {
  #container {
    padding: 15px 10px 0;
  }
  
  #header {
    height: 200px;
  }
  
  .headtitle {
    font-size: 36pt;
    bottom: 15px;
    left: 10px;
    right: 10px;
  }
  
  #menu {
    top: 10px;
    right: 15px;
  }
  
  .menu-toggle {
    padding: 12px 15px;
    /* font-size: 1.4em; */
  }

  .menu-icon span {
    width: 20px;         /* Increased from 16px */
    height: 2px;         /* Increased thickness */
  }
  
  .menu-dropdown {
    min-width: 180px;
  }
  
  #menu ul li a:link, 
  #menu ul li a:active, 
  #menu ul li a:visited {
    /* font-size: 1.4em; */
    padding: 10px 12px;
  }
  
  #insidecontent {
    padding: 15px;
  }

    #insidecontent p {
    /*font-size: 1.4em; */   /* Increased from 1.3em */
    line-height: 150%;   /* Increased line spacing */
  }
  
  .centerImage {
    max-height: 120px;
    max-width: 130px;
  }
}

/* Mobile phones - INCREASED FONT SIZES */
@media (max-width: 480px) {
  #container {
    padding: 10px 5px 0;
  }
  
  #header {
    height: 150px;
  }
  
  .headtitle {
    /* font-size: clamp(1rem, 6vw, 1.8rem); */
    bottom: 10px;
    left: 8px;
    right: 8px;
  }
  
  #menu {
    top: 8px;
    right: 10px;
  }
  
  .menu-toggle {
    padding: 12px 15px;  /* Increased padding for bigger button */
    /*font-size: 1.4em;   */ /* Increased from 1em */
  }
  
  .menu-icon span {
    width: 20px;         /* Increased from 16px */
    height: 2px;         /* Increased thickness */
  }
  
  .menu-dropdown {
    min-width: 180px;    /* Increased from 160px */
  }
  
  #menu ul li a:link, 
  #menu ul li a:active, 
  #menu ul li a:visited {
    /*font-size: 1.4em; */   /* Increased from 1.1em */
    padding: 10px 12px;  /* Increased padding */
  }
  
  #insidecontent {
    padding: 10px;
  }
  
  #insidecontent p {
    /*font-size: 1.4em;*/    /* Increased from 1.3em */
    line-height: 150%;   /* Increased line spacing */
  }
  
  .hanging {
    padding-left: 20px;
    text-indent: -20px;
  }
  
  .centerImage {
    max-height: 100px;
    max-width: 110px;
  }
  
  #footer {
    padding: 0 10px;
  }
  
  #footer span {
    /*font-size: 1.4em;  */  /* Increased from 1.1em */
    padding: 8px;
  }
}

/* Very small screens */
@media (max-width: 320px) {
  #container {
    padding: 10px 5px 0;
  }
  
  #header {
    height: 100px;
  }
  
  .headtitle {
    /* font-size: clamp(1rem, 6vw, 1.8rem); */
    bottom: 10px;
    left: 8px;
    right: 8px;
  }
  
  #menu {
    top: 8px;
    right: 10px;
  }
  
  .menu-toggle {
    padding: 12px 15px;  /* Increased padding for bigger button */
    /*font-size: 1.4em;   */ /* Increased from 1em */
  }
  
  .menu-icon span {
    width: 20px;         /* Increased from 16px */
    height: 2px;         /* Increased thickness */
  }
  
  .menu-dropdown {
    min-width: 150px;    /* Increased from 160px */
  }
  
  #menu ul li a:link, 
  #menu ul li a:active, 
  #menu ul li a:visited {
    /*font-size: 1.4em; */   /* Increased from 1.1em */
    padding: 10px 12px;  /* Increased padding */
  }
  
  #insidecontent {
    padding: 10px;
  }
  
  #insidecontent p {
    /*font-size: 1.4em;*/    /* Increased from 1.3em */
    line-height: 150%;   /* Increased line spacing */
  }
  
  .hanging {
    padding-left: 20px;
    text-indent: -20px;
  }
  
  .centerImage {
    max-height: 100px;
    max-width: 110px;
  }
  
  #footer {
    padding: 0 10px;
  }
  
  #footer span {
    /*font-size: 1.4em;  */  /* Increased from 1.1em */
    padding: 8px;
  }
}