* {
    margin: 0;
    padding: 0;
}

:root {
    font-size: 16px;
    --reg-width: 1080px;
    --blueish: rgb(173, 216, 230);
    --bluefade: rgba(173, 216, 230, 0.7);
    --darkerblue: hsl(195, 53%, 59%);
    --darkestblue: hsl(195, 53%, 36%);
    --focus-color: hsl(195, 53%, 95%);

    --animation-speed: 0.2s;
}

header {
    position: sticky;
    top: 0px;
    z-index: 11;
}

nav {
    display: flex;
    align-items: stretch;
    justify-content: space-evenly;
    overflow: hidden;

    width: 100%;
    height: 100px;
    background-color: var(--blueish);
    border: 3px solid black;
    border-left-width: 0;
    border-right-width: 0;
}

/* USING PERCENT FOR FLEX-BASIS IS OBVIOUSLY A BAD IDEA, THE SIZE SCALES ON THE SIZE OF THE BROWSER TOO, THUS USE REM OR PX */

nav a {
    flex-basis: 12rem; 
    flex-shrink: 1;
    flex-grow: 1;
    width: 15%;
    text-align: center;
    text-justify: center;
    color: rgb(255, 255, 255);
    font-size: 2rem;
    font-family: Helvetica;
    text-transform: uppercase;
    text-decoration: none;
    
    display: flex;
    justify-content: center; 
    align-items: center;

    background-color: var(--blueish);
    border:0.1rem solid rgb(255, 255, 255);
    border-radius: 1rem;
    margin: 0.5rem 0.5rem;

    transition: background-color var(--animation-speed) linear,
    color var(--animation-speed) linear;
}

nav a.new {
    flex-basis: 18rem; 
    font-size: 2rem;
}

nav a:hover {
    background-color: white;
    color: var(--blueish);
}

nav div.nav-empty {
    flex-basis: 400px;
    flex-grow: 6;
    flex-shrink: 6;
}

main {
    display: flex;
    flex-direction: column;
    justify-items: center;
    align-items: center;
}

.hero-image {
    background-image: url('../images/dentist.jpg');
    width: 90%;
    height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.hero-image .hero-text {
    display: flex;
    flex-direction: column;
    justify-items: center;
    align-items: center;
    text-align: center;
    background-color: var(--bluefade);
    padding: 2rem 2rem;
    z-index: 10;
    color:rgb(52, 52, 52);
}

.hero-image .hero-text h1 {
    font-weight: bolder;
    font-size: 3rem;
    font-family: 'Helvetica';
}

.hero-image .hero-text p {
    font-weight: bold;
    font-size: 1rem;    
    font-family: 'arial';
}

.hero-image .hero-text button {
    width: 15rem;
    height: 3rem;
    border-radius: 1rem;
    border-color: var(--darkerblue);
    padding: 0.5rem;

    cursor: pointer;

    font-weight: normal;
    font-size: 1rem;
    color: var(--darkerblue);
    background-color: white;

    transition: background-color var(--animation-speed) linear,
    color var(--animation-speed) linear;
}

.hero-image .hero-text button:hover {
    background-color: var(--darkerblue);
    color: white;
}

/* animation container */
.dropdown-container {
    width: 100%;
    height: 0px;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

/* animation box */
.dropdown-container .dropdown {
    width: 90%;
    background-color: var(--blueish);
    display: flex;
    flex-direction: column;
    align-items: center;
}

#information-form {
    display: flex;
    flex-direction: column;
    align-items: left;
    font-size: 1.6rem;
    font-family: 'Tahoma', 'arial';   

    width: auto; 
}

#information-form #time-container {
    align-self: center;
}

form#information-form div input {
    width: 15rem;
    padding: 12px 20px;
    margin: 4px 0;
    box-sizing: border-box;
    border: 2px solid hsl(0, 100%, 68%);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    
    transition: border-color 0.4s linear;
}

form#information-form div input:focus {
    background-color: var(--focus-color);
}

form#information-form div#submit-container {
    align-self: center;
}

