/* SCSS */
/* SCSS */
/* ===== Usage ===== */
.gallery {
    width: 100%;
    padding: 1rem;
}

.gallery__wrapper {
    gap: 0.5rem;
    align-items: center;
    justify-content: start;
}

.gallery__content {
    border-top: 3px solid var(--clr-secondary);
}

.gallery__main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: start;
    margin-bottom: 1rem;
}

@media only screen and (min-width: 768px) {
    .gallery__main {
        grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
    }
}

@media only screen and (min-width: 1168px) {
    .gallery__main {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

.gallery__title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gallery__item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 30px;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--clr-neutral-70);
}

    .gallery__item:first-child {
        padding-top: 1rem;
    }

    .gallery__item:last-child {
        border-bottom: 0;
    }

    .gallery__item .entity__name {
        color: var(--clr-neutral-10);
    }

    .gallery__item:has(.ad-banner__wrapper) {
        width: 100%;
        max-width: 728px;
    }

.gallery__head {
    flex-shrink: 0;
    align-self: start;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--clr-secondary);
    color: var(--clr-secondary);
    font-weight: 600;
}

.gallery__wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gallery--wrapper {
    gap: 1rem;
}

.gallery__container {
    display: flex;
    gap: 0.5rem;
    overflow: auto;
    overflow-x: auto; /* Enable scrolling */
    scrollbar-width: none; /* For Firefox */
    -webkit-scrollbar: none;
}

.gallery__latest {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gallery__latest-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

@media only screen and (min-width: 992px) {
    .gallery__latest-wrapper {
        flex-direction: column;
        gap: 1rem;
    }
}

.gallery__latest-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media only screen and (min-width: 992px) {
    .gallery__latest-item {
        flex-direction: row;
    }
}

.gallery__latest-image {
    aspect-ratio: 2/3;
    -o-object-fit: cover;
    object-fit: cover;
}

@media only screen and (min-width: 992px) {
    .gallery__latest-image {
        width: 45%;
    }
}

.gallery__item {
    display: flex;
    flex-direction: column;
}

.gallery__image {
    border-radius: 0.5rem;
    -o-object-fit: cover;
    object-fit: cover;
}

.gallery__media {
    position: relative;
}

.gallery__navigations {
    position: absolute;
    display: grid;
    grid-template-columns: repeat(3, 30%);
    justify-content: space-between;
    width: 100%;
    max-width: 728px;
    height: calc(100% - 26px);
    top: 0;
}

.gallery__navigations-prev, .gallery__navigations-next {
    padding: 0.5rem;
    display: inline-flex;
}

    .gallery__navigations-prev > svg, .gallery__navigations-next > svg {
        background: #fff;
        width: 30px;
        height: 30px;
        padding: 0.5rem;
        border-radius: 50%;
        margin: auto 0;
        color: var(--clr-neutral);
    }

.gallery__navigations-prev {
    grid-column: 1;
}

    .gallery__navigations-prev > svg {
        transform: rotate(90deg);
    }

    .gallery__navigations-prev:hover {
        background: linear-gradient(to right, rgba(0, 0, 0, 0.5), transparent);
    }

        .gallery__navigations-prev:hover > svg {
            color: var(--clr-secondary);
        }

.gallery__navigations-next {
    grid-column: 3;
}

    .gallery__navigations-next > svg {
        margin-left: auto;
        transform: rotate(270deg);
    }

    .gallery__navigations-next:hover {
        background: linear-gradient(to left, rgba(0, 0, 0, 0.5), transparent);
    }

        .gallery__navigations-next:hover > svg {
            color: var(--clr-secondary);
        }

.gallery__related {
    position: relative; /* Enable positioning of children */
}

.gallery__related-item {
    height: 320px;
    cursor: pointer;
}

    .gallery__related-item:active {
        border: 1px solid var(--clr-secondary);
    }

.gallery__content {
    font-size: 14px;
    background: var(--clr-always-white);
    width: 90%;
    align-self: center;
    font-weight: 600;
    margin: -1rem;
    padding: 0.5rem;
}

.gallery__posted {
    font-weight: 400;
    color: var(--clr-neutral-40);
}

.gallery__navigation {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}

    .gallery__navigation .disabled {
        cursor: not-allowed;
        background-color: var(--clr-neutral-70);
    }

    .gallery__navigation .navigation__button {
        background: #e80844;
        color: var(--clr-always-white);
        border-radius: 50%;
        padding: 0.5rem;
    }

        .gallery__navigation .navigation__button:hover {
            background: var(--clr-primary);
            cursor: pointer;
        }

    .gallery__navigation .navigation__button--up {
        transform: rotate(180deg);
    }

.gallery__nav .share__wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery__nav .share a {
    padding: 0;
    background: none;
    border: none;
    color: var(--clr-always-black);
}

    .gallery__nav .share a svg {
        padding: 0;
        width: 30px;
        height: 30px;
    }

.gallery__flex-bw .share__wrapper {
    border-top: 0 !important;
    border-bottom: 0 !important;
    padding: 0.5rem 0 !important;
}

@media only screen and (max-width: 575.98px) {
    .gallery__flex-bw {
        flex-direction: column;
        align-items: start;
    }
}

.gallery__scroll-button {
    /* Style the buttons as desired (position, size, color, etc.) */
    position: absolute; /* Position buttons absolutely within the container */
    top: 50%; /* Center buttons vertically */
    transform: translateY(-50%); /* Offset buttons vertically for proper alignment */
    z-index: 1; /* Ensure buttons appear above the images */
    cursor: pointer; /* Indicate interactive element */
    background-color: #e80844; /* Desired background color */
    color: var(--clr-always-white); /* Desired symbol color */
    border-radius: 50%; /* Make it round */
    padding: 0.5rem;
}

.gallery__scroll-button--left {
    transform: rotate(90deg);
    left: 0; /* Position left button at the left edge */
    color: var(--clr-always-white);
}

.gallery__scroll-button--right {
    transform: rotate(270deg);
    right: 0; /* Position right button at the right edge */
    color: var(--clr-always-white);
}

@media only screen and (min-width: 768px) {
    .gallery__item {
        padding-top: 0.5rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--clr-neutral-70);
    }

    .gallery__main {
        grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
    }
}

