/* Reset some basic styling for the body */
html {
  display: flex;
  justify-content: center;
}

body {
  font-family: "Corbel", "Calibri", "Verdana", sans-serif;
  margin: 0;
  padding: 0;
  background-color: white;
  color: #333;
  display: flex; /* Make body use flexbox layout */
  max-width: 1920px; /* Set maximum width */
}

/* Adjust header to sit on the left side */
header {
  background: white;
  color: black;
  padding: 1rem 0;
  text-align: center;
  width: 15%; /* Set header width to 15% */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  margin: 5rem;
  top: calc(clamp(450px, 80%, 80%) * 0.3);
  position: relative;

  #languageSwitcher {
    display: flex;
    gap: 10px;
    cursor: pointer;
    align-items: center;
    padding-bottom: 2rem;
  }
  
  .lang-flag {
    width: 30px;
    height: 20px;
    cursor: pointer;
    transition: opacity 0.3s ease;
    display: block !important;
  }
  
  .lang-flag:hover {
    opacity: 0.7;
  }
}

/* Style the navigation bar */
nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column; /* Make the navigation links stack vertically */
  align-items: flex-start;
}

nav ul li {
  margin: 15px 0; /* Add margin between items */
}

nav ul li a {
  color: black;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: bold;
  
  &:hover {
    color: #cc3300;
  }
}

/* Main content will take the rest of the page (85%) */
main {
  width: 85%; /* The remaining 85% width */
  padding-top: 10rem;
  background: white;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  margin-right: 10rem;
}

/* Section and form styling */
section {
  margin-bottom: 5rem;
}

a {
  color: #cc3300;
  text-decoration: none;
}

p {
  line-height: 1.5rem;
}

.title {
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 2rem;

  h1,
  h2 {
    margin: 0;
  }

  h2 {
    padding-bottom: 1rem;
    border-bottom: 2px solid #cc3300;
  }

  h3 {
    text-align: left;
    font-weight: bold;
    text-transform: uppercase;
    padding-bottom: 1rem;
    border-bottom: 2px solid #cc3300;
  }
}

#hero {
  img {
    width: clamp(450px, 80%, 80%); /* Preferred: 50%, Min: 200px, Max: 600px */
    height: auto;
  }

  h1 {
    color: #cc3300;
    font-size: 3.1rem;
  }

  h2 {
    font-weight: normal;
  }

  ul {
    padding: 0;
    margin-top: 2rem;

    li {
      list-style-type: none;
      margin-bottom: 1rem;
      font-weight: bold;
      display: none;
    }

    li.active {
      display: block;
    }
  }
}

#services {
  .grid-container {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    grid-gap: 1rem;

    img {
      width: 100%;
      height: auto;
      transition: opacity 1s ease-in-out;
    }

    .fade-out {
      opacity: 0;
    }
  }
}

#about {
  img {
    width: 12rem;
    height: auto;
  }

  span {
    color: #cc3300;
    font-weight: bold;
  }
}


@media (max-width: 1169px) {  
  body {
    flex-direction: column; /* Stack header on top */
    align-items: center; /* Center the content */
  }

  header {
    width: 100%; /* Make the header full width */
    position: static; /* Remove relative positioning */
    margin: 0; /* Remove margin */
    padding: 1rem 0; /* Add some padding */
  }

  main {
    width: 80%;
    margin: 0; /* Remove side margins */
    padding: 0; /* Add some padding for spacing */
  }

  #hero {
    img {
      width: clamp(200px, 100%, 100%); /* Preferred: 50%, Min: 200px, Max: 600px */
      height: auto;
    }
  }

  #services {
    .grid-container {
      width: 100%;
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
  }
}


[data-lang] {
  display: none;
}

[data-lang="en"] {
  display: block;
}
