/* Animations */
@keyframes fadein {
    0% { opacity: 0;}
    50% {opacity: 0;}
    100% {opacity: 1;}
}
@keyframes zoomdrop {
    0% {opacity:0; transform: scale(10,10);}
    50% {opacity: 1;}
    100%{transform: scale(1,1);}
}
@keyframes zoomout {
    from {background-size: 120vw;}
    to {background-size: 100vw;}
}

/* General Use Classes */
.visible {
    display: initial;
}
.invisible {
    display: none !important;
}
.grey_out {
    background-color: #555555 !important;
    color: #999999 !important;
    cursor: default !important;
}

html {
    background: url('../images/site/storm2.jpg')  no-repeat center fixed;
    background-size: 100vw;
    background-color: black;
    font-optical-sizing: auto;
    animation: zoomout 30s ease-out;
}

body {
    animation: fadein 0.5s linear;
    font-family: "Fira Sans", sans-serif;
}

header {
    background-color: blue;
}

/* Header block */
header {
    background-color: #324b5cCC;
    color: #CCC;
    margin: 0;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

:is(h1, h2, h3, h4, h5, h6), nav {
    font-family: "Oswald", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

header :is(h1, h2, h3) {
    margin: 0;
}

h1 {
    font-size: clamp(20px, 5vw, 87px);
    text-transform: uppercase;
}

h2 {
    font-size: clamp(15px, 4vw, 50px);
}

h3 {
    font-size: clamp(15px, 4vw, 50px);
}

/* Navigation menu */

nav a, nav a:hover {
    text-decoration: none;
}
body > nav {
    background-color: #3C4F76CC;
    margin: 0;
    padding: 0;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    text-transform: uppercase;
}
nav ul {
    list-style-type: none;
    margin: 0;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
nav ul li {
    flex-basis: auto;
    flex: 1 1 150px;
    text-align: center;
    font-size: 12pt;
}
nav ul a {
    display: block;
    white-space: nowrap;
    background-color: #AB9F9D;
    color: white;
    padding: 7px;
    text-decoration: none;
}
nav ul a:hover {
    color: black;
    background-color: #FFDE58;
    text-decoration: none;
}

/* Footer Section */
footer {
    background-color: #324b5cCC;
    color: #CCC;
    text-align: center;
    padding-top: 20px;
    padding-bottom: 20px;
    margin: 0;
    font-family: Futura, Jost, sans-serif;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}
footer :is(h1, h2) {
    font-size: 16pt;
    letter-spacing: 0.2em;
    font-family: Futura, Jost, sans-serif;
    margin: 0;
    padding: 0;
}
footer :is(h1, h2) a {
    text-decoration: none;
    color: #CCC;
}

footer :is(h1, h2) a:hover {
    text-decoration: none;
    color: green;
}
footer p {
    margin: 5px;
}
footer p a {
    text-decoration-thickness: 1px;
    color: #CCC;
}

footer p a:hover {
    color: green;
}
#Sponsors_Footer img {
    height: 150px;
    width: auto;
    padding: 10px;
}
#HarbourCityBears_Footer img {
    height: 200px;
    width: auto;
}
#People_Footer img {
    width: 100%;
    height: auto;
}

/* Section */
section {
    background-color: #a0b4beDD;
    color: black;
    margin: 0;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    font-size: 20pt;
    padding: 0;
}

div.EventNames ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
div.EventNames li {
    flex: 1 1 150px;
}

div {
    padding: 0;
    margin: 0;
}
section article :is(h1, h2, h3, h4) {
    text-align: center;
    padding: 0;
    margin: 0;
}

article.odd {
    background-color: #324b5cCC;
    color: #CCC;
}

article > img, article > picture > img {
    width: 100%;
    margin-left: 0;
    margin-bottom: 20px;
}

article > p > img, article > p > picture > img {
    width: 100%;
}

article.sponsors img {
    width: 150px;
    height: 150px;
}

