/* FONTS */
/* ----------------------------------------------------- */

/* Montagu Slab Light */
@font-face {
    font-family: 'Montagu Slab Light';
    src: url('MontaguSlab120pt-Light.eot');
    src: url('MontaguSlab120pt-Light.eot?#iefix') format('embedded-opentype'),
        url('MontaguSlab120pt-Light.woff2') format('woff2'),
        url('MontaguSlab120pt-Light.woff') format('woff'),
        url('MontaguSlab120pt-Light.ttf') format('truetype'),
        url('MontaguSlab120pt-Light.svg#MontaguSlab120pt-Light') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
/* Montagu Slab */
@font-face {
    font-family: 'Montagu Slab';
    src: url('MontaguSlab120pt-Regular.eot');
    src: url('MontaguSlab120pt-Regular.eot?#iefix') format('embedded-opentype'),
        url('MontaguSlab120pt-Regular.woff2') format('woff2'),
        url('MontaguSlab120pt-Regular.woff') format('woff'),
        url('MontaguSlab120pt-Regular.ttf') format('truetype'),
        url('MontaguSlab120pt-Regular.svg#MontaguSlab120pt-Regular') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
/* Libre Baskerville */
@font-face {
    font-family: 'Libre Baskerville';
    src: url('LibreBaskerville-Regular.eot');
    src: url('LibreBaskerville-Regular.eot?#iefix') format('embedded-opentype'),
        url('LibreBaskerville-Regular.woff2') format('woff2'),
        url('LibreBaskerville-Regular.woff') format('woff'),
        url('LibreBaskerville-Regular.ttf') format('truetype'),
        url('LibreBaskerville-Regular.svg#LibreBaskerville-Regular') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
/* Libre Baskerville Italic */
@font-face {
    font-family: 'Libre Baskerville Italic';
    src: url('LibreBaskerville-Italic.eot');
    src: url('LibreBaskerville-Italic.eot?#iefix') format('embedded-opentype'),
        url('LibreBaskerville-Italic.woff2') format('woff2'),
        url('LibreBaskerville-Italic.woff') format('woff'),
        url('LibreBaskerville-Italic.ttf') format('truetype'),
        url('LibreBaskerville-Italic.svg#LibreBaskerville-Italic') format('svg');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}
/* Manrope */
@font-face {
    font-family: 'Manrope';
    src: url('Manrope-Regular.eot');
    src: url('Manrope-Regular.eot?#iefix') format('embedded-opentype'),
        url('Manrope-Regular.woff2') format('woff2'),
        url('Manrope-Regular.woff') format('woff'),
        url('Manrope-Regular.ttf') format('truetype'),
        url('Manrope-Regular.svg#Manrope-Regular') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
/* Manrope Medium */
@font-face {
    font-family: 'Manrope Medium';
    src: url('Manrope-Medium.eot');
    src: url('Manrope-Medium.eot?#iefix') format('embedded-opentype'),
        url('Manrope-Medium.woff2') format('woff2'),
        url('Manrope-Medium.woff') format('woff'),
        url('Manrope-Medium.ttf') format('truetype'),
        url('Manrope-Medium.svg#Manrope-Medium') format('svg');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}


/* CSS RESETS */
/* ----------------------------------------------------- */

*   {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}
html    {
    margin: 0;
    padding: 0;
}
body    {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}
img, video {
    display: block; 
    margin: 0 auto;
    max-width: 100%;
    object-fit: contain;
}
h1, h2, h3, h4, ul, ol, p {
    margin: 0;
    padding: 0;
    font-weight: normal;
    font-style: normal;
    list-style: none;
}
table {
    table-layout: fixed;
    border-collapse: collapse;
}
button {
    font-family: sans-serif;
    cursor: pointer;
    background-color: transparent;
}
details > summary {
    list-style: none;
}
details > summary::-webkit-details-marker {
    display: none;
}


/* CSS VARIABLES (CUSTOM PROPERTIES) */
/* ----------------------------------------------------- */

:root {
    --bgCol: rgb(248, 248, 248);
    --globalMargin: 70px;

    --timelineHt: 180px;

    --tlColor: black;
    --timelineCol2: ;
    --timelineCol3: ;

    --tl1yr: 10px;
    --tl5yrs: 20px;
    --tl10yrs: 30px;
    --tl50yrs: 40px;

    --yearWd: 0.625%; /* calculated based on 100 / no. of yrs on timeline. 100%/160 = 0.625% */

    --btnWd: 35px; /* nextprev buttons */

    --cardWd: 500px; /* */
    --cardHt: calc(100vh - var(--timelineHt) - 300px);
    --cardCol: rgb(255, 255, 255);
    --popupWd: calc(0.8 * var(--cardWd));

    --selBg: rgb(224, 224, 224); 
    --selCol: ;

}


/* OVERALL & QUICK LOADS (TEXT) */
/* ----------------------------------------------------- */

html {
    font-family: 'Montagu Slab';
    font-size: ;
    line-height: 1.35;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}
body {
    overflow-x: auto;
    background-color: var(--bgCol);
    overflow-y: auto;
}

.card {
    font-family: 'Manrope', sans-serif;
    font-size: 1.2rem;
    display: none;
}
.cardVisible {
    display: block;
}
.card h1 {
    font-family: 'Libre Baskerville';
    font-size: 1.25rem;
}
button p {
    font-family: 'Montagu Slab';
}
.tlDot p {
    font-size: 24px;
}
.decade p {
    font-size: 18px;
}
#tlDots .currentDot .dot {
    /* background-color: blue; */
}

.leader-line {
    /* display: none; */
    opacity: 0.4;
}

/* OVERALL CONTAINERS */
/* ----------------------------------------------------- */
header#titleBlock {
    position: fixed;
    width: 100vw;
    background-color: var(--bgCol);
    padding: 0 var(--globalMargin);
    padding-top: 50px;
    top: 0;
    left: 0;
    font-family: 'Libre Baskerville';
}

main#cards {
    display: flex;
    align-items: start;
    /* min-height: 100vh; */
    /* gap: 20px; */
    padding: var(--globalMargin);
    padding-top: calc(var(--globalMargin) + 70px);
    padding-bottom: var(--timelineHt);
    min-width: 101vw;
}

#timeline {
    position: fixed;
    background-color: ;
    bottom: 0px;
    left: 00px;
    width: 100%;
    padding: var(--globalMargin);
}
#filters {
    position: fixed;
    left: var(--globalMargin);
    bottom: calc(var(--globalMargin) - 10px);
    background-color: ;
    
    /* z-index: 600; */
}


