/* reset rule */
* {
    margin: 0; padding: 0; box-sizing: border-box;
}

/* good rule of thumb: order elements in the css file as they occur on the webpage */

/* use powertoys "measure" tool to measure elements on the webpage in pixels */
/* use min-height instead of height */

body {
    font-family: verdana;
    background-color: #EEE;
}

header {
    background-color: white;
}

header .promo_bar {
    background-color: #eaa22e;
    min-height: 40px;
}

header nav {
    background-color: white;
    min-height: 90px;
}

nav.inner-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    flex: 0 0 auto;
}

.primary-nav {
    flex: 1;
    text-align: center;
}

.secondary-nav {
    flex: 0 0 auto;
    text-align: right;
}


section.hero {
    min-height: 450px;
    background-color: skyblue;
    background-image: url(../images/ruffwear_hero.jpg);
    background-size: 140%;
    /* insures image fits by longest edge */
    background-repeat: no-repeat;
    background-position: left center;
    position: relative;
}

.hero_text {
    color: white;
    font-family: impact;
    font-size: 2.7em;
    padding: 20px;
    /* padding value order: top, right, bottom, left */
    background-color: rgba(20,20,20,.7);
    position: absolute;
    top: 10px; left: 100px;
    letter-spacing: .05em;
}

.call-to-action {
    display: block; /* convert to a block element */
    background-color: #eaa22e;
    width: 180px; padding: 16px 8px;
    position: absolute; bottom: 40px; left: 100px;
    text-decoration: none;
    text-align: center; /* horizontally center the text */
    color: #234;
    font-size: 16pt;
    border-radius: 8px;
    box-shadow: 2px 3px 6px rgba(10,10,10,.7); /* y, x, blur, color */
    transition: transform 150ms linear;
}

.call-to-action:hover {
    transform: scale(104%);
}

section.products {
    min-height: 300px;
    background-color: #eee;
    display: flex; /*make this a flexbox parent */
    justify-content: space-between;
    flex-flow: row wrap;
    gap: 5px;
    padding: 60px 100px;
}

.product_card {
    flex: 0 0 20%;
    background-color: white;
    padding: 4px;
    text-align: center;
    border-radius: 6px;
    box-shadow: 0 0 20px #888;
    text-decoration: none; /* gets rid of underline */
    color: #234;
    transition: box-shadow 150ms linear;
    transition: transform 150ms linear;
}

.product_card:hover {
    box-shadow: 0 0 20px #555;
    transform: scale(104%);
}

.product_card h2 {
    font-size: 10pt;
    margin-top: 40px;
    margin-bottom: 10px;
}

.product_card img {
    width: 80%;
}

.product_card p {
    font-size: 8pt;
}

.featured_story {
    margin: 40px 100px;
    min-height: 650px;
    background-color: white;
    display: flex; /* becomes a flex parent */
    text-decoration: none;
    color: #234;
    border-radius: 6px;
    box-shadow: 0 0 20px #888;
    transition: background-color 150ms linear;
    transition: transform 150ms linear;
}


.featured_story:hover {
    box-shadow: 0 0 20px #555;
    transform: scale(1.02);
}

.featured_story figcaption {
    background-color: white;
    flex: 0 0 30%;
    border-radius: 6px 0 0 6px;
}

.featured_story figcaption p:first-child {
    text-align: center;
    text-transform: uppercase;
    font-size: 8pt;
    margin: 8px;
    font-weight: bold;
}


.featured_story figcaption h2 {
    margin: 16px;
    font-size: 14pt;
    line-height: 1.4;
}

.featured_story figcaption p {
    margin: 16px;
    font-size: 10pt;
    line-height: 1.6;
}

.featured_story figure {
    flex: 0 0 70%;
    background-image: url(../images/ruffwear_hero2.jpg);
    background-size: 200%;
    background-position: 75% 65%;
    border-radius: 0 6px 6px 0;
}

footer {
    min-height: 300px;
    background-color: grey;
    color: #eee;
}

footer .inner-container {
    margin: 0 100px;

}

header .inner-container, nav.inner-container, footer h2 {
    padding: 10px;
}


/* code below generated by ChatGPT */

@media (max-width: 900px) {
    .featured_story {
        flex-direction: column;
        min-height: auto;
    }

    .featured_story figure {
        flex: none;
        height: auto;
        min-height: 300px;
        background-size: 150%;
        background-repeat: no-repeat;
        background-position: center;
        border-radius: 0 0 6px 6px;
    }

    .featured_story figcaption {
        flex: none;
        height: auto;
        border-radius: 6px 6px 0 0;
    }
}
