/* vvv HTML and ROOT Element CSS vvv */

html {
    box-sizing: border-box;
    font-family: "Helvetica Neue", Arial, sans-serif;
    min-height: 100%;
}

:root {
    --wrapper-background-color: #666666b1;
    --header1-color: #fff;
    --footer-color: #fff;
    --red-pastel: #cb3d3d;
    --green-pastel: #75a86c;
    --blue-pastel: rgb(108, 171, 226);
    --yellow-pastel: #e9eb6d8e;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

/* ^^^ HTML and ROOT Element CSS ^^^ */
/* */
/* */
/* vvv Wrapper, Body, and Header CSS vvv */

body {
    min-height: 100%;
    margin: 0;
    background: url(images/background-headerfooter-img.webp) repeat-x,
        url(images/background-headerfooter-img.webp) repeat-x left bottom,
        radial-gradient(circle, hsla(0, 0%, 22%, 1) 0%, hsla(0, 0%, 4%, 1) 100%);
}

.container {
    margin: 0 .625rem;
    overflow: hidden;
}

.wrapper {
    border: solid 2px rgb(44, 44, 44);
    border-radius: 10px;
    background: var(--wrapper-background-color);
    margin-top: 10px;
    margin-bottom: 10px;
}

header {
    display: flex;
    border-radius: 10px;
    border: 2px solid rgba(128, 128, 128, 0.593);
    margin: 20px;
    background: url(images/50-percent-off.webp) no-repeat top 0px right 0px / 50px 50px,
        url(images/computer-header-background.webp) no-repeat center center / cover;
}

header h1 {
    line-height: 4;
    text-align: center;
    flex: 1 0 auto;
    margin: 0;
    color: #fff;
    font-family: "Myriad Pro Regular", sans-serif;
    font-weight: 200;
    letter-spacing: 4px;
    text-shadow: 0 -2px 2px rgba(0, 0, 0, 0.6);
    background: transparent linear-gradient(180deg,rgba(79, 79, 79, 0.587) 0%, rgba(116, 116, 116, 0.318) 100%);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.return-button {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    margin-left: 0.5rem;
    padding-left: 0.8rem;
    background: rgb(22, 22, 22);
    border-radius: 4px;
    transition-duration: 300ms;
    width: 226px;
    box-shadow: 2px 2px black;
    font-family: sans-serif;
}

.return-button:hover {
    background: rgb(45, 45, 45);;
    transition-duration: 300ms;
}

.return-button a {
    color: white !important;
    text-decoration: none;
}

.return-button p {
    margin: 0;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}
/* ^^^ Wrapper, Body and Header CSS ^^^ */
/* */
/* */
/* vvv Navigation CSS vvv */

ul, ol {
    padding-left: 0;
    list-style: none;
}

button {
    margin-left: 20px;
}

nav ul li a {
    text-decoration:none;
    color: white;
    padding: 8px 32px;
    margin: 6px 16px 6px 16px;
    background-color:#aaaaaa;
    border: solid 2px black;
    border-radius: 4px;
}

.nav-main-menu-toggle {
    cursor:pointer;
    background: var(--red-pastel);
    border:solid 1px black;
}

.nav-main-menu-toggle svg * {
    transform-box: fill-box;
}

.nav-main-menu-toggle rect {
    transition: all 1.5s cubic-bezier(0.075, 0.82, 0.165, 1);
    transform-origin: center;
}

.nav-main-menu-toggle[aria-expanded="true"] rect{
    transform: rotate(0.5turn);
    fill:#ffffff;
}

#nav-main-menu {
    transform: translateX(-100%);
    transition: all 0.75s ease-in-out;
    width: 82vw;
    margin:0;
    padding:0;
    visibility: hidden;
    position: absolute;
    display: flex;
    flex-wrap: wrap;
    flex-direction:column;
    list-style: none;
    background: rgb(50, 50, 50);
    border-radius: 6px;
    border: solid 2px black;
    padding: 0 0 0 12px;
}

#nav-main-menu:not([hidden]) {
    visibility: visible;
    transform: translateX(0);
    transition: all 0.75s ease-in-out;
}

