html {
    --side-margin: 60px;
    --section-margin: 150px;
    --badge-margin: 20px;
    --letter-spacing: -2px;
    --main-bg-color: #f8f7f4;
}

body {
    display: grid;
    grid:   'header'
            'main'
            'featured-header'
            'content'
            'gradient' 100px
            'footer' auto
            ; 
    box-sizing: border-box;
    background-color: var(--main-bg-color);
    font-family: 'Instrument Sans', sans-serif;
    margin: 0;
}

#grad1 {
    position: absolute;
    width: 100%;
    height: 800px;
    z-index: -1;
}
#grad1 .gradient-start {
    stop-opacity: 0.25;
}
#grad1 .gradient-end {
    stop-opacity: 0;
}
#grad1 #rg1 .gradient-start, #grad1 #rg1 .gradient-end {
    stop-color: #fa3f2c;
}
#grad1 #rg2 .gradient-start, #grad1 #rg2 .gradient-end {
    stop-color: #ffc919;
}

a {
    text-decoration: none;
    color: #000;
}

#header {
    grid-area: header;
}

#header a {
    color: #1e1e1e;
}

#header #header_row {
    margin: 20px var(--side-margin) 0 var(--side-margin);
    background-color: #fff;
    border-radius: 999px;
    display: grid;
    grid:   'header1 header2 header3' / 1fr auto 1fr; 
    align-items: center;
}

#header #header_row > div:nth-child(1) {
    grid-area: header1;
    margin-left: 45px;
}

#header #header_row > div:nth-child(2) {
    grid-area: header2;
}

#header #header_row > div:nth-child(3) {
    grid-area: header3;
    display: flex;
    justify-content: flex-end;
}
#header #header_row > div:nth-child(3) nav {
    padding: 10px 10px 10px 0;
}
.create-account-button {
    border: 1px solid black;
    border-radius: 2em;
    padding: 12px;
    text-align: center;
}


nav ul {
    display: flex;
    list-style-type: none;
    padding: 0;
}

nav ul li {
  margin-right: 30px;
}

nav ul li:last-child {
  margin-right: 0;
}

#main {
    grid-area: main;
    padding: 100px 0 40px 0;
    text-align: center;
    box-sizing: border-box;
}
#main > div {
    margin-top: 20px;
}
#main > div:nth-child(3) {
    margin-top: 40px;
    box-sizing: border-box;
}

/* search box */
#search-box {
    text-align: center;
    position: relative;
    margin: 40px 0;
}

#search-box input {
    width: 40%;
    padding: 16px 16px 16px 30px;
    border-radius: 999px;
    border: 1px solid #ffc919;
    box-shadow: 0px 98px 39px rgba(255, 201, 25, 0.01), 0px 55px 33px rgba(255, 201, 25, 0.03), 0px 24px 24px rgba(255, 201, 25, 0.05), 0px 6px 13px rgba(255, 201, 25, 0.06);
    font-size: 16px;
    box-sizing: border-box;
}
#search-box input::placeholder {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #8e8e8e;
}
#search-box svg {
    position: absolute;
    width: 18px;
    height: 18px;
    left: calc(70% - 44px);
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}


.cap1 {
    font-size: 50px;
    font-weight: 500;
    letter-spacing: var(--letter-spacing);
}

.cap1 em {
    font-weight: 100;
    font-family: 'Instrument Serif', serif;
    font-style: italic;
}

.cap2 {
    font-size: 50px;
    /* font-weight: 200; */
    letter-spacing: var(--letter-spacing);
}

/* categories */
#categories .row {
    margin-left: 10px;
    display: inline-flex;
    gap: 10px;
}
#categories .row > a > div {
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 10px 20px;
    border-radius: 999px;
}

#featured-header {
    grid-area: featured-header;
    margin: 20px var(--side-margin) 0 var(--side-margin);
}

/* content */
#content {
    margin: 10px var(--side-margin) 120px var(--side-margin);
    grid-area: content;
    display: flex;
    gap: 20px;
}
#content > div:first-child {
    flex: 3;
}
#content > div:last-child {
    flex: 1;
}
#articles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
#articles img {
    width: 100%;
    height: 300px;
    display: block;
    border-radius: 30px;
    object-fit: cover;
}
.article > div:nth-child(n+2) {
    margin: 10px 0;
}
.article > div:nth-child(2) {
    font-size: 18px;
    font-weight: 500;
}
.article > div:nth-child(3) {
    font-size: 18px;
    color: #4b4b4a;
}
.article > div:nth-child(4) {
    font-weight: 500;
}

