/* CSS BY Alex Armstrong */

/* IMPORTED FONTS*/
/* IMPORT "INTER" FROM GOOGLE FONTS"*/
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* CSS RESET */
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
    display: block;
}
body {
    line-height: 1;
}
ol, ul {
    list-style: none;
}
blockquote, q {
    quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* ROOT VARIABLES */
:root {
    --blue: #007BFF;
    --red: #FF4500;
    --white: #EAEAEA;
    --black: #000000;
    --charcoal: #333333;
    --font: "Inter", sans-serif;
}

html, body {
    overflow-x: hidden; 
    box-sizing: border-box; 
}

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

body {
    font-family: var(--font);
    background-color: var(--white);
    min-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

p {
    font-size: 1rem;
}

main {
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

header {
    width: 100%;
    margin: 0 auto;
    background-color: var(--black);
    display: flex;
    flex-direction: column;
}

header > .top-bar {
    width: 90%;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    background-color: var(--black);
    padding: 2rem 1rem;
    box-sizing: border-box;
}

.logo-div {
    color: var(--blue);
    font-size: 1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    min-width: 0;
}

.nav-div {
    color: var(--white);
    min-width: 0;
}

.drop-down {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%; 
    left: 0;
    background-color: var(--black);
    color: var(--white);
    text-decoration: none;
    list-style: none;
}

.dropdown-content > li { 
    padding: 1rem;
}

@media all and (max-width: 799px) {
    .drop-down:hover .dropdown-content {
    display: block;
    color: var(--blue);
    }

    ul > li > a {
        text-decoration: none;
        color: var(--white);
    }
}


/* ADD TO "INNOVATION & INVESTMENT SECTION (Photo by Kevin Matos on Unsplash) */
.innovation-investment {
    background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)), url('images/vanguard-hero.jpg') no-repeat center center/cover;
    height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    place-items: center;
    text-align: center;
    overflow: hidden;
    color: white;
    width: 100%;
}

.innovation-investment > h2 {
    font-size: 1.75rem;
    font-weight: bold;
    font-family: var(--font);
    padding: 1rem;
}

.innovation-investment > p {
    margin: 0 auto; 
    padding: 1rem;
}

.innovation-investment > button {
    font-size: var(--size-p);
    font-weight: bold;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--blue);
    background-color: var(--blue);
    color: var(--white);
}


/* ADD FLOATING SVG LOGO BEFORE THE H1 */
.logo {
    content: "";
    left:-.5rem;
    width: 3.75rem;
    height: 3.75rem;
    background: url('images/vanguard-logo.svg') no-repeat center/contain;
}

main > h2 {
    padding: 0 2rem;
    text-align: left;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 1rem;
}

main > p {
    padding: 0 1rem 1rem 1rem;
}

.offer {
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding: 0 1rem;
    align-items: center;
    justify-content: center;
    outline: none; 
    border: none; 
}

.offer > h2 {
    font-size: 1.5rem;
    font-weight: bold;
    align-self: flex-start;
}

.card {
    width: 100%; 
    margin: 1rem auto; 
    background-color: var(--blue);
    padding: 1rem;
    color: var(--white);
    border-radius: 8px;
}

.card > h3 {
    font-size: 1.25rem;
    font-weight: bold;
}

img, table, .container {
    max-width: 100%;
    width: auto; 
}

.proven {
    width: 100%;
    margin: 0 auto;
    background-color: var(--blue);
    padding: 1rem;
    color: var(--white);
}

.proven > h2 {
    font-size: 1.5rem;
    font-weight: bold;
    padding-left: 1rem;
}

.proven > p {
    padding: 1rem;
}

.profits > h3 {
    font-size: 1.25rem;
    font-weight: bold;
    padding: 1rem;
}

.profits > table {
    width: 100%;
    table-layout: fixed;
    margin: 0 auto;
    background-color: var(--black);
    border-collapse: collapse;
    font-size: 1rem;
}

th {
    background-color: var(--black);
}

tbody tr:nth-child(odd) {
    background-color: var(--charcoal);
}

