html {
  scroll-behavior: smooth;
}

/* General Settings */
body {
  background-color: #f0f0f0;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

img {
  max-width: 100px;
}

/* Navbar */
.navbar {
  background-color: #333;
  display: flex;
  align-items: center;
  padding: 10px 20px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.logo {
  display: flex;
  align-items: center;
  margin-left: 20%;
  margin-right: 30px;
}

.logo img {
  max-width: 100px;
}

.navbar-right {
  display: flex;
  gap: 20px;
}

.navbar-right a {
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  padding: 5px 10px;
  transition: color 0.3s ease-in-out;
}

.navbar-right a:hover {
  color: #ffa600;
}

/* Dark Mode Styles */
.dark-mode {
  background-color: #222;
  color: white;
}

.dark-mode .navbar {
  background-color: #111;
}

.dark-mode .footer {
  background-color: #111;
}

.dark-mode .menu-item {
  background-color: #444;
  color: white;
}

.dark-mode .menu-item p {
  color: white;
}

/* Dark Mode Button */
#dark-mode-toggle {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  margin-left: 20px;
  color: white;
}

/* Fix for spacing under navbar */
main {
  padding-top: 100px;
}

/* Main Section */
.mainpage {
  background-image: url("img/bakgrund.jpg");
  background-size: cover;
  background-position: center;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(255, 255, 255);
  text-align: center;
}

.mainpage h1 {
  font-size: 3em;
  margin: 0;
}

h1, p {
  background-color: #00000091;
  color: white;
  padding: 10px 20px;
  border-radius: 10px;
}

/* Menu Page Header */
.menu-header {
  background-color: #ffa600;
  color: white;
  padding: 10px 20px;
  border-radius: 10px;
  margin: 40px auto;
  justify-content: center;
  display: flex;
  width: 300px;
  text-align: center;
}

/* Menu Section */
.menu {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding: 20px;
  max-width: 1600px;
  margin: auto;
  justify-items: center;
}

/* Menu Item Design */
.menu-item {
  background-color: #ffa600;
  padding: 20px;
  margin: 20px;
  width: 100%;
  max-width: 350px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  text-align: center;
}

.menu-item:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.menu-item img {
  width: 80%;
  max-width: 250px;
  max-height: 200px;
  border-radius: 10px;
  margin: 5px;
}

.menu-item h2 {
  color: white;
  font-size: 1.8em;
  margin-bottom: 10px;
}

.menu-item p {
  color: white;
  font-size: 1.2em;
  line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .menu {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .menu {
    grid-template-columns: 1fr;
  }

  .menu-item {
    width: 80%;
  }
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url("img/bakgrund.jpg");
  background-size: cover;
  background-position: center;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  padding: 20px;
}

.hero-content {
  max-width: 800px;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 12px;
  backdrop-filter: blur(5px);
}

.hero h1 {
  font-size: 3.5em;
  margin-bottom: 15px;
  font-weight: bold;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.hero p {
  font-size: 1.4em;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* CTA Button */
.cta {
  background-color: #ffa600;
  color: #ffffff;
  padding: 15px 35px;
  font-size: 1.2em;
  text-decoration: none;
  border-radius: 30px;
  transition: all 0.3s ease-in-out;
  display: inline-block;
  font-weight: bold;
}

.cta:hover {
  background-color: #e64a19;
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(255, 166, 0, 0.5);
}

/* Responsiv design */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5em;
  }

  .hero p {
    font-size: 1.2em;
  }

  .cta {
    padding: 12px 30px;
    font-size: 1em;
  }
}

/* About Section */
.about-container {
  max-width: 800px;
  margin: auto;
  padding: 40px 20px;
  text-align: center;
}

.about-container h2 {
  color: #ffa600;
}

.about-container ul {
  list-style: none;
  padding: 0;
}

.about-container ul li {
  font-size: 18px;
  margin: 10px 0;
}

/* Card Design */
.card {
  background-color: #ffa600;
  padding: 20px;
  margin: 20px;
  width: 100%;
  max-width: 350px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.card h2 {
  background-color: transparent;
  text-align: center;
}

.card img {
  width: 80%;
  max-width: 250px;
  max-height: 200px;
  border-radius: 10px;
  margin: 5px;
}

/* Favorites Section (Grid Layout) */
.favorites {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding: 20px;
  max-width: 1600px;
  margin: auto;
  justify-items: center;
}

/* Contact Form */
.contact-form-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 90vh;
  padding-top: 100px;
}

.contact-form {
  background-color: #ffa600;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  width: 50%;
  max-width: 450px;
  border-radius: 10px;
}

.contact-page {
  background-image: url("img/bakgrund.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

input:focus,
textarea:focus {
  border: 2px solid #472f01;
  outline: none;
  box-shadow: 0 0 8px #664406b3;
}

.contact-form h1 {
  font-size: 2.2em;
  margin-bottom: 20px;
}

.contact-form p {
  font-size: 1.1em;
  margin-bottom: 20px;
}

.contact-form .form-input label {
  font-size: 1.1em;
  margin-bottom: 5px;
  display: block;
}

.contact-form .form-input input,
.contact-form .form-input textarea {
  width: 100%;
  padding: 12px 15px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-bottom: 15px;
  box-sizing: border-box;
  font-family: inherit;
}

.contact-form .form-input input:focus,
.contact-form .form-input textarea:focus {
  border-color: #472f01;
  box-shadow: 0 0 8px rgba(102, 68, 6, 0.7);
}

.contact-form button[type="submit"] {
  padding: 12px 20px;
  font-size: 1.1em;
  background-color: #333;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact-form button[type="submit"]:hover {
  background-color: #222;
}

/* Form inputs */
.form-input {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

/* Make message box larger */
.contact-form textarea {
  height: 100px;
  resize: none;
}

/* Align send button to the right */
.send-btn {
  align-self: flex-end;
  padding: 10px 20px;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.send-btn:hover {
  background-color: #222;
}

/* Footer */
.footer {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 20px;
  font-size: 14px;
  border-top: 4px solid #ffa600;
  margin-top: 45px;
}

.footer a {
  color: #ffa600;
  text-decoration: none;
  font-weight: bold;
  margin: 0 5px;
  transition: color 0.3s ease-in-out;
}

.footer a:hover {
  color: #ffcc80;
}

.footer p {
  margin: 5px 0;
  line-height: 1.5;
  background-color: transparent;
}

/* Hamburger Menu */
.menu-toggle {
  display: none;
  font-size: 30px;
  color: white;
  cursor: pointer;
  padding: 10px;
}

/* Customize navbar for mobile */
@media (max-width: 768px) {
  .navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
  }

  .logo {
    margin-left: 0; /* Move the logo to the left */
  }

  .menu-toggle {
    display: block; /* Show the hamburger menu */
    margin-right: 50px;
    transition: transform 0.3s ease-in-out;
  }

  .menu-toggle.active {
    transform: rotate(90deg);
  }

  /* Mobile Navbar */
  /*
  .navbar-right {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 0;
    background-color: #333;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  }
  */

  /* Slide-in effect when menu opens */
  .navbar-right.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
  }

  /* Style for menu links */
  .navbar-right a {
    display: block;
    padding: 15px;
    color: white;
    text-decoration: none;
  }

  /* Animation for menu links */
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .navbar-right {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 110px; /* Lower the hamburger menu so it doesn't overlap the logo */
    right: 0;
    background-color: #333;
    width: 100%;
    text-align: center;
    padding: 15px;
  }

  .navbar-right a {
    display: block;
    padding: 15px;
    color: white;
    text-decoration: none;
  }

  .navbar-right.active {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .contact-form {
    width: 80%;
  }
}

/* Responsive Grid */
@media (max-width: 1024px) {
  .favorites {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .favorites {
    grid-template-columns: 1fr;
  }
}

@media only screen and (max-width: 360px) {
  body {
    font-size: 12px;
  }

  .navbar {
    padding: 5px 10px;
  }

  .logo {
    margin-left: 0; /* Tar bort extra margin som skjuter ut logotypen */
  }

  .navbar-right a {
    padding: 5px;
    font-size: 14px;
  }

  .mainpage {
    padding: 10px;
  }

  .hero h1 {
    font-size: 2em;
  }

  .hero p {
    font-size: 1em;
  }

  .menu-header {
    width: 90%;
    margin: 20px auto;
    padding: 8px;
    font-size: 1em;
  }

  .menu {
    gap: 10px;
    padding: 10px;
  }

  .menu-item {
    margin: 10px auto;
    padding: 10px;
    max-width: 90%;
  }

  .contact-form {
    width: 90%;
    padding: 10px;
  }

  .contact-page {
    /* Använd scroll istället för fixed på bakgrunden */
    background-attachment: scroll;
  }

  img {
    max-width: 100%;
    height: auto;
  }
}