#nav-main-menu li a {
    color: white;
    background: none;
    transition: all .25s ease-in-out;
    display:flex;
    padding-left: 24px;
    padding-right: 24px;
    margin-top: 0px;
    margin-bottom: 0px;
    padding-top: 12px;
    padding-bottom: 12px;
    margin-left: 0;
    margin-right: 0;
    border:none;
    font-weight: 400;
    transition-duration: 300ms;
}

#nav-main-menu li a:hover {
    transition-duration: 300ms;
    color:white;
    background:var(--red-pastel);
}

/* ^^^ Navigation CSS ^^^ */
/* */
/* */
/* vvv Section, Heading 2, P, and IMG CSS vvv */

.main-section {
    overflow: hidden;
    margin: 24px;
    border: 2px solid white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.8);
    background: var(--blue-pastel);
}

h2 {
    margin: 24px 0 6px;
}

p {
    margin: 0 0 16px;
    line-height: 1.4;
    text-indent: 12px;
}

img {
    width: 25%;
    align-self: center;
}

/* ^^^ Section, Heading 2, P, and IMG CSS ^^^ */
/* */
/* */
/* vvv Cards CSS vvv */

.card-overhead {
    padding-left: 24px;
    margin-top: 2em;
    color: white;
}

.cards {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin-bottom: 24px;
    margin-left: 8px;
    margin-right: 8px;
    gap: 24px;
}

.card {
    flex: 0 0 calc(50% - 12px);
    display: flex;
    flex-direction: column;
    border: solid 2px white;
    border-radius: 4px;

}

.card-figure {
    position: relative;
    margin: 0;
    line-height: 0;
    overflow: hidden;
    object-fit: cover;
    transform-origin: 50% 50%;
    transform: rotate(0) scale(1);
    transition: all 1.5s;
}

.card-figure-img {
    width:100%;
    height: 200px;
    object-fit: cover;
}

.card-figure .card-figure-img
{
    transform: rotate(0) scale(1.0);
    transition: all 1.5s;
}

.card-figure:hover .card-figure-img {
    transform: rotate(0deg) scale(1.15);
    transition: all 1.5s;
    overflow: hidden;
}

.card-section {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: var(--green-pastel);
    padding: 4px;
}

.card-section-header {
    border-bottom: solid 1px black;
    margin-bottom: 16px;
}

.card-section-metatext {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-top: solid 1px black;
    margin-top: 16px;
    margin-bottom: 16px;
}


.card-section-link {
    text-align: right;
    text-decoration: none;
    color: black;
    padding-right: 6px;
    padding-bottom: 6px;
    font-size: 1.1em;
    transition-duration: 500ms;
}

.card-section-link:hover {
    transition-duration: 400ms;
    transform: translateX(-2%);
    padding-top: 8px;
    font-size: 1.125em;
}

/* ^^^ Cards CSS ^^^ */
/* */
/* */
/* vvv Newsletter Subscription CSS vvv */

fieldset {
    border: 0px;
}

.subscribe-newsletter {
    display: flex;
    flex-wrap: wrap;
    background: hsla(0, 0%, 22%, 1);
    border-radius: 12px;
    margin-right: min(100px, 15%);
    flex: 1 1 auto;
    flex-direction: column;
    --z-index: -1;
    position: relative;
    font-family: 'Times New Roman', Times, serif;
    margin-bottom: 24px;
    font-weight: 150;
    justify-content: space-around;
    align-items: stretch;
}

.subscribe-newsletter label:first-child {
    font-weight: 500;
    text-align: center;
    font-size: 1.4em;
    color: white;
}

.subscribe-newsletter label:nth-child(3) {
    color: white;
}

.newsletter-form-email {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.newsletter-form-submit {
    display: flex;
    justify-content: center;
}

.subscribe-newsletter input {
    font-size: 1.4em;
    line-height: 2.2;
    position: relative;
}

.subscribe-newsletter input[type=email]:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px hsla(0, 0%, 0%, 0.5);
}

.subscribe-newsletter input::placeholder {
    position: relative;
    opacity: 1;
    font-family: 'Times New Roman', Times, serif;
}

.subscribe-newsletter input::placeholder {
    transition: 2s cubic-bezier(0.165, 0.84, 0.44, 1), .65s ease-out;
}

.subscribe-newsletter input:focus::placeholder {
    transform: translateY(150%);
    transition: 1s cubic-bezier(0.55, 0.055, 0.675, 0.19);
}

