/*-------------------------------->
<---           Hero            --->
<--------------------------------*/

/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
  #hero-81 {
    text-align: center;
    padding: clamp(9rem, 25.95vw, 18.75rem) 1rem 0;
    padding-bottom: clamp(12.125rem, 30.95vw, 28.125rem);
    position: relative;
    z-index: 1;
    overflow: hidden;
  }
  #hero-81:before {
    content: "";
    width: 31.25rem;
    height: 135rem;
    background: var(--white);
    opacity: 1;
    position: absolute;
    display: block;
    bottom: -139.6875rem;
    right: 80%;
    z-index: 0;
  }
  #hero-81:after {
    content: "";
    width: 31.25rem;
    height: 135rem;
    background: var(--white);
    opacity: 1;
    position: absolute;
    display: block;
    bottom: -139.6875rem;
    left: 80%;
    z-index: 0;
  }
  #hero-81 .cs-background {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -2;
  }
  #hero-81 .cs-background:before {
    content: "";
    width: 100%;
    height: 100%;
    background: var(--dark);
    opacity: 0.7;
    position: absolute;
    display: block;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
  }
  #hero-81 .cs-background img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
  }
  #hero-81 .cs-container {
    width: 100%;
    max-width: 67.5rem;
    margin: auto;
  }
  #hero-81 .cs-title {
    font-size: clamp(2.1rem, 6.4vw, 3.8125rem);
    font-weight: 700;
    line-height: 1.2em;
    text-align: center;
    max-width: 15ch;
    margin: 0 auto clamp(1rem, 4vw, 1.5rem);
    color: var(--white);
    position: relative;
  }
  /*
  #hero-81 .cs-title:after {
    content: "";
    width: clamp(3.75rem, 9.5vw, 6.25rem);
    height: clamp(0.25rem, 0.8vw, 0.5rem);
    margin: clamp(1rem, 4vw, 1.5rem) auto clamp(1rem, 4vw, 1.5rem);
    background: var(--primary);
    opacity: 1;
    position: relative;
    display: block;
  }
  */
  #hero-81 .cs-text {
    font-size: clamp(1rem, 1.95vw, 1.1rem);
    line-height: 1.5em;
    text-align: center;
    width: 100%;
    max-width: 35ch;
    margin: 0 auto;
    margin-bottom: clamp(2.5rem, 4vw, 3rem);
    color: var(--white);
  }
  #hero-81 .cs-button-solid {
    border: none;
    font-family: "Poppins", sans-serif;
    cursor: pointer;
  }
}
/* Desktop - 1024px */
@media only screen and (min-width: 64rem) {
  #hero-81:before {
    content: "";
    width: 31.25rem;
    height: 150rem;
    background: var(--white);
    opacity: 1;
    position: absolute;
    display: block;
    bottom: -139.6875rem;
    right: 80%;
    z-index: 0;
  }
  #hero-81:after {
    content: "";
    width: 31.25rem;
    height: 150rem;
    background: var(--white);
    opacity: 1;
    position: absolute;
    display: block;
    bottom: -139.6875rem;
    left: 80%;
    z-index: 0;
  }
  #hero-81 .cs-text {
    max-width: 50ch;
  }
}

/* Desktop - 1300px (To make image background parallax) */
@media only screen and (min-width: 81.25rem) {
  #hero-81 {
    background: url("../assets/images/hero.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
  }
}

/*-------------------------------->
<---        Hero tjänster      --->
<--------------------------------*/

