* {
  margin: 0;
  padding: 0;
}

/*colors*/
/*__________________________________________________________________________*/
:root {
  --blue: #98C3FE ;  /*rgba(112, 110, 127, 0.597);/*rgba(228, 75, 134, 0.6);
  /* 75, 149, 228, 0.6   rgba(0, 107, 224, 0.39);*/
  --white: rgb(252, 252, 252);
  --yellow: #fcf4ba;
  /*255, 244, 189  rgba(246, 247, 179, 1);*/
  --gray: rgb(245, 243, 244); /*240*3*/
  --dark: rgb(39, 33, 23);
  /*rgb(39, 54, 93);*/

  --ttest: var(--tyellow);
  --test: rgb(59, 40, 12);
  --tblue: hsla(215, 100%, 70%, 0.667);; /*hsla(215, 100%, 70%, 0.667);*/
  --tred: #fab3a9;
  --tpurple: #1700976c;
  --tpurple2: #9587e5;
  --tyellow: rgba(254, 238, 134, 0.555);

}

title {
  background-color: rgb(0, 66, 232);
  color: #2d7edb;
}

body {
  background-color: #f1f1f1;
  overflow-x: hidden;
  /*undvika sidoscroll*/
}

.card,
.additional-info,
.contact-info,
.flex-container {
  background-color: #ffffff;
}

/*media*/
/*__________________________________________________________________________*/

img,
video {
  background-color: transparent;
  /* Ensure images and videos do not have a background color */
  border-radius: 1px;
}

img {
  max-width: 90%;
  max-height: 50rem;
  /* utvärdera */
  object-fit: contain;
  display: block;
}

.square,
.tall,
.wide {
  width: 100%;
  position: relative;
  overflow: hidden;
  display: block;
}

.square {
  padding-top: 100%; /* 1:1 aspect ratio */
}

.tall {
  padding-top: 150%; /* 3:4 aspect ratio (height/width * 100) */
}

.wide {
  padding-top: 75%; /* 4:3 aspect ratio (height/width * 100) */
}

/* Crop images inside these containers */
.square img,
.tall img,
.wide img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  max-width: none;
  max-height: none;
}

.BW {
  filter: grayscale(60%) brightness(1.1);
}

video {
  max-width: 80%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  padding-bottom: 3rem;
}

.arrow {
  margin: auto;
  margin-top: 2rem;
  place-self: center;
  fill: var(--white);
  width: 8rem;
  height: auto;
  position: absolute;
 
}

.arrow svg {
  width: 100%;
}

.svg-icon * {
  fill: rgb(121, 157, 121);
  /* Set all elements inside the SVG to green */
  max-width: 5px;
  display: block;
  margin: auto;
}

/*text*/
/*____________________________________________________________________________*/

