/* =====================================================
   TYPOGRAFI
===================================================== */

/* Open Sans från Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300&display=swap");

/* Raleway font */
@font-face {
  font-family: "Raleway";
  src:
    url("fonts/raleway-semibold.woff2") format("woff2"),
    url("fonts/raleway-semibold.woff") format("woff");
  font-weight: 600; /* Semibold */
}

/* ================================
   GLOBAL RESET
================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Grundläggande textinställningar */
body {
  font-family: "Open Sans", sans-serif;
  font-weight: 300;
  font-size: 30px;
  text-align: left;
  margin: 0;
  padding: 0;
}

/* Rubriker */
h1 {
  font-size: clamp(2.25rem, 2.5vw, 2rem);
  font-family: "Raleway", sans-serif;
  text-align: left;
}

h2 {
  font-size: clamp(1.5rem, 1.5vw, 1.5rem);
  font-family: "Raleway", sans-serif;
  text-align: left;
}

h3 {
  font-size: clamp(1.5rem, 1.5vw, 1rem);
  font-family: "Raleway", sans-serif;
  text-align: left;
}

p {
  color: black;
  font-size: 1rem;
  margin-bottom: 1rem;
}

p.stor {
  font-size: 1.25rem;
}

blockquote {
  font-family: "Open Sans", sans-serif;
  text-align: center;
  font-size: 1rem;
}

.fetstil {
  font-weight: bold;
}

.tjansterli li {
  font-family: "Open Sans", sans-serif;
  font-weight: 300;
  font-size: 16px;
  text-align: left;
}

a {
  color: black;
  text-decoration: underline;
}

label {
  font-family: "Raleway", sans-serif;
  text-align: left;
  font-size: 1.125rem;
}

/* =====================================================
   LAYOUT
===================================================== */

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  position: relative;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: rgb(248, 248, 243);
}

main {
  flex: 1;
  width: 100%;
}

.wrapper {
  width: 100%;
  max-width: 2000px;
  margin: 0 auto;
}

.container {
  display: flex;
  gap: 2rem;
  align-items: stretch;
  flex-wrap: wrap;
  margin: 4rem 0;
}

.centered-block {
  width: 80%;
  margin: 2rem auto;
  text-align: left;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem; /* magiskt mellanrum */
}

.centered-block img {
  max-width: 300px; /* eller den storlek du vill ha */
  width: 100%; /* gör att den skalar ner men inte upp */
}

.centered-block h2 {
  max-width: 500px;
  margin: 0; /* eller margin-left: 0 */
}

.centered-block p {
  max-width: 500px;
  margin: 0 auto; /* om du vill att p ska centreras */
}

.centered-block2 {
  width: 40%;
  border: #6b6969a8;
  background-color: white;
  min-height: 150px;
  margin: 2rem auto;
  text-align: left;
  display: flex;
  justify-content: space-between;
}

.project {
  display: grid;
  align-items: center;
  margin: 1em 0;
}

.project img {
  width: 250px;
  height: auto;
  margin-right: 15px;
  margin-left: 5px;
}

.project h2 {
  margin: 0;
}

.block {
  flex: 1;
  min-width: 150px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: left;
}

.block h2,
.block p {
  margin-left: 0; /* eller t.ex. 10px om du vill */
  max-width: 220px;
  padding-bottom: 10px;
  padding-top: 10px;
}

.block img {
  display: block;
  float: none;
  max-width: 250px; /* eller den storlek du vill ha */
  width: 100%; /* gör att den skalar ner men inte upp */
  height: auto;
  margin-bottom: 1rem;
}

.block-content {
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
  text-align: left;
}

.highlighted-text {
  background-color: rgba(251, 252, 248, 0.824);
  display: inline;
}

.center-wrapper {
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}

/* =====================================================
   HEADER & NAVIGATION
===================================================== */

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: white;
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  height: 120px;
  gap: 10rem;
  padding: 0 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header img {
  height: 4.5rem;
}

