﻿@font-face {
    font-family: 'Be Vietnam Pro';
    src: url(fonts/BeVietnamPro-Regular.ttf) format("truetype");
}

@font-face {
    font-family: 'Be Vietnam Pro';
    font-weight: bold;
    src: url(fonts/BeVietnamPro-Bold.ttf) format("truetype");
}

:root {
    --clr-yellow: #FFD435;
    --clr-product-border: black /*#C7D7DB*/;
    --clr-logo-darkblue: #240E39;
    --clr-logo-lightblue: #6189B3;
    --product-corner-radius: 5px;
    --clr-product-title-bk: #598AB7;
    --clr-product-descr-bk: #F7FBFF;
    --main-font: Be Vietnam Pro;
}

*,
*::after,
*::before {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
    font: inherit;
}

body {
    text-rendering: optimizeSpeed;
    line-height: 1.5;
    font-family: var(--main-font);
    background-image: url('images/background.jpg');
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
}

img, picture, svg {
    max-width: 100%;
    display: block;
}

.container {
    --max-width: 1110px;
    --padding: 1rem;
    width: min( var(--max-width), 100% - (var(--padding) * 2));
    margin-inline: auto;
}


header {
    position: sticky;
    top: 0;
    z-index: 999;
    display: flex;
    background-color: white;
    box-shadow: 0 -6px 10px 5px rgba(0,0,0,0.5);
}

header div.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}


#slogan {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.main {
    background-color: white;
    padding: 20px;
    border-left: 1px solid black;
    border-right: 1px solid black;
    border-bottom: 1px solid black;
    text-align: center;
}

h1 {
    font-size: 22px;
    font-weight: bold;
    color: white;
    background-color: var(--clr-logo-lightblue);
    text-shadow: 1px 1px 2px black;
    border-radius: var(--product-corner-radius);
    display: inline-block;
    padding: 5px 10px 5px 10px;
    margin: 0 0 10px 0;
}

h3 {
    font-size: 16px;
    font-weight: bold;
    color: var(--clr-yellow);
    background-color: var(--clr-logo-lightblue);
    text-shadow: 1px 1px 2px black;
    border-radius: var(--product-corner-radius);
    display: inline-block;
    padding: 5px 10px 5px 10px;
    margin: 0 0 10px 0;
}

h5
{
    text-align: right;
    font-style: italic;
}

button.button{
    font-size: 1vw;
    background-color: var(--clr-logo-darkblue);
    color: white;
    border-radius: var(--product-corner-radius);
    padding: 2px 5px;
}

.form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    font-size: 14px;
    grid-gap: 10px;
}

.form div {
    text-align: center;
}

.form div.right {
    text-align: right;
}

.form div.left {
    text-align: left;
}

.form div#input {
    grid-column-start: 1;
    grid-column-end: 3;
}

.form a {
    text-decoration: none;
    color: var(--clr-logo-darkblue);
}

.form a:hover {
    color: var(--clr-logo-lightblue);
}

input#search-box {
    width: 90%;
    max-width: 100%;
    height: 30px;
    border-radius: 15px;
    padding: 0 30px 0 30px;
    border: 1px solid gray;
    background-image: url("images/Magnifying_glass_icon.svg");
    background-size: 20px;
    background-repeat: no-repeat;
    background-position-x: 5px;
    background-position-y: 5px;
}

input#search-box:hover, input#search-box:focus {
    box-shadow: 0 0 4px 0 #3f69a8;
    border-color: #3f69a8;
    outline: none;
    transition: all .3s;
}


.search-results {
    padding: 20px 20px 0 20px;
    display: grid;
    grid-template-columns: 1fr 8fr 1fr 1fr;
    font-size: 14px;

}

/* Alternating background colors for the search results table, but skip the title row */
.search-results div:nth-child(8n+1), .search-results div:nth-child(8n+2), .search-results div:nth-child(8n+3), .search-results div:nth-child(8n+4) {
    background: var(--clr-logo-lightblue);
    color: var(--clr-yellow);
    font-weight: bold;
}

.search-results div:nth-child(8n+5), .search-results div:nth-child(8n+6), .search-results div:nth-child(8n+7 ), .search-results div:nth-child(8n+8) {
    background: white;
    color: black;
    font-weight: normal;
}

