@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* BRAND COLOR*/
    --yellow: #ffd600;
    --orange: #ff7a00;
    --red: #ff0069;
    --plum: #d300c5;
    --violet: #7638fa;

    --border: hsl(205, 10%, 86%);
    --text-accent: hsl(205, 4%, 59%);
    --text-primary: hsl(205, 8%, 24%);
    --accent-primary: hsl(203 96 47);

    --accent: hsl(206 23 37);
    --accent-light: hsl(205, 6%, 66%);
    --accent-lighter: hsl(205, 3%, 92%);
    --accent-dark: hsl(206, 28%, 29%);
    --accent-darkest: hsl(206, 7%, 18%);
}

.app {
    --gap: 0.25rem;
    --brder-base: 18px;
    --brder-outer: 12px;
    --brder-inner: calc(var(--brder-outer) - var(--gap));
    --header: 112px;
    --shadow-1: #495057;
    --shadow-2: #adb5bd;
    inline-size: var(--width);
    /*overflow: hidden;
    display: grid;
    grid: "header" var(--header) "main" 1fr;*/
    /* aspect-ratio: 1/1.67;*/
    border: 1px solid var(--border);
    border-radius: var(--brder-base);
    background-color: #fff;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
}

/* IM SO PROUD OF THIS... */
.app:has(.dialog.open) :where(header, .navigation__list-container) {
    pointer-events: none;
}
/* ...AND THIS TOO */
.app:has([data-hidden="false"]#collection1) .button--go-back {
    visibility: hidden;
}

.gallery-category-carousel .owl-nav {
    margin-top: 0px;
    margin-bottom: 30px;
}

header {
    /*grid-area: header;
    display: grid;
    align-content: space-between;
    padding-inline: 1rem;
    padding-block: 1rem 1rem;*/
    width: 100%;
}

.button--go-back {
    inline-size: 2.25rem;
    display: inline grid;
    place-content: center;
    aspect-ratio: 1;
    position: relative;
    border: 0;
    background: 0;
}

.arrow-left {
    width: 1.25rem;
    height: 1.25rem;
    fill: var(--accent-light);
    transition: fill 266ms ease-out;
}

.button--go-back::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: #0001;
    opacity: 0;
    transition: opacity 266ms ease-out;
}

.button--go-back:focus-visible {
    outline: 2px solid var(--accent-primary);
}

.button--go-back:hover::before {
    opacity: 1;
}

.button--go-back:where(:hover, :focus-visible) .arrow-left {
    fill: var(--accent-darkest);
}

.dynamic-title {
    place-self: end start;
    font-size: 20px;
    font-weight: 500;
    font-family: roboto;
    line-height: 1;
    letter-spacing: 0.3px;
    color: var(--accent-primary);
    text-transform: capitalize;
}

/*main {
    --_nav: 5.5rem;
    grid-area: main;
    display: grid;
    gap: 0.5rem;
    grid: "nav" var(--_nav) "gallery" 1fr;
}*/

nav {
    grid-area: nav;
}

.navigation__list-container {
    /*list-style: none;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;*/
    /*block-size: 100%;
    align-items: center;*/
}

.gallery-item {    
    margin-bottom: 20px;
    text-align: center;
}

.gallery-item img {
    height: 350px;
    width: auto;
    max-width: 100%;
}

.list-item {
    width: 200px;
    display: grid;
    gap: 0.125rem;
    text-align: center;
    place-content: center;
    block-size: calc(var(--_nav) - 0.5rem);
}

.nav-button {
    display: grid;
    aspect-ratio: 1;
    block-size: 3.5rem;
    border-radius: 50%;
    border: 0;
    background: 0;
    position: relative;
    outline-color: transparent;
    cursor: pointer;
    z-index: 0;
    margin: 0 auto;
}

.nav-button::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    place-self: center;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    border-radius: inherit;
    background: #0184cd;
    opacity: 0;
    scale: 70%;
    transition: opacity 350ms ease-out, scale 300ms ease-out;
}

.nav-button::after {
    content: "";
    position: absolute;
    z-index: -1;
    place-self: center;
    width: calc(100% + 0px);
    height: calc(100% + 0px);
    border-radius: inherit;
    opacity: 1;
    outline: 2px solid var(--accent-lighter);
    outline-offset: 0px;
    transition: opacity 200ms ease-in;
}

.avatar-icon {
    place-content: center;
    margin: 0.125rem;
    border-radius: inherit;
    aspect-ratio: 1;
    display: inline-grid;
    background-color: var(--accent-lighter);
}

.avatar-icon--svg {
    fill: var(--accent-light);
    display: block;
    width: 1.5rem;
    height: 1.5rem;
    transition: fill 266ms linear;
}

.list-item .label {
    color: var(--text-accent);
    font-size: 13.3px;
    font-weight: 600;
    transition: color 300ms ease-out;
    width: 100%;
}
@media only screen and (max-width: 700px) {
    .label {
        font-size: 12px;
    } 
}
.nav-button[aria-selected="true"]::before {
    opacity: 1;
    scale: 1;
}
.nav-button[aria-selected="true"] .avatar-icon {
    background-color: #fff;
}

.nav-button[aria-selected="true"]::after {
    opacity: 0;
}

li:has(.nav-button[aria-selected="true"]) :where(.label, .avatar-icon--svg) {
    color: var(--accent-darkest);
    fill: var(--accent-darkest);
    transition: fill 500ms linear, color 500ms linear;
}

.nav-button[aria-selected="false"]:hover .avatar-icon--svg {
    fill: var(--accent);
}

li:has(.nav-button[aria-selected="false"]:hover) .label {
    color: var(--accent);
}

.image-gallery {
    grid-area: gallery;
    position: relative;
    block-size: 100%;
    padding: calc(var(--gap) * 2);
    background: var(--accent-lighter);
}

.rs-gallery {
    grid-area: gallery;
    position: relative;
    border-radius: 0 0 10px 10px;
    margin: 10px;
    block-size: 100%;
    padding: calc(var(--gap) * 2);
}

/*.image__gallery-collection {
    block-size: 100%;
    list-style: none;
    display: grid;
    border-radius: var(--brder-inner);
    grid-template-columns: repeat(
        auto-fit,
        minmax(calc(100% / 3 - calc(var(--gap) * 2)), 1fr)
    );
    gap: calc(var(--gap) * 2);
    overflow: hidden;
}

.image__gallery-collection:has(:last-child:nth-child(4)) {
    grid-template-columns: repeat(2, 1fr);
}

.image__gallery-collection:has(:last-child:nth-child(2)) {
    grid-template-rows: repeat(2, 1fr);
    grid-auto-flow: column;
}*/

.image-item {
    display: grid;
    cursor: pointer;
    overflow: hidden;
}
.image-item img{
    width: 100%;
    height: 200px;
    max-height: 100%;
}



.dialog {
    position: absolute;
    z-index: 10;
    inset: 0;
    padding: 1.5rem;
    border: none;
    display: none;
    background-color: #0008;
}

.dialog.open {
    display: grid;
    animation: show2 400ms ease-out forwards;
}

@keyframes show2 {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 3rem;
    right: 3rem;
    background: #0000;
    aspect-ratio: 1;
    height: 2.25rem;
    border: none;
    outline-color: transparent;
    color: var(--accent-lighter);
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    -webkit-text-stroke: 1.25px var(--accent-darkest);
}

.dialog.open .close-btn:where(:hover) {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    background: #fff7;
}

.image__gallery-collection[data-hidden="true"] {
    display: none;
}