th,
td {
    padding: 1rem;
    text-align: center;
}

tr:nth-child(2) {
    border-top: 1px solid var(--charcoal);
}

td:first-child, 
th:first-child {
    border-right: 1px solid var(--charcoal);
}

td:nth-child(2),
th:nth-child(2) {
    border-right: 1px solid var(--charcoal);
}


/* THIS ONE IS DONE FOR YOU */
#bar-chart {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: flex-end;
    justify-content: space-around;
    gap: 1rem;
    height: 300px;
    width: 100%;
    max-width: 800px;
    padding: 1rem;
    position: relative;
}
/* ADD ON TRANSITION ON HEIGHT */
.bar {
    width: 50px;
    background: var(--charcoal);
    border-radius: 10px;
    position: relative;
    transition: height 0.5s ease-in-out;
    height: 0;
}
/* THIS ONE IS DONE FOR YOU */
.bar::after {
    content: attr(data-year);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
    font-weight: bold;
    color: var(--white);
}
@keyframes stepUp {
    0% {
        height: 0;
    }
    100% {
        height: var(--height);
    }
}
/* ADD ANIMATION ON stepUp for 1s ease-in-out */
.bar {
    animation: stepUp 1s ease-in-out forwards;
}

footer {
    width: 100%;
    margin: 0 auto;
    background-color: var(--black);
    padding: 1rem;
    color: var(--white);
}

footer > h2 {
    font-size: 1.5rem;
    font-weight: bold;
    padding: 1rem;
}

footer > p {
    padding: 1rem;
}

form {
  border-radius: 5px;
  padding: 20px;
}

label {display: block;}

input[type=text], select {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  display: inline-block;
  border: 2px solid var(--blue);
  border-radius: 4px;
  box-sizing: border-box;
}

input[type=submit] {
  width: 100%;
  background-color: var(--blue);
  color: var(--white);
  padding: 14px;
  margin: 8px 0;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

input[type=email] {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  display: inline-block;
  border: 2px solid var(--blue);
  border-radius: 4px;
  box-sizing: border-box;
}

input[type=submit]:hover {
  background-color: var(--blue);
  border: 1px solid var(--charcoal);
}

textarea {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    display: inline-block;
    border: 2px solid var(--blue);
    border-radius: 4px;
    box-sizing: border-box;
}

.page-info {
    text-align: center;
    padding: 1rem;
}

.page-info > p {
    padding: 0.25rem;
}

.contact-us-tel {
    text-decoration: none;
    color: var(--white);
}

/* MEDIA QUERIES (MEDIUM) */ 
@media all and (min-width: 800px) {
    #results {
        grid-template-columns: 1fr 1fr;
    }

    .results-container {
        flex-direction: row;
        justify-content: space-between;
    }

    .results-table {
        width: 50%;
    }

    .bar-chart {
        width: 50%;
    }

    .drop-down > img {
        display: none;
    }

    .dropdown-content {
        display: flex;
        color: var(--blue);
        position:relative;
        font-size: 1.5rem;
        font-weight: bold;
    }

    .dropdown-content > li {
        list-style: none;
    }

    li > a {
        text-decoration: none;
        color: var(--blue);
    }

    .cards-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        padding-bottom: 2rem;
    }

    .proven {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .proven > h2 {
        grid-column: 1 / -1;
    }

    .proven > p {
        grid-column: 1 / -1;
    }

}

/* MEDIA QUERIES (LARGE) */

@media all and (min-width: 1024px) {

    .cards-section {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 1rem;
        padding-bottom: 2rem;
    }

    form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    input[type="submit"] {
        width: 100%; 
        padding: 1rem;
        margin: 0 auto;
        height: 50%; 
    }

    .drop-down > img {
        display: none;
    }

    .dropdown-content {
        display: flex;
        color: var(--blue);
        position:relative;
        font-size: 1.5rem;
        font-weight: bold;
    }

    .dropdown-content > li {
        list-style: none;
    }

    li > a {
        text-decoration: none;
        color: var(--blue);
    }
}