@import url("https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100..900;1,100..900&display=swap");

:root {
  --primary-light: #74a84a;
  --primary-dark: #2c541d;
  --black: #000000;
  --white: #efefef;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Jost", sans-serif;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Header-sidan */
.nav-container {
  max-width: 1200px;
  margin: auto;
  padding: 0;
}

#header {
  width: 100vw;
  min-height: 400px;
  background-image: url("./img/startsidan.jpg");
  background-position: center 30%;
  background-size: cover;
  padding-top: 1px;
  position: relative;
}

/* mörk overlay bakom texten för bättre läsbarhet */
#header::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 0;
  pointer-events: none; /* blockera inte klick eller selektion */
}

/* gör header-texterna vita och lättlästa endast på index-headern */
#header .header-content h1,
#header .header-content p {
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

#header .header-content {
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 16px;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  min-height: 72px;
  background-color: lightblue;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 32px;
  font-size: 18px;
}

nav .logo {
  font-size: 20px;
}

nav .logo img {
  max-height: 80px;
  width: auto;
  margin-left: 20px;
}

/* Primär länkstil i nav */
nav .nav-links > li > a {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

/* Hover/focus */
nav .nav-links > li > a:hover,
nav .nav-links > li > a:focus {
  background-color: rgba(255, 255, 255, 0.25);
}

/* Dropdown styles */
nav ul li {
  position: relative;
}

nav ul li .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--white);
  list-style: none;
  padding: 0;
  margin: 0;
  min-width: 180px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 10;
}

nav ul li .dropdown li {
  border-bottom: 1px solid var(--primary-dark);
}

nav ul li .dropdown li a {
  display: block;
  padding: 10px 16px;
  color: var(--primary-dark);
  font-size: 16px;
}

nav ul li .dropdown li a:hover {
  background-color: rgb(69, 138, 161);
  color: white;
}

/* Show dropdown on hover (desktop) */
nav ul li:hover > .dropdown {
  display: block;
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 60px;
}
.header-content h1 {
  font-size: 40px;
  color: var(--primary-dark);
  font-weight: 500;
}

.header-content p {
  font-size: 16px;
  color: var(--primary-dark);
}

.primary-btn {
  padding: 10px 24px;
  background-color: rgb(69, 138, 161);
  color: whitesmoke;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.primary-btn:hover {
  background-color: rgb(46, 75, 84);
}

.menu-btn {
  position: absolute;
  right: 16px;
  top: 16px;
  background: #333333;
  padding: 8px 12px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
  cursor: pointer;
}

.close-btn {
  display: none; /* X är gömd på stora skärmar */
}

/* Tjänster del */
#services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 120px;
  gap: 30px;
  justify-content: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.service {
  width: 300px;
}

.service p {
  color: gray;
}

.service p.summary {
  font-size: 12px;
  color: #888;
  font-style: italic;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eee;
}
.service img {
  max-width: 100%;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service img:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Våra uppdrag  */
#våra-uppdrag-header {
  width: 100vw;
  min-height: 400px;
  background-image: url(./img/vara-uppdrag.jpg);
  background-size: cover;
  background-position: center;
  position: relative;
  padding-top: 1px;
}

/* Diskret overlay för att jämna ut bilden och ge bättre kontrast */
#våra-uppdrag-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.15));
  pointer-events: none;
  z-index: 0;
}

#våra-uppdrag-header .header-content h1,
#våra-uppdrag-header .header-content p {
  padding-top: 90px;
  color: var(--black);
  text-shadow: 0 2px 6px rgba(255, 255, 255, 0.35);
}

#våra-uppdrag-header .header-content {
  position: relative;
  z-index: 1;
}

/* Roll-detaljer (Läkare, Sjuksköterska, etc.) */
#role-detail {
  display: flex;
  margin-top: 80px;
  margin-bottom: 80px;
  gap: 60px;
  align-items: center;
}

.role-content {
  flex: 1;
  max-width: 600px;
}

.role-content h1 {
  font-size: 36px;
  color: var(--primary-dark);
  margin-bottom: 24px;
  font-weight: 600;
}

.role-content p {
  font-size: 18px;
  line-height: 1.7;
  color: #444;
  margin-bottom: 16px;
}

.role-image {
  flex: 1;
  max-width: 400px;
}

.role-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.role-image img:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Omvänd layout för Undersköterska och Socionom (bild vänster, text höger) */
#role-detail.reverse {
  flex-direction: row-reverse;
}

#assignments {
  display: grid;
  grid-template-columns: repeat(
    2,
    260px
  ); /* fasta kolumnbredder för att styra horisontellt avstånd */
  column-gap: 16px; /* horisontellt mellanrum */
  row-gap: 20px; /* vertikalt mellanrum */
  justify-content: center; /* centrera två kolumner i containern */
  margin-top: 64px; /* närmare header */
  margin-bottom: 100px; /* mer luft mot footern */
}

