/* Makes sizing the layout easier and more predictable, including padding and borders. */

* {
  box-sizing: border-box;
}

/* Removes the white border the browser automatically places around the page (i.e., margin: 0 removed the browser's default page margin) and sets the main font (i.e., font-family replaced the browser’s default Times New Roman). */

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: rgb(34, 34, 34);
  background-color: rgb(244, 241, 234);
}

/* Prevents the image from overflowing its container. */

img {
  max-width: 100%;
  height: auto;
}


/* Styles the header and uses overflow to contain its floated children. The padding adds 18px vertically and 24px horizontally.  */
/* overflow: auto makes the header contain the floated business name and navigation */

header {
  padding: 18px 24px;
  background-color: rgb(15, 15, 15);
  color: rgb(255, 255, 255);
  overflow: auto;
}


/* Floats the business name left and displays it in uppercase without changing the text written in the HTML. */

header p {
  float: left;
  margin: 0;
  font-size: 20px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Changes only the word “Street” to red. */

header p span {
  color: rgb(200, 55, 43);
}

/* Floats the navigation to the right side of the header. */

nav {
  float: right;
}

/* Removes the list’s default bullets, margin, and padding. */

nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Places the navigation items beside one another using floats. */

nav li {
  float: left;
  margin-left: 24px;
}

/* Styles the navigation links. */

nav a {
  color: rgb(255, 255, 255);
  text-decoration: none;
  line-height: 24px;
}

/* Creates the large red introduction area below the header. */
/* #home: Targets the specific HTML element that has the attribute id="home". */
/* text-align: center;: Aligns all text and inline content inside this element directly to the center */

#home {
  padding: 54px 20px;
  background-color: rgb(200, 55, 43);
  color: rgb(255, 255, 255);
  text-align: center;
}

/* Styles the main headline and removes its default margin. */
/* #home h1: Targets any <h1> heading inside the specific HTML element with id="home" */
/* margin: 0 0 10px;: Removes the top, right, and left spacing around the heading, and leaves a 10px space at the bottom. */

#home h1 {
  margin: 0 0 10px;
  font-size: 44px;
}

/* Adds space between the supporting text and the button. */
/* #home p: Targets all <p> paragraph elements that are located inside the element with id="home". */

#home p {
  margin: 0 0 26px;
  font-size: 16px;
  font-weight: bold;
}


/* Styles the link inside #home as a button. inline-block allows the link to accept padding while remaining an inline-level element. */

#home a {
  display: inline-block;
  padding: 12px 26px;
  background-color: rgb(15, 15, 15);
  color: rgb(255, 255, 255);
  font-weight: bold;
  text-decoration: none;
}


/* Removes default spacing while allowing sections to control their own widths. */

main {
  padding: 0;
}


/* Centers the prices section and limits its width. */

#prices {
  width: 60%;
  max-width: 900px;
  margin: 58px auto;
}

/* Styles the section headings and adds the red line. */

main h2 {
  margin: 0 0 24px;
  padding-bottom: 8px;
  border-bottom: 3px solid rgb(200, 55, 43);
  font-size: 26px;
}

/* Makes the table fill its container and combines adjacent cell borders into single, clean lines. */

table {
  width: 100%;
  border-collapse: collapse;
}

/* Adds spacing and dividing lines to the table rows. */

th,
td {
  padding: 11px 8px;
  border-bottom: 1px solid rgb(215, 215, 215);
}

/* Aligns the service names to the left. */

th {
  text-align: left;
}

/* Aligns the prices to the right. */

td {
  text-align: right;
  font-weight: bold;
}

/* Centers the About section and limits its width. */

#about {
  width: 60%;
  max-width: 900px;
  margin: 0 auto 70px;
}

/* Floats the image and caption to the left side of the About section. */

#about figure {
  float: left;
  width: 38%;
  margin: 0 24px 0 0;
}

/* Makes the image fill the width of its figure. */

#about figure img {
  display: block;
  width: 100%;
}

/* Centers and italicizes the caption beneath the image. */

#about figcaption {
  margin-top: 8px;
  font-size: 14px;
  font-style: italic;
  text-align: center;
}

/* Targets the paragraph directly inside #about and moves it down to align visually beside the floated figure */
/* > is the direct-child combinator, so this selector will not affect paragraphs nested more deeply inside #about */

#about > p {
  margin: 0;
  padding-top: 90px;
  line-height: 1.15;
}

/* Makes the About section contain its floated figure. */

#about::after {
  content: "";
  display: block;
  clear: both;
}

/* Clears the earlier floats and creates the black footer. */


footer {
  clear: both;
  padding: 28px 20px;
  background-color: rgb(15, 15, 15);
  color: rgb(215, 215, 215);
  text-align: center;
}


/* Removes the address element's default italic style.  */

footer address {
  font-style: normal;
}

/* Controls the spacing between the footer lines. */

footer p {
  margin: 8px 0;
}

/* Makes the telephone link match the footer text. */

footer a {
  color: rgb(215, 215, 215);
  text-decoration: none;
}
