/*  
Theme Name: Stephen Wolfram Scrapbook
Theme URI: http://www.wolfram.com
Description: Responsive theme for the Mathematica Scrapbook website.
Version: 2.0
Author: Daniel Sherman & Sue Feng
Author URI: http://www.wolfram.com
*/

/*  main
    -------------------------------*/
html {
    background: transparent;
    height: 100%;
}
body {
    font-family: Georgia, Times New Roman, serif;
    height: 100%;
    position: relative;
}
.main a {
    color: #c62a14;
}
.main a:hover {
    color: #e9951c;
}
.inner {
    margin: 0 auto;
    padding: 0 12px;
}
.main img {
    max-width: 100%;
}
.main .heading,
.section .heading {
    border: 0;
    color: #7c7c7c;
    font-size: 1.3rem;
    margin: 1rem 0;
    padding: 5px 3px 0;
}
.main .year,
.section .year {
    color: #c62a14;
}


/*  header
    -------------------------------*/
.main-header {
    padding: 0 150px 1rem 0;
}
.main-header .heading a {
    color: #ba0b19;
    font-size: 2.5rem;
    line-height: 1.1;
    margin: 0 0 1rem;
}
.main-header .heading .a-scrapbook {
    color: #6f6f6f;
    display: block;
}

/*  main
    -------------------------------*/
body .main:not(.ajax-text-and-image) {
    min-height: 100%;
}
body .main:not(.ajax-text-and-image),
body .section {
    background: #fed78f;
    margin: -2px 0 0;
    padding: 2.5rem 0 0;
    z-index: 10;
    position: relative;
}
body .mfp-wrap ~ .main:not(.ajax-text-and-image),
body .mfp-wrap ~ .section {
    background: #cbcbcb;
}
body .section:not(:first-of-type) {
    padding: .8rem 0 0;
}
body .main:not(.ajax-text-and-image) .inner,
body .section .inner {
    background: #fff url('img/background.jpg') right top repeat-y;
    box-shadow: 0 0 5px #aaa;
    max-width: 1174px;
    margin: 0 auto;
    padding: 1rem 5rem 2rem;
    position: relative;
}

/*  links
    -------------------------------*/
.main-header .links {
    margin: 1.5rem 0;
    padding: .8rem 1.8rem;
    position: absolute;
    right: -17px;
    top: 11px;
    width: 12.8rem;
}
.main-header .links ul {
    position: relative;
    z-index: 10;
}
.main-header .links:after {
    bottom: 0;
    content: '';
    display: block;
    background: #ededed;
    box-shadow: -3px 3px 6px #ccc;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 2;
}
.main-header .links:before {
    border-right: 17px solid transparent;
    border-top: 17px solid #d2d2d2;
    bottom: -17px;
    content: '';
    display: inline-block;
    height: 10px;
    position: absolute;
    right: 0;
    width: 10px;
    z-index: 0;
}
.main-header .links a {
    color: #6f6f6f;
    display: inline-block;
    font-size: 1.05rem;
    padding: .3rem 0;
}
.main-header .links a:after {
    color: #7c7c7c;
}
.main-header .links a:hover {
    color: #ba0b19;
}
.main-header .links a:hover:after {
    color: #ba0b19;
}
.scrapbook .links .scrapbook,
.timeline .links .timeline,
.biofacts .links .biofacts {
    color: #ba0b19;
}
.scrapbook .links .scrapbook:after,
.timeline .links .timeline:after,
.biofacts .links .biofacts:after {
    display: none;
}

/*  thumbnails
    -------------------------------*/