article {
    padding: 20px;
}

article div {
    padding: 20px;
    text-align: left;
}

article div p {
    padding: 10px !important;
}

#IntroText {
    text-align: center;
}

#IntroText h1 {
    font-size: 40pt;
    margin: 0;
    padding: 40px 0 0 0;
}

#IntroText h2 {
    font-size: 35pt;
    margin: 0;
    padding: 0;
}
#IntroText > picture > img {
    width: 100%;
}

th {
    white-space: nowrap;
}
th, td {
    vertical-align: top;
    padding: 10px;
    text-align: left;
}

/* Article action buttons */
article ul.menu_buttons {
    list-style-type: none;
    text-align: center;
    margin: 0;
    padding: 0;
    clear: both;
}
article ul.menu_buttons li {
    display: inline-block;
    text-align: center;
    /* width: 200px; */
    padding: 5px;
    margin: 3px;
}
article ul.menu_buttons a {
    display: block;
    font-weight: bold;
    white-space: nowrap;
    background-color: #2d2d5f;
    color: white;
    padding: 7px;
    text-decoration: none;
}
article ul.menu_buttons a:hover {
    color: black;
    background-color: #FFDE58;
    text-decoration: none;
}

/*Scroll back to top button */
#scrollButton {
    font-size: smaller;
    position: fixed;
    bottom: 0;
    right: 0;
    margin: 20px;
}
#scrollButton p a {
    background-color: #D76300;
    color: black;
    font-weight: bold;
    padding: 5px 10px 5px 10px;
    text-decoration: none;
    border-radius: 25px;
}
#scrollButton p a:hover {
    background-color: #FFDE58;
    color: black;
}

article.sponsor_list, article.sponsor_list div {
    text-align: center;
}
article.sponsor_list img {
    width: 200px;
    height: 200px;
    /* float: left; */
}

article.sponsors img {
    width: 150px;
    height: 150px;
}

article.contestant {
    text-align: center;
}
article.contestant > img, article.contestant > picture > img {
    width: 50%;
    margin: auto;
}


/* Sold out masking */
.sold_out {
    position: relative;
}
.sold_out::before {
    content: "Sold Out";
    font-family: "Oswald", sans-serif;
    text-transform: uppercase;
    text-align: center;
    font-style: normal;
    font-weight: 500;
    font-size: 40pt;
    letter-spacing: 0.3em;
    padding: 0.7em;
    background-color: rgba(255, 0, 0, 0.6);
    box-shadow: 0 0 20px 5px black;
    border-radius: 25px;
    position: absolute;
    top: 40%;
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    right: 0;
    left: 0;
    margin: auto;
    transform: rotate(-14deg);
    pointer-events: none;
}
.past.sold_out::before {
    display: none;
}

/* Selling Fast Masking */
.nearly_sold h3::after {
    content: "Nearly sold out! \A Only a few tickets left!";
    white-space: pre-wrap;
    display: block;
    font-family: "Oswald", sans-serif;
    text-align: center;
    text-transform: uppercase;
    font-style: normal;
    font-weight: 500;
    font-size: 18pt;
    padding: 0.7em;
    background-color: rgba(255, 0, 0, 1);
    box-shadow: 0 0 20px 5px black;
    border-radius: 25px;
    margin: auto;
    margin-top: 20px;
    margin-bottom: 30px;
    width:70%;
}

/* Today highlight */
.today h3::after {
    content: "Tonight!";
    white-space: pre-wrap;
    display: block;
    font-family: 'Oxanium', sans-serif;
    text-align: center;
    text-transform: uppercase;
    font-style: normal;
    font-weight: 500;
    font-size: 18pt;
    padding: 0.7em;
    background-color: rgba(0, 255, 0, 0.7);
    box-shadow: 0 0 20px 5px black;
    border-radius: 25px;
    margin: auto;
    margin-top: 20px;
    margin-bottom: 30px;
    width:70%;
}