/* NEXT PREV BUTTONS */
/* ----------------------------------------------------- */
.nextPrev {
    position: fixed;
    z-index: 500;
    top: 0;
    top: calc(40vh);
    background-color: ;
}
#prev {
    left: 0;
    left: var(--globalMargin);
}
#next {
    right: 0;
    right: var(--globalMargin);
}
.nextPrev button {
    display: block;
    background-color: var(--bgCol);
    padding: 10px;
    display: flex;
    justify-content: center;align-items: center;
    width: var(--btnWd);
    height: var(--btnWd);
    border-radius: 50%;
}


/* CARDS, OVERALL */
/* ----------------------------------------------------- */

#cards > div {
    position: relative; /* for topLine */
}
#cards .topLine {
    height: 1px;
    background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' stroke='%23333' stroke-width='2' stroke-dasharray='1%2c 10' stroke-dashoffset='2' stroke-linecap='square'/%3e%3c/svg%3e");
    width: 100%;
    position: absolute;
    top: 13px;
    z-index: -2;
}

/* card year */
h2.year {
    display: inline-flex;
    align-items: center;
    background-color: var(--bgCol);
    padding-right: 8px;
    font-size: 1.2rem;
    font-family: 'Montagu Slab Light';
    margin-bottom: 10px;
}
.h2Dot {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    /* background-color: antiquewhite; */
    margin-right: 5px;
    border: 1px solid dimgray;
    background-color: var(--bgCol);
    /* position: absolute; */
    /* left: -1rem; */
}

