/* Small Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand', sans-serif;
    display: flex;
    flex-direction: column;
    position: relative;
}

/*  Default styles */
html {
    font: normal 16px/1.3 'Helvetica Neue', sans-serif;
    background: #eee;
    color: #333;
}

main {
    position: relative;
    max-width: 80rem;
    margin: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

article {
    display: flex;
    flex-direction: column;
    flex: 1;
}

h1 {
    font-size: 2.8em;
    margin-bottom: 0.2rem;
}

h2 {
    font-size: 2.4em;
}

h3 {
    font-size: 1.87em;
}

h4 {
    font-size: 1.3em;
}

h5 {
    font-size: 1.13em;
}

h6 {
    font-size: 0.83em;
}

.full-width {
    width: 100%;
}

.header--title {
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

h1 span {
    white-space: nowrap;
}

figure {
    width: 100%;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    overflow: hidden;
}

#image, 
.tribute__figure img {
    display: block;
    max-width: 100%;
    margin: 0 auto;
    height: auto;
    max-height: 320px;
    object-fit: contain;
    object-position: center;
}

figcaption,
.tribute__figure figcaption {
    padding: 0.3rem;
    text-align: center;
    width: 100%;
    max-width: 800px;
}

button {
    background: transparent;
    border: none;
    cursor: pointer;
    outline: none;
}

/* Timeline Style */
.flex-parent {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    height: 100%;
    min-height: 300px;
    gap: 1rem;
}

.flex-parent h2 {
    padding-top: 1rem;
    margin-bottom: 2rem;
}

.input-flex-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    flex-basis: 33vh;
    width: 80vw;
    max-width: 1000px;
    position: relative;
    z-index: 0;
    margin-left: -1rem;
}

#timeline,
footer {
    padding: 0 1rem;
}

input {
    width: 25px;
    height: 25px;
    background-color: #333;
    position: relative;
    border-radius: 50%;
    display: block;
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

input:focus {
    outline: none;
}

input::before,
input::after {
    content: '';
    display: block;
    position: absolute;
    z-index: -1;
    top: 50%;
    transform: translateY(-50%);
    background-color: #333;
    width: 4vw;
    height: 5px;
    max-width: 50px;
}

input::before {
    left: calc(-4vw + 12.5px);
}

input::after {
    right: calc(-4vw + 12.5px);
}

input:checked {
    background-color: #333;
}

input:checked::before {
    background-color: #333;
}

input:checked::after {
    background-color: #ffba49;
}

input:checked ~ input,
input:checked ~ input::before,
input:checked ~ input::after {
    background-color: #ffba49;
}

input:checked + .dot-info span {
    font-size: 13px;
    font-weight: bold;
}

.dot-info {
    width: 25px;
    height: 25px;
    display: block;
    visibility: hidden;
    position: relative;
    z-index: -1;
    left: calc((((80vw - 25px) / 20) * -1) - 1px);
}

.dot-info span {
    visibility: visible;
    position: absolute;
    font-size: 12px;
}

.dot-info span.year {
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
}

.dot-info span.label {
    top: -65px;
    left: 0;
    transform: rotateZ(-45deg);
    width: 70px;
    text-indent: -10px;
}

#timeline-descriptions-wrapper {
    width: 100%;
    font-size: 18px;
    font-weight: 400;
}

#timeline-descriptions-wrapper p {
    margin-top: 0;
    display: none;
}

input[data-description='1955']:checked ~ #timeline-descriptions-wrapper p[data-description='1955'] {
    display: block;
    text-align: center;
}

input[data-description='1960']:checked ~ #timeline-descriptions-wrapper p[data-description='1960'] {
    display: block;
    text-align: center;
}

input[data-description='1961']:checked ~ #timeline-descriptions-wrapper p[data-description='1961'] {
    display: block;
    text-align: center;
}

input[data-description='1966']:checked ~ #timeline-descriptions-wrapper p[data-description='1966'] {
    display: block;
    text-align: center;
}

input[data-description='1967']:checked ~ #timeline-descriptions-wrapper p[data-description='1967'] {
    display: block;
    text-align: center;
}

input[data-description='1971']:checked ~ #timeline-descriptions-wrapper p[data-description='1971'] {
    display: block;
    text-align: center;
}

input[data-description='1972-1']:checked
    ~ #timeline-descriptions-wrapper
    p[data-description='1972-1'] {
    display: block;
    text-align: center;
}

input[data-description='1972-2']:checked
    ~ #timeline-descriptions-wrapper
    p[data-description='1972-2'] {
    display: block;
    text-align: center;
}

input[data-description='1973']:checked ~ #timeline-descriptions-wrapper p[data-description='1973'] {
    display: block;
    text-align: center;
}

@media (min-width: 1250px) and (max-width: 1400px) {
    input::before {
        left: calc(-6vw + 26.5px) !important;
    }

    input::after {
        right: calc(-6vw + 26.5px) !important;
    }
}

@media (min-width: 631px) and (max-width: 1249px) {
    input::before {
        left: calc(-5.5vw + 12.5px);
        width: 5.5vw;
    }

    input::after {
        right: calc(-5.5vw + 12.5px);
        width: 5.5vw;
    }
}

@media (max-width: 630px) {
    .flex-parent {
        justify-content: initial;
    }

    .flex-parent h2 {
        font-size: 1.8em;
    }

    input,
    .dot-info {
        width: 60px;
        height: 60px;
        margin: 0 10px 50px;
    }

    input {
        background-color: transparent !important;
        z-index: 1;
    }

    input::before,
    input::after {
        content: none;
    }

    input:checked + .dot-info {
        background-color: #333;
    }

    input:checked + .dot-info span.year {
        font-size: 14px;
    }

    input:checked + .dot-info span.label {
        font-size: 12px;
    }

    .dot-info {
        visibility: visible;
        border-radius: 50%;
        z-index: 0;
        left: 0;
        margin-left: -70px;
        background-color: #ffba49;
    }

    .dot-info span.year {
        top: 0;
        left: 0;
        transform: none;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        color: #ecf0f1;
    }

    .dot-info span.label {
        top: calc(100% + 5px);
        left: 50%;
        transform: translateX(-50%);
        text-indent: 0;
        text-align: center;
    }

    footer {
        padding-top: 0;
    }
}

@media (max-width: 480px) {
    figure {
        height: 350px;
    }
    
    #image, 
    .tribute__figure img {
        max-height: 280px;
    }
}

@media (max-width: 400px) {
    h1 {
        font-size: 2.2em;
    }

    p {
        font-size: 0.9em;
    }

    .flex-parent h2 {
        font-size: 1.8em;
        margin-bottom: 1.5rem;
    }
    
    figure {
        height: 300px;
    }
    
    #image, 
    .tribute__figure img {
        max-height: 240px;
    }

    #closing {
        padding-top: 1rem;
    }
}

@media only screen and (min-width: 1400px) {
    input::before,
    input::after {
        max-width: 80px;
    }
}

@media only screen and (min-width: 400px) and (max-width: 599px),
       only screen and (min-width: 600px) {
    .input-flex-container {
        width: 70vw;
    }
}

@media only screen and (min-width: 480px) {
    .input-flex-container {
        width: 100%;
    }
}

/* Footer */
#closing {
    padding-top: 2rem;
    text-align: center;
}