nav {
  display: flex;
  align-self: flex-end;
  margin-bottom: 20px;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
  margin: 0;
  padding: 0;
  align-items: center;
}

nav li:hover {
  background-color: rgba(244, 96, 192, 0.242);
}

/* Standard: stor skärm */
.menu-icon {
  display: none;
}

.menu > li > a {
  display: inline-block;
}

nav ul {
  display: flex;
  flex-direction: row;
  gap: 2rem;
}

#top-menu {
  list-style: none;
  padding: 15px;
  font-style: normal;
  font-size: x-large;
}

#top-menu a {
  text-decoration: none;
  color: black;
}

/* Dölj checkboxen */
.menu-checkbox {
  display: none;
}

/* Dölj hamburgermenyn på stora skärmar */
.menu-toggle-label {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  user-select: none;
}

/* Desktop: visa menyn som vanligt */
.menu {
  display: flex;
  gap: 20px;
}

.menu-icon {
  display: none;
  position: absolute;
  left: -9999px;
}

#menu-toggle:checked + .menu-icon + ul {
  display: flex;
}

/* ===========================
   FIXAD MENY & UNDERSMENY
=========================== */

.menu {
  list-style: none;
  display: flex;
  gap: 2rem;
  position: relative;
}

.menu > li {
  position: relative;
}

/* Dölj undermenyer */
.submenu {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  padding: 0.5rem 0;
  margin: 0;
  display: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  min-width: 180px;
  z-index: 999;
}

/* Visa undermeny vid hover eller fokus */
.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu {
  display: block;
}

/* Länkar i undermenyn */
.submenu li a {
  display: block;
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

.submenu li a:hover {
  background: #f2f2f2;
}

/* =====================================================
   BILDER & SEKTIONER
===================================================== */

.bildsektion {
  width: 100%;
  min-height: 650px;
  margin: 0 auto;
  background-image: url("images/Bakgrund.PNG");
  background-size: cover;
  background-position: center;
  background-color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-top: 70px;
  text-align: center;
  margin-bottom: 40px;
}

.bildsektion2 {
  width: 100%;
  min-height: 500px;
  margin: 0 auto;
  background-size: cover;
  background-position: center;
  background-color: rgba(234, 229, 229, 0.571);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 3rem;
  text-align: center;
  margin-bottom: 20px;
}

.content-wrapper {
  background-color: rgba(255, 255, 255, 0.8);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}

.rundbild {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  display: block;
  margin: 0 auto 50px;
  object-fit: cover;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.bild {
  width: 200px;
  height: 280px;
  border-radius: 10px;
  aspect-ratio: 1 / 1;
  display: block;
  margin: 0 auto 20px;
  object-fit: cover;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* =====================================================
   KNAPPAR
===================================================== */

.contact-button {
  display: inline-block;
  max-width: 200px;
  margin-top: 40px;
  width: fit-content;
  padding: 10px 20px;
  background: linear-gradient(135deg, white, white);
  color: black;
  border: 2px solid black;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.contact-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

/* =====================================================
   GRID
===================================================== */

.grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  grid-template-areas: "section1 section2 section3 section4";
}

/* =====================================================
   FOOTER
===================================================== */

.footer-container {
  background-color: #fad8dda8;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 0.5rem;
  width: 100%;
  gap: 1rem;
}

.footer-container a[href^="mailto:"] {
  color: #000;
  text-decoration: none;
  font-weight: normal;
}

.footer-section {
  padding: 1rem;
}

.footer-section h3 {
  margin-top: 0;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li a {
  color: #0e0e0d;
  text-decoration: none;
}

.footer-section ul li a:hover {
  text-decoration: underline;
}

#footer-section1 {
  grid-area: footer-section1;
}

#footer-section2 {
  grid-area: footer-section2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

#footer-section3 {
  grid-area: footer-section3;
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
}

#footer-section3 a img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

#footer-section3 a:hover img {
  transform: scale(1.1);
  filter: brightness(1.2);
}

/* =====================================================
   MEDIA QUERIES
===================================================== */

@media (max-width: 4000px) {
  .wrapper {
    width: 100%;
  }
}

@media (max-width: 1320px) {
  .wrapper {
    width: 100%;
  }

  #top-menu {
    font-size: 16px;
    padding: 0;
    margin: 0;
  }
}

