:root {
    /* Colors */
    --color-primary: #227470;
    --color-secondary: #23354B;
    --color-background: #FAF5ED;
    --color-white: #FFFFFF;
    --color-hero: #E1ECE7;
    --color-text: #333333;
    --color-hover: #36a39e;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 3rem;
    --space-xl: 4rem;
    
    /* Layout */
    --container-width: 1300px;
    --card-width: 335px;
    --card-height: 400px;
    --border-radius: 5px;
  }
  
  /* Base Reset */
  *, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  /* Typography */

  body {
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: "Roboto", sans-serif;
    line-height: 1.6;
  }
  
  h1 { display: none; }
  
  h2, h3, h4 { 
    font-family: "Roboto", sans-serif;
    font-style: normal;
    font-weight: 700;
    margin: var(--space-xs) 0;
    color: var(--color-secondary);
  }

  h2 {
    font-size: 1.7rem;
  }

  h3 {
    font-size: 1.4rem;
  }

  h4 {
    font-size: 1.1rem;
  }
  
  a {
    color: var(--color-primary);
    text-decoration: none;
  }
  
  /* Layout */
  .container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-sm);
  }

  section a:hover {
    text-decoration: underline;
  }
  
  /* Header */
  header {
    display: flex;
    justify-content: space-between;
    margin: var(--space-sm) auto var(--space-sm);
    max-width: var(--container-width);
    padding: 0 var(--space-sm);
  }
  
  .logo {
    font-family: "Goldman", sans-serif;
    font-weight: 700;
    font-style: normal;
    width: 200px;
  }
  
  .topmen {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    position: relative;
  }
  
  /* Navigation */
  
  .hamburger {
    display: none;
    cursor: pointer;
    padding: var(--space-sm);
    background: none;
    border: none;
  }
  
  .line {
    width: 25px;
    height: 3px;
    background-color: var(--color-secondary);
    margin: 5px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  nav {
    margin-top: var(--space-xs);
  }
  
  nav ul {
    display: flex;
    list-style: none;
  }
  
  nav a {
    color: var(--color-secondary);
    font-weight: bold;
    padding: var(--space-xs) var(--space-sm);
  }

  nav a:hover {
    background-color: var(--color-secondary);
    border-radius: var(--border-radius);
    color: var(--color-white);
  }
  
  .soc {
    display: flex;
    margin-top: var(--space-sm);
  }
  
  .socicon {
    width: 1.4em;
    height: 1.4em;
    margin: 0 var(--space-xs);
  }

  /* Sticky Header Styles */
header.sticky {
  padding: 0.5rem;
  background-color: var(--color-hero);
  border-bottom: var(--color-white) 1px solid;
  position: sticky;
  top: 0;
  z-index: 100;
}

header.sticky h1 {
  display: none; /* Hide the h1 in sticky state */
}

header.sticky .logo {
  /* Style for the smaller logo */
  padding: 0;
  margin: 0.5rem 0 0 1rem;
  width: 90px;
}

header.sticky .soc {
  display: none; /* Hide social icons */
}

/* Show hamburger menu in sticky state, just in case */
header.sticky .hamburger {
  margin: 0.3rem 1rem 0 0;
  padding: 0;
}
  
  /* Hero Section */
  .hero {
    display: flex;
    margin-bottom: var(--space-xl);
  }

  .hero-wrapper {
    display: flex;
    flex: 1; /* Take up available space */
}
  
  .ingress {
    background-color: var(--color-hero);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    display: flex;
    flex: 2;
    flex-direction: column;
    justify-content: center;
    min-width: 20rem;
    padding: var(--space-md) var(--space-lg);
  }
  
  .heroimg {
    flex: 3;
    min-width: 20rem;
    display: flex;
  }
  
  .heroimg img {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 30% 50%;
    transform: scaleX(-1);
  }

    
  .ingress h2 {
    margin-top: var(--space-md);
    line-height: 1.4;
  }

  .ingress p {
    line-height: 1.6;
  }
  
  .ingress button {
    align-self: center;
    margin: var(--space-md) 0;
    padding: var(--space-sm);
  }
  
  /* Buttons */
  button {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    padding: var(--space-sm);
  }

  button:hover {
    background-color: var(--color-hover);
  }
  
  /* Booking form */

  .booking {
    background-color: var(--color-white);
    border: #227470 1px solid;
    border-radius: var(--border-radius);
    margin-bottom: var(--space-md);
  }

  .booking h2 {
    margin: var(--space-sm) var(--space-md) 0;
  }

  #booking-form {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--card-width), 1fr));
    gap: 0 var(--space-md);
    margin-bottom: var(--space-sm);
    justify-items: center;
  }
  
  .book1, .book2, .book3 {
    box-sizing: border-box;
    width: var(--card-width);
    padding: var(--space-sm);
  }
  
  select, input, textarea {
    background-color: #FAF5ED;
    border: #227470 1px solid;
    box-sizing: border-box;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    width: 303px;
  }
  
  textarea {
    max-width: 303px;
  }

  #younger-yes, #younger-no {
    margin: 0.5rem;
    width: 1rem;
  }

  #gdpr {
    margin: 0 0.5rem;
    width: 1rem;
  }

  .gdprlabel, .smalltext {
    font-size: small;
    line-height: 1.5;
  }
  
  .submit-booking, #reset-dates {
    margin: auto;
    padding: 1rem;
  }

  #total-price {
    color: var(--color-secondary);
    font-weight: bold;
  }
    
  .calendar {
    border: 1px solid var(--color-primary);
    border-radius: var(--border-radius);
    box-sizing: border-box;
    padding: var(--space-xs);
    width: 100%;
    border-collapse: collapse;
  }

  .unavailableday {
    background-color: silver;
    color: black;
  }

  .partialday {
    background-color: paleturquoise;
    color: black;
  }
  
  .calendar th,
  .calendar td {
    border: 1px solid var(--color-primary);
    width: calc(100% / 7);  /* Equal width for 7 days */
    height: 2.2rem;
    text-align: center;
  }
  
  .calendar th {
    background-color: var(--color-hero);
    font-weight: bold;
  }
  
  .date-cell {
    cursor: pointer;
  }
  
  .date-cell:hover {
    background-color: var(--color-hero);
  }

  .date-cell:active {
    background-color: orange;
  }
  
  .date-cell.past-day {
    color: #ccc;
    pointer-events: none;
  }
  
  .date-cell.selected {
    background-color: var(--color-primary);
    color: var(--color-white);
  }
  
  #calendar-view {
    text-align: center;
    margin: 0 0 var(--space-xs) 0;
  }
  
  #prevMonthButton, #nextMonthButton {
    border: none;
    color: var(--color-white);
    cursor: pointer;
    margin: auto;
    padding: 0.4rem 0.6rem;
  }
  
  #selected-dates-list {
    margin-top: var(--space-sm);
  }
  
  #selected-dates-list ul {
    list-style-type: none;
  }
  
  #reset-dates {
    margin: var(--space-sm) 0;
  }
  
  #error-messages, #form-errors {
    color: red;
    font-weight: 600;
  }
  
  #success-messages {
    color: #227470;
    font-weight: 600;
  }
  
  /* Course Grid */

  .mainwhite {
    margin: 0;
    padding: 0;
    width: 100%;
  }
  
  .course-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-width), 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    justify-items: center;
  }
  
  article {
    background-color: var(--color-white);
    border-radius: var(--border-radius);
    box-shadow: 1px 1px 3px #ccc;
    display: flex;
    flex-direction: column;
    height: var(--card-height);
    width: var(--card-width);
  }

  article:hover {
    background-color: var(--color-hero);
  }

  article a {
    color: var(--color-primary);
  }

  article #phone-display, article #mail-display {
    padding-top: var(--space-sm);
    padding-left: var(--space-sm);
  }
  
  .thumbnail {
    border-radius: var(--border-radius);
    height: 100%;
    width: 100%;
    object-fit: cover;
    overflow: hidden;
  }
  
  article h4 {
    padding: var(--space-xs) var(--space-sm);
  }
  
  article p {
    padding: 0 var(--space-sm) var(--space-xs);
  }

  .bokningsknapp {
    display: flex;
    justify-content: right;
    margin: 0 var(--space-sm) var(--space-sm);
  }
  
  .arrow {
    display: flex;
    justify-content: flex-end;
    padding: 0 var(--space-sm) var(--space-sm);
  }
  
  .arrow img {
    height: 1rem;
    width: 3rem;
  }
  
  /* About */
  .about-sami {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
  }
  
  .omtext {
    background-color: var(--color-white);
    flex: 1;
    min-width: var(--card-width);
    padding: var(--space-md);
  }
  
  .aboutpic {
    border-radius: var(--border-radius);
    height: auto;
    max-width: 280px;
    object-fit: cover;
  }
  
  
  /* Footer */
  footer {
    background-color: var(--color-primary);
    color: var(--color-white);
    margin-top: var(--space-xl);
  }
  
  .footcontainer {
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
    max-width: var(--container-width);
    padding: var(--space-md) var(--space-sm);
  }
  
  .footerbox {
    width: 400px;
    padding: 0 var(--space-sm);
  }
  
  footer a, footer h2 {
    color: var(--color-white);
  }
  
  #phone-display img, #mail-display img {
    height: 0.75em;
    margin: 0 -0.2rem 0 0;
    padding: 0;
  }
  
  .aukt {
    height: auto;
    margin-top: 2rem;
    width: 10rem;
  }
  
  .mountdiv {
    text-align: right;
  }
  
  .mountains {
    position: relative;
    bottom: -8px;
    margin-right: 5%;
    margin-top: -3rem;
    width: 45%;
  }

  .courseatt, .kursmeny {
    border-radius: var(--border-radius);
    padding: var(--space-md);
    width: var(--card-width);
  }

  .kursmeny {
    background-color: var(--color-white) ;
    border: var(--color-primary) 1px solid;
    color: var(--color-primary);
  }

  .kursmeny ul {
    list-style-type: none;
  }

  .courseatt {
    background-color: var(--color-primary);
    color: var(--color-white);
  }

  .pic {
    height: auto;
    width: var(--card-width);
  }

  .pic300w {
    height: 200px;
    width: 300px;
  }

  .pic450h {
    height: 450px;
    width: 300px;
  }

  .pic450w {
    height: 300px;
    width: 450px;
  }

  .biggerpic {
    border-radius: var(--border-radius);
    height: auto;
    margin: 6rem 2rem 2rem 2rem;
    max-height: 500px;
    max-width: 350px;
    object-fit: cover;
  }
 
  .flexconrow {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
  }

  .flexfaq {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-lg);
  }

  .flextext {
    background-color: var(--color-white);
    flex: 1;
    min-width: var(--card-width);
    max-width: 800px;
  }

  .whitebg {
    box-sizing: border-box;
    background-color: var(--color-white);
    padding: var(--space-md);
  }

  .bokanucontainer {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .copyright {
    margin-bottom: var(--space-sm);
    text-align: center;
  }
  
  /* Media Queries */
  @media (max-width: 700px) {
  
    .hamburger {
      display: block;
      position: relative;
      z-index: 1000;
    }
  
    .line {
      display: block;
    }
  
    nav ul {
        display: none;
        position: absolute;
        top: 100%;          /* Position right below the hamburger */
        right: 0;          /* Align with right side */
        width: 180px;      /* Set specific width */
        background: white;
        flex-direction: column;
        padding: 20px;
        margin: 0;         /* Remove default margin */
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        z-index: 999;
        transition: all 0.3s ease;
    }
  
    nav ul.active {
        display: flex;
    }
  
    nav ul li {
        margin: 10px 0;
        text-align: right;  /* Align text to the right */
    }
  
    /* Hamburger animation */
    .hamburger.active .line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
  
    .hamburger.active .line:nth-child(2) {
        opacity: 0;
    }
  
    .hamburger.active .line:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
  
    .hamburger:focus {
        outline: 2px solid #227470;
        border-radius: 5px;
    }
  
    nav ul li a:focus {
        outline: 2px solid #227470;
        border-radius: 5px;
    }
  
    /* Hero */
  
    .hero {
      flex-direction: column;
    }

    .hero-wrapper {
      flex-direction: column; /* Stack items within wrapper */
    }
  
    .ingress {
      border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
  
     .heroimg img {
      border-radius: 0 0 var(--border-radius) var(--border-radius); /* Rounded corners on bottom */
      max-height: 200px;
    }
   
  
    /* Booking form */
  
    #booking-form {
      justify-content: center;
      text-align: center;
    }
  
    .book1, .book2, .book3 {
        margin: 0 2rem;
    }
  
    .course-preview {
        justify-content: center;
    }
  
    .footcontainer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
  
    .footerbox {
        margin: var(--space-sm) auto;
    }
  
    .about-sami, .flexconrow {
      flex-direction: column;
      align-items: center;
      text-align: left;
    }
  
    .aboutpic {
      margin: var(--space-sm) 0;
      max-width: 100%;
      width: 280px;
    }

    .pic450h {
      height: 300px;
      margin: auto;
      margin-bottom: var(--space-md);
      width: 200px;
    }
  
    .pic450w {
      height: 200px;
      margin: auto;
      margin-bottom: var(--space-md);
      width: 300px;
    }

    .biggerpic {
      margin-top: 0;
    }
  
    .mountains {
      width: 60%;
    }
  }
  
  @media screen and (min-width: 701px) {
    nav ul {
        display: flex !important;
    }
  
    .about-sami {
      flex-direction: row-reverse;
    }
  }

  @media screen and (min-width: 701px) and (max-width: 861px) {
    .biggerpic {
      margin-top: 0;
    }
  }

@media (max-width: 450px) {

  .logo {
    height: auto;
    width: 150px;
    margin-top: 1rem;
    }

  header {
    flex-direction: row; /* Stack items on mobile */
    align-items: flex-start; /* Align logo to the left */
  }

  header h1 {
      display: none; /* Hide the h1 on mobile */
  }

  .topmen {
      width: 100%;
      display: flex;
      justify-content: right;
  }

    header.sticky {
      flex-direction: row; /* Keep logo and hamburger in a row when sticky */
      height: 4rem;
  }

  .book1, .book2, .book3, .footerbox {
    box-sizing: border-box;
    max-width: 350px;
  } 

  .container {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .whitebg, .mainwhite {
    box-sizing: border-box;
    margin: 0;
    padding: 1rem;
    width: 100%;
  }

  .flexconrow {
    box-sizing: border-box;
    gap: var(--space-lg) 0;
  }

  .flextext {
    max-width: 350px;
  }

  .pic, .biggerpic {
    margin: auto;
    max-width: 350px;
  }

  .biggerpic {
    margin-bottom: 1rem;
    margin-top: -1rem;
  }

}