@font-face {
  font-family: 'Josefin-Sans';
  src: url('fonts/Josefin_Sans/JosefinSans-VariableFont_wght.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Alatsi';
  src: url('fonts/Alatsi/Alatsi-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Spartan';
  src: url('fonts/League_Spartan/LeagueSpartan-VariableFont_wght.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'Inconsolata';
  src: url('fonts/Inconsolata/Inconsolata-VariableFont_wdth\,wght.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Urbanist';
  src: url('fonts/Urbanist/Urbanist-VariableFont_wght.ttf');
  font-weight: 600;
  font-style: normal;
}

body {
  font-family: 'Alatsi', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  color: var(--dark);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Spartan', sans-serif;
  font-weight: 400;
  letter-spacing: 0.18rem;
}

h1 {
  /* projekt-titel*/
  font-size: 2.5em;
  color: var(--dark);
  text-align: center;
  padding-top: 1em;
  font-weight: 400;
}

h2 {
  /* projekt-underrubrik*/
  font-size: 1.8em;
  text-align: center;
  font-style: italic;
  color: var(--dark);
  padding: 1em;
}

h3 {
  /* kapittelrubrik */
  font-size: 1.8em;
  font-weight: 550;
  text-align: center;
  padding: 2rem;
}

h4 {
  font-size: 1.3em;
  color: var(--dark);
  padding-bottom: 1rem;
}

p {
  font-family: 'inconsolata', sans-serif;
  font-weight: 400;
  max-width: 40vw;
  margin: auto;
  font-size: 1em;
  line-height: 2em;
  letter-spacing: -0.02rem;
}

a {
  font-family: 'Inconsolata', sans-serif;
  text-decoration: none;
  color: var(--dark);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

p a {
  color: inherit;
  /* Inherit the color of the surrounding text */
  text-decoration: underline;
  display: inline;
}

a:hover {
  scale: 102%;
  transition: all 0.25s ease;
  /*color: var(--yellow);*/
}

li {
  list-style: none;
}

.creators {
  text-align: center;
  width: 100%;
}

/*classes for design functions*/
/*____________________________________________________________________________*/

header {
  margin-top: 0;
  width: 100%;
  position: fixed;
  z-index: 1000;
  background-color: var(--tyellow);
  backdrop-filter: blur(1.8px);
  -webkit-backdrop-filter: blur(1.5px);
  /* Safari support */
  box-sizing: border-box;
  /* Inkludera padding och border i bredden */
}

header h1 {
  color: var(--dark);
  font-size: 3em;
  text-align: left;
  padding: 0.2em 0em 0em 0.2em;
  line-height: 1;
}

header h1:hover {
  color: var(--dark);
}

header a {
  color: var(--dark);
  font-family: Spartan, sans-serif; 
}


/*header #nav{
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

#nav ul{
  display: flex;
  justify-content: space-evenly;
}

#nav li {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}*/

/* Basic navbar styles */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  margin-left: auto;
  /* Flytta menyn till höger */
  justify-content: flex-end;
  /* Justera innehållet till höger */
  width: auto;
  /* Ta endast upp så mycket plats som behövs */
  box-sizing: border-box;
  padding-right: 1rem;
  /* Lägg till 1rem padding på höger sida */
}

/* Hamburger styles */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  margin-right: 1rem;
}

.hamburger span {
  display: block;
  height: 4px;
  width: 100%;
  background: var(--dark);
  margin: 5px ;
  border-radius: 2px;
  transition: 0.3s;
}

/* Responsive styles */
@media (max-width: 900px) {
  .main-nav {
    display: none;
    /* Dölj menyn som standard */
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 0;
    /* Placera menyn mot höger */
    background: var(--gray);
    width: 200px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    padding: 1rem 0;
  }

  .main-nav.active {
    display: flex;
    /* Visa menyn när den är aktiv */
  }

  .hamburger {
    display: flex;
  }
}

#nav .active:not(h1) {
  color: var(--dark);
  text-decoration: underline;
}

.hero {
  margin: 0;
  padding-bottom: 3rem;
  padding-top: 8rem;
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* Default: Two columns */
  background-color: var(--white);
  background-size: cover;
  background-position: center;
  align-items: center;
  justify-content: center;
  align-content: center;
}

.hero h1 {
  padding: 0;
  grid-column: span 1;
  /* Ensure the title spans both columns */
  text-align: center;
  justify-self: right;
  padding-right: 2rem;
}

.hero h2 {
  text-align: left;
  padding: 0;
  margin: 2rem;
  color: var(--dark);
}

.hero p {
  padding: 0;
  padding-left: 2rem;
  color: var(--dark);
  width: 40%;
  max-width: 400px;
  margin: 0%;
}

footer {
  display: flex;
  padding: 3rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  justify-items: center;
  background-color: var(--yellow);
}

footer a {
  padding: 1rem;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  color: var(--dark);
  font-size: 1.2rem;
}

footer svg {
  margin-right: .5rem;
}

footer a:hover {
  text-decoration: underline;
  outline: none;
  color: var(--dark);
}


/* layout classes*/
/*_______________________________________________________________________*/

.grid-container {
  /* 4 som standard, ett mellanläge med 2 kolumner och för mobilen ett långt flöde*/
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 3rem;
  gap: 5rem 3rem;
  justify-items: center;
}

.grid-container img {
  place-self: center;
}

.text {
  width: 80%;
  max-width: 30vw;
  place-self: center;
}

.text-one {
  width: 80%;
  grid-column: span 1;
  place-self: center;
}

.text-two {
  grid-column: span 2;
}

.span-1 {
  grid-column: span 1;
}

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: span 3;
}

.span-4 {
  grid-column: span 4;
}

.grid-container p,
h4 {
  margin: auto;
  justify-self: center;
  align-self: center;
}

.grid-container h3 {
  padding: 0;
}

@media screen and (max-width: 1150px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .dynamic-span {
    grid-column: span 2;
  }

  .text {
    width: 80%;
    max-width: 90vw;
  }

  .text-one {
    grid-column: span 2;
    width: 80%;
    max-width: 90vw;
  }

  .span-3,
  .span-4 {
    grid-column: span 2;
  }
}

@media screen and (max-width: 767px) {
  .grid-container {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .grid-container p h4 {
    margin: 0;
    max-width: 100%;
  }

  .text-one,
  .span-2,
  .span-3,
  .span-4 {
    grid-column: span 1;
  }

  .text p {
    max-width: 80vw;
  }

  .text-one p {
    max-width: 80vw;
  }
}

/*___________________________________________________________________________*/

.grid {
  display: grid;
  grid-auto-flow: column;
  /* Force items to flow in a single row */
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  /* Flexible column widths */
  gap: 1rem;
  /* Add spacing between items */
  align-items: center;
  /* Align items vertically */
  justify-items: center;
  /* Center items horizontally */
  margin: auto;
}

.grid img {
  width: 100%;
  /* Make images responsive to the container width */
  height: auto;
  /* Maintain aspect ratio */
  object-fit: contain;
  /* Ensure images fit without distortion */
  place-self: center;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  max-width: 100%;
}
.placeholder {
  aspect-ratio: 1 / 1; /* Ensures placeholders are square */
  background-color: var(--tyellow);
}
.gallery img {
  width: 95%;
  aspect-ratio: 1 / 1;     /* ensures each image bounds to a square */
  object-fit: contain;       /* fills the box, maintaining aspect */
  display: block;
  margin: auto;
}
.gallery .placeholder {
  width:25%;
  aspect-ratio: 1 / 1;     /* ensures each image bounds to a square */
  object-fit: contain;       /* fills the box, maintaining aspect */
  display: block;
  margin: auto;
}


@media (min-width: 1200px) {
  .gallery {
    grid-template-columns: repeat(5, 1fr); /* Limits grid to 5 columns on large screens */
  }
}

.dark-section {
  width: 100%;
  color: #ffffff;
}

.dark-section h2 {
  color: #ffffff;
}

.dark-section h3 {
  color: #ffffff;
}

.dark-section h4 {
  color: #ffffff;
}

/*cards*/
/*__________________________________________________________________________*/
.card-holder {
  padding: 1rem 0rem;
  background-color: var(--gray);
}

.card {
  width: 39vw;
  height: fit-content;
  margin: auto;
  margin-top: 5rem;
  margin-bottom: 1rem;
  border: 2px solid #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
  transition: all 0.2s ease-in-out;
}

.card .card-header {
  background-color: var(--blue);
  background-size: cover;
  height: 26vw;
  background-position: center;
  /*padding: 10em 2em;*/
  cursor: pointer;
  align-content: end;
  --card-header-text: var(--dark); /* default text color for dark images */
}

.card-header.light { --card-header-text: var(--dark); } /* for light backgrounds */
.card-header.dark  { --card-header-text: var(--white); text-shadow: 0 0 4px rgba(0, 0, 0, 0.7); } /* for dark backgrounds */

/* make header text use that variable */
.card-header .card-header-text,
.card-header .card-header-text h5,
.card-header .card-header-text h6 {
  color: var(--card-header-text);
  transition: color 0.2s ease;
}

/* always force dark text when header is hovered (white bg shown on hover) */
.card-header:hover .card-header-text {
  --card-header-text: var(--dark);
  text-shadow: none;
}

.card-header-text {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-content: end;
  justify-content: center;
  height: fit-content;
  transition: 0.2s;
  /*background-color: var(--tyellow);*/
  /*opacity: .75;*/
  /*backdrop-filter: blur(1.8px);
  -webkit-backdrop-filter: blur(1.5px);*/ /* Safari support */
}

.card h5 {
  line-height: normal;
  font-size: 2em;
  transition: all 0.2s ease;
  padding: 0;
  margin: 0;
}

.card h6 {
  opacity: 0;
  font-size: 1.3em;
  transition: all 0.2s ease;
  padding: 0;
  margin: 0;
}

.card:hover {
  scale: 101.5%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease-in-out;
}

.card-header:hover .card-header-text {
  box-shadow: inset 0 0 0 2000px var(--white);/*rgba(255, 255, 255, 1)*/
  opacity:1;
  transition: all 0.3s ease-in-out;
}

/*box-shadow: inset 0 0 0 2000px rgba(244, 255, 255, 0.5); mörk version*/

.card-header:hover h5 {
  opacity: 1;
  color: var(--dark);
}

.expanded .card-header-text {
  opacity: 0;
}
.expanded:hover h5,
.expanded:hover h6,
.expanded:hover .card-header-text {
  opacity: 0;
}

.card-header:hover h6 {
  opacity: 1;
}

.card-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-in-out;
  color: #202020;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.card-content img {
  cursor: pointer;
  transition: box-shadow 0.3s;
}
/*.card-content img:hover {
  box-shadow: 0 0 8px #aaa;
}*/

.card-content h2 {
  color: #202020;
}

.card.expanded {
  width: 80%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card.expanded:hover {
  scale: 100%;
}
.card.expanded p {
  width: 90%;
}

.card.expanded img {
  margin: 30px;
  margin: 0 auto;
}

.card.expanded .card-content {
  max-height: 50000px;
  padding-bottom: 5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.home-cards {
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  margin: auto;
  padding: 3rem;
  justify-content: center;
  justify-items: center;
}

.home-card {
  width: 300px;
  height: 200px;
  margin: 1rem;
  margin-bottom: 0;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.35s ease-in-out;
}

.home-cards a {
  text-decoration: none;
}

.home-card h2 {
  opacity: 1;
  color: #fff;
  margin: 0;
  padding: 0;
  margin-top: 25rem;
  font-size: 30px;
  font-style: normal;
  text-align: center;/*centrera?*/
}

.home-card p {
  opacity: 0;
  margin: auto;
}
.home-card:hover {
  box-shadow: inset 0 0 0 2000px rgba(255, 255, 255, 0.3);
}

.home-card:hover h2 {
  opacity: 1;
  color: var(--dark);
  transition: all 0.35s ease-in-out;
}

.home-card:hover p {
  opacity: 1;
  color: var(--dark);
  transition: all 0.35s ease;
}

.home-card {
  background-image: url(/Images/DSC05490.jpg);
  background-size: cover;
  background-position: center;
  padding: 1em 1em 20em 1em;
  cursor: pointer;
}

/* effects*/

.grainy {
  position: relative;
  overflow-x: hidden; /* ensures the grain stays inside */
}
  
/* Grain overlay */
.grainy::before {
  content: "";
  position: absolute;
  inset: 0; /* covers entire container */
  pointer-events: none; /* so it doesn’t block clicks */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><rect width='120' height='120' fill='%23ffffff'/><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch' /></filter><rect width='120' height='120' filter='url(%23n)' opacity='0.06' /></svg>");
  background-repeat: repeat;
  background-size: 120px 120px;
  mix-blend-mode: multiply; /* blends grain subtly */
  z-index: 1;
}


/* image expands */

/* Lightbox Modal Background */

#img-modal {
  display: none; /* Hide modal by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8); /* grey translucent background */
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Large Image in Modal */
.modal-content {
  max-width: 90%;
  max-height: 90%;
  cursor: grab;
  user-select: none;
  transition: transform 0.2s ease;
  transform-origin: center center;
}

/* Close Button */
.close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 4rem;
  color: white;
  cursor: pointer;
  z-index: 1001;
}

/*media queries*/
/*---------------------------------------------------*/

@media screen and (max-width: 600px) {

  .hero {
    grid-template-columns: 1fr;
    /* Stack content vertically */
    justify-content: start;
    align-items: start;
    /* Align items to the top-left */
    text-align: left;
    /* Ensure text aligns to the left */
  }

  .hero h1 {
    justify-self: left;
    text-align: left;
    padding-left: 2rem;
    margin-bottom: 2rem;
    max-width: 90%;
    font-size: 2.2em;
  }

  .hero p {
    margin: 0;
    /* Remove any default margin */
    padding-left: 2rem;
    /* Ensure consistent padding */
    width: 90%;
    /* Make the text take up more space */
  }

.card-header-text {
  padding: 0.3rem;
}

  header h1 {
    font-size: 2em;
  }

  #nav ul {
    flex-direction: column;
    /* Stack the links vertically */
    align-items: center;
    /* Center the links */
    gap: 0.1rem;
    /* Add spacing between the links */
  }

  #nav li {
    justify-content: center;
    /* Center the content inside each list item */
  }

  .home-cards {
    flex-direction: column;
    margin: 10px;
    justify-content: center;
    align-items: center;
    justify-items: center;
  }
}