/* Past masking */
.past h3::after {
    content: "You missed it!";
    white-space: pre-wrap;
    display: block;
    font-family: 'Oxanium', sans-serif;
    text-align: center;
    text-transform: uppercase;
    font-style: normal;
    font-weight: 500;
    font-size: 18pt;
    padding: 0.7em;
    background-color: rgba(0, 0, 255, 0.7);
    box-shadow: 0 0 20px 5px black;
    border-radius: 25px;
    margin: auto;
    margin-top: 20px;
    width:70%;
}
.past img {
    display: none;
}
.past div {
    display: none;
}

/* Small Screen Rules */
@media screen and (max-width:900px) {
    article > img, article > picture > img {
        float: initial;
        width: 100%;
        margin: 0;
        padding: 0;
        max-width: none;
    }
    h1, article h1 {
        font-size: 30pt;
    }
    h2, article h2 {
        font-size: 25pt;
    }
    h3 {
        font-size: 20pt;
    }
    h4{
        font-size: 16pt;
        white-space: normal;
    }
    #GoogleMap {
        width:100%;
    }
    article.event_grid p {
        grid-template-columns: repeat(2, 1fr);
    }
}

article.event_grid p {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px 10px;
}
article.event_grid picture > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    margin: 0;
    padding: 0;
}

/* Mobile Screen Rules */
@media screen and (max-width: 600px) {
    html {
        background-size: 100vh;
        background-attachment: fixed;
        background-position: top;
    }
    /* background fix for mobile safari */
    html::before {
        content: '';
        position: fixed;
        height: 100vh;
        width: 100vw;
        background-image: url('../images/site/storm2.jpg');
        background-size: cover;
        background-position: center;
        z-index: -1;
      }
      
    /* Make wide items full width */
    nav ul {
        flex-direction: column;
    }
    nav ul li {
        flex: initial;
        width: 100%;
    }
    hr{
        width: 100%;
    }

    /* Make article action buttons full width */
    body {
        width: 100%;
        margin: 0;
        max-width: 100%;
    }
    section {
        margin: 0;
        width: 100%;
    }
    article {
        padding: 20px 0;
        margin: 0;
        width: 100%;
    }
    article > img, article > picture > img {
        float: initial;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    article > div {
        margin: 20px 10px;
    }
    article ul.menu_buttons li,
    article.sponsor_list ul.menu_buttons li,
    article.contestant ul.menu_buttons li 
     {
        display: block;
        text-align: center;
        width: 100%;
        padding: 0;
        margin: 10px 0 10px 0;
    }
    article > :is(ul, p, h3, h4, h5) {
        padding: 0 20px;
    }
    
    article.sponsor_list h2 {
        font-size: 20pt;
    }
    
    /* Table flip */
    table, th, td {
        display: block;
        padding: 0;
    }
    th {
        padding-bottom: 0;
    }
    td {
        padding-top: 5px;
        padding-bottom: 20px;
    }


    ul {
        padding-left: 15px;

    }

    #overlay h1 {
        font-size: 16pt;
    }
    #overlay h2 {
        font-size: 16pt;
    }
    
    .nearly_sold h3::after, .today h3::after, .past h3::after {
        width: auto;
        border-radius: 0;
    }

    article.contestant div {
        padding: 5px 20px;
    }

    article.even.contestant > img {
        float: initial;
        padding-right: unset;
    }

    .nearly_sold h3::after, .today h3::after, .past h3::after {
        width: auto;
        border-radius: 0;
    }
    .sold_out::before {
    width: 80%;
    max-width: 60vw;
    }

    article.event_grid p {
        grid-template-columns: repeat(1, 1fr);
    }

    article.event_grid p {
    grid-template-columns: repeat(2, 1fr);
    }
    article.contestant > img, article.contestant > picture > img {
    width: 90%;
    margin: auto;
}
}
