/* Math artifacts homepage styles.

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

/* ==========================================================================
   headers
   ========================================================================== */

#homepage .section-header {
    padding: 3rem 0 1rem;
    text-align: center;
}

#homepage .section-header h3 {
    color: var(--artifacts-charcoal);
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 2px;
    padding-bottom: 1rem;
    text-transform: uppercase;
}

/* ==========================================================================
   virtual exhibits
   ========================================================================== */

#virtual-exhibits { padding: 0 2rem; }

#virtual-exhibits .grid {
    display: grid;
    grid-gap: 1.5rem;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    margin: 0 auto;
    max-width: 1056px;
}

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

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

#virtual-exhibits .topic {
    border: 1px solid var(--artifacts-silver);
    box-shadow: 4px 0 12px var(--artifacts-silver);
    padding: 1.2rem;
    position: relative;
}

#virtual-exhibits .topic:hover { border: 1px solid var(--artifacts-orange); }

#virtual-exhibits .topic:before {
    background: var(--artifacts-red);
    content: '';
    height: 4px;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
}

#virtual-exhibits .topic:after {
    background: var(--artifacts-red);
    bottom: 0;
    content: '';
    height: 48px;
    left: 0;
    position: absolute;
    width: 100%;
}

#virtual-exhibits .topic-algebra:before { background: var(--artifacts-area-algebra); }
#virtual-exhibits .topic-algebra:after {
    background: var(--artifacts-area-algebra);
    background-image: url('https://history-of-mathematics.org/img/exhibits/backgrounds/Bkgrnd-Algebra.jpg');
    background-size: cover;
}

#virtual-exhibits .topic-arithmetic:before { background: var(--artifacts-area-arithmetic); }
#virtual-exhibits .topic-arithmetic:after {
    background: var(--artifacts-area-arithmetic);
    background-image: url('https://history-of-mathematics.org/img/exhibits/backgrounds/Bkgrnd-Arithmetic.jpg');
    background-size: cover;
}

#virtual-exhibits .topic-counting:before { background: var(--artifacts-area-counting); }
#virtual-exhibits .topic-counting:after {
    background: var(--artifacts-area-counting);
    background-image: url('https://history-of-mathematics.org/img/exhibits/backgrounds/Bkgrnd-Counting.jpg');
    background-size: cover;
}

#virtual-exhibits .topic-geometry:before { background: var(--artifacts-area-geometry); }
#virtual-exhibits .topic-geometry:after {
    background: var(--artifacts-area-geometry);
    background-image: url('https://history-of-mathematics.org/img/exhibits/backgrounds/Bkgrnd-Geometry.jpg');
    background-size: cover;
}

#virtual-exhibits .topic-primes:before { background: var(--artifacts-area-primes); }
#virtual-exhibits .topic-primes:after {
    background: var(--artifacts-area-primes);
    background-image: url('https://history-of-mathematics.org/img/exhibits/backgrounds/Bkgrnd-Primes.jpg');
    background-size: cover;
}

#virtual-exhibits .topic-mathematics-education:before { background: var(--artifacts-area-mathematics-education); }
#virtual-exhibits .topic-mathematics-education:after {
    background: var(--artifacts-area-mathematics-education);
    background-image: url('https://history-of-mathematics.org/img/exhibits/backgrounds/Bkgrnd-MathematicsEducation.jpg');
    background-size: cover;
}

#virtual-exhibits .topic-pythagorean-theorem:before { background: var(--artifacts-area-pythagorean-theorem); }
#virtual-exhibits .topic-pythagorean-theorem:after {
    background: var(--artifacts-area-pythagorean-theorem);
    background-image: url('https://history-of-mathematics.org/img/exhibits/backgrounds/Bkgrnd-PythagoreanTheorem.jpg');
    background-size: cover;
}

#virtual-exhibits .topic-polyhedra:before { background: var(--artifacts-area-polyhedra); }
#virtual-exhibits .topic-polyhedra:after {
    background: var(--artifacts-area-polyhedra);
    background-image: url('https://history-of-mathematics.org/img/exhibits/backgrounds/Bkgrnd-Polyhedra.jpg');
    background-size: cover;
}