@media only screen and (min-width: 992px) {
    .gallery__main {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

.gallery__entities {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 0;
    overflow: auto;
    -ms-overflow-style: none; /* Internet Explorer 10+ */
    scrollbar-width: none; /* Firefox */
}

    .gallery__entities::-webkit-scrollbar {
        display: none; /* Safari and Chrome */
    }

.gallery__entities-item {
    flex-shrink: 0;
    display: flex;
    max-width: 140px;
    flex-direction: column;
    overflow: hidden;
    background: var(--clr-surface);
    border-radius: 0.25rem;
    border: 1px solid var(--clr-neutral-70);
}

.gallery__entities-title {
    font-size: 14px;
    padding: 0.5rem;
    text-align: center;
}

.gallery__entities-image {
    width: 100%;
}

.gallery__entities-container {
    padding: 1rem;
    margin: 1rem auto;
}

.image-layout {
    display: flex;
    gap: 0.5rem;
    padding: 0 0.75rem;
}

.image-layout__header {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    order: 1;
    justify-self: center;
    width: 100%;
}

.image-layout__aside {
    padding: 0.5rem;
    order: 2;
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--clr-neutral-90);
}

.image-layout__aside__wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.image-layout__aside .share__wrapper,
.image-layout__aside .gallery__navigation {
    flex-direction: row;
    padding: 0.25rem;
}

.image-layout__main {
    order: 3;
}

.image-layout__sidebar {
    order: 4;
}

.image-layout__header {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 0.5rem;
}

    .image-layout__header > * {
        grid-column: 1;
    }

    .image-layout__header .options {
        grid-column: 2;
        grid-row: 1/-1;
    }

    .image-layout__header .options__list {
        top: 2.75rem;
        right: 0.5rem;
    }

@media only screen and (min-width: 768px) {
    .image-layout {
        display: grid;
        grid-template-columns: auto 60px;
        align-items: stretch;
    }

    .image-layout__aside {
        grid-column: 2;
        grid-row: span 9;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        border-left: 1px solid var(--clr-neutral-70);
        border-right: 1px solid var(--clr-neutral-70);
        display: flex;
        flex-direction: column;
    }

    .image-layout__aside__wrapper {
        flex-direction: column;
        border-top: 0;
        border-bottom: 0;
    }

    .image-layout__aside .share__wrapper,
    .image-layout__aside .gallery__navigation {
        flex-direction: column;
    }

    .image-layout__main {
        grid-column: 1;
    }

    .image-layout__sidebar {
        grid-column: 1;
    }
}

@media only screen and (min-width: 1168px) {
    .image-layout {
        grid-template-columns: auto 56px 336px;
        grid-template-rows: auto 1fr;
        gap: 0.75rem;
    }

    .image-layout__header {
        grid-column: 1;
        grid-row: 1;
    }

    .image-layout__aside {
        grid-column: 2;
    }

    .image-layout__main {
        grid-column: 1;
        grid-row: 2;
    }

    .image-layout__sidebar {
        grid-column: 3;
        grid-row: span 3;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
}
