/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Document */
html {
  height: 100%;
}

body {
  margin: 0;
  height: 100vh;
  padding: 0;
  font-family: neue-haas-grotesk-display, sans-serif;
  font-weight: 600;
  font-style: normal;
  background-color: #ffffff;
}

/* Header */
.header {
  position: fixed;
  top: -40px;
  left: 0;
  width: 100vw;
  display: flex;

  justify-content: space-between;
  transition: top 0.3s ease;
  z-index: 1000;
  padding: 2px 20px 0;

}

.header a {
  text-decoration: none;
  text-transform: uppercase;
  text-wrap: none;
  color: black;
  font-size: 13px;
}

.contacts {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Gallery containers */
.gallery-continer {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 0px;
  transition: all 0.4s cubic-bezier(.2, .8, .2, 1);
}
/* Rows */
.gallery {
  display: flex;
  flex: 1;                 /* default row size */
  gap: 0px;
  overflow: hidden;
  transition: flex 0.4s cubic-bezier(.2,.8,.2,1);
}

/* When any item is active, only that row expands */
.gallery-continer:has(.gallery-item.active) .gallery {
  flex: 1;
}
.gallery-continer:has(.gallery-item.active) .gallery:has(.gallery-item.active) {
  flex: 10;
}

/* Items */
.gallery-item {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex: 1;                 /* default item size */
  height: 100%;
  transition: flex 0.4s cubic-bezier(.2,.8,.2,1);
  transform-origin: top;
}

/* Hover preview (slightly bigger) */
.gallery-item:hover {
  flex: 3;
background-color: #fbfbfb;
}

/* Clicked item expands big */
.gallery-item.active {
  flex: 10;
}

/* Siblings inside the active row get a fixed size */
.gallery:has(.gallery-item.active) .gallery-item:not(.active) {
  flex: 1;
}

/* Images */
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1);
}