/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
  #h-services-81 {
    padding: 0 1rem clamp(2.5rem, 7.9vw, 6.25rem) 1rem;
    position: relative;
    z-index: 10;
  }
  #h-services-81 .cs-card-group {
    width: 100%;
    max-width: 29.0625rem;
    margin: 0 auto 0;
    margin-top: calc(clamp(5rem, 13vw, 4.75rem) * -1);
    padding: clamp(2.5rem, 4.7vw, 3.75rem) clamp(1rem, 4vw, 3.75rem);
    box-shadow: 0px 20px 40px 0px rgba(0, 0, 0, 0.1);
    border-radius: 0.3125rem;
    border-top: 8px solid var(--primary);
    background-color: #fff;
    box-sizing: border-box;
  }
  #h-services-81 .cs-item {
    list-style: none;
    margin: 0 auto 2.5rem;
    width: 100%;
    max-width: 22.5rem;
  }
  #h-services-81 .cs-item:last-of-type {
    margin-bottom: 0;
  }
  #h-services-81 .cs-icon {
    width: clamp(4.25rem, 8.8vw, 5.5rem);
    height: clamp(4.25rem, 8.8vw, 5.5rem);
    margin: auto;
    margin-bottom: clamp(1.25rem, 5vw, 1.5rem);
    display: flex;
    justify-content: center;
    align-items: center;
  }
  #h-services-81 .cs-icon img {
    width: clamp(6.75rem, 9.8vw, 8.25rem);
    height: auto;
  }
  #h-services-81 .cs-icon #visma {
    width: clamp(12.75rem, 11.8vw, 10.25rem);
  }

  #h-services-81 .cs-title {
    font-size: 1.1rem;
    line-height: 1.2em;
    text-transform: uppercase;
    text-align: center;
    margin: 0 auto 0.5rem;
    color: var(--dark);
  }
  #h-services-81 .cs-text {
    font-size: 1rem;
    text-align: center;
    line-height: 1.5em;
    max-width: 22.5rem;
    margin: 0 auto;
    color: var(--dark);
  }
}
/* Tablet - 768px */
@media only screen and (min-width: 48rem) {
  #h-services-81 .cs-card-group {
    max-width: 80rem;
    margin-top: calc(clamp(4.75rem, 20vw, 20rem) * -1);
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    column-gap: 2.5rem;
  }
  #h-services-81 .cs-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex: 1;
    height: 100%;
  }
}

/*-------------------------------->
<---          Tjänster          -->
<--------------------------------*/

/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
  #tjanster,
  #RPsbsr-1587 {
    padding: var(--sectionPadding);
    padding-top: 0;
    position: relative;
    background-color: var(--white);
    z-index: 1;
    scroll-margin-top: 120px;
  }
  #tjanster .cs-container,
  #RPsbsr-1587 .cs-container {
    width: 100%;
    max-width: 36.5rem;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(2.5rem, 6vw, 4rem);
  }
  #tjanster .cs-picture,
  #RPsbsr-1587 .cs-picture {
    width: 100%;
    height: clamp(25rem, 80vw, 47rem);
    position: relative;
  }
  #tjanster .cs-picture img,
  #RPsbsr-1587 .cs-picture img {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 20px;
    height: 100%;
    width: 100%;
    object-fit: cover;
  }
  #tjanster .cs-content,
  #RPsbsr-1587 .cs-content {
    text-align: left;
    width: 100%;
    max-width: 39.375rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  #tjanster .cs-title,
  #RPsbsr-1587 .cs-title {
    margin: 0;
    font-size: clamp(2rem, 5vw, 2.5rem);
  }
  #tjanster .cs-card-group,
  #RPsbsr-1587 .cs-card-group {
    width: 100%;
    padding: 0;
    margin: clamp(1.5rem, 4vw, 2.5rem) 0;
    display: grid;
    gap: clamp(1rem, 4vw, 2.5rem);
  }
  #tjanster .cs-item,
  #RPsbsr-1587 .cs-item {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  #tjanster .wrapper,
  #RPsbsr-1587 .wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.625rem;
  }
  #tjanster .cs-h3,
  #RPsbsr-1587 .cs-h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--dark);
  }
  #tjanster .cs-item-text,
  #RPsbsr-1587 .cs-item-text {
    font-size: 0.875rem;
    line-height: 1.5em;
    margin: 0;
    color: var(--dark);
  }
  #tjanster .cs-button-group,
  #RPsbsr-1587 .cs-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5rem;
    margin-top: 2rem;
  }
}
/* Tablet max 768px */
@media only screen and (max-width: 47rem) {
  #tjanster .cs-button-group,
  #RPsbsr-1587 .cs-button-group {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }
  #tjanster .cs-button-solid,
  #RPsbsr-1587 .cs-button-solid,
  #tjanster .cs-button-more,
  #RPsbsr-1587 .cs-button-more {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }
}
/* Tablet - 768px */
@media only screen and (min-width: 48rem) {
  #tjanster .cs-container,
  #RPsbsr-1587 .cs-container {
    max-width: 80rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
  }
  #tjanster .cs-picture,
  #RPsbsr-1587 .cs-picture {
    width: 50%;
    min-height: 32.8125rem;
    height: auto;
  }
  #tjanster .cs-picture {
    order: 2;
  }
  #tjanster .cs-content,
  #RPsbsr-1587 .cs-content {
    width: 50%;
    max-width: 39.375rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
  }
  #tjanster .cs-middle,
  #RPsbsr-1587 .cs-middle {
    flex-grow: 1;
    display: flex;
    align-items: center;
  }
  #tjanster .cs-card-group,
  #RPsbsr-1587 .cs-card-group {
    grid-template-columns: repeat(12, 1fr);
  }
  #tjanster .cs-item,
  #RPsbsr-1587 .cs-item {
    grid-column: span 6;
  }
}
/* Tablet 768px - 1024px */
@media only screen and (min-width: 48rem) and (max-width: 64.99rem) {
  #tjanster .cs-container,
  #RPsbsr-1587 .cs-container {
    align-items: stretch;
  }
  #tjanster .cs-picture,
  #RPsbsr-1587 .cs-picture {
    margin: 2.4rem 0 2rem 0;
    height: auto;
    display: flex;
  }
  #RPsbsr-1587 .cs-content {
    padding: 1rem;
  }
  #tjanster .cs-button-group,
  #RPsbsr-1587 .cs-button-group {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start;
  }
  #tjanster .cs-button-solid,
  #RPsbsr-1587 .cs-button-solid,
  #tjanster .cs-button-more,
  #RPsbsr-1587 .cs-button-more {
    font-size: 0.85rem;
    padding: 0 1rem;
    min-width: auto;
    max-width: 12rem;
    line-height: 2.75rem;
  }
  #tjanster .cs-button-more,
  #RPsbsr-1587 .cs-button-more {
    padding: 0 0 0 1rem;
    gap: 1rem;
  }
  #tjanster .cs-button-more .cs-wrapper,
  #RPsbsr-1587 .cs-button-more .cs-wrapper {
    width: 2.25rem;
  }
  #tjanster .cs-button-more .cs-icon,
  #RPsbsr-1587 .cs-button-more .cs-icon {
    width: 0.7rem;
    height: 0.7rem;
  }
}