@media screen and (max-width: 900px) {
  .card {
    width: 90vw;
  }

  .card .card-header {
    height: 60vw;
  }

  .card.expanded {
    width: 95%;
  }

  .card h5 {
    font-size: 2em;
    /* Adjust font size for smaller screens */
  }

  .card h6 {
    font-size: 1em;
    /* Adjust font size for smaller screens */
  }
  
  .grid {
    grid-template-columns: 1fr;
    /* Stack items in a single column */
    grid-auto-flow: row;
    /* Force items to flow in a single row */
  }
  .grid img {
    width: 70vw;
    max-width: 15rem;
    place-self: center;
    margin: auto;
  }
}

@media screen and (max-width: 1150px) {
  .home-card {
    width: 150px;
    height: 100px;
    padding: 1em 1em 10em 1em;
    ;
  }

  .home-card h2 {
    font-size: 16px;
    margin-top: 13rem;
  }
}

@media (hover: none) {

  /* Ensure hover effects never show on touch devices */
  .home-card:hover,
  .home-card:hover h2,
  .home-card:hover p,
  .card-header:hover .card-header-text,
  .card-header:hover h5,
  .card-header:hover h6,
  .home-card p {
    box-shadow: none;
    /* Remove hover shadow */
    color: inherit;
    /* Keep the original color */
    opacity: 0;
    /* Directly set opacity to 0 */
  }
}

