/* ARTIST PAGE */

.artist-content{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.artist-bio {
  display: flex;
  flex-wrap: wrap;
  gap: 20px; /* fixed gap between elements horizontally and vertically */
}

.artist-bio-element {  
  /* Remove horizontal padding to avoid width overflow */
  padding-top: 10px;
  padding-bottom: 150px;
  padding-left: 0;
  padding-right: 0;

  display: flex;
  flex-direction: row;
  align-items: center;
  overflow: hidden;
  justify-content: space-between;
}

/* Image container: 40% width, square */
.artist-bio-image {
  flex: 0 0 37%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  flex-shrink: 0;

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

.artist-bio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.artist-bio-text {
  flex: 0 0 56%;
  height: 100%;
  box-sizing: border-box;
  padding: 30px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  
  
  /* To increase letter spacing a bit, but only on all lines except last, we’ll do a trick below */
  /* Unfortunately, CSS cannot target “all lines except last” directly */
}


/* Menu items */
.external-link{
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  list-style: none;
  padding: 0;
  margin: 0;
  letter-spacing: var(--main-uppercase-spacing);
  font-size: 1.1vw;
  color: #ffffff;
  text-transform: uppercase;
}

/* Menu links */
.external-link a {
  color: white;
  margin-left: 1vw;
  margin-right: 1vw;
  text-decoration: none;
  transition: color var(--transition-time-long) ease;
}

.external-link a:hover {
  color: var(--main-red-color);
}

.external-link a:first-child {
  margin-left: 0;
}

.external-link a:last-child {
  margin-right: 0;
}





/* ARTISTS ARCHIVE */

.artists-archive-items {
  display: flex;
  align-items: center;
  width: 100%;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;                 /* Enable wrapping */
  justify-content: center;        /* Center items horizontally */
  align-content: center;          /* Center multiple rows vertically */
  height: 100%;  
}

.artists-archive-item {
  position: relative;
  flex: 1 0 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--main-background-color); /* fallback color */
  color: white;
  border-top: 1px solid var(--main-background-color);
  border-right: 1px solid var(--main-background-color);
  border-bottom: 1px solid var(--main-background-color);
  border-left: 1px solid var(--main-background-color);  
}

/* Background image as pseudo-element */
.artists-archive-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-image: var(--bg-url); /* Set via inline style in PHP */
  opacity: 0;
  transition: opacity var(--transition-time) ease-in-out, filter var(--transition-time) ease-in-out;
  z-index: 0;
  filter: grayscale(100%);
  /* filter: grayscale(100%) contrast(110%) brightness(120%); */
}

.artists-archive-item:hover::before {
  opacity: 1;
}

/* Hide actual <img> */
.artists-archive-item .artist-main-image {
  display: none;
}

/* Text content always on top */
.artists-archive-item h2 {
  z-index: 1;
  position: relative;
  width: 100%;
  height: 100%;
  font-size: 1.6vw;
  letter-spacing: var(--main-uppercase-spacing);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.artists-archive-item h2 a {
  color: inherit;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  transition: color var(--transition-time) ease;
}

.artists-archive-item h2 a:hover {
  color: var(--main-red-color);
}




@media (min-width: 901px) {
  /* First item: only right border */
  .artists-archive-item:first-child {
    border-right: 1px solid rgb(49, 49, 49);
  }

  /* Last item: only left border */
  .artists-archive-item:last-child {
    border-left: 1px solid rgb(49, 49, 49);
  }

  /* All other (middle) items: left and right borders */
  .artists-archive-item:not(:first-child):not(:last-child) {
    border-left: 1px solid rgb(49, 49, 49);
    border-right: 1px solid rgb(49, 49, 49);
  }
  .artists-archive-item {
    transition: border-left-color var(--transition-time) ease,
                border-right-color var(--transition-time) ease;
  }
}







@media (max-width: 900px) {
  .artist-bio {
    flex-direction: column;
    gap: 100px; /* vertical gap between elements */
    padding-bottom: 100px;
  }

  .artist-bio-element {
    flex-direction: column;
    align-items: center; /* center items horizontally */
    justify-content: flex-start;
    width: 100%; /* full width */
    padding: 0;
    gap: 100px;
  }

  .artist-bio-image {
    flex: 0 0 auto; /* reset flex */
    width: 100%; /* or 100%, or any width relative to viewport */
    aspect-ratio: 1 / 1; /* keep square */
    padding: 0;
  }

  .artist-bio-text {
    flex: 0 0 auto; /* reset flex */
    width: 100%; /* text container narrower than image */
    padding: 0;
  }

  .external-link {
    flex-direction: column;
    align-items: flex-start;
    font-size: 0.9rem;            /* Increase font size, adjust as needed */
    margin: 20px 6px;
  }

  /* Menu items full width with padding */
  .external-link a {
    width: 100%;
    margin: 2px 0;
    width: 100%;
    display: block;
  }



  /* ARTIST ARCHIVE */

  .artists-archive-items {
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: stretch;
  }

  .artists-archive-item {
    flex: none; /* Prevent growing/shrinking */
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    margin: 0; /* Remove any gaps */
  }

  .artists-archive-item h2 {
    font-size: 4.2vw;
  }

  .artists-archive-item:first-child {
    border-bottom: 1px solid rgb(49, 49, 49);
    border-right: 0;
  }

  /* Last item: only left border */
  .artists-archive-item:last-child {
    border-top: 1px solid rgb(49, 49, 49);
    border-left: 0;
  }

  /* All other (middle) items: left and right borders */
  .artists-archive-item:not(:first-child):not(:last-child) {
    border-bottom: 1px solid rgb(49, 49, 49);
    border-top: 1px solid rgb(49, 49, 49);
    border-left: 0;
    border-right: 0;
  }

  .artists-archive-item {
    transition: border-top-color var(--transition-time) ease,
                border-bottom-color var(--transition-time) ease;
  }


}
