/* Math artifacts topic shingle page styles.

   developer:   marionm
   requires:    shared.css
   ========================================================================== */

/* ==========================================================================
   wrappers
   ========================================================================== */

#shingle-wrapper {
    margin: 0 auto;
    max-width: calc(1200px - 4rem);
    padding: 0 2rem 3rem;
}

@media all and (max-width: 600px) {
    #shingle-wrapper { padding: 0 0 3rem; }
}

#shingle-wrapper > div {
    border: 1px solid var(--artifacts-silver);
    position: relative;
}

#shingle-wrapper > div:before {
    content: '';
    display: block;
    height: 7px;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 20;
}

#shingle-wrapper.topic-algebra > div:before { background: var(--artifacts-bar-algebra); }
#shingle-wrapper.topic-arithmetic > div:before { background: var(--artifacts-bar-arithmetic); }
#shingle-wrapper.topic-counting > div:before { background: var(--artifacts-bar-counting); }
#shingle-wrapper.topic-geometry > div:before { background: var(--artifacts-bar-geometry); }
#shingle-wrapper.topic-learning-journeys > div:before { background: var(--artifacts-bar-learning-journeys); }
#shingle-wrapper.topic-mathematics-education > div:before { background: var(--artifacts-bar-mathematics-education); }
#shingle-wrapper.topic-pi > div:before { background: var(--artifacts-bar-pi); }
#shingle-wrapper.topic-polyhedra > div:before { background: var(--artifacts-bar-polyhedra); }
#shingle-wrapper.topic-primes > div:before { background: var(--artifacts-bar-primes); }
#shingle-wrapper.topic-pythagorean-theorem > div:before { background: var(--artifacts-bar-pythagorean-theorem); }

#shingle-wrapper section {
    padding: 3rem 2rem 2rem;
    position: relative;
}

@media all and (max-width: 600px) {
    #shingle-wrapper section { padding: 2rem 1rem 1rem; }
}

#shingle-wrapper section.gradient { background: linear-gradient(180deg, rgba(255,255,255,1) 80%, rgba(241,241,241,1) 100%); }

/* ==========================================================================
   top
   ========================================================================== */

#shingle-main { border-bottom: 1px solid var(--artifacts-orange); }

#shingle-main .date {
    color: var(--artifacts-orange);
    font-size: 1.25rem;
    margin-bottom: .3rem;
}

#shingle-main .date .around {
    color: #a3a3a3;
    display: block;
    font-size: 1rem;
}

#shingle-main h3 {
    color: var(--artifacts-charcoal);
    font-size: 2.7rem;
    font-weight: 400;
    margin-bottom: .25rem;
}

#shingle-main .subheading {
    color: var(--artifacts-orange);
    font-size: 1.55rem;
    font-style: italic;
}

@media all and (max-width: 600px) {
    #shingle-main .subheading {
        font-size: 1.25rem;
        line-height: 1.2;
    }
}

#shingle-main .shingle-desc {
    color: #535353;
    font-size: 1.12rem;
    line-height: 1.7;
    margin: 2rem 0 1rem;
}

@media all and (max-width: 600px) {
    #shingle-main .shingle-desc {
        font-size: 1.2rem;
        line-height: 1.5;
        margin-top: 1rem;
    }
}

#shingle-main .shingle-desc a { color: #9a5626; }

#shingle-main .shingle-desc a:visited { color: #866e5d; }

#shingle-main .shingle-desc a:hover { color: var(--artifacts-orange); }

#shingle-main .shingle-hero {
    background: #000;
    display: block;
    margin: 0 auto;
    max-height: 50rem;
    max-width: 100%;
    text-align: center;
}

#shingle-main .shingle-hero img { padding: .5rem; }

#shingle-main .shingle-details {
    font-size: .97rem;
    line-height: 1.8;
    margin: 2rem 0;
}

@media all and (max-width: 600px) {
    #shingle-main .shingle-details {
        font-size: 1.1rem;
        line-height: 1.65;
    }
}

#shingle-main .shingle-details a { color: #9a5626; }

#shingle-main .shingle-details a:visited { color: #866e5d; }

#shingle-main .shingle-details a:hover { color: var(--artifacts-orange); }

#shingle-main .shingle-additional-images  {
    align-items: center;
    border-top: 1px solid #ddd;
    display: grid;
    grid-gap: 1rem;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    padding-top: 1rem;
    text-align: center;
}

@media all and (max-width: 600px) {
    #shingle-main .shingle-additional-images {
        grid-template-columns: 1fr;
    }
}

#shingle-main .shingle-additional-images img {
    border: 1px solid var(--artifacts-silver);
    box-shadow: 0 0 .5rem 0 rgba(0, 0, 0, 0);
    height: auto;
    opacity: 1;
    transition: box-shadow .1s ease;
    width: 100%;
}

@media all and (max-width: 600px) {
    #shingle-main .shingle-additional-images img {
        margin: .25rem;
        max-width: 10rem;
    }
}

#shingle-main .shingle-additional-images a:hover img {
    border: 1px solid var(--artifacts-orange);
    box-shadow: 0 0 .5rem 0 rgba(0, 0, 0, .2);
}

/* ==========================================================================
   location
   ========================================================================== */