/* pages */
#pages_left {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 80px;
}
#pages_left > div {
    flex: 1;
}
#pages_left > div:first-child div {
    width: 52px;
    height: 52px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background-color: #f9e2dc;
    border-radius: 50%;
}
#pages_left > div:first-child svg {
    position: relative;
    width: 10px;
    height: 19px;
    stroke: #fa3f2c;
    left: -1px;
}
#pages_left > div:nth-child(2) {
    text-align: center;
}
#pages_left > div:nth-child(2) > page:nth-child(n+2) {
    margin-left: 20px;
}
#pages_left > div:last-child {
    text-align: right;
}
#pages_left > div:last-child div {
    width: 52px;
    height: 52px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background-color: #fa402c;
    border-radius: 50%;
}
#pages_left > div:last-child svg {
    position: relative;
    width: 10px;
    height: 19px;
    stroke: #fff;
    left: 1px;
}
page {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 37px;
    height: 52px;
    border-radius: 32px;
}
page.current {
    color: #fffbfa;
    background-color: #fa3f2c;
}
page a {
    color: #050101;
}


/* popular posts */
#popular-posts {
    background-color: #fff;
    border-radius: 30px;
    border: 1px solid #ccc;
    padding: 20px;
}

#popular-posts hr {
    height: 1px; 
    border: none; 
    background-color: #e6e6e6;
    
}
#popular-posts ul {
    padding: 0 20px 0 20px;
    list-style-type: square;
}
#popular-posts ul > li {
    padding: 10px 0;
}
#popular-posts a {
    text-decoration: underline;
}

/* stay informed */
#stay-informed {
    background-color: #fff;
    border-radius: 30px;
    border: 1px solid #ccc;
    padding: 20px;
    margin-top: 20px;
}
#stay-informed > div:nth-child(n+2) {
    margin-top: 15px;
}
#stay-informed input {
    width: 100%;
    padding: 10px 10px 10px 20px;
    border-radius: 999px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}
#stay-informed input::placeholder {
    color: #737373;
}
#stay-informed .subscribe {
    background-color: #FFC919;
    border-radius: 999px;
    padding: 10px 10px 10px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 500;
}

#gradient {
    grid-area: gradient;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, transparent, var(--main-bg-color)), linear-gradient(90deg, rgba(250, 63, 44, 0.4), rgba(255, 201, 25, 0.4));
    backdrop-filter: blur(150px);
}

/* footer */
#footer {
    grid-area: footer;
    background-color: #171717;
}

#footer > div {
    margin-left: var(--side-margin);
    margin-right: var(--side-margin);
}

/* logo */
#footer > div:nth-child(1) {
    margin-top: 40px;
    margin-bottom: 40px;
}

#footer > div:nth-child(2) {
    margin-bottom: 40px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 10px; 
}

#footer > div:nth-child(2) > div:nth-child(1) > p {
    font-size: 18px;
}

#footer > div:nth-child(2) > div:nth-child(1) > ul {
    margin-top: 60px;
    display: flex;
    list-style-type: none;
    padding: 0;
}
#footer > div:nth-child(2) > div:nth-child(1) > ul > li {
    padding-right: 60px;
}

#footer > div:nth-child(2) > div:nth-child(5) img {
    vertical-align: middle;
    margin-right: 5px;
}

#footer h2 {
    color: #fff;
    margin: 0 0 20px 0;
    padding: 0;
    font-weight: 500;
}

#footer p {
    color: #b5b4b2;
    padding: 5px 0 5px 0;
}

#footer hr {
    height: 1px; 
    border: none; 
    background-color: #3b3b3b;
}

#footer a {
    color: #b5b4b2;
}

#copyright {
    padding: 20px 0 20px 0;
}

p {
    margin: 0;
}

#categories .title, #featured-header, #popular-posts .title, #stay-informed .title {
    font-size: 20px;
    font-weight: 500;
}
