/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 4.5rem;
  --footer-height: 3rem;

  /*========== Colors ==========*/

  --black-color: hsl(220, 24%, 12%);
  --black-color-light: rgba(86, 165, 164);
  --black-color-lighten: hsl(220, 20%, 18%);
  --white-color: #fff;
  --body-color: hsl(220, 100%, 97%);
  --dropdown-color: rgb(100, 157, 157);
  --header-background: rgb(0, 63, 80);
  --footer-background: rgb(1, 63, 80);

  --accent-color: #ff3b1f;
  /*========== Font and typography ==========*/

  --body-font: "Mitr", sans-serif;
  --normal-font-size: 0.9rem;
  --text-color: var(--text-color);

  /*========== Font weight ==========*/
  --font-regular: 400;
  --font-semi-bold: 600;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
}
button {
  cursor: pointer;
  margin-top: 15px;
  padding: 5px;
}

/*=============== BASE ===============*/
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
}
.main {
  position: relative;
  min-height: calc(100vh - var(--header-height));
}
.is-index .page-content {
  padding-top: clamp(1.5rem, 4vh, 3rem);
  padding-bottom: 0;
}

.content {
  flex: 1;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

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

.language-switch {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.language-switch a {
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.language-switch a:hover {
  opacity: 1;
}
/*=============== HEADER ===============*/

.header {
  position: relative;
  color: var(--body-color);

  background-color: var(--header-background);

  z-index: var(--z-fixed);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  position: relative;
  min-width: 0;
  overflow: visible;
}

.nav__data {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav__logo {
  font-weight: 600;
  font-size: 2rem;
  color: var(--accent-color);
}

/* ===== NAV MENU ===== */

.nav__menu {
  display: block;
  margin-left: auto;
}
.nav__menu a {
  color: var(--nav-text);
  border-bottom: 2px solid transparent;
  transition: 0.25s;
}

.nav__menu a:hover {
  color: var(--nav-hover);
  border-bottom: 2px solid var(--accent-color);
}
.nav__list {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav__link {
  color: var(--nav-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
}
.nav__link:hover {
  opacity: 0.8;
}
.dropdown__arrow {
  transition: transform 0.3s ease;
}
.dropdown__item.open .dropdown__arrow {
  transform: rotate(180deg);
}
/* ===== BURGER ===== */

.nav__toggle {
  display: none;
  font-size: 1.6rem;
  cursor: pointer;
  position: relative;
  width: 30px;
  height: 30px;
}

.nav__burger,
.nav__close {
  position: absolute;
  inset: 0;
  margin: auto;
  transition: 0.3s;
}

.nav__close {
  opacity: 0;
  transform: rotate(90deg);
}

/* icon animation */

.show-icon .nav__burger {
  opacity: 0;
  transform: rotate(90deg);
}

.show-icon .nav__close {
  opacity: 1;
  transform: rotate(0deg);
}

/* ===== DROPDOWN ===== */

.dropdown__item {
  position: relative;
}
.dropdown__menu {
  position: absolute;
  top: 100%;
  margin-top: 18px;
  right: 0;

  background: rgb(100, 157, 157);
  padding: 12px 16px;
  list-style: none;
  min-width: 180px;

  max-height: 0;
  overflow: hidden;

  opacity: 0;
  visibility: hidden;

  transition:
    max-height 0.35s ease,
    opacity 0.25s ease;

  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  border-radius: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
}
.dropdown__menu a {
  color: white;
}

.dropdown__menu a:hover {
  background: var(--dropdown-hover);
}
.dropdown__item.open .dropdown__menu {
  max-height: 300px;
  opacity: 1;
  visibility: visible;
}
.dropdown__trigger {
  cursor: pointer;
}
.dropdown__link {
  display: block;
  padding: 8px 10px;
  color: white;
  transition: background 0.2s ease;
}
.dropdown__link:hover {
  background: var(--dropdown-hover);
}
/* ===== MOBILE ===== */

@media (max-width: 768px) {
  .nav__toggle {
    display: block;
  }

  .nav__menu {
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--dropdown-color);

    transform: scaleY(0);
    transform-origin: top;
    opacity: 0;

    overflow: hidden;

    transition:
      transform 0.35s ease,
      opacity 0.25s ease;

    will-change: transform;
    backface-visibility: hidden;

    z-index: var(--z-fixed);
  }

  .nav__menu.show-menu {
    transform: scaleY(1);
    opacity: 1;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 0;
  }

  /* ===== MAIN LINKS ===== */

  .nav__link {
    display: block;
    position: relative;

    color: var(--nav-text);
    padding: 12px 20px;

    transition: background 0.2s ease;

    z-index: 2;
  }

  .nav__link:hover,
  .nav__link:active,
  .nav__link:focus {
    background: var(--nav-hover);
  }

  /* ===== DROPDOWN ITEM ===== */

  .dropdown__item {
    width: 100%;
  }

  /* ===== DROPDOWN MENU ===== */

  .dropdown__menu {
    position: static;
    width: 100%;

    background: rgb(100, 157, 157);

    padding: 0;
    margin: 0;

    opacity: 1;
    visibility: visible;

    max-height: 0;
    overflow: hidden;

    transition: max-height 0.3s ease;

    box-shadow: none;
    border-radius: 0;

    z-index: 1;
  }

  .dropdown__item.open .dropdown__menu {
    max-height: 100vh;
  }

  /* ===== DROPDOWN LINKS ===== */

  .dropdown__link {
    display: block;
    padding: 12px 20px;
    color: var(--nav-text);

    transition: background 0.2s ease;
  }

  .dropdown__link:hover,
  .dropdown__link:active,
  .dropdown__link:focus {
    background: var(--dropdown-hover);
  }
}

/*=============== cookie ===============*/
.cookie-banner {
  position: fixed;
  bottom: 0;
  width: 100%;
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 10px;
  z-index: 1000;
  display: none;
}

.cookie-button {
  background-color: #f1c40f;
  border: none;
  padding: 10px 20px;
  margin-left: 20px;
  cursor: pointer;
  color: #333;
  font-weight: bold;
  border-radius: 5px;
}

.cookie-button:hover {
  background-color: #e2b607;
}
.cookie-link {
  color: #f1c40f;
  text-decoration: underline;
  margin-left: 10px;
  cursor: pointer;
}

.cookie-link:hover {
  color: #e2b607;
}

footer {
  position: fixed;
  background-color: var(--footer-background);
  color: #ffffff;
  background-size: 90%;
  font-size: 0.6rem;
  font-family: "Mitr", sans-serif;
  font-style: normal;
  font-weight: 100;
  text-align: center;
  width: 100%;
  height: var(--footer-height);
  bottom: 0;
  padding: 1%;
  box-shadow: 0 2px 16px hsla(220, 32%, 8%, 0.3);
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.portfolio-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 6px 12px;
  background-color: var(--footer-background);
  font-size: 0.65rem;

  pointer-events: none;
  z-index: 20;
}

.ikon_insta {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.ikon_insta img {
  width: 30px;
  height: 30px;
  transition: transform 0.3s ease;
}

.ikon_insta img:hover {
  transform: scale(1.1);
}

.popup {
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.9rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.popup-arrow {
  position: absolute;
  top: 100%;
  left: 80%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #333;
}

.footer-content {
  text-align: center;
  flex-grow: 1;
}

footer a {
  color: #f40004;
  text-decoration: none;
  font-family: "Mitr", sans-serif;
  font-style: normal;
  font-weight: 300;
  text-align: center;
  display: inline-block;
  margin: 10px;
}

a:hover {
  transform-origin: center;
  transition: 0.3s ease-in-out;
}

.link {
  display: flex;
  justify-content: center;
}

/* --------- Loggo ------------- */
.logo {
  display: flex;
  align-items: center;
  height: 100%;
}

.logo img {
  max-height: 150%;
  width: auto;
  display: block;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}
.logo:hover img {
  transform: scale(1.03);
  opacity: 0.95;
}

/* --------- Portfolio/Skisser mapp skrivbord ------------- */
.reveal-wrapper {
  position: relative;
  width: 100%;
  /* height: 100%; */
  /* max-width: 100%; */
  min-height: 100%;
  background-color: rgb(204, 207, 176);
}
.reveal-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.reveal-wrapper.dimmed {
  filter: blur(4px);
}

.reveal-wrapper.dimmed::after {
  opacity: 1;
}

#hint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 14px;
  pointer-events: none;
  animation: fadeOut 4s forwards;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* --------- Portfolio/Skisser mapp skrivbord ------------- */
body.fade-out {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.reveal-inactive {
  pointer-events: none;
}

.hotspot {
  position: absolute;
  pointer-events: auto;
  z-index: 1000;
  cursor: pointer;
}
.hotspot-portfolio {
  left: 20%;
  top: 63%;
  width: 20.9%;
  height: 7%;
}
.hotspot-animation {
  left: 65.2%;
  top: 63%;
  width: 10%;
  height: 5%;
}
.hotspot-projekt {
  left: 68%;
  top: 57%;
  width: 20%;
  height: 7%;
}
.hotspot-extern {
  left: 53%;
  top: 29%;
  width: 8%;
  height: 4%;
}

#portfolioFolder {
  position: absolute;
  left: 16%;
  top: 70.5%;
  width: 22%;
  opacity: 0;
  cursor: pointer;
  z-index: 20;
}

#animationFolder {
  position: absolute;
  left: 64%;
  top: 71.5%;
  width: 22%;
  opacity: 0;
  cursor: pointer;
  z-index: 20;
}
#projektFolder {
  position: absolute;
  left: 70%;
  top: 58%;
  width: 20%;
  opacity: 0;
  cursor: pointer;
  z-index: 20;
}
.hotspot {
  pointer-events: none;
}

@media (min-width: 1025px) {
  .hotspot {
    pointer-events: auto;
  }
}

/* -----------------------------Huvudsidor-------------------------------- */
.main {
  height: calc(100vh - var(--header-height));

  display: flex;
  align-items: center;
  justify-content: center;
}

.page-content {
  max-width: 1440px;
  width: min(90%, 1100px);
  margin-inline: auto;

  padding-bottom: clamp(3rem, 8vh, 6rem);
}
.is-index .page-content {
  padding-top: clamp(1.5rem, 4vh, 3rem);
  padding-bottom: 0;
}

body:not(.is-index) .page-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.contentGdpr {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 100svh;
  padding: clamp(2rem, 4vw, 4rem) 1rem;
}

/* ----------------------------formulär till kontaktsidan------------------------------------ */
.form-row label {
  display: block;
  /* margin-bottom: o.75em; */
  letter-spacing: 0.02em;
}
.form-row {
  margin-bottom: 1rem;
}

.form-row input,
.form-row textarea {
  min-width: 100%;
  padding: 8px;
}
.form-row button {
  display: block;
  padding: 10px 20px;
  margin: 1.5rem auto 0;
  background-color: rgb(32, 79, 101);
  color: white;
  border-radius: 10px;
  border: none;
  cursor: pointer;
}
.form-row button:hover {
  background-color: rgb(53, 123, 156);
}

.form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px;
  margin-inline: auto;
  width: 80%;
  max-width: 500px;
  font-size: 1.5em;
  background-color: rgb(170, 190, 183);
  border: solid 1px #000;
  border-radius: 4px;
}

#meddelande {
  width: 100%;
  height: auto;
}
.form-feedback {
  margin: 2rem auto;
  padding: 1.5rem 2rem;
  max-width: 500px;
  border-radius: 10px;
  text-align: center;
  line-height: 1.5;
  animation: fadeIn 0.4s ease;
}

.form-feedback.success {
  background-color: rgb(148, 181, 168);
  color: #1f3847;
}

.form-feedback.error {
  background-color: rgba(255, 40, 3, 0.15);
  color: #690202;
}

.form-feedback h3 {
  margin-bottom: 0.5rem;
  font-weight: 400;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 768px) {
  .form {
    padding: 0 1rem;
  }

  .form-row {
    margin-bottom: 1.2rem;
  }

  textarea {
    font-size: 1rem;
  }
}

/* -----------------------------------Font-sizes--------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.hero-text {
  position: static;
  pointer-events: none;
}

.sidrubrik {
  position: relative;
  text-align: center;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 100;
  margin-top: 10%;
  margin-bottom: 2rem;
  color: black;
}
.h1startsida {
  position: absolute;
  top: 3rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 3;
  max-width: 90%;
  color: var(--text-color);

  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

.h2startsida {
  position: absolute;
  bottom: calc(var(--footer-height) + 2.5rem);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 3;
  max-width: 90%;
  pointer-events: none;
  color: var(--text-color);

  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.02em;
}
.h2startsida h2 {
  font-weight: 400;
  line-height: 1.35;
}
.h1startsida h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.h2startsida h2 {
  font-size: clamp(1rem, 2vw, 1.3rem);
}

section {
  margin: 5px;
}

label {
  font-size: 0.7em;
  font-weight: 100;
}
.underrubrik {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 200;
  margin-bottom: 10px;
}
.tools p {
  max-width: 60ch;
  margin-bottom: 1.4em;
  line-height: 1.6;
}
.tools__image {
  max-width: 420px;
  margin: 2rem auto;
  text-align: center;
}

.tools__image img {
  width: 100%;
  height: auto;
}

.tools__image figcaption {
  font-size: 0.85rem;
  font-style: italic;
  margin-top: 0.5rem;
  opacity: 0.8;
}

.tools__closing {
  margin-top: 2rem;
  font-weight: 500;
}
.tools__epilog {
  margin-top: 2.5rem;
  font-style: italic;
  opacity: 0.85;
}

.omOss {
  display: grid;
  align-content: center;
  margin-inline: auto;
  background-color: rgb(170, 190, 183);
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  padding: 30px;
  margin-top: 0%;
  font-size: 1.2em;
}
.about p {
  max-width: 60ch;
  margin-bottom: 1.4em;
  line-height: 1.6;
}
.about-closer {
  margin-top: 2em;
  font-style: italic;
}
.kontaktaOss {
  display: grid;
  align-content: center;
  margin-inline: auto;
  width: 80%;
  max-width: 650px;
  color: hsla(0, 0%, 1%, 1);
  font-size: 1.2em;
}
.kontaktaOss:nth-last-child(1) {
  margin-top: 5%;
  margin-bottom: 10%;
  text-align: center;
}
.kontaktaOss,
.form {
  transition: opacity 0.3s ease;
}

.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.innehallGdpr {
  max-width: 720px;
  width: 100%;

  font-size: 0.95rem;
  line-height: 1.65;

  color: rgba(0, 0, 0, 0.85);
}
.innehallGdpr h3 {
  font-size: 1.3rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.innehallGdpr h4 {
  font-size: 1.05rem;
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.innehallGdpr p {
  margin-bottom: 1rem;
}

.innehallGdpr ul {
  margin: 0.5rem 0 1.5rem 1.2rem;
}

.innehallGdpr li {
  margin-bottom: 0.4rem;
}
.innehallGdpr ul:last-of-type {
  padding: 1rem 1.2rem;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
}

h4 {
  text-align: center;
}
.tools h4 {
  text-align: left;
}
@media (max-width: 768px) {
  .page-content {
    padding: 1rem;
  }

  .about p,
  .tools p {
    line-height: 1.7;
    margin-bottom: 1.2rem;
  }
}
@media (max-width: 768px) {
  .tools__image {
    margin: 1.5rem auto 2rem;
    max-width: 90%;
  }

  .tools__image figcaption {
    font-size: 0.8rem;
    line-height: 1.4;
  }
}
@media (max-width: 768px) {
  .tools__list h4 {
    margin-top: 1.6rem;
    margin-bottom: 0.3rem;
    font-size: 1rem;
  }
}
@media (max-width: 768px) {
  .tools__closing {
    margin-top: 2rem;
    font-weight: 500;
  }
}

/* ------------Pictures------------------- */

#frontImage {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 75%;
  max-height: 75%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ------------------Back-------------- */

button.buttonBack {
  position: fixed;
  width: fit-content;
  cursor: pointer;
  padding: 3px 12px 3px 12px;
  background-color: rgb(86, 165, 164);
  background: linear-gradient(to bottom, #2e6b7f, #cbeefa);
  margin-left: 1%;
  margin-bottom: 3%;
  bottom: 35px;
  border-radius: 25px;
  /* border: 2px 4px 2px 2px solid rgb(69, 83, 97); */
  border-left: solid rgba(249, 200, 191, 0.4);
  opacity: 0.9;
  color: #1f3847;
  font-size: 1.3em;
  font-family: var(--font-regular);
  font-weight: 400;
  box-shadow: 5px 4px 8px rgba(0, 0, 0, 0.4);
  z-index: 1000 !important;
  transition:
    background-color 0.2s ease-in-out,
    box-shadow 0.2s ease-in-out,
    border 0.2s ease-in-out;
}

.buttonBack:active {
  background-color: rgba(255, 40, 3, 1);
  border: solid 1px #1f3847;
  background: linear-gradient(to bottom, #690202, #fc5252);
  box-shadow: none;
  transform: translateY(
    2px
  ); /* Simulerar tryck-effekten genom att flytta knappen lite neråt */
}

.buttonBack:active::before {
  content: "";
  position: absolute;
  height: 7px;
  width: 15px;
  height: 2px;
  margin-top: 0;
  margin-left: 10%;
  margin-right: 10%;
  border-radius: 30px;
  background-color: rgba(249, 200, 191, 0.4);
  transform-origin: 0 0;
  animation: scaleLine 0.3s forwards;
}

@keyframes scaleLine {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(3);
  }
}

/* =========================
   HEADER – CONTAINER SETUP
========================= */

.header {
  container-type: inline-size;
  container-name: header;
}
