/* =====================================================
   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,
h3 {
  font-family: "Raleway", sans-serif;
  text-align: left;
  font-size: 1.125rem; /* exempelvärde, motsvarar ca "large" */
}

p {
  color: black;
  font-size: 1rem;
  margin-bottom: 1rem;
}

p.stor {
  font-size: 1.25rem; /* större variant */
}

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;
}

label {
  font-family: "Raleway", sans-serif;
  text-align: left;
  font-size: 1.125rem; /* exempelvärde */
}

/* =====================================================
   LAYOUT
===================================================== */

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  position: relative;
}

a {
  color: navy; /* eller välj en egen färg, t.ex. color: black; */
  text-decoration: none;
  text-align: left;
  margin-top: 5px;
  margin-bottom: 5px;
}

a:hover {
  text-decoration: underline;
}

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: 40%;
  margin: 2rem auto;
  text-align: left;
}

.centered-block2 {
  width: 40%;
  border: #6b6969a8;
  background-color: white;
  min-height: 150px;
  margin: 2rem auto;
  justify-items: center;
  align-items: center;
  display: flex;
}

.project {
  display: grid;
  align-items: center; /* Vertikal centrering */
  margin: 1em 0;
}

.project img {
  width: 250px; /* Anpassa storlek på bilden */
  height: auto;
  margin-right: 15px; /* Avstånd mellan bild och rubrik */
  margin-left: 5px;
}

.project h2 {
  margin: 0; /* Tar bort extra marginaler */
}

.block {
  flex: 1;
  min-width: 70px;
  padding: 1rem;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: flex-start;
  text-align: left;
}

.block h2,
.block p {
  max-width: 220px; /* välj en bredd */
}

.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; /* styr vertikalt med padding */
}

/* =====================================================
   HEADER & NAVIGATION
===================================================== */

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: white;
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  height: 115px;
  gap: 10rem; /* avstånd mellan logga och meny */
  padding: 0 2rem; /* lite luft från kanterna */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header img {
  height: 4.5rem;
}

nav {
  display: flex; /* gör nav till flex-container */
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: flex-start; /* centrera länkarna */
  gap: 1rem; /* avstånd mellan länkar */
  margin: 0;
  padding: 0;
  align-items: center;
}

nav li:hover {
  background-color: rgb(236, 176, 215);
}

/* Standard: stor skärm */
.menu-icon {
  display: none;
}

nav ul {
  display: flex;
  flex-direction: row;
  gap: 2rem;
}

#top-menu {
  list-style: none;
  padding: 15px;
  font-style: normal;
  font-size: large;
}

#top-menu a {
  text-decoration: none;
  color: black;
}

#menu-toggle:checked + .menu-icon + ul {
  display: flex;
}

/* =====================================================
   BILDER & SEKTIONER
===================================================== */

.bildsektion {
  width: 100%;
  min-height: 600px;
  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: center;
  align-items: center;
  text-align: center;
  margin-bottom: 10px;
}

.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: 2rem;
  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 40px;
  object-fit: cover;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.ikonrad {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  padding-left: 30px;
}

.ikonrad img {
  width: 120px;
  height: auto;
  transition: transform 0.2s ease;
}

.ikonrad img:hover {
  transform: scale(1.1);
}

/* =====================================================
   KNAPPAR
===================================================== */

.contact-button {
  display: inline-block;
  max-width: 200px;
  width: fit-content; /* eller auto */
  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: 1rem;
  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: 20px; /* mindre text */
    padding: 0;
    margin: 0;
  }
}

@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";
  }

  header {
    flex-direction: row;
  }

  header img {
    margin: 0;
    height: 4rem;
  }
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
    align-items: center;
  }

  .block h2 {
    font-size: 1.4rem; /* större än brödtext */
  }

  .block p {
    font-size: 1rem; /* lite mindre än rubrik */
    width: 220px;
    max-width: 100%;
  }

  .block {
    width: 95%;
    margin-bottom: 2rem;
  }

  .block img.rundbild {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
  }

  .centered-block2 {
    width: 90%;
    margin-bottom: 2rem;
  }
}

@media (max-width: 600px) {
  /* Footer i en kolumn */
  .footer-container {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "footer-section1"
      "footer-section3";
    gap: 0.5rem;
  }

  .block {
    min-width: 100%; /* blocken staplas snyggt på mobil */
  }

  .block h2,
  .block p {
    max-width: 220px; /* välj en bredd */
  }

  #top-menu {
    font-size: 16px; /* mindre text */
    padding: 0;
    margin: 0;
  }

  .menu-icon,
  #menu-toggle {
    display: none !important;
  }

  nav ul {
    display: flex !important;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  header {
    display: flex;
    flex-direction: row;
    height: 100px;
    align-items: center;
    padding: 1rem;
    gap: 2rem;
  }

  header img {
    height: 3rem;
    margin: 0;
  }

  .logo {
    margin: 0;
  }

  h1 {
    font-size: clamp(1.5rem, 1.5vw, 1.5rem);
    font-family: "Raleway", sans-serif;
    text-align: left;
  }

  h2,
  h3 {
    font-family: "Raleway", sans-serif;
    text-align: left;
    font-size: 1rem;
  }

  .center-wrapper {
    display: flex;
    flex-direction: column;
    padding: 4px 0;
  }

  .centered-block {
    width: 60%;
    margin: 1.5rem auto;
    text-align: left;
  }

  .ikonrad img {
    width: 90px;
  }

  .ikonrad {
    padding-left: 5px;
  }

  .bildsektion2 {
    width: 100%;
    min-height: 300px;
    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: 1rem;
    text-align: center;
    margin-bottom: 20px;
  }
}

@media (min-width: 601px) {
  .menu-icon,
  #menu-toggle {
    display: none !important;
  }

  nav ul {
    display: flex !important;
    flex-direction: row;
    gap: 2rem;
    justify-content: space-between;
    align-items: center;
  }

  header {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0.5rem;
  }
}
@media (max-width: 430px) {
  .bildsektion {
    clip-path: inset(40px 0 40px 0);
  }

  .footer-container {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "footer-section1"
      "footer-section2"
      "footer-section3";
    gap: 0.5rem;
  }

  /* ============================
   MOBILMENY – FUNGERANDE VERSION
   max-width: 430px
============================ */

@media (max-width: 430px) {

  /* FIXAR HEADERN SÅ DEN INTE BLOCKERAR KLICK */
  header {
    z-index: 1 !important; /* sänker headern så checkboxen ligger ovanpå */
    gap: 0 !important;
    justify-content: space-between !important;
  }

  /* HAMBURGERIKON */
  .menu-icon {
    display: block !important;
    font-size: 34px;
    cursor: pointer;
    position: relative;
    z-index: 2000 !important; /* ovanpå headern */
  }

  /* CHECKBOX – MÅSTE LIGGA ÖVER HEADERN */
  #menu-toggle {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 3000 !important; /* ← detta gör den klickbar */
  }

  .menu-wrapper {
    position: relative;
  }

  /* DÖLJ DESKTOP-MENYN */
  nav ul {
    display: none !important;
  }

  /* MOBILMENY PANEL */
  nav .menu {
    position: fixed;
    top: 0;
    right: -60%;
    width: 60%;
    height: 100vh;
    background: white;
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    box-shadow: -4px 0 12px rgba(0,0,0,0.25);
    transition: right 0.3s ease;
    z-index: 1500;
  }

  /* VISA MENYN */
  header:has(#menu-toggle:checked) nav .menu {
    right: 0;
    display: flex;
  }
}