.thumbnails {
    font-size: 0;
    padding: 1rem 0 0;
}
.thumb {
    box-shadow: 0 0 7px #aaa;
    display: inline-block;
    padding-top: 18%;
    overflow: hidden;
    margin: .5%;
    position: relative;
    text-align: left;
    width: 19%;
}
.thumb:hover {
    box-shadow: 0 0 7px #f77700;
}
.thumb .title {
    display: none;
}
.thumb:hover .title {
    background: rgba(0, 0, 0, .5);
    bottom: 0;
    color: #fff;
    display: block;
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 12px;
    left: 0;
    line-height: 1.2;
    margin: auto;
    padding: 7px 10px;
    position: absolute;
    right: 0;
    z-index: 10;
}
.thumb img {
    display: block;
    bottom: -50%;
    left: -50%;
    margin: auto;
    max-width: 150%;
    position: absolute;
    right: -50%;
    top: -50%;
}

/*  magnific
    -------------------------------*/
.mfp-bg {
    height: auto !important;
    position: fixed !important;
    top: 0 !important;
    bottom: 0;
    left: 0;
    right: 0;
}
.mfp-wrap {
    height: auto !important;
    overflow: hidden !important;
    position: fixed !important;
    top: 0 !important;
    bottom: 0;
    left: 0;
    right: 0;
}
.mfp-container {
    padding: 0 !important;
    margin: 0 auto !important;
    max-width: 1140px !important;
    right: 0;
}
.mfp-content {
    background: #303030;
    height: 100%;
    max-width: 1140px !important;
}
.mfp-inner-content p {
    color: #8c8c8c;
    font-size: 1rem;
    line-height: 1.5;
    padding: 0;
}
.mfp-inner-content a {
    color: #f85b42;
}
.mfp-iframe-scaler {
    overflow: auto !important;
}
.mfp-iframe-scaler iframe {
    background: transparent !important;
    max-width: 1140px !important;
    min-height: 100%;
    overflow: hidden !important;
}
.mfp-inner-content {
    background: #303030;
    margin: 1rem 0 0;
    padding: 0 3rem;
}
.ajax-text-and-image {
    background: #303030;
    height: 100%;
    line-height: 1;
    text-align: center;
}
.mfp-inner-content img {
    height: auto;
    max-width: 100%;
    width: auto;
}
.image-container {
    height: 76vh;
    overflow: auto;
    margin: 4.5% auto;
    width: 76vw;
}
.image-container.smaller {
    height: 67vh;
}
.mfp-inner-content img.fullsize {
    margin: 1rem auto;
    max-height: inherit !important;
    max-width: inherit !important;
    padding: 0;
    position: relative;
    width: 800px;
}
.mfp-inner-content img.smaller {
    max-height: 67vh;
}
.ajax-text-and-image .inner {
    padding: 0;
}
.ajax-text-and-image p img {
    display: block;
    height: auto;
    max-height: 69vh;
    max-width: 100%;
    opacity: 0;
    padding: 0 4rem;
    bottom: 0;
    left: 0;
    margin: auto;
    position: absolute;
    right: 0;
    top: 0;
}
.image-container.magnify {
    cursor: pointer;
}
.image-container .mag {
    display: none;
}
.image-container.magnify .mag {
    display: inline-block;
    position: absolute;
    height: 20px;
    width: 20px;
}
.magnify:hover .mag path {
    fill: #f67865;
}
.ajax-text-and-image .heading {
    border-top: 0;
    color: #fff;
    font-size: 1.3rem;
    font-style: italic;
    line-height: 1.1;
    margin: 1rem 1.5rem 0;
}
.ajax-text-and-image .heading .date {
    color: #f67865;
    font-style: normal;
}
.mfp-content button.mfp-close {
    background: transparent !important;
    box-shadow: none !important;
    color: #878787 !important;
    font-weight: 700;
    height: 36px !important;
    padding: 8px !important;
    right: 1px !important;
    top: 1px !important;
    width: 36px !important;
}
.scroll .mfp-content button.mfp-close {
    right: 15px !important;
}
.mfp-arrow {
    opacity: 1 !important;
    text-align: center;
    width: 20px !important;
}
.mfp-arrow:after {
    display: none !important;
}
.mfp-arrow:before {
    color: #f85b42 !important;
    border: 0 !important;
    bottom: 0 !important;
    display: block !important;
    font-family: Arial !important;
    font-size: 6rem !important;
    height: 7.625rem !important;
    left: 0 !important;
    margin: auto !important;
    opacity: 1 !important;
    right: 0 !important;
    width: 15px !important;
}
.mfp-arrow:hover:before {
    color: #fa7d64 !important;
}
.mfp-arrow-right {
    right: 45px;
}
.mfp-arrow-left {
    left: 30px;
}
.mfp-arrow-right:before {
    content: '\203A' !important;
}
.mfp-arrow-left:before {
    content: '\2039' !important;
}

