/* reset */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* variables */

:root {
    --primary: #be2529;
    --dark: #333;
    --secondary: #0d0d0d;
    --gray: #ddd;
    --gray-light: #eee;
    --gray-hint:#555;
}

/* general */

:root {
    font-size: 62.5%;
}

body {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.6rem;
    line-height: 2rem;
    color: var(--dark);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 1rem 0;
}

h3 {
    font-size: 1.8rem;
}

p {
    margin: 1rem 0;
}

a {
    font-size: 1.6rem;
    color:var(--dark);
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

hr {
    border: 0;
    border-bottom: 1px solid var(--gray);
}

::placeholder {
    color:var(--dark);
}

/* utility */

.container {
    display: block;
    margin: auto;
    max-width: 1100px;
    height: 1500px;
    padding: 0 1rem;
}

.text-primary {
    color: var(--primary);
}

.text-primary:hover {
    opacity: 0.8;
}

.text-hint {
    color: var(--gray-hint);
    font-size: 1.2rem;
}

.btn {
    font-size: 1.6rem;
    padding: 1rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    border: 0;
    transition: all 0.2s;
}

.btn-light {
    background: white;
    border: 1px solid var(--primary);
    color:var(--primary);
}

.btn-light:hover {
    background: var(--primary);
    color: #fff;
}

.btn-dark {
    background: var(--dark);
    color: white;
    border: 1px solid var(--dark)
}

.btn-dark:hover {
    border: 1px solid var(--dark);
    background: white;
    color: var(--dark);
}

.mx-1 {
    margin-left: 1rem;
    margin-right: 1rem;
}

.underline {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray);
    margin-bottom: 2rem;
}

.article-author {
    font-weight: 700;
    font-size: 1.4rem;
}

/* header */

header {
    display: grid;
    grid-template-columns: 1fr auto;
    place-items: center start;
    line-height: 3.5rem;
    margin: 0.5rem auto;
}

header .logo {
    font-size: 3rem;
    font-family: "Staatliches", cursive;
}

header a {
    display: block;
    padding: 1rem;
}

header ul {
    display: flex;
    align-items: center;
}

header ul li {
    padding: 1rem;
}

/* nav */

nav {
    padding:1rem;
    display: flex;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: #fff;
}

/* showcase */

.showcase {
    padding: 2rem 0;
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
}

.showcase article:first-child {
    grid-column:  1 / 2;
    grid-row: 1 / 4;
}

.showcase article:last-child {
    grid-column:  3 / 4;
    grid-row: 1 / 4;
}

.article-small {
    display: grid;
    column-gap: 10px;
    grid-template-columns: 80px auto;
    grid-template-rows: 80px;
    grid-auto-rows: auto;
}

.article-small p {
    margin: 0.5rem 0;
}

.article-small .article-content {
    grid-column: span 2;
    max-height: 6rem;
    overflow: hidden;
}

.article-small .article-author {
    grid-column: span 2;
}

.article-small .text-hint {
    grid-column: span 2;
}

/* ads */

.ads {
    background: var(--gray-light);
    margin: 2rem 0;
    display: grid;
    grid-template-columns: 200px 1fr auto 1fr;
    grid-template-rows: 1fr auto auto auto 1fr;
    grid-template-areas: 
    "img . . ."
    "img . h1 ."
    "img . p ."
    "img . form ."
    "img . . . ";
}

.ads img {
    grid-area: img;
}

.ads h1 {
    grid-area: h1;
    font-size: 4rem;
}

.ads p {
    grid-area: p;
}

.ads form {
    grid-area: form;
}

.ads form input {
    background: var(--gray-light);
    border: 0;
    border-bottom: 1px solid var(--dark);
    padding: 1rem 0;
    margin-right: 1rem;
    outline: 0;
}

/* content */

.content {
    margin: 3rem 0;
    display: flex;
    align-items: start;
}

.articles {
    flex: auto;
}

.articles article {
    display: grid;
    grid-template-columns: 1fr 80px;
    grid-auto-rows: auto;
    grid-template-areas: 
    "title img"
    "content img"
    "author img"
    "details img";
    margin-bottom: 2rem;

}

.articles article h3,
.articles article p {
    margin:0.2rem 0;
}

.articles article img {
    grid-area: img;
}

.articles article h3 {
    grid-area: title;
}

.articles article p:first-child {
    grid-area: content;
}

.articles article .article-author {
    grid-area: author;
}

.articles article .text-hint {
    grid-area: details;
}
    
.popular {
    flex: 350px;
    padding:0 3rem;
    position: sticky;
    top: 45px;
}

.popular ul li {
    display: grid;
    grid-template-columns: 50px auto;
    place-items: center center;
    margin-bottom: 1rem;
}

.popular ul li div:first-child {
    font-size: 3rem;
    color: var(--gray-hint)
}

.popular ul li p,
.popular ul li h3 {
    margin: 0.2rem;
}
