/* style */

/* PAGE FOUNDATION */
/* Styling the entire visible page:
- width: 90% allows the page to shrink on narrower screens
- max-width: 800px prevents the page from becoming wider than 800px on large screens
- margin: 0 auto removes the top and bottom margins and divides the remaining horizontal space equally between the left and right sides, which centers the page
- font-family asks the browser to use Lato. If Lato cannot load, the browser uses an available sans-serif font instead */

body {
  width: 90%;
  max-width: 800px;
  margin: 0 auto;
  padding-top: 50px;
  font-family: "Lato", sans-serif;
}

/* ARTICLE IMAGES */
/* Styles only images located inside an <article>:
- display: block makes each image behave like a block-level section and removes the small baseline gap that inline images can create
- width: 100% makes each image fill the available width of its article
- height: auto adjusts the image height automatically so the original proportions are preserved and the image is not stretched or squashed */

/* Here, img works because the page only seems to contain these article images, but opted for article img b/c that's more intentional: if a logo or icon is added later, it won’t automatically stretch to the full page width. */

/* img {
  display: block;
  width: 100%;
  height: auto;
} */

article img {
  display: block;
  width: 100%;
  height: auto;
}

/* MAIN TITLE: “THE FOODIST” */
/* Styles the <h1> containing the main title:
margin: 0 removes the browser's default outside spacing around the heading so we can control the spacing ourselves
font-size: 48px explicitly controls the title's size
font-weight: 300 replaces the browser's default bold heading weight with the lighter Lato 300 weight loaded by the HTML
Almost used display: inline for some reason, lol; that's wrong because the reference places the title on its own line. The <h1> remains block-level by default. */

header h1 {
  margin: 0;
  font-size: 48px;
  font-weight: 300;
}

/* Styles the link nested inside the main <h1>:
- header h1 a means: find an <a> inside an <h1> inside the <header>
- color: rgb(221, 0, 0) changes “The Foodist” from the default blue link color to red; an alternative is #d00 whuch is shorthand for #dd0000
- text-decoration: none removes the link's default underline */

header h1 a {
  color: rgb(221, 0, 0);
  text-decoration: none;
}

/* SUBTITLE: "FOOD BLOG” */
/* Styles the “Food blog” <h2> subtitle:
- margin: 12px 0 20px adds 12px above the subtitle, no margin on its left or right, and 20px below it
- color: rgb(34, 34, 34) changes the subtitle to a very dark gray; an alternative is #222
- font-size: 24px makes the subtitle half the size of the 48px title
- font-weight: 300 replaces the <h2> element's default bold appearance with Lato's lighter 300 weight
Remember: the <h2> remains block-level by default & the navigation also remains on its own line because <nav> is block-level. */

header h2 {
  margin: 12px 0 20px;
  color: rgb(34, 34, 34);
  font-size: 24px;
  font-weight: 300;
}

/* HEADER NAVIGATION */
/* Styles the navigation container located inside the header:
- margin-bottom: 55px creates the large amount of space shown between the city navigation and the first article's date
- This selector affects the header navigation only (i.e., it does not affect the separate navigation located inside the footer). */

header nav {
  margin-bottom: 55px;
}

/* Styles each city link inside the header navigation:
- margin-right: 14px creates space after each city link
- color: rgb(221, 221, 221)changes the links from blue to the very light gray shown in the reference image; an alternative is #ddd 
- font-size: 16px controls the size of the city names
- Did not remove text-decoration because the reference shows these links underlined */

header nav a {
  margin-right: 14px;
  color: rgb(221, 221, 221);
  font-size: 16px;
}

/* ARTICLE CONTAINERS */
/* Styles each <article>:
- padding-bottom creates space between the content and divider line
- margin-bottom creates space after the divider
- border-bottom adds the thin gray divider shown in the reference */

article {
  padding-bottom: 25px;
  margin-bottom: 35px;
  border-bottom: 1px solid rgb(221, 221, 221);
}


/* ARTICLE DATES */
/* Styles each article's <h3> date:
- margin controls the space around the date
- color changes the date to light gray
- font-size makes the date larger than normal text
- font-weight replaces the default bold appearance with Lato 300 */

article h3 {
  margin: 0 0 12px;
  color: rgb(204, 204, 204);
  font-size: 32px;
  font-weight: 300;
}

/* ARTICLE TITLES */
/* Styles each article's <h2>:
- margin controls the space above and below the title
- font-size makes the article title larger than paragraph text
- font-weight replaces the default bold appearance with Lato 300 */

article h2 {
  margin: 0 0 16px;
  font-size: 28px;
  font-weight: 300;
}


/* Styles the link inside each article title:
- color changes the title from default blue to black
- text-decoration removes the default underline */

article h2 a {
  color: rgb(17, 17, 17);
  text-decoration: none;
}


/* ARTICLE PARAGRAPHS */
/* Styles paragraphs inside each article:
- line-height adds vertical space between lines for readability
- margin controls the space above and below each paragraph */

article p {
  margin: 20px 0;
  line-height: 1.5;
}

/* Creates the large first letter, or drop cap:
- ::first-letter selects only the paragraph's first letter
- float: left lets the paragraph text wrap beside the enlarged letter
- color changes the letter to light gray
- font-size enlarges the letter
- line-height controls the drop cap's vertical height (i.e., its vertical position and height)
-  margin adds space between the drop cap and surrounding text & the small negative left margin pulls the letter slightly left so it aligns more closely with the image and article title */

/* Old code that I changed: 
article p::first-letter {
  float: left;
  color: rgb(221, 221, 221);
  font-size: 64px;
  font-weight: 300;
  line-height: 0.8;
  margin: 6px 10px 4px 0;
} */

article p::first-letter {
  float: left;
  color: rgb(221, 221, 221);
  font-size: 5em;
  font-weight: 300;
  line-height: 0.8;
  margin: 6px 10px 4px -8px;
}

/* “NEXT” LINKS */
/* Styles the <h4> containing each “Next” link:
- margin controls the space around the link
- text-align: right moves “Next” to the article's right side */

article h4 {
  margin: 18px 0 0;
  text-align: right;
}

/* Styles the “Next” link itself:
- color changes it from blue to red
- text-decoration removes the default underline */

article h4 a {
  color: rgb(221, 0, 0);
  text-decoration: none;
}


/* FOOTER */
/* Adds space below the footer */

footer {
  padding-bottom: 30px;
}


/* Styles links inside the footer navigation:
- color changes the links from blue to red
- text-decoration removes their default underlines */

footer nav a {
  color: rgb(221, 0, 0);
  text-decoration: none;
}


/* Styles the copyright bit:
- color changes the copyright text to light gray
- margin-top adds 24px of space above the copyright paragraph, separating it from the footer navigation 
Rememebr: margin-top = space outside the element’s top edge & margin-bottom = space outside the element’s bottom edge*/

footer p {
  margin-top: 24px;
  color: rgb(187, 187, 187);
}