/* start and end spacers */
#startSpace {
    font-size: 5rem;
    line-height: 0;
    user-select: none;
}
#endSpace {
    font-size: 22rem;
    line-height: 0;
    user-select: none;
}


/* INDIVIDUAL CARDS */
/* ----------------------------------------------------- */

/* overall wrapper */
.card {
    min-width: var(--cardWd);
    flex-shrink: 0;
}

/* actual card + popup container */
.cardContent {
    display: flex;
    align-items: start;
    margin-right: 5rem;
}

/* actual card */
.actualCard {
    padding: 0 1rem;
    padding-bottom: 0.8rem;
    margin-left: 2px;
    background-color: var(--cardCol);
    max-height: var(--cardHt);
    width: var(--cardWd);
    overflow-y: auto;
    border-radius: 10px;
    position: relative;
}
.actualCard h1 {
    position: sticky;
    top: 0;
    background-color: var(--cardCol);
    padding-top: 0.8rem;
    padding-bottom: 0.2rem;
}
.actualCard article {
    margin-top: 1rem;
}

/* popup buttons  */
.popupBtns {
    display: flex;
    flex-direction: row-reverse;
    justify-content: end;
    /* flex-direction: column;
    position: absolute;
    top: 15px;
    right: 10px; */
}
.popupBtns button {
    transform: rotate(45deg);
    height: 25px;
    width: 25px;
    padding: 0;
    border-radius: 50%;;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}
.popupBtns button.closed {
    transform: rotate(0deg);
}

/* popups: overall container */
.popups {
    /* background-color: aliceblue; */
    margin-left: 2rem;
    margin-top: 1rem;
}

/* individual popups */
.popups aside.closed {
    display: none;
}
.popup {
    margin-top: 2rem;
    background-color: var(--cardCol);
    border-radius: 10px;
    width: var(--popupWd);
    padding: 10px;
}



/* carousel, images */
.txtImg {
    margin-top: 1rem;
}

.flickityWrap {
    margin-top: 1rem;
}
.flickityWrap .carouselCapt {
    text-align: center;
    padding-top: 0.2rem;
}


/* TIMELINE */
/* ----------------------------------------------------- */

/* overall containers */
#timeline {
    display: flex;
    height: var(--timelineHt);
    padding: 0;
    padding: 0 var(--globalMargin);
}
#tlDots {
    display: flex;
    position: absolute;
    width: calc(100% - 2 * var(--globalMargin));
    z-index: 20;
    /* background-color: rgba(240,240,240,0.9); */
    /* background-color: var(--tlColor); */
    /* padding-left: 1px; */
}
#tlLines {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-top: 1px;
    padding-bottom: 20px;
    background-color: var(--bgCol);
    align-items: start;
}

/* timeline dots: clickable dots + timeline bar */
.tlBar {
    height: 10px;
    opacity: 0.5;
}
.currentDot ~ .tlBar {
    height: 3px;
}
.tlBar, .tlDot {
    width: var(--yearWd);
    background-color: black;
    border: 0;
    border-left: 1px solid var(--bgCol);
    border-left-color: black;
    padding: 0;
}

.tlDot {
    position: relative;
    z-index: 100;
    outline: 0;
    /* background-color: transparent; */
    /* background-color: lightblue; */
    /* height: 100px; */
    opacity: 0.8;
}
.currentDot ~ .tlDot {
    background-color: transparent;
}

/* year above each timeline dot */
.tlDot p {
    /* display: none; */
    position: absolute;
    bottom: 10px;
    left: -2px;
    opacity: 0;
    transition: 0.2s ease;
    transition-delay: 0s;
    padding-bottom: 10px;
}
.tlDot:hover p, 
.tlDot:focus-visible p {
    opacity: 1;
    transition: 0.2s ease;
    transition-delay: 0.05s;
}