@media (min-width: 900px) {
  .block h2,
  .block p {
    margin-left: 50px;
    max-width: 300px;
  }
}

@media (max-width: 900px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      "section1 section2"
      "section3 section4";
  }

  .footer-container {
    display: grid;
    grid-template-areas: "footer-section1 footer-section2 footer-section3";
  }

  #top-menu {
    font-size: 12px;
    padding: 0;
    margin: 0;
  }

  .submenu {
    position: static; /* gör att den hamnar under sin förälder */
    box-shadow: none;
  }

  .has-submenu:focus-within .submenu {
    display: block;
  }

  header {
    flex-direction: row;
  }

  header img {
    margin: 0;
  }
}

@media (max-width: 600px) {
  /* HEADER */
  header {
    flex-direction: column; /* Menyn hamnar under loggan */
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 3px;
    height: auto; /* Låter header växa när menyn öppnas */
  }

  header img {
    margin: 0;
  }

  .centered-block {
    width: 90%;
    margin: 1.5rem auto;
    text-align: left;
    align-items: center;
  }

  /* TEXT & LAYOUT */
  .bildsektion {
    background-position: left center;
    max-height: fit-content;
  }

  .container {
    flex-direction: column;
    align-items: center;
  }

  nav ul li a {
    font-size: 12px;
  }

  nav ul {
    gap: 0.1rem;
  }

  /* HAMBURGERMENY */
  .menu-toggle-label {
    display: block;
    font-size: 2rem;
    cursor: pointer;
    user-select: none;
  }

  /* Dölj menyn som standard */
  .menu {
    display: flex;
    flex-direction: column;
    background: white;
    padding: 20px;
    width: 100%;
    max-height: 0; /* Fälld */
    overflow: hidden; /* Göm innehållet */
    transition: max-height 0.3s ease;
  }

  /* Fäll ner menyn när checkboxen är ikryssad */
  .menu-checkbox:checked ~ nav .menu {
    max-height: 500px; /* Fäll ner */
  }

  /* Undermenyer i mobil */
  .submenu {
    position: static;
    box-shadow: none;
  }

  .has-submenu:focus-within .submenu {
    display: block;
  }

  nav {
    align-self: center;
    margin-bottom: 0;
  }
}

@media (max-width: 418px) {
  h1 {
    font-size: 30px;
    font-family: "Raleway", sans-serif;
    text-align: left;
  }

  h1 {
    margin-top: 5px; /* eller mer om du vill */
  }

  h2 {
    text-align: left;
  }

  .block {
    flex: 1;
    min-width: 70px;
  }

  .menu {
    gap: 5px; /* mindre avstånd mellan Hem / Produkter / Tjänster */
  }

  .menu li a {
    padding: 4px 6px; /* mindre klickyta */
    font-size: 12px; /* mindre text */
  }

  .menu li {
    margin: 0; /* ta bort extra marginaler */
  }

  .bildsektion {
    max-height: 250px;
  }

  header img {
    height: 3rem; /* eller t.ex. 2.5rem om du vill ha ännu mindre */
  }

  nav ul {
    gap: 0.1rem; /* eller 0.25rem om du vill ha ännu tajtare */
  }

  nav {
    margin-bottom: 30px;
  }

  nav ul li {
    gap: 5px;
  }

  #footer-section3 {
    flex-direction: column;
    gap: 5px;
  }

  #footer-section3 .copyright {
    font-size: 10px;
  }

  .bildsektion {
    min-height: 400px;
  }
}
