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

body {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    margin: 0;
    background-color: #0d0409;
}

/**
 *  .wrapper
 *  max-width around 1000px
 *  centered on the page
 *  display grid
 *  gap value used
 *  padding value used
 */
.wrapper { 
    max-width: 960px; 
    display: grid; 
    grid-template-columns: repeat(6, 1fr);
    background: #f2f2f2;
    gap: 1rem;
    padding: 20px;
    margin: 0px auto;   
}

header {
    grid-column: 1 / -1;
}
/**
 * header h1
 * center align text
 * text converted to upper case characters
 */
header h1 {
    margin: auto;
    text-transform: uppercase;
    text-align: center;
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
}

header h1 a:link {
    color: #0d0409;
    text-decoration: none;
}

header h1 a:visited {
    color: #0d0409;
}

h2 {
    color: #0d0409;
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
}

/**
 * .post
 * display grid
 * gap value used
 * padding-bottom value used
 * border-bottom value used
 * margin-bottom value used
 */
.post {
    display: grid;
    grid-template-columns: 1fr;
    grid-column: span 6;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 3px solid #f2a30f;
    margin-bottom: 10px;
}

/**
 * .post-featured-image (figure element)
 * remove default margin set to zero
 */
.post-featured-image {
    margin: 5px;
}

/**
 * .post-featured-image img
 * width 100%;
 * aspect-ratio 16 / 9
 * object-fit cover
 * padding value used
 * background color used
 * border value used
 */
.post-featured-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    padding: 10px;
    background-color: #e1f28d;
    border: 6px solid #04adbf;
}

.post-content a:link {
    color: #005670;
    text-decoration: none;
}

.post-content a:visited {
    color: #04adbf;
}

.post-content a:hover {
    color: #f2a30f;
}

.post-content a:focus {
    color: #f2a30f;
    outline: 2px solid #04adbf;
}

.post-content a:active {
    color: #e1f28d;
}


/**
 * .footer
 * display flex
 * gap value used
 * margin bottom used
 * validation links on right side of footer
 */
footer {
    grid-column: span 6;
    display: flex;
    gap: 5px;
    margin-bottom: 4px;
}

footer :first-child {
    margin-right: auto;
}

footer :nth-child(n + 2) {
    margin-left: 1rem;
}

/**
 * .footer a
 * Style links - no default link styles
 * Style links - hover state
 */
footer a {
    margin: 15px;
    text-decoration-color: #0d0409;
    border: 2px solid #04adbf;
    padding: 10px;
}
footer a:hover,
footer :first-child a:hover, 
footer :nth-child(n + 2) a:hover {
    color: #0d0409;
    background-color: #f2a30f;
}

footer a:link,
footer :first-child a:link, 
footer :nth-child(n + 2) a:link {
    color: #005670;
}

footer a:visited,
footer :first-child a:visited, 
footer :nth-child(n + 2) a:visited {
    color: #04adbf;
}

footer a:focus,
footer :first-child a:focus, 
footer :nth-child(n + 2) a:focus {
    color: #e1f28d;
    outline: 2px solid #04adbf;
}

footer a:active,
footer :first-child a:active, 
footer :nth-child(n + 2) a:active {
    color: #e1f28d;
}

@media screen and (min-width: 768px) {
    /**
     * .post
     * create two equal-sized grid columns
     */
    .post {
         grid-template-columns: 1fr 1fr;
    }

    /**
     * .post-content
     * rearrange the visual order using the order property
     * show .post-content before .post-featured-image
     */
    .post-content {
        order: -1;
    }
}