.search-results div:nth-child(8n+9), .search-results div:nth-child(8n+10), .search-results div:nth-child(8n+11 ), .search-results div:nth-child(8n+12) {
    background: lightgray;
    color: black;
    font-weight: normal;
}

.search-results div {
    padding: 5px;
    text-align: left;
}

.search-results div.code {
    border-left: 1px gray solid;
}

.search-results div.lastmodified {
        border-right: 1px gray solid;
    }

    .search-results div:nth-last-child(1), .search-results div:nth-last-child(2), .search-results div:nth-last-child(3), .search-results div:nth-last-child(4) {
        border-bottom: 1px gray solid;
    }

    .search-results div.title {
        font-weight: bold;
    }

.search-results div.title a {
    text-decoration: none;
    color: var(--clr-logo-darkblue);
}

.search-results div.title a:hover {
    color: var(--clr-logo-lightblue);
}

.search-results h3 {
    grid-column-start: 1;
    grid-column-end: 5;
}

.footer {
    display: grid;
    background-color: #6189b3;
    font-size: 12px;
    color: white;
    border-left: 1px solid black;
    border-right: 1px solid black;
    border-bottom: 1px solid black;
    padding: 5px 0 0 0;
}

.footer div {
    align-items: center;
    text-align: center;
}

.footer img{
    width: 220px;
    display: inline;
}

.footer a:hover img {
    box-shadow: 0 0 6px 0 #3f69a8;
    border-color: #3f69a8;
    outline: none;
    transition: all .3s;
}

.article-main {
    display: grid;
    grid-template-columns: 3fr 1fr;
}

.article-main .article-side {
    background-color: white;
    text-align: center;
    padding: 10px;
    font-size: 12px;
    text-align: left;
    border-left: 1px black solid;
    border-right: 1px black solid;
    border-bottom: 1px black solid;
    overflow-wrap: anywhere;
}

    .article-main .article-side {
        padding: 20px 20px 0 20px;
    }

    .article-main .article-side p {
        padding: 10px 0 0 0;
    }

.article-main .article-side blockquote {
    padding: 10px 30px 10px 30px;
}

.article-main .article-side b {
    font-weight: bold;
}

.article-main .article-side h4 {
    font-weight: bold;
    font-size: 14px;
}

.article-main .article-side h1 {
    display: block;
}

.article-main .tip-side {
    background-image: url('images/pentamino_seamless_1867x1867.webp');
    background-size: 1000px;
    text-align: center;
    border-right: 1px black solid;
    border-bottom: 1px black solid;
    padding: 20px;
}

.article-main .tip-side .tip {
    display: grid;
    background-color: white;
    border: 1px solid black;
    border-radius: var(--product-corner-radius);
    font-size: 12px;
    text-align: left;
    text-decoration: none;
}

.article-main .tip-side .tip-title {
    font-weight: bold;
    background-color: var(--clr-logo-lightblue);
    color: var(--clr-yellow);
    text-align: center;
    padding: 5px;
    font-size: 14px;
    border-bottom: 1px solid black;
}

.article-main .tip-side .tip-body {
    padding: 5px;
}

.article-main .tip-side .tip-body a {
    text-decoration: none;
    color: black;
}

.article-main .tip-side .tip-body:hover {
    background-color: var(--clr-yellow);
}

.article-main .tip-side .tip-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 5px;
    text-align: center;
    border-top: 1px solid black;
    background-color: lightgray;
}

.article-main .tip-side .tip-nav input {
    padding: 3px;
}


/* Drop-down menu with website links */
.dropbtn {
    xcolor: white;
    padding: 16px;
    font-size: 14px;
    border: none;
    background-color: white;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0; /* to be aligned with right-side edge of the button */
    background-color: #f1f1f1;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #ddd;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .dropbtn {
    background-color: var(--clr-logo-lightblue);
    color: white;
}


@media screen and (max-width: 700px) {
    div .code, div.product, div.lastmodified {
        display: none;
    }

    .search-results {
        grid-template-columns: 1fr;
    }

        .search-results div.title {
            border-left: 1px gray solid;
            border-right: 1px gray solid;
        }

    #slogan {
        font-size: 0.5rem;
    }

    .form a {
        font-size: 12px;
    }

    .article-main {
        grid-template-columns: 1fr;
    }

    #slogan {
        display: none;
    }

    .article-main .article-side blockquote {
        padding: 10px 0px 10px 0px;
    }
}