.mfp-bg {
    opacity: .65;
}

/*  pagination
    -------------------------------*/
.paginated-links {
    bottom: 0;
    font-size: 0;
    left: 0;
    height: 12vh;
    margin: 0 auto 2vh;
    overflow: auto;
    position: absolute;
    right: 0;
    vertical-align: bottom;
    white-space: pre;
}
.paginated-links:empty {
    display: none;
}
.scroll .paginated-links {
    position: relative;
}
.paginated-links .prev, .paginated-links .next {
    background: transparent;
    border: 0;
    color: #dd1100;
    margin: 0 5px;
    padding: 0;
    vertical-align: bottom;   
}
.paginated-links .prev:hover, .paginated-links .next:hover {
    color: #f77700;
}
.paginated-links .prev:after {
    content: 'Previous';
    margin: 0 0 0 5px;
} 
.paginated-links .next:before {
    content: 'Next';
    margin: 0 5px 0 0;
}
.ajax-text-and-image .prev:after, .ajax-text-and-image .next:before {
    display: none;
}
.ajax-text-and-image .prev, .ajax-text-and-image .next {
    bottom: 0;
    color: #f9c366;
    font-family: Arial;
    font-size: 3.5rem;
    height: 3rem;
    margin: auto;
    position: fixed;
    top: 0;
    width: 1.5rem;
}
.ajax-text-and-image .prev:hover, .ajax-text-and-image .next:hover {
    color: #fff;
}
.ajax-text-and-image .prev {
    left: 71px;
}
.ajax-text-and-image .next {
    right: 69px;
}
.paginated-links img {
    border: 1px solid #bbb;
    display: inline-block;
    height: 10vh;
    margin: 0 .5rem;
}

.paginated-links .page-num img {
    border: 2px solid #f85b42;
    opacity: 1;
}
.paginated-links img {
    opacity: .8;
}
.paginated-links img:hover {
    opacity: 1;
}
.single {
    overflow: hidden;
}
.single.scroll {
    overflow: auto;
}

body.no-scroll {
    overflow: hidden;
    position: fixed;
}

/*  direct single page
    -------------------------------*/
.no-iframe {
    overflow: auto;
}
.direct-page .inner > .heading {
    margin: 1rem 9rem 1rem 0;
    padding: 0;
}
.direct-page .mfp-inner-content {
    background: transparent;
    text-align: center;
}
.direct-page .mfp-inner-content img, 
.direct-page .mfp-inner-content img.smaller {
    max-height: inherit;
}
.direct-page .mfp-inner-content p img {
    padding: 2rem 0;
}

.direct-page .mfp-inner-content p {
    color: #545454;
}
.direct-page .scroll-window {
    width: 100%;
}
.direct-page .paginated-links {
    font-size: 1rem;
    height: auto;
    position: relative;
    white-space: normal;
}
.direct-page .paginated-links a,
.direct-page .paginated-links span {
    display: inline-block;
    vertical-align: middle;
}
.direct-page .paginated-links img {
    height: 5rem;
}

/*  timeline
    -------------------------------*/
