/* ======================
   Slider Container
   ====================== */
#essays-slider {
    position: relative;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    width: var(--full-width);
    height: calc(var(--full-height) - (var(--header-height) * 2));
    margin-top: var(--header-height);
    height: calc(var(--full-height) - (var(--header-height) * 2));
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-height: 40rem;
}

#essays-slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

#highlited--essays-wrapper {
    display: flex;
    height: 100%;
    min-width: var(--full-width);
}

.essay--slide {
    flex: 0 0 var(--full-width);
    width: var(--full-width);
    scroll-snap-align: start;
    /* height: calc(var(--full-height) - var(--header-height)); */
    padding-top: 12px;
    height: 100%;
    display: flex;
    justify-content: center;
}

.essay--slide a, 
.essay--slide a:hover, 
.essay--slide a:focus {
    display: flex;
}

.essay--cover {
    grid-column: 6 / -6;
    height: calc(var(--full-height) - (var(--header-height) * 2) - 12px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    aspect-ratio: 9 / 13;
    justify-self: center;
    border-radius: 3px;
    height: 100%;
}



.essay--cover.has-image {
    position: relative;
    overflow: hidden;
}

.essay--cover-text {
    height: 100%;
    display: flex;
    flex-direction: column;
    /* position: relative; */
    align-items: center;
    padding: 46px 40px 46px 40px;
    transform: translateZ(0);
    z-index: 2;
}

.essay--cover.has-image::before {
    content: "";
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: var(--essay-cover-bg);
    background-size: cover;
    background-position: var(--essay-cover-bg-position, 50% 50%);
    opacity: 0;
    transition: opacity 0.4s;
    will-change: opacity;
    z-index: 1;
    transform: translateZ(0);
}

.essay--cover-text,
.essay--cover-text * {
    transition: var(--main-transition);
}



.essay--cover-text h1 {
    margin-top: 2.5rem;
}

.essay--cover.has-image .essay--cover-text {
    opacity: 1;
    will-change: opacity;
    transition: opacity 0.4s;
    transform: translateZ(0);
}

#button-right,
#button-left {
    position: absolute;
    top: var(--header-height);
    height: calc(var(--full-height) - (var(--header-height) * 2));
    display: flex;
    align-items: center;
    width: 20vw;
    padding-top: 6px;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

#button-right {
    right: var(--main-margin);
    justify-content: flex-end;
}

#button-left {
    left: var(--main-margin);
    justify-content: flex-start;
}

#button-left:disabled,
#button-right:disabled {
    opacity: 0;
    cursor: auto;
}

@media (hover: hover) {
    #button-right:hover,
    #button-left:hover {
        opacity: 1;
        transition: var(--button-transition);
    }
    
    .essay--cover.has-image:hover::before,
    .essay--cover.has-image:focus::before {
        opacity: 1;
    }
    
    .essay--cover.has-image:hover .essay--cover-text,
    .essay--cover.has-image:focus .essay--cover-text {
        opacity: 0;
       
    }
}

.slider-bullets {
    position: absolute;
    left: 50%;
    bottom: 87rem;
    transform: translateX(-50%);
    display: none;
    gap: 6px;
    z-index: 20;
}

.slider-bullet {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.slider-bullet.active {
    background: #222;
}

#essays-slider h1, 
#essays-slider h2,
#essays-slider h6 {
    text-align: center;
}

#essays-slider h2 {
    line-height: 33px;
}

#essays-slider h6 {
    letter-spacing: 3px;
    position: absolute;
    bottom: 46px;
    width: 100%;
}

.t-xmedium h2 {
    font-size: var(--t-xmedium);
    line-height: var(--lh-xmedium);
}

/* .essay--slide h1 {
    max-width: 90%;
} */

/* ======================
   Essay List Styles
   ====================== */
#essayListNav {
    padding: 70px 0 25px 0;
    margin: 15px 0 60px 0;
    color: var(--c-darker);
    position: sticky;
    top: 0;
    background: var(--c-lighter);
    z-index: 8;
}

.essay--head {
    margin-bottom: 35px;
}

.essays--list h3 {
    text-transform: initial;
    letter-spacing: 0px;
    text-align: left;
}

#listNr,
.essay--nr {
    grid-column: 1 / span 2;
    position: relative;
}

#listTitle {
    grid-column: 3 / span 5;
    position: relative;
}

.essay--head-info {
    grid-column: 3 / span 10;
}

#listYear,
.essay--year {
    grid-column: 14 / -1;
    text-align: right !important;
    position: relative;
    width: fit-content;
    justify-self: right;
}

#listTopic {
    text-align: right;
    position: relative;
    width: fit-content;
    grid-column: 12;
    justify-self: right;
}

/* ======================
   Author & Dot Line
   ====================== */
.essay--author {
    display: flex;
    justify-content: space-between;
}

.dot-line {
    flex-grow: 1;
    height: 2.5px;
    margin: 0 6px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='9' height='2.5'><circle cx='1.25' cy='1.25' r='1.25' fill='black' /></svg>");
    background-repeat: repeat-x;
    background-position: center;
    background-size: 9px 2.5px;
    transform: translateY(21px);
}

/* ======================
   Sort Buttons
   ====================== */
#listNr.--active-sort-asc::before,
#listTitle.--active-sort-asc::before,
#listTopic.--active-sort-asc::before,
#listYear.--active-sort-asc::before {
    content: "▲";
    font-size: 7px;
    vertical-align: middle;
    position: absolute;
    left: -13px;
    top: 2px;
}

#listNr.--active-sort-desc::before,
#listTitle.--active-sort-desc::before,
#listTopic.--active-sort-desc::before,
#listYear.--active-sort-desc::before {
    content: "▼";
    font-size: 7px;
    vertical-align: middle;
    position: absolute;
    left: -13px;
    top: 2px;
}

/* ======================
   Transition States
   ====================== */
/* #highlited--essays-wrapper.is-transitioning .essay--cover.has-image::before,
#highlited--essays-wrapper.is-transitioning .essay--cover.has-image .essay--cover-text {
    pointer-events: none !important;
    transition: none !important;
    cursor: default !important;
}

#highlited--essays-wrapper.is-transitioning .essay--cover.has-image:hover::before,
#highlited--essays-wrapper.is-transitioning .essay--cover.has-image:focus::before,
#highlited--essays-wrapper.is-transitioning .essay--cover.has-image:hover .essay--cover-text,
#highlited--essays-wrapper.is-transitioning .essay--cover.has-image:focus .essay--cover-text {
    opacity: 1 !important;
} */

#essays-slider.is-transitioning,
#essays-slider.is-transitioning * {
  pointer-events: none !important;
  cursor: default !important;
}

/* .essay--cover.has-image {
  background-size: cover;
  background-repeat: no-repeat;
} */



@media (hover: hover) {
  .essay--cover:hover .essay--cover-text {
    background-color: var(--c-darker);
    transition: var(--main-transition);
    }
    .essay--cover:hover .essay--cover-text * {
        color: var(--c-lighter);
        transition: color var(--main-transition);
    }
    .essay--cover:hover.has-image .essay--cover-text {
        background-color: unset;
        }
}

/* .essay--cover.has-image,
.essay--cover-text {
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
} */
