/* Makes element sizing include padding and borders. */

* {
  box-sizing: border-box;
}

/* Removes the default page margin and sets the site's main appearance. */

body {
  margin: 0;
  color: rgb(35, 52, 43);
  background-color: rgb(241, 248, 245);
  font-family: Arial, Helvetica, sans-serif;
}

/* Prevents images from overflowing their containers. */

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

/* Uses Flexbox to place the business name and navigation on opposite sides. */

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background-color: rgb(47, 111, 83);
  color: rgb(255, 255, 255);
}

/* Styles the business name. */

header > p {
  margin: 0;
  font-size: 20px;
  font-weight: bold;
}

/* Uses Flexbox to arrange the navigation links in one row. */

nav ul {
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Styles the navigation links. */

nav a {
  color: rgb(255, 255, 255);
  font-weight: bold;
  text-decoration: none;
}

/* Centers the page's primary content and limits its width. */

main {
  width: 60%;
  max-width: 900px;
  margin: 0 auto;
}

/* Centers the introductory heading, sentence, and image. */

main > section:first-child {
  padding-top: 48px;
  text-align: center;
}

/* Styles the main heading. */

h1 {
  margin: 0 0 12px;
  color: rgb(47, 111, 83);
  font-size: 38px;
}

/* Controls the spacing below the introductory sentence. */

main > section:first-child p {
  margin: 0 0 36px;
  font-size: 17px;
}

/* Gives the hero image a wide, landscape shape. */

main > section:first-child img {
  display: block;
  width: 100%;
  height: 265px;
  object-fit: cover;
}

/* Adds space above the services section. */

#services {
  margin-top: 24px;
}

/* Styles the major section headings. */

main h2 {
  margin: 0 0 24px;
  color: rgb(47, 111, 83);
  font-size: 24px;
}

/* Uses Flexbox to place the three service cards in one row. */

#services {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

/* Makes the heading occupy a full row above the service cards. */

#services > h2 {
  flex-basis: 100%;
  margin-bottom: 0;
}

/* Gives each service card an equal share of the row. */

#services > section {
  flex: 1;
  padding: 20px;
  border-top: 4px solid rgb(47, 111, 83);
  background-color: rgb(255, 255, 255);
}

/* Controls spacing inside the service cards. */

#services h3 {
  margin: 0 0 16px;
  font-size: 18px;
}

#services p {
  margin: 0;
  line-height: 1.15;
}

/* Adds space above the review section. */

#reviews {
  margin-top: 64px;
}

/* Styles the testimonial as a white box with a green left border. */

#reviews blockquote {
  margin: 0;
  padding: 24px;
  border-left: 4px solid rgb(47, 111, 83);
  background-color: rgb(255, 255, 255);
  font-style: italic;
}

/* Removes the testimonial paragraph's default margin. */

#reviews blockquote p {
  margin: 0;
}

/* Styles the customer's name beneath the testimonial. */

#reviews > p {
  margin: 10px 0 0;
  font-weight: bold;
}

/* Adds space above and below the quote section. */

#quote {
  margin: 64px 0 80px;
}

/* Creates the white form container. */

form {
  padding: 24px;
  border: 1px solid rgb(195, 218, 207);
  background-color: rgb(255, 255, 255);
}

/* Places each label on its own line above its form control. */

form label {
  display: block;
  margin: 0 0 6px;
  font-weight: bold;
}

/* Gives the form controls consistent widths and spacing. */
/* font: inherit;: Forces the form fields to inherit the font family, size, and weight of the surrounding webpage */

form input, form select, form textarea {
  width: 100%;
  margin: 0 0 16px;
  padding: 10px;
  border: 1px solid rgb(200, 200, 200);
  font: inherit;
}

/* Gives the property-details box enough room for multiple lines. */

form textarea {
  height: 95px;
  resize: vertical;
}

/* Styles the form's submit button. */

form button {
  padding: 12px 24px;
  border: 0;
  background-color: rgb(47, 111, 83);
  color: rgb(255, 255, 255);
  font-weight: bold;
}

/* Creates the green footer and centers its contents. */

footer {
  padding: 34px 20px;
  background-color: rgb(47, 111, 83);
  color: rgb(255, 255, 255);
  text-align: center;
}

/* Controls spacing between the footer lines. */

footer p {
  margin: 10px 0;
}

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

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