/* Linear Y Scroll View Styles */
:root {
    --header-height: 3.5rem;
}

body {
    margin: 0;
    padding: 0;
}

/* Main header default state - visible for all views */
.main-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: var(--color-background) !important;
    z-index: 10002 !important;
    height: var(--header-height);
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Stack of Images specific styles */
.study-container.desktop-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 10002;
    background-color: var(--color-background);
    overflow: hidden;
}

/* Hide main header for Stack of Images in desktop view only */
@media screen and (min-width: 40em) {
    body:not(.linear-y-scroll):not(.single-image-view) .study-container.desktop-view ~ .main-header {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* Ensure study header is visible and properly positioned */
    .study-container.desktop-view .study-header {
        position: fixed;
        left: 0;
        right: 0;
        z-index: 10003;
        display: block;
    }
}

.main-header .wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 100% !important;
}

.study-container.study-linear-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding-top: var(--header-height); /* Add padding to account for fixed header */
    min-height: 100vh;
    position: relative;
}

/* Desktop View */
.study-linear-scroll {
    width: 100%;
    max-width: 100%;
    margin: 0;
    position: relative;
}

.study-linear-scroll .study-header {
    position: fixed;
    top: 2rem;
    left: 0;
    right: 0;
    z-index: 10000;
    display: block;
}

.study-linear-scroll .study-header-content {
    width: 85%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    color: var(--color-text);
}

.study-linear-scroll .study-counter {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.study-linear-scroll .study-title-header {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0;
}

.study-linear-scroll .study-title-header a {
    color: var(--color-text);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.study-linear-scroll .study-title-header a:hover {
    opacity: 0.7;
}

.study-linear-scroll .study-images-list {
    list-style: none;
    padding: 0 0 8rem 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10rem;
    width: 85%;
    margin: 0 auto;
}

.study-linear-scroll .study-image-item {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    line-height: 0;
}

.study-linear-scroll .linear-scroll-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Desktop Styles */
@media screen and (min-width: 40em) {
    .mobile-view {
        display: none;
    }

    .study-linear-container {
        min-height: 100vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .study-footer {
        z-index: 10003;
        padding: 0.5rem 0;
    }

    .study-footer .global-width {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        height: 2rem;
    }

    .study-footer .study-title {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-top: 2px;
    }

    .study-footer h4 {
        margin: 0;
        font-size: 0.8rem;
    }

    .study-footer span {
        display: inline;
        margin: 0;
        font-size: 1rem;
    }

    .study-footer .mobile-title {
        display: none;
    }

    .study-footer .desktop-title {
        display: inline-block;
        margin: 0;
        font-size: 0.8rem;
        border-bottom: none;
    }

    .study-nav {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 0.5rem;
        margin-top: 2px;
    }

    .study-nav a {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .study-nav li {
        display: inline-flex;
        align-items: center;
    }

    .circle {
        margin: 0;
        padding: 2px 0.8em;
        font-size: 0.8rem;
        position: relative;
        top: -1px;
    }
} 