form#information-form div input#submit {
    width: 15rem;
    padding: 12px 20px;
    margin: 4px 0;
    box-sizing: border-box;
    border: 2px solid white;
    border-radius: 4px;
    background-color: #f0f0f0;
    color: #000000;
}

form#information-form div input#submit:hover {
    cursor: pointer;
}

form#information-form div input:invalid {
    border-color: hsl(0, 100%, 68%);
}

form#information-form div input:valid {
    border-color: rgb(144, 238, 144);
}

input:invalid + span::after {
    content: "\0274C";
    padding-left: 5px;
    color: #8b0000;
}
  
input:valid + span::after {
    content: "\02713";
    padding-left: 5px;
    color: #009000;
}



.footer {
    display: flex;
    flex-direction: column;
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    width: 100%;

    background-color: var(--darkestblue);
    color: white;
}

.footer-body {
    display: grid;
    width: 90%;
    height: auto;
    margin-top: 1rem;
    

    justify-items: center;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem 0.5rem;

    grid-template: 40% 40% / repeat(4, 1fr) ;

}

.footer-body div.address,
.footer-body div.email,
.footer-body div.hours {
    justify-self: left;
    align-self: flex-start;

    font-size: 1.2rem;
    font-family: Georgia;
}

.footer-body div.address {
    grid-area: 1 / 1 / span 1 / span 1;
}

.footer-body div.email {
    grid-area: 2 / 1 / span 1 / span 1;
}

.footer-body div.hours {
    grid-area: 1 / 2 / span 2 / span 1;
}

.footer-body div.address-map {
    grid-area: 1 / 3 / span 2 / span 2;
    
    display: block;
    margin: auto;

    max-width: 100%;
    height: auto;
}



.footer-bar {
    margin: 1rem 0rem;
    width: 90%;
}

.footer-bar hr {
    width: 100%;
    border: 0;
    height: 1px;
    background: #333;
    background-image: linear-gradient(to right, var(--darkestblue), white, var(--darkestblue));
}

.footer-bar p.credits {
    width: 100%;
    height: auto;
    text-align: center;

    font-size: 1rem;
    font-family: Georgia;
}

@media only screen and (max-width: 1120px) {
    .footer-body div.address-map img {
        width: 100%;
        height: auto;
    }
}

@media only screen and (max-width: 938px) {
    :root {
        font-size: 12px;

    }
    .hero-image .hero-text h1 {
        font-size: 4.5rem;
    }
    
    .hero-image .hero-text p,
    .hero-image .hero-text button {
        font-size: 1.5rem;    
    }
    .hero-image .hero-text button {
        height: 6rem;
    }
}

@media only screen and (max-width: 586px) {
    :root {
        font-size: 8px;

    }
    .hero-image .hero-text h1 {
        font-size: 6rem;
    }
    
    .hero-image .hero-text p,
    .hero-image .hero-text button {
        font-size: 2rem;    
    }
    .hero-image .hero-text button {
        height: 6rem;
    }
    
    .footer-body {
        margin-top: 0.4rem;
        gap: 0.2rem 0.2rem;
    
        grid-template: 25% 25% 50% / 1fr 1fr ;
    
    }
    
    .footer-body div.address,
    .footer-body div.email,
    .footer-body div.hours {
        justify-self: left;
        align-self: flex-start;
    
        font-size: 3rem;
        font-family: Georgia;
    }
    
    .footer-body div.address {
        grid-area: 1 / 1 / span 1 / span 1;
    }
    
    .footer-body div.email {
        grid-area: 2 / 1 / span 1 / span 1;
    }
    
    .footer-body div.hours {
        grid-area: 1 / 2 / span 2 / span 1;
    }
    
    .footer-body div.address-map {
        grid-area: 3 / 1 / span 1 / span 2;
        
        display: block;
        margin: auto;
    
        max-width: 100%;
        height: auto;
    }

    .footer-body {
        margin-bottom: 13rem;
    }
    .footer-bar p.credits {
        font-size: 2rem;
    }
}