#shingle-location .label {
    color: #a6a6a6;
    font-size: .75rem;
    line-height: 1;
    margin-bottom: .2rem;
}

@media all and (max-width: 600px) {
    #shingle-location .label {
        font-size: .95rem;
        margin-bottom: .4rem;
    }
}

#shingle-location .value { margin-bottom: 1rem; }

@media all and (max-width: 600px) {
    #shingle-location .value { font-size: 1.2rem; }
}

#shingle-location .value span {
    color: #a6a6a6;
    font-size: .85rem;
}

#shingle-location .value a { color: var(--artifacts-charcoal); }

#shingle-location .value a:hover { color: var(--artifacts-orange); }

#shingle-location .external-link:after,
#shingle-location .external-link-wa:after {
    content: '';
    display: inline-block;
    vertical-align: top;
}

#shingle-location .external-link:after {
    background: url('https://www.wolframcloud.com/obj/history-of-mathematics/production/img/artifacts/external-link.png') no-repeat;
    background-size: 10px 20px;
    height: 10px;
    margin: .3rem 0 0 .5rem;
    width: 10px;
}

#shingle-location .external-link-wa:after {
    background: url('https://www.wolframcloud.com/obj/history-of-mathematics/production/img/artifacts/external-link-wa.png') no-repeat;
    background-size: 16px 32px;
    height: 16px;
    margin: .1rem 0 0 .25rem;
    width: 16px;
}

#shingle-location .external-link:hover:after { background-position: 0 -10px; }

#shingle-location .external-link-wa:hover:after { background-position: 0 -16px; }

#shingle-location > img {
    height: auto;
    max-width: 100%;
}

/* ==========================================================================
   shared section styles
   ========================================================================== */

#shingle-wrapper section.add-border { padding: 0 2rem 2rem; }

@media all and (max-width: 600px) {
    #shingle-wrapper section.add-border { padding: 0 1rem 2rem; }
}

#shingle-wrapper section.add-border h3 {
    border-top: 1px solid var(--artifacts-orange);
    color: var(--artifacts-orange);
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: .8rem;
    padding-top: 1rem;
}

#shingle-wrapper .coming-soon {
    background-color: var(--artifacts-orange);
    color: #fff;
    display: inline-block;
    font-size: .8rem;
    letter-spacing: 2px;
    padding: .5rem 2rem;
    text-align: center;
    text-transform: uppercase;
}

/* ==========================================================================
   timeline
   ========================================================================== */

#shingle-timeline img {
    display: block;
    height: auto;
    margin: 0 auto;
    max-width: 100%;
}

/* ==========================================================================
   other resources
   ========================================================================== */

#other-resources .grid {
    display: grid;
    grid-gap: 2rem 1rem;
    grid-template-columns: 1fr 1fr 1fr;
}

@media all and (max-width: 900px) {
    #other-resources .grid { grid-template-columns: 1fr 1fr; }
}

@media all and (max-width: 600px) {
    #other-resources .grid { grid-template-columns: 1fr; }
}

#other-resources .grid figure {
    align-items: center;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    line-height: 1.1;
}

#other-resources .grid-thumb {
    align-items: center;
    border: 1px solid var(--artifacts-silver);
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin-right: .6rem;
    max-width: 8.125rem;
}

#other-resources .grid-thumb img {
    height: auto;
    max-width: 100%;
}

#other-resources .grid h6 {
    color: #a6a6a6;
    font-size: .8rem;
    font-weight: 400;
    line-height: 1;
    margin-bottom: .4rem;
}

@media all and (max-width: 600px) {
    #other-resources .grid h6 {
        font-size: .9rem;
        margin-bottom: .6rem;
    }
}

#other-resources .grid a { color: #484848; }

@media all and (max-width: 600px) {
    #other-resources .grid a {
        font-size: 1rem;
        line-height: 1.25;
    }
}

#other-resources .grid a:hover { color: var(--artifacts-orange); }

#other-resources .grid a:after {
    color: var(--artifacts-orange);
    content: '\00BB';
    margin-left: .2rem;
}

/* ==========================================================================
   additional reading
   ========================================================================== */

#additional-reading ul {
    color: #555;
    font-size: .85rem;
}

@media all and (max-width: 600px) {
    #additional-reading ul {
        font-size: .97rem;
        line-height: 1.2;
    }
}

#additional-reading li:not(:last-child) { margin-bottom: .25rem; }

@media all and (max-width: 600px) {
    #additional-reading li:not(:last-child) { margin-bottom: .95rem; }
}

/* ==========================================================================
   additional links
   ========================================================================== */

#additional-links li {
    font-size: .85rem;
    line-height: 1.3;
    margin-left: .9rem;
    padding-bottom: .25rem;
}

@media all and (max-width: 600px) {
    #additional-links li { font-size: .97rem; }
}

#additional-links li:before {
    color: #a6a6a6;
    content: '\25AA';
    display: inline-block;
    font-size: 14px;
    line-height: .6;
    margin-left: -.9rem;
    width: .9rem;
}

/* ==========================================================================
   image credits
   ========================================================================== */

#image-credits p {
    font-size: .85rem;
    line-height: 1.3;
}

@media all and (max-width: 600px) {
    #image-credits p { font-size: .97rem; }
}

#image-credits p:not(:last-child) { padding-bottom: .25rem; }