/*-- -------------------------- -->
<---            CTA             -->
<--- -------------------------- -*/

/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
  #cta-51 {
    padding: var(--sectionPadding);
    position: relative;
  }
  #cta-51 .cs-container {
    width: 100%;
    max-width: 80rem;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(3rem, 6vw, 4rem);
  }
  #cta-51 .cs-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  #cta-51 .cs-title,
  #cta-51 .cs-text {
    max-width: 35rem;
    width: 100%;
  }
  #cta-51 .cs-title {
    color: var(--white);
  }
  #cta-51 .cs-text {
    margin-bottom: 1rem;
    color: var(--white);
    opacity: 0.8;
  }
  #cta-51 .cs-text:last-of-type {
    margin-bottom: 2rem;
  }
  #cta-51 .cs-picture {
    height: 100%;
    width: 100%;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
  }
  #cta-51 .cs-picture:before {
    content: "";
    position: absolute;
    display: block;
    height: 100%;
    width: 100%;
    background: var(--dark);
    opacity: 0.8;
    top: 0;
    left: 0;
    z-index: 1;
  }
  #cta-51 .cs-picture img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
  }
}
/* Tablet - 768px */
@media only screen and (min-width: 48rem) {
  #cta-51 .cs-content {
    padding-left: 2rem;
    align-items: flex-start;
    text-align: left;
    max-width: 30rem;
    margin-right: auto;
  }
  #cta-51 .cs-text {
    max-width: 24rem;
    width: 100%;
  }
}
/* Tablet 768 - 1024px */
@media only screen and (min-width: 48rem) and (max-width: 63.99rem) {
  #cta-51 .cs-content {
    max-width: 33rem;
    padding-left: 2rem;
  }
  #cta-51 .cs-text {
    max-width: 36rem;
  }
}
/* Desktop - 1024 */
@media only screen and (min-width: 64rem) {
  #cta-51 .cs-content {
    max-width: 40rem;
  }
  #cta-51 .cs-text {
    max-width: 34rem;
    width: 100%;
  }
}

/* ===================================================
=             Formulär - Popup modal                 =
=================================================== */

/* ===============================
   MODAL OVERLAY
   =============================== */
#consultationModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
  overflow-y: auto;
}
html {
  overflow-y: scroll;
}
body.modal-open {
  position: fixed;
  width: 100%;
}
#consultationModal.active {
  display: flex;
}

/* ===============================
   MODAL BOX
   =============================== */
#consultationModal .modal {
  background: #fff;
  width: 100%;
  max-width: 34rem;
  padding: 1.6rem 1.75rem;
  border: 5px solid var(--primary);
  border-radius: 1rem;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: modalFadeIn 0.25s ease;
  max-height: 90vh;
  overflow-y: auto;
}

/* ===== Animation ===== */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===============================
   CLOSE BUTTON
   =============================== */
#consultationModal .modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 2rem;
  height: 2rem;
  background: var(--primary);
  border: 2px solid rgba(0, 0, 0, 0);
  border-radius: 50%;
  font-size: 1.5rem;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

#consultationModal .modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.1);
}

/* ===============================
   TITLE
   =============================== */
#consultationModal h3 {
  text-align: center;
  font-size: 1.45rem;
  margin-bottom: 1.2rem;
}

/* ===============================
   FORM STYLING
   =============================== */
#consultationModal .cs-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem 1.2rem;
  font-family: "Poppins", sans-serif;
}
#consultationModal .label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.95rem;
}
#consultationModal .input {
  background: #efefef;
  border-radius: 0.5rem;
  padding: 0.8rem;
  border: none;
  font-size: 0.95rem;
  font-family: inherit;
}
#consultationModal .input::placeholder {
  color: #7d799c;
  opacity: 0.6;
}
#consultationModal select.input {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #555 50%),
    linear-gradient(135deg, #555 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
#consultationModal .textarea {
  min-height: 6rem;
  max-height: 9.5rem;
  resize: vertical;
  padding-top: 0.9rem;
  font-family: inherit;
}

/* ===============================
   SUBMIT BUTTON
   =============================== */
#consultationModal .cs-button-solid {
  margin-top: 0.75rem;
  padding: 0 2.2rem;
  border: none;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  display: block;
  margin-left: auto;
  margin-right: auto;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

/* Knapp efter framgång */
.cs-button-solid.success {
  background-color: #4caf50 !important;
  color: #fff;
  pointer-events: none;
}

/* ===============================
   RESPONSIVE JUSTERINGAR
   =============================== */

/* Tablets (768–1024px) */
/* @media (min-width: 48rem) and (max-width: 64rem) {
  #consultationModal .modal {
    max-width: 42rem;
    padding: 2rem;
  }
  #consultationModal h3 {
    font-size: 1.6rem;
  }
  #consultationModal .cs-form {
    gap: 1rem 1.5rem;
  }
  #consultationModal .input,
  #consultationModal .textarea {
    padding: 0.9rem;
    font-size: 1rem;
  }
} */

/* Medium screens (≥ 480px / 30rem) */
/* @media (min-width: 30rem) {
  #consultationModal .cs-form {
    grid-template-columns: 1fr 1fr;
  }
  #consultationModal .label:nth-child(5),
  #consultationModal .cs-button-solid {
    grid-column: 1 / -1;
  }
} */

/* Small screens (< 480px / 30rem) */
/* @media (max-width: 30rem) {
  #consultationModal .cs-form {
    gap: 0.5rem 1rem;
  }
  #consultationModal .textarea {
    min-height: 5rem;
    max-height: 7rem;
  }
  #consultationModal .label {
    font-size: 0.9rem;
  }
  #consultationModal .input,
  #consultationModal .textarea {
    padding: 0.6rem;
    font-size: 0.9rem;
  }
} */

/* Extra small screens (< 400px / 25rem) */
@media (max-width: 30rem) {
  #consultationModal .modal {
    padding: 1.3rem 1rem;
  }
  #consultationModal h3 {
    font-size: 1.1rem;
    margin-top: 2rem;
  }
  #consultationModal .textarea {
    min-height: 4rem;
    max-height: 6rem;
  }
  #consultationModal .label {
    font-size: 0.85rem;
  }
  #consultationModal .input,
  #consultationModal .textarea {
    padding: 0.5rem;
    font-size: 0.85rem;
  }
  #consultationModal .modal-close {
    width: 2rem;
    height: 2rem;
    font-size: 1.2rem;
  }
}