#virtual-exhibits .topic-pi:before { background: var(--artifacts-area-pi); }
#virtual-exhibits .topic-pi:after {
    background: var(--artifacts-area-pi);
    background-image: url('https://history-of-mathematics.org/img/exhibits/backgrounds/Bkgrnd-Pi.jpg');
    background-size: cover;
}

#virtual-exhibits a { display: block; }

#virtual-exhibits a > div:first-child {
    position: absolute;
    right: 2px;
    top: 4px;
    width: 5rem;
}

#virtual-exhibits a > div:first-child img {
    height: auto;
    width: 100%;
}

#virtual-exhibits h4 {
    color: var(--artifacts-orange);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
    margin: 0 2rem 1rem 0;
}

@media all and (max-width: 1200px) {
    #virtual-exhibits h4 { font-size: 1.25rem; }
}

@media all and (max-width: 600px) {
    #virtual-exhibits h4 { font-size: 1.89rem; }
}

#virtual-exhibits .topic-algebra h4 { color: var(--artifacts-area-algebra); }
#virtual-exhibits .topic-arithmetic h4 { color: var(--artifacts-area-arithmetic); }
#virtual-exhibits .topic-counting h4 { color: var(--artifacts-area-counting); }
#virtual-exhibits .topic-geometry h4 { color: var(--artifacts-area-geometry); }
#virtual-exhibits .topic-mathematics-education h4 { color: var(--artifacts-area-mathematics-education); }
#virtual-exhibits .topic-pi h4 { color: var(--artifacts-area-pi); }
#virtual-exhibits .topic-polyhedra h4 { color: var(--artifacts-area-polyhedra); }
#virtual-exhibits .topic-primes h4 { color: var(--artifacts-area-primes); }
#virtual-exhibits .topic-pythagorean-theorem h4 { color: var(--artifacts-area-pythagorean-theorem); }

#virtual-exhibits .topic:hover h4 { color: var(--artifacts-orange); }

#virtual-exhibits p {
    color: #323232;
    font-size: .95rem;
    line-height: 1.25;
    margin-bottom: .6rem;
    min-height: 5rem;
}

@media all and (max-width: 900px) {
    #virtual-exhibits p {
        font-size: .96rem;
        line-height: 1.35;
        margin-bottom: .9rem;
    }
}

@media all and (max-width: 600px) {
    #virtual-exhibits p {
        font-size: 1.3rem;
        min-height: auto;
    }
}

#virtual-exhibits .subgrid {
    display: grid;
    grid-auto-rows: 1fr;
    grid-gap: 5%;
    grid-template-columns: minmax(30%, 30%) minmax(30%, 30%) minmax(30%, 30%);
    position: relative;
    z-index: 20;
}

@media all and (max-width: 900px) {
    #virtual-exhibits .subgrid { margin-bottom: .5rem; }
}

@media all and (max-width: 600px) {
    #virtual-exhibits .subgrid { margin-bottom: 1rem; }
}

#virtual-exhibits .subgrid:before {
    content: '';
    grid-column: 1 / 1;
    grid-row: 1 / 1;
    padding-bottom: 100%;
    width: 0;
}

#virtual-exhibits .subgrid > div {
    background: #000000;
    border: 3px solid var(--artifacts-grid-bg);
    overflow: hidden;
}

#virtual-exhibits .subgrid > div:first-child {
    grid-column: 1 / 1;
    grid-row: 1 / 1;
}

#virtual-exhibits .subgrid div div {
    align-items: center;
    display: flex;
    flex-direction: row;
    height: 100%;
    justify-content: center;
    width: 100%;
}

#virtual-exhibits .subgrid img {
    height: auto;
    max-height: 60px;
    max-width: 100%;
    width: auto;
}

/* ==========================================================================
   learning journeys
   ========================================================================== */

#learning-journeys { padding: 0 2rem 5rem; }

#learning-journeys .grid {
    display: grid;
    grid-gap: 1.5rem;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    margin: 0 auto;
    max-width: 655px;
    text-align: center;
}

#learning-journeys .grid a { display: block; }

#learning-journeys .grid img {
    height: auto;
    max-width: 100%;
}

#learning-journeys .grid p {
    color: #909090;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.2;
    margin: .5rem auto 0;
    max-width: 286px;
}

#learning-journeys .grid a p { color: var(--artifacts-orange); }

#learning-journeys .grid a:hover p { color: #666; }