* {
    -webkit-tap-highlight-color: transparent;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-touch-callout: none;
    /* Prevent callout to copy image, etc when tap to hold */
    -webkit-user-select: none;
    user-select: none;
    /* Prevent text selection */
    -webkit-touch-action: manipulation;
    /* Prevent default touch actions */
    touch-action: manipulation;
}

*:focus {
    -webkit-tap-highlight-color: transparent;
    outline: none;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
}

body,
html {
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    scroll-behavior: smooth;
}

html {
    overflow: hidden;

    --text-color-normal: hsl(210, 10%, 62%);
    --text-color-light: hsl(210, 15%, 35%);
    --text-color-richer: hsl(210, 50%, 72%);
    --text-color-highlight: hsl(25, 70%, 45%);

    --background-color-default: rgb(249, 243, 237);
    --text-color-default: hsl(60, 3%, 7%);
    --text-color-invert: hsl(31, 29%, 86%);
    --text-color-light-fade: hsla(60, 3%, 7%, 0.49);
    --fade-color-first-page-up: hsl(0, 0%, 95%);
    --fade-color-first-page-down: hsl(0, 0%, 7%);
    --background-img: url(../img/bg.jpg);
    --text-shadow: none;
}

@media (prefers-color-scheme: dark) {
    html {
        --background-color-default: hsl(247, 9%, 19%);
        --text-color-default: hsl(31, 29%, 86%);
        --text-color-invert: hsl(60, 3%, 7%);
        --text-color-light-fade: hsla(31, 30%, 86%, 0.512);
        --fade-color-first-page-up: hsl(0, 0%, 7%);
        --fade-color-first-page-down: hsla(39, 38%, 91%, 0.329);
        --background-img: url(../img/bg_invert.jpg);
        --text-shadow:
            5px -5px hsla(31, 30%, 86%, 0.543),
            5px -5px hsla(31, 30%, 86%, 0.543),
            5px -5px hsla(31, 30%, 86%, 0.543),
            5px -5px hsla(31, 30%, 86%, 0.543);
    }
}

.y.mandatory-scroll-snapping {
    height: 100vh;
    height: 100svh;
    overflow-y: scroll;

    -webkit-scroll-snap-type: mandatory;
    -ms-scroll-snap-type: mandatory;
    scroll-snap-type: y mandatory;
}

.y.snap {
    scroll-snap-align: start;
}

#first-page {
    position: relative;
    display: -webkit-flex;
    display: flex;
    -webkit-flex: 1;
    /* Ensure flexbox compatibility */
    -ms-flex: 1;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;

    background-image: var(--background-img);
    background-size: cover;
    background-position: 10% 50%;
    background-repeat: no-repeat;
    height: 100vh;
    height: 100svh;
    width: 100%;
}

#first-page::before {
    z-index: 1;
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10rem;
    /* background: linear-gradient(to top, transparent 0%, #e7e7e7 100%); */
    background: linear-gradient(to top, transparent 0%, var(--fade-color-first-page-up) 100%);
}

#first-page::after {
    z-index: 1;
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10rem;
    background: linear-gradient(to bottom, transparent 0%, var(--fade-color-first-page-down) 100%);
}

header {
    height: 5rem;
    z-index: 999;
    font-family: 'nevins';

    display: -webkit-flex;
    display: flex;
    justify-content: space-between;
}

header>div {
    height: 100%;
    align-content: center;
}

.header-left {
    font-size: clamp(1rem, 2vh, 2rem);
    text-align: left;
    margin-left: 3rem;
    color: var(--text-color-default);
}

.header-right {
    text-align: right;
    margin-right: 3rem;
    fill: var(--text-color-default);
}

.header-right a {
    width: clamp(1rem, 2vh, 2rem);
    height: clamp(1rem, 2vh, 2rem);
}

.insta-logo>* {
    fill: var(--text-color-default);
}

[rolling-container] {
    display: inline-block;
    overflow: hidden;
    position: relative;
    height: auto;
}

[rolling-container]:hover .rolling-element-1 {
    transform: translateY(120%);

}

[rolling-container]:hover .rolling-element-2 {
    transform: translateY(0);
}


[rolling-element] {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    transition: transform 0.5s cubic-bezier(.18, 1.03, .68, .97);

    &.rolling-element-2 {
        transform: translateY(-120%);
    }
}

.marquee {
    z-index: 2;
    /* border-top: 5px solid rgb(249, 243, 237);
    border-bottom: 5px solid rgb(249, 243, 237); */

    border-top: 5px solid var(--text-color-invert);
    border-bottom: 5px solid var(--text-color-invert);

    display: -webkit-flex;
    display: flex;
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
    bottom: max(2rem, 5vh);
    position: relative;
    gap: 2rem;
    width: 100%;
}

.marquee .content {
    /* color: rgb(249, 243, 237); */
    color: var(--text-color-invert);
    text-shadow: var(--text-shadow);
    font-family: 'nevins';
    font-size: clamp(3rem, 14vh, 150px);
    flex-shrink: 0;
    min-width: 100%;
    animation: scroll 10s linear infinite;
}