.assignment-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.assignment-card img {
  width: 100%;
  max-width: 220px; /* mindre på desktop */
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.assignment-card img:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.assignment-card h1 {
  font-size: 22px;
  margin-top: 6px;
  color: var(--black);
}

.assignment-card a {
  text-decoration: none;
}

/* Titel över assignments */
#assignments > h2 {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--black);
  margin-bottom: 8px;
}

/* Om oss del */
#about-header {
  min-height: 400px;
  background-image: url(./img/om-oss-hero.jpg);
  background-size: cover;
  background-position: center;
  padding-top: 1px;
}

#about-header .header-content h1,
#about-header .header-content p {
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  padding-top: 90px;
}
#about {
  display: flex;
  margin-top: 120px;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px; /* mer mellanrum mellan text och bild */
  align-items: center; /* centrera vertikalt på desktop */
}

.about-content {
  max-width: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.about-content h1 {
  font-size: 32px;
  color: var(--primary-dark);
  text-transform: uppercase;
}

.about-img {
  flex: 1;
  max-width: 500px;
}

.about-img img {
  width: 80%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-img img:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

/* Om oss omvänd layout (bild vänster, text höger) */
#about-reverse {
  display: flex;
  margin-top: 120px;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
}

.about-img-reverse {
  flex: 1;
  max-width: 500px;
  order: 1;
}

.about-content-reverse {
  flex: 1;
  max-width: 600px;
  order: 2;
}

.about-content-reverse h1 {
  font-size: 32px;
  color: var(--primary-dark);
  text-transform: uppercase;
  margin-bottom: 24px;
}

.about-content-reverse p {
  font-size: 18px;
  line-height: 1.7;
  color: #444;
  margin-bottom: 16px;
}

.about-img-reverse img {
  width: 80%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-img-reverse img:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

/* Prata med oss delen */
#talk-to-us {
  background-image: url(./img/talk-to-us.png);
  background-size: cover;
  background-position: center;
  min-height: 500px;
  margin-top: 120px;
  margin-bottom: 0;
}
.talk-to-us-content {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  height: 500px;
  gap: 16px;
  padding: 0 16px;
}
.talk-to-us-content h1 {
  color: var(--primary-dark);
}

.talk-to-us-content p {
  max-width: 500px;
}

/* Footer */
footer {
  background: lightblue;
  padding-top: 64px;
  margin-top: 0%;
}

footer .container {
  width: 1140px;
  max-width: 100%;
  margin: auto;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-content {
  flex: 1; /* delar upp sig jämnt */
  min-width: 200px; /* så de inte blir för smala */
}

footer h3 {
  font-size: 16px;
  margin-bottom: 15px;
  text-align: center;
  text-decoration: underline;
  color: var(--black);
}

.footer-content p {
  width: 190px;
  margin: auto;
  padding: 7px;
  color: var(--black);
}

.footer-content a {
  color: var(--black);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-content a:hover {
  color: white;
}

.footer-content ul {
  text-align: center;
  padding: 0;
}

.list {
  padding: 0;
}

.list li {
  width: auto;
  text-align: center;
  list-style-type: none;
  padding: 7px;
  position: relative;
}

.list li:hover::before {
  width: 70px;
}

.list li a {
  color: var(--black);
}

.list li a:hover {
  color: white;
}

/* Kontakt sidan */
#contact-header {
  min-height: 400px;
  background-image: url(./img/kontakt.jpg);
  background-size: cover;
  background-position: center;
  padding-top: 1px;
}

#contact-header .header-content h1,
#contact-header .header-content p {
  color: #000000;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  padding-top: 90px;
}

#contact-us {
  margin: 80px auto;
}

.contact-content {
  display: flex;
  justify-content: space-between;
  gap: 60px;
  align-items: flex-start;
}

#for-kunder-header {
  position: relative;
  padding-top: 1px;
  overflow: hidden;
  height: clamp(320px, 45vw, 520px);
}

#for-kunder-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.25));
  z-index: 1;
  pointer-events: none;
}

#for-kunder-header .hero-background {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 35%;
}

#for-kunder-header .container {
  position: absolute;
  inset: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

#for-kunder-header .header-content {
  margin-top: 0;
  align-items: center;
  padding: 0;
  text-align: center;
}

#for-kunder-header .header-content h1 {
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

form {
  flex: 1;
  max-width: 500px;
}

.customer-info {
  flex: 1;
  max-width: 600px;
}

.customer-info h1 {
  font-size: 28px;
  color: var(--primary-dark);
  margin-bottom: 24px;
  line-height: 1.3;
}

.customer-info p {
  font-size: 16px;
  line-height: 1.7;
  color: #444;
  margin-bottom: 20px;
}

.customer-form {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.customer-form h1 {
  font-size: 24px;
  color: var(--primary-dark);
  margin-bottom: 24px;
  text-align: center;
}

.inputsWrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  background: white;
  transition: border-color 0.3s ease;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(69, 138, 161, 0.1);
}

.required {
  position: absolute;
  right: 12px;
  color: #e74c3c;
  font-weight: bold;
  font-size: 16px;
}

.personnel-section {
  margin: 20px 0;
}