.timeline-wrapper {
    position: relative;
    width: 85%;
}
.timeline-section {
    font-size: 1.2rem;
    margin: 2rem 0 0 2.5rem;
    padding: 0 1rem 0 0;
    width: 95%;
}
.timeline-wrapper img {
    height: 150px;
    position: absolute;
    right: 0;
    top: 1rem;
    width: 150px;
}
.timeline-section .date {
    color: #d57425;
    text-align: right;
    vertical-align: top;
    width: 130px;
}
.timeline-section td {
    padding: .3rem;
}
.timeline-section td:nth-child(2) {
    padding: .3rem 160px .3rem .3rem;
}
.timeline-section .facts {
    color: #d57425;
    display: inline-block;
    padding: .3rem;
    text-align: left;
}
.timeline-section th {
    border-top: 1px solid #cdcdcd;
    color: #ba0b19;
    font-size: 2rem;
    font-weight: 400;
    padding: 10px 0;
    text-align: left;
}
.timeline-section .spacer td {
    height: 1.1rem;
}

/*  scroll window
    -------------------------------*/
.scroll-window {
    background: #fff;
    height: 81vh;
    left: 0;
    margin: auto;
    overflow: auto;
    position: relative;
    right: 0;
    width: 76vw;
}

/*  Mathematica Scrapbook banner
    -------------------------------*/
.mathematica-scrapbook {
    background: #fed78f;
    font-family: Enriqueta;
    margin: 0 auto;
    padding: 2rem 1.3rem;
}
.mathematica-scrapbook a {
    background: #2f2f2f url('img/mathematica-scrapbook.png') no-repeat left center;
    display: block;
    height: 89px;
    margin: 0 auto;
    max-width: 1174px;
    padding: 1.2rem 1rem 1.2rem 26%;
}
.mathematica-scrapbook:hover a {
    background-color: #3f3f3f;
}
.mathematica-scrapbook .see-also {
    color: #c9c9c9;
    display: block;
    font-size: 1rem;
    line-height: 1.2;
}
.mathematica-scrapbook p {
    color: #fff;
    font-size: 1.5rem;
    line-height: 1.2;
    position: relative;
}
.mathematica-scrapbook p:before {
    background: url('img/see-also.png') no-repeat;
    content: '';
    display: block;
    height: 43px;
    left: -65px;
    position: absolute;
    top: -1rem;
    width: 55px;
}
.mathematica-scrapbook .red {
    color: #dd1100;
}

/*  footer (overriding the common template)
    -------------------------------*/
#footer {
    background: #fed78f;
}

#footer .inner {
    max-width: calc(1174px + 2.6rem);
    padding-left: 1.3rem;
    padding-right: 1.3rem;
}

/* ==========================================================================
   responsive breakpoint styles
   ========================================================================== */