ul {
    padding-left: 0;
}

.pictures {
    min-height: 100vh;
    min-height: 100svh;
}

.pictures li {
    transition: outline .2s ease-out;
    outline: 2px solid transparent;
}

.pictures li:hover {
    outline: 2px solid rgb(249, 243, 237);
    z-index: 99;
}

#categories-container {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--background-color-default);
    width: 100%;
    overflow-y: auto;
}

#custom-scrollable-list {
    display: -webkit-flex;
    display: flex;
    list-style: none;
    margin: 0;
}

#custom-scrollable-list li {
    list-style: none;
    font-family: "Didact Gothic", sans-serif;
    color: var(--text-color-default);
}

#custom-scrollable-list .clickable {
    padding: 1rem 2rem 1rem 2rem;
}

#custom-scrollable-list .clickable:hover {
    text-decoration: underline;
    cursor: pointer;
}

#custom-scrollable-list .clickable.active {
    color: rgb(235, 156, 8);
}

#photo-list {
    list-style: none;
    display: -webkit-flex;
    display: flex;
    margin: 0;
    flex-wrap: wrap;
}

#photo-list li {
    flex-grow: 1;
    min-width: 0;
    cursor: pointer;
    position: relative;
    height: max(30vh, 20vw);
    max-width: 100%;
    overflow: hidden;

    display: -webkit-flex;
    display: flex;
}

#photo-list img {
    object-fit: cover;
    min-width: 100%;
    max-height: 100%;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: none;
}

#modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;

    display: -webkit-flex;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0;
    background-color: var(--background-color-default)
}

#overlay-buttons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100svh;

    display: -webkit-flex;
    display: flex;
}

#overlay-buttons div {
    width: 50%;
    z-index: 1000;
    cursor: pointer;
}

#modal-content button {
    background-color: transparent;
    border: none;
    z-index: 10001;
    height: 2rem;
    fill: var(--text-color-light-fade);
    transition: all .2s ease-out;
    display: -webkit-flex;
    display: flex;
    align-items: center;
}

#modal-content button svg {
    width: 1.3rem;
}

#modal-content button p {
    display: -webkit-flex;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-family: 'nevins', sans-serif;
    height: 2rem;
    margin: 0 .5rem 0 .5rem;
    height: 100%;
    font-size: 1rem;
    color: var(--text-color-light-fade);
    transition: all .2s ease-out;
    text-wrap: nowrap;
}

#modal-content button:hover,
#modal-content button.hovered {
    fill: var(--text-color-default);
    cursor: pointer;
}

#back-button {
    position: absolute;
    margin: 1rem;
    top: 0;
    left: 0;
}

#carousel {
    display: -webkit-flex;
    display: flex;
    scroll-snap-type: x mandatory;
    /* scroll-behavior: smooth;
    overscroll-behavior-x: none; */
    overflow-x: scroll;
    width: 100%;
    height: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
    overscroll-behavior: none;

    /* IE and Edge */
    -ms-overflow-style: none;
    /* Firefox */
    scrollbar-width: none;
}

/* Hide scrollbar for Chrome, Safari and Opera */
#carousel::-webkit-scrollbar {
    display: none;
}

.img-container {
    flex: 0 0 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    display: -webkit-flex;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.img-container button {
    background-color: rgba(6, 6, 6, 0.7);
    border: 2px solid transparent;
    border-radius: 0.4rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.img-container button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.img-container button.left {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 10001;
}

.img-container svg {
    height: 1.5rem;
    fill: rgb(249, 243, 237);
}

.img-container img {
    max-width: 100%;
    max-height: 85%;
}

.card-container {
    max-height: 5rem;
    width: min(80rem, 80%);

    display: -webkit-flex;
    display: flex;
    justify-content: center;
    align-items: end;

    flex-shrink: 0;
    font-family: "Didact Gothic", sans-serif;
    font-weight: 500;
    font-size: clamp(.7rem, 3vw, 1.3rem);
}

.description-container {
    width: 100%;
    display: -webkit-flex;
    display: flex;
    justify-content: center;

    flex-grow: 2;
    height: 100%;
    overflow-y: auto;
    z-index: 10003;
}

.description-container p {
    margin: 0;
    align-content: center;
    color: var(--text-color-default);
}



@keyframes scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-100% - 2rem));
    }
}

@media (prefers-reduced-motion: reduce) {
    .marquee .content {
        animation: none;
    }
}


@media only screen and (max-width: 768px) {

    #previous-button p,
    #next-button p {
        width: 0;
        height: 0;
        display: none;
        opacity: 0;
    }

    .description-container {
        margin: 0;
    }
}

@media (hover: none) {
    #overlay-buttons {
        z-index: -10;
        display: none;
    }

    #carousel img {
        touch-action: none;
        pointer-events: none;
    }

}