/* 
Author: Shannon Mahan 
Date: 4/25/2025 
File Name: styles.css 
*/

/* CSS Reset */
html, body, header, nav, main, footer, section, article, form, img, iframe {
    margin: 0;
    padding: 0;
    border: 0;
}

/* Makes sure the page covers the entire viewport */
html, body {
    height: 100%;
    width: 100%;
    touch-action: auto;
}

body {
    font-family: Arial, sans-serif;
    background: #333;
    color: white;
    overflow-x: hidden;
}

/* Ensures all things are boxed correctly */
* {
    box-sizing: border-box;
}

header {
    background: #333;
    color: white;
}

/* Navigation Rule Set */
.nav-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 0 1em;
    text-align: center;
}

.logo img {
    max-width: 65px;
    max-height: 65px;
    padding-left: .25em;
}

img, iframe {
    max-width: 100%;
}

/* Makes sure that the images won't try to drag on mobile devices. */
img {
    max-width: 100%;
    display: block;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
    touch-action: manipulation;
}

nav {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Correctly ensures the navigation is centered. */
.nav-list {
    display: flex;
    flex-direction: column;
    background: #333;
    padding: 0;
    margin: 0;
    width: 100%;
    z-index: 100;
    list-style: none;
}

.nav-list li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.nav-list li a:hover {
    text-decoration: underline;
}

.nav-container, .nav-list {
    max-width: 100%;
    overflow: hidden;
}

/* Hero Image & Hero Content Rule Sets */
.hero, .hero-home {
    position: relative;
    height: 300px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.6);
}

.hero-content {
    position: relative;
    z-index: 10;
    font-weight: bold;
    font-size: 1em;
    animation: fadeIn 3s;
}

/* Animations for hero content */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Heading Rule Set */
h1, h2 {
    padding: 1em;
    text-align: center;
}

/* Article Rule Sets */
article {
    padding: 1em;
    text-align: center;
}

.intro h2 {
    text-align: center;
}

.article-list {
    font-weight: bold;
}

.article-list ul {
    list-style: none;
}

/* Footer Rule Set */
footer {
    color: white;
    text-align: center;
    padding: 1em;
    margin-top: 2em;
    position: relative;
    width: 100%;
    bottom: 0;
    z-index: 10;
}

footer a:link {
    color: white;
}

/* Form Rule Set */
form {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 1em;
    width: 90%;
    margin: 2em auto;
    box-sizing: border-box;
}

#form {
    background-color: transparent;
    padding: 1em;
}

label {
    display: block;
    padding-top: 0.5em;
}

input, textarea, select {
    width: 100%;
    padding: 0.5em;
    box-sizing: border-box;
}

fieldset, input, select, textarea {
    margin-bottom: 1em;
}

form #submit {
    padding: 1em;
    background-color: #b3b3b3;
    font-size: 1em;
    border-radius: 10px;
    border: none;
    display: block;
    margin: 0 auto;
}

.btn {
    justify-self: center;
}

/* Contact Information Grid Rule Set */
.contact-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2em;
    margin: 2em auto;
    max-width: 1000px;
    padding: 0 1em;
}

/* Map container Rule Set */
.map-container {
    width: 100%;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
}

.contact-info {
    text-align: center;
    font-size: 1.1em;
    line-height: 1.6;
}

/* Product Grid Rule Set */
.product-section {
    padding: 2em 1em;
    text-align: center;
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5em;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1em;
}

.product-card {
    background: #444;
    padding: 1em;
    border-radius: 8px;
    color: white;
    text-align: center;
}

.product-card img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
}

.product-card h3 {
    font-size: 1.2em;
}

.product-card p {
    margin: 0.5em 0;
}

.product-card button {
    padding: 0.5em 1em;
    border: none;
    background-color: #b3b3b3;
    border-radius: 6px;
    cursor: pointer;
}

/* Mobile View Applies First then changes on viewport size */
.intro {
    display: none;
}

.intro-mobile {
    display: block;
}
/* Tablet Viewport - Adjusts for tablet viewport */
@media (min-width: 768px) {
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        text-align: center;
    }

    .nav-list {
        flex-direction: row;
        justify-content: center;
        gap: 1em;
    }

    form {
        width: 70%;
    }

    .hero, .hero-home {
        height: 350px;
    }

    .hero-content {
        font-size: 2.5em;
    }
    
    .contact-grid {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .map-container {
        flex: 1 1 50%;
        height: 350px;
    }
    
    .contact-info {
        flex: 1 1 40%;
        text-align: left;
        padding-left: 2em;
    }
    
    .product-grid {
        grid-template-columns: repeat (2, 1fr);
    }
    
    .intro {
        display: block;
    }
    
    .intro-mobile {
        display: none;
    }
}

/* Desktop Viewport - Adjusts for desktop viewport */
@media (min-width: 1024px) {
    form {
        grid-template-columns: auto auto auto;
    }

    .btn {
        grid-column: 2 / span 1;
    }

    .hero, .hero-home {
        height: 500px;
    }

    .hero-content {
        font-size: 3em;
    }
    
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .intro {
        display: block;
    }
    
    .intro-mobile {
        display: none;
    }
}