.subscribe-newsletter input:not([type="radio"]):not([type="checkbox"]) {
    /* -webkit-appearance: none; */
    --border-radius-standard: 8px;
}

.subscribe-newsletter input[type=submit] {
    font-size: 1.2em;
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
    background:var(--yellow-pastel);
    color: black;
    font-weight: 550;
    text-transform: uppercase;
    border: solid 3px black;
    border-radius: 8px;
    transition-duration: 250ms;
}

.subscribe-newsletter input[type=submit]:hover {
    transition-duration: 250ms;
    border: solid 3px white;
}

.subscribe-newsletter label {
    font-size: 1.18em;
}

.subscribe-newsletter fieldset:last-child::after {
    content: "";
    position: absolute;
    width: 20%;
    height: 20%;
    background: url(images/loader-circles-spin.svg) no-repeat center;
    z-index: var(--z-index, -1);
}

.subscribe-newsletter-message-error {
    color: black;
    background: var(--red-pastel);
    padding: 6px;
    border-radius: 6px;
    font-weight: 250;
    font-size: 1.2em;
    text-align: center;
}

.subscribe-newsletter-message-success {
    color: white;
    font-weight: 250;
    font-size: 1.2em;
    text-align: center;
    flex: 1 1 auto;
}

.subscribe-newsletter.sending {
    transition-duration: 1250ms;
    background: var(--green-pastel);
}  

.subscribe-newsletter fieldset input[type=submit]:disabled {
    transition-duration: 500ms;
    background: rgb(102, 102, 102);
    color: black;
}

/* ^^^ Newsletter Subscription CSS ^^^ */
/* */
/* */
/* vvv Footer CSS vvv */

footer {
    clear: both;
    overflow: auto;
    margin: 0 20px;
    padding: 0 0 20px;
    color: #fff;
}

footer a[href^=javascript] {
    position: relative;
    color: #000;
    display: block;
    line-height: 2em;
    font-size: 0.625em;
    background-color: #fff;
    border-radius: 3px;
    margin: 0 0 0 10px;
    padding: 0 10px;
    float: right;
    text-decoration: none;
    box-shadow: 0 2px 2px #000;
}

footer a[href^=http]:active {
    top: 2px;
    box-shadow: none;
}

/* ^^^ Footer CSS ^^^ */
/* */
/* */
/* vvv Media Query vvv */

@media (min-width: 768px) {
    .container {
        width: 88%;
        max-width: 1028px;
        margin: 20px auto;
    }

    .subscribe-newsletter {
        flex-direction: row;
    }

    header {
        height: 400px;
        background: url(images/limited-offer.webp) no-repeat -8px -4px / 72px 60px,
            url(images/50-percent-off.webp) no-repeat top -5px right -5px / 100px 80px,
            url(images/computer-header-background.webp) no-repeat center center / cover;
    }

    header h1 {
        line-height: 2;
        font-size: 2.75em;
        align-self: flex-end;
        border-top-left-radius: 0px;
        border-top-right-radius: 0px;

    }

    .nav-main {
        position:static;
        top:auto;
        left:auto;
    }

    .nav-main-menu-toggle {
        display:none;
    }

    #nav-main-menu {
        position:relative;
        visibility: visible;
        transform: translateX(0);
        transition:none;
        background:transparent;
        display:flex;
        flex-direction:row;
        border:none;
        justify-content: space-around;
        flex-wrap: wrap;
        gap: 12px;
    }

    #nav-main-menu li a {
        margin-top: 0px;
        margin-bottom: 0px;
    }

    #nav-main-menu li a:hover {
        transition-duration: 200ms;
        color:white;
        background: var(--red-pastel);
        border-radius: 2px;
        border: solid black 2px;
    }

    img {
        width: auto;
        float: right;
        margin: 0 0 2px 4px;
    }

    .subscribe-newsletter fieldset:last-child::after {
        content: "";
        position: absolute;
        width: 90%;
        height: 90%;
        background: url(images/loader-circles-spin.svg) no-repeat center;
        z-index: var(--z-index, -1);
    }

    .card-overhead {
        padding-left: 24px;
        margin-top: 2em;
    }

    .card {
        flex: 0 0 calc(50% - 12px);
    }
}