.currentDot p {
    opacity: 1;
}
#tlDots:has(.tlDot:hover p) .currentDot p,
#tlDots:has(.tlDot:focus-visible p) .currentDot p {
    opacity: 0;
}
#tlDots:has(.currentDot:hover p) .currentDot p, 
#tlDots:has(.currentDot:focus-visible p) .currentDot p {
    opacity: 1;
    transition-delay: 0.2s;
}

.inactive:hover p,
.inactive:focus-visible p {
    opacity: 0;
}
.inactive {
    cursor: default;
}
#tlDots:has(.inactive:hover p) .currentDot p,
#tlDots:has(.inactive:focus-visible p) .currentDot p {
    opacity: 1;
}

.tlDot .dot {
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: calc(50%);
    transform: translate(-50%, -50%); /* Centers the element relative to its own dimensions */        border-radius: 50%;
    background-color: red;
    opacity: 0.4;
    /* display: none; */
}
.inactive .dot {
    background-color: transparent;
}


/* timeline lines, marking & text */
#tlLines p {
    position: absolute;
}
#tlLines .decade {
    display: flex;
    justify-content: space-between;
    background-color: ;
    flex-grow: 1;
    position: relative;
    border-top: 1px solid black;
}
/* lines to mark one year */
#tlLines .decade > div {
    flex-grow: 1;
    border-left: 1px solid black;
    height: var(--tl1yr);
}
/* lines to mark 5 years */
#tlLines div.fives {
    height: var(--tl5yrs);
}    
/* lines to mark 10 years */
#tlLines div.zeros {
    height: var(--tl10yrs);
}
.decade p {
    display: none;
}

/* lines to mark the 50 years */
.decade:nth-of-type(4) p,
.decade:nth-of-type(9) p,
.decade:nth-of-type(14) p,
.decade:nth-of-type(20) p {
    display: block;
    top: calc(var(--tl50yrs) + 1px);
    left: -2px;
}
#tlLines .decade:nth-of-type(4) div.zeros,
#tlLines .decade:nth-of-type(9) div.zeros,
#tlLines .decade:nth-of-type(14) div.zeros,
#tlLines .decade:nth-of-type(20) div.zeros {
    height: var(--tl50yrs);
    /* border-left-width: 2px; */
}   



/* FILTERS */
/* ----------------------------------------------------- */

#filters button {
    font-size: 1.2rem;
    font-family: 'Manrope';
    letter-spacing: -0.02em;
    border-radius: 20px;
    padding: 0 12px;
    padding-bottom: 2px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: 1px solid gray;
}

#filters .filterClicked {
    font-family: 'Manrope Medium';
    background-color: lightgray;
    border-color: lightgray;
}
.filterClicked::after {
    content: "✖";
    margin-left: 10px;
}



/* SELECTION */
/* ----------------------------------------------------- */

::-moz-selection {
    background: var(--selBg);
    color: var(--selCol);
}
::selection {
    background: var(--selBg);
    color: var(--selCol);
}


/* SCROLLBARS */
/* ----------------------------------------------------- */

.actualCard {
    --scrollBG: var(--cardCol);
    --thumbBG: ;
    --scrollWidth: 10px;
    --scrollOutline: var(--high1);
}

.actualCard {
    /* Non-Standard, But More Styling-Capable Properties */
    &::-webkit-scrollbar {
      width: var(--scrollWidth);
    }
    &::-webkit-scrollbar-thumb {
        background: var(--thumbBG);
        border: 1px solid dimgray;
        border-radius: 5px;
    }
    &::-webkit-scrollbar-track {
      background: var(--scrollBG);
      border-radius: 10px;
    }
    /* Standardized Properties */
    @supports not selector(::-webkit-scrollbar) {
      scrollbar-color: var(--high1);
      scrollbar-width: thin;
    }
}

.actualCard::-webkit-scrollbar {
    width: var(--scrollWidth);
}
.actualCard::-webkit-scrollbar-thumb {
    background: var(--thumbBG);
    border: 1px solid dimgray;
    border-radius: 5px;
}
.actualCard::-webkit-scrollbar-track {
    background: var(--scrollBG);
    border-radius: 10px;
}