main {
    background-color: var(--color-brand-2);
}

.work-section-1 {
    padding: 4rem var(--padding-1600px);
    width: 100%;
}

.work-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4rem 1rem;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

.work-container a {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 100%;
    /* height: 10%; */
    /* width: 100%;
    height: 100%; */
    /* height: 75vh;          */
    /* width: 100%; */
    /* height: 100%; */
    /* cursor: pointer; */
    text-decoration: none;
    animation: rise 0.8s ease both;

}


.work-container li img {
    width: 100%;
    height: 100%;
    /* border-radius: 0.25rem; */
    
}

.brand-name {
    font-family: elza-text, sans-serif;
    font-weight: 400;
    font-style: normal;
    color: var(--color-brand-1);
    font-size: 1rem;
    line-height: 1;
    white-space: unset;
    text-wrap: pretty;
    width: fit-content;
}

.work-container a::after {
    /* height: 1px; */
    content: "";
    display: block;
    width: 100%;
    /* height: 1px; */
    border-bottom: 1px solid var(--color-brand-1);
    /* background-color: var(--color-brand-1); */
}





/* ---------- Page lock ---------- */
html {
    scrollbar-gutter: stable;
}

body:has(dialog[open]) {
    overflow: hidden;
}

/* ---------- Dialog ---------- */
.work-overlay {
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    background-color: transparent;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.work-overlay::backdrop {
    background: rgb(0 0 0 / 0.5);
}

.work-overlay-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1;
    cursor: pointer;

    width: var(--arrow-size, 2.5rem);
    height: var(--arrow-size, 2.5rem);
    padding: 0;
    border: 0;
    background: none;
    color: #fff;
}


/* ---------- Gallery ---------- */
.work-overlay-gallery {
    --image-width: 300px;
    --arrow-size: 2.5rem;
    --arrow-gap: 0.75rem;
    position: relative;
    height: 100%;
    padding: 4rem 0rem 6rem 0rem;
}

.gallery-track {
    display: flex;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.gallery-track::-webkit-scrollbar {
    display: none;
}

/* ---------- Slides ---------- */
.gallery-slide {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    padding-inline: 1rem;
    scroll-snap-align: center;
}

.gallery-scroll {
    width: min(calc(var(--image-width) + 1rem), 100%);
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 0.25rem;
    /* gap between the image and the bar */
    scrollbar-width: thin;
    scrollbar-color: rgb(255 255 255 / 0.45) transparent;

}

.gallery-scroll:hover {
    scrollbar-color: rgb(255 255 255 / 0.8) transparent;
}

.gallery-scroll img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 1rem;
}

/* .gallery-slide::-webkit-scrollbar {
    display: none;
} */

/* .gallery-slide img {
    display: block;
    width: 100%;
    height: 100%;
    height: auto;
} */

/* ---------- Arrows ---------- */
.gallery-arrow {
    position: absolute;
    /* bottom: 1.5rem; */
    /* or top: 50% and translate, depending on your choice */
    width: var(--arrow-size);
    height: var(--arrow-size);
    cursor: pointer;
    padding: 0;
    border: 0;
    background: none;
    color: #fff;
    /* bottom: 1rem; */
}

.gallery-arrow-icon {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 16;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gallery-arrow-prev {
    left: calc(50% - var(--arrow-size) - var(--arrow-gap));
}

.gallery-arrow-next {
    left: calc(50% + var(--arrow-gap));
}


/* ---------- Keyboard focus ---------- */
/* .gallery-arrow:focus-visible,
.work-overlay-close:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
} */

.gallery-controls {
  position: absolute;
  bottom: max(2rem, env(safe-area-inset-bottom));
  left: 50%;
  translate: -50% 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.gallery-arrow,
.work-overlay-close {
  position: static;        /* the bar positions them now */
  width: var(--arrow-size);
  height: var(--arrow-size);
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
}