@media (max-device-height: 570px), (max-height: 500px) {
    .mfp-iframe-scaler {
        bottom: 0;
        height: 100%;
        left: 0;
        margin: auto;
        max-width: 1140px;
        overflow-x: hidden;
        overflow-y: auto;
        padding-top: 0;
        position: fixed;
        right: 0;
        top: 0;
        -webkit-overflow-scrolling: touch;
    }
    .mfp-iframe-scaler iframe {
        overflow-y: auto !important;
        min-height: inherit;
    }
    body.single {
        overflow: auto !important;
    }
    body.single .image-container {
        height: auto !important;
    }
    main:not(.direct-page) .ajax-text-and-image .prev,
    main:not(.direct-page) .ajax-text-and-image .next {
        display: none;
    }
    main:not(.direct-page) .paginated-links > .page-num {
        display: none;
    }
    main:not(.direct-page) .paginated-links {
        height: auto;
        overflow: hidden;
        position: relative;
        white-space: normal;
    }
    main:not(.direct-page) .paginated-links img,
    main:not(.direct-page) .paginated-links .page-num img  {
        border: 0;
        height: auto;
        margin: auto;
        max-width: 100%;
        opacity: 1;
        padding: 0 2rem;
    }
    main:not(.direct-page) .mfp-inner-content p img {
        width: 100% !important;
        margin: 1rem auto !important;
        max-height: inherit !important;
        position: relative !important;
    }
    main:not(.direct-page) .mfp-inner-content .mag {
        display: none !important;
    }
}
@media (max-width: 1200px) {
    body .main:not(.ajax-text-and-image) .inner,
    body .section .inner {
        margin: 0 20px;
    }
    .scroll .mfp-inner-content {
        padding: 0 3rem;
    }
    .ajax-text-and-image p img {
        max-width: 92%;
    }
}
@media (max-width: 900px) {
    #logo {
        float: none;
        padding: 0 0 0 10px;
    }
    .main {
        margin: 6px 0 0;
    }
    body .section:not(:first-of-type) {
        margin: 0;
    }
    body .main:not(.ajax-text-and-image) .inner,
    body .section .inner {
        padding: 1rem 2rem 2rem;
        position: relative;
    }
    .main-header .heading a {
        font-size: 2.53rem;
    }
    .ajax-text-and-image .prev, .ajax-text-and-image .next {
        top: -2px;
    }
    .thumb {
        padding-top: 24%;
        width: 24%;
    }
    .mfp-arrow-right {
        right: 25px;
    }
    .mfp-arrow-left {
        left: 20px;
    }
    .ajax-text-and-image .prev {
        left: 42px;
    }
    .ajax-text-and-image .next {
        right: 39px;
    }
    .timeline-wrapper {
        width: 100%;
    }
    .timeline-wrapper img {
        height: 120px;
        width: 120px;
    }
}
@media (max-width: 600px) {
    body .main:not(.ajax-text-and-image) .inner, body .section .inner {
        padding: 1rem 1rem 2rem;
        position: relative;
    }
    .main-header {
        padding: 4rem 0 0 0;
    }
    .main-header .inner {
        background: transparent;
    }
    .direct-page .inner > .heading {
        margin: 1rem 0 1rem 0;
        font-size: 1.5rem;
    }
    .main-header .heading a {
        font-size: 2.25rem;
    }
    .main {
        margin: 0;
    }
    .main-header .links {
        line-height: 1.1;
        padding: .8rem 1rem;
        top: -8px;
        width: 320px;
        white-space: nowrap;
    }
    .main-header .links li {
        display: inline-block;
    }
    .main-header .links a {
        padding: 0.5rem 1rem 0.5rem 0;
        font-size: 0.9rem;
    }
    .main-header .links li:last-of-type a {
        padding: 0.5rem 0 0.5rem 0;
    }
    .scrapbook .links .scrapbook,
    .timeline .links .timeline,
    .biofacts .links .biofacts {
        display: none;
    }
    body .main:not(.ajax-text-and-image),
    body .section {
        margin: 0;
    }
    body .main:not(.ajax-text-and-image) .inner,
    body .section .inner {
        padding: 1rem 1rem 2rem;
        position: relative;
    }
    .ajax-text-and-image p img {
        padding: 0 2rem;
    }
    .optional {
        display: none;
    }
    .timeline-wrapper img {
        display: none;
    }
    .timeline-section {
        margin: 2rem 0 0;
        padding: 0;
        width: 100%;
    }
    .timeline-section .date {
        width: 90px;
    }
    .timeline-section td:nth-child(2) {
        padding: .3rem;
    }   
    .thumb {
        padding-top: 32%;
        width: 32%;
    }
    .mfp-arrow-right {
        right: 10px;
    }
    .mfp-arrow-left {
        left: 0;
    }
    .ajax-text-and-image .prev,
    .ajax-text-and-image .next {
        display: none;
    }
    .mathematica-scrapbook a {
        background-image: none;
        height: auto;
        padding: 1.2rem 1rem 1.2rem 5.5rem;
    }
    .mathematica-scrapbook p:before {
        background-size: 40px auto;
        left: -50px;
        width: 40px;
    }
}
@media (max-width: 600px) and (min-height: 700px) {
    body {
        height: 90vh;
    }
    .paginated-links {
        bottom: -4vh;
    }
}
@media (max-width: 400px) {
    .thumb {
        padding-top: 49%;
        width: 49%;
    }
}
@media (max-width: 320px) {
    .mathematica-scrapbook .see-also {
        display: none;
    }
    .mathematica-scrapbook p:before {
        top: 4px;
    }
}