.personnel-section h3 {
  font-size: 18px;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.personnel-section p {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
  line-height: 1.4;
}

.description-section {
  margin: 20px 0;
}

.description-section h3 {
  font-size: 18px;
  color: var(--primary-dark);
  margin-bottom: 12px;
}

.description-section textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  background: white;
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.description-section textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(69, 138, 161, 0.1);
}

.inputsWrapper input {
  padding: 12px 16px;
  width: 100%;
  border: 1px solid var(--primary-dark);
  outline: none;
}

.address {
  flex-basis: 50%;
}

.detailsWrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 60px;
}
.detail {
  display: flex;
  gap: 10px;
}
.detail img {
  width: 40px;
  height: 40px;
}

.detail h6 {
  color: gray;
}

.detail a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.detail a:hover {
  color: rgb(119, 221, 255);
}

/* Mediaquery */

@media only screen and (max-width: 520px) {
  #for-kunder-header {
    height: auto;
  }
  #for-kunder-header .hero-background {
    height: auto;
  }
  #for-kunder-header .header-content {
    padding: 100px 0 60px;
  }
  /* Services: 1 kolumn på mobil */
  #services {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 80px;
    justify-items: center;
  }

  /* Assignments: 1 kolumn på mobil */
  #assignments {
    grid-template-columns: 200px; /* fast kolumnbredd på mobil */
    justify-content: center;
    column-gap: 12px;
    row-gap: 16px;
    margin-top: 60px;
  }
  .assignment-card img {
    max-width: 160px; /* mindre på mobil */
  }
  .container {
    padding: 0 20px;
  }

  /* About mobile layout */
  #about {
    flex-direction: column;
    gap: 24px;
    margin-top: 60px;
  }

  /* About reverse mobile layout */
  #about-reverse {
    flex-direction: column;
    gap: 24px;
    margin-top: 60px;
  }

  .about-img-reverse {
    order: 1;
  }

  .about-content-reverse {
    order: 2;
  }

  /* Role detail mobile layout */
  #role-detail {
    flex-direction: column;
    gap: 40px;
    margin-top: 60px;
    margin-bottom: 60px;
  }

  /* Reverse layout on mobile also stacks vertically */
  #role-detail.reverse {
    flex-direction: column;
  }

  .role-content h1 {
    font-size: 28px;
  }

  .role-content p {
    font-size: 16px;
  }
  /* Header och content */
  #header {
    min-height: 50vh;
  }
  .header-content h1 {
    font-size: 30px;
  }
  .header-content p {
    font-size: 20px;
  }
  .menu-btn {
    display: block;
  }
  nav {
    padding: 12px 16px;
  }

  /* Mobil navbar */
  nav ul {
    position: fixed; /* fixad över hela skärmen */
    top: 0;
    right: -100%; /* gömd utanför skärmen */
    width: 80%;
    height: 100vh; /* fyller hela höjden */
    flex-direction: column;
    background-color: var(--white);
    padding-top: 80px;
    transition: right 0.3s ease;
    overflow-y: auto; /* scroll vid långt innehåll */
    z-index: 1000;
  }

  nav ul.active {
    right: 0; /* visar menyn */
  }

  nav li {
    border-bottom: 1px solid var(--primary-dark);
    width: 100%;
    padding: 8px 16px;
    text-align: right;
  }

  .close-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    font-size: 28px;
    color: var(--primary-dark);
    cursor: pointer;
    display: none;
    z-index: 1010;
  }
  nav ul.active ~ .close-btn {
    display: block;
  }

  /* Dropdown */
  nav ul li .dropdown {
    position: static;
    box-shadow: none;
    width: 100%;
    display: none;
  }
  nav ul li:focus-within > .dropdown {
    display: block;
  }
  nav ul li .dropdown li {
    border: none;
    text-align: right;
  }
  nav ul li .dropdown li a {
    padding: 10px 16px;
    display: block;
  }

  /* Footer */
  footer .container {
    width: 100%;
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
  }
  .footer-content {
    width: 100%;
    margin-bottom: 20px;
  }
  footer h3 {
    font-size: 18px;
  }
  .footer-content p,
  .list li {
    width: 100%;
    text-align: center;
  }

  /* Kontakt sidan */
  .contact-content {
    flex-direction: column;
    gap: 40px;
  }
  .inputsWrapper {
    margin-left: 0;
  }
  .customer-form {
    padding: 20px;
  }

  .customer-form h1 {
    font-size: 20px;
    margin-bottom: 20px;
  }
  .customer-info h1 {
    font-size: 24px;
    margin-bottom: 20px;
  }
  .customer-info p {
    font-size: 15px;
    margin-bottom: 16px;
  }

  /* Extra padding längst ner för scroll */

  /* Logo mindre på mobil */
  nav .logo img {
    max-height: 50px;
  }
}

/* Arrow */
nav ul li .arrow {
  margin-left: 6px;
  transition: transform 0.3s ease;
}

/* Rotera arrow när aktiv */
nav ul li.active > a .arrow {
  transform: rotate(-180deg);
}
