/* styles.css */
:root {
  --font-sans: Helvetica, Arial, sans-serif;
  --spacing: 1rem;
  /* Responsiva tumnaglar med clamp: min 300px, 60vh, max 600px */
  --thumb-height: clamp(300px, 60vh, 600px);
  --thumb-min-width: clamp(250px, 30vw, 400px);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  overflow-x: hidden;
}
body {
  font-family: var(--font-sans);
  color: #000;
  background: #fff;
  line-height: 1.6;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing);
  margin-bottom: ;
}
h3 {
  color: inherit;
}
.nav-list {
  display: flex;
  gap: var(--spacing);
  list-style: none;
}
.nav-list a {
  text-decoration: none;
  font-weight: bold;
  color: inherit;
}

.active {
  text-decoration: none;
  font-weight: bold;
  color: inherit;
    display: flex;
  gap: var(--spacing);
  list-style: none;
}

main {
  padding: 0 var(--spacing);
}
section {
  margin-bottom: calc(var(--spacing) * 2);
}
/* Gallerilayout med CSS Grid: flexibla kolumner */
#works {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--thumb-min-width), 1fr));
  gap: var(--spacing);
  justify-content: center;
  margin-top: var(--spacing);
}
/* Varje objekt: stapla bild + info */
#works .work-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* Bild-styling: responsiv höjd, max-bredd */
#works .work-item img {
  height: var(--thumb-height);
  width: auto;
  max-width: 100%;
  object-fit: cover;
  cursor: pointer;
  display: block;
}
/* Text under bild */
#works .work-item .info {
  margin-top: calc(var(--spacing) / 2);
  text-align: center;
}
.info p {
  font-size: inherit;
}
.info .title {
  font-style: italic;
}
/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.lightbox.hidden {
  display: none;
}
.lightbox-image {
  max-width: 90%;
  max-height: 80%;
}
.lightbox-info p {
  margin-top: 1rem;
  text-align: center;
}
.lightbox-info .title {
  font-style: italic;
}
.lightbox button {
  position: absolute;
  background: none;
  border: none;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}
.lightbox .close {
  top: var(--spacing);
  right: var(--spacing);
}
.lightbox .prev {
  left: calc(var(--spacing) * 2);
  top: 50%;
  transform: translateY(-50%);
}
.lightbox .next {
  right: calc(var(--spacing) * 2);
  top: 50%;
  transform: translateY(-50%);
}
/* Mobilanpassning */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: center;
  }
  header h1 {
    width: 100%;
    text-align: center;
    margin-bottom: calc(var(--spacing) / 2);
  }
  .nav-list {
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
    margin-bottom: calc(var(--spacing) / 2);
  }
  .nav-list li {
    width: 33.3333%;
    text-align: center;
  }
  #works {
    grid-template-columns: 1fr;
  }
  #works .work-item {
    max-width: 90vw;
  }
}
.instagram-link {
  display: inline-block;
  margin-top: var(--spacing);
  color: inherit;
}
.instagram-link svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Portrait image sizing on CONTACT page */
.portrait {
  justify-self: center;
  max-width: 270px;
  width: 100%;
  height: auto;
  display: block;
  margin: var(--spacing) 0; /* bara vertikalt avstånd */
  border-radius: 0;          /* raka hörn */
  margin-top: ;
}

/* Center all content on the CONTACT page */
#contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--spacing);
}

#contact p,
#contact .portrait-wrapper {
  width: 100%;
  max-width: 400px;
}

footer {
    text-align: center;
    padding: 1rem 0;
    font-size: 0.9rem;
    color: lightgray;
    background-color: white;
}

@media (max-width: 600px) {
  /* Mobile-specific negative bottom margin for header */
  header {
    margin-bottom: -15px;
  }
  .portrait {
      margin-bottom:;
      justify-self: center;
      margin-top: -3px;
      max-width: 90%;
}

  /* ... övriga mobilregler ... */
}

