/* ***************************** */
/* HEADER */
/* ***************************** */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fdf2e9;
  /* Height given to make the header sticky */
  height: 9.6rem;
  /* set padding on the left/right */
  padding: 0 4.8rem;
  position: relative;
}
.logo {
  height: 2.2rem;
}

/* ***************************** */
/* NAVIGATION */
/* ***************************** */
.main-nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 4.8rem;
}

.main-nav-link:link,
.main-nav-link:visited {
  display: inline-block;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 1.8rem;
  transition: all 0.3s;
}
.main-nav-link:hover,
.main-nav-link:active {
  color: #cf711f;
}
.main-nav-link.nav-cta:link,
.main-nav-link.nav-cta:visited {
  padding: 1.2rem 2.4rem;
  border-radius: 0.9rem;
  background-color: #e67e22;
  color: #fff;
}
.main-nav-link.nav-cta:hover,
.main-nav-link.nav-cta:active {
  background-color: #cf711f;
}

/* MOBILE NAVIGATION */

.btn-mobile-nav {
  border: none;
  background: none;
  cursor: pointer;
  /* make the navigation button hidden */
  display: none;
}

.icon-mobile-nav {
  height: 4.8rem;
  width: 4.8rem;
  color: #333;
}

/* select css based on attributes (name) */
.icon-mobile-nav[name="close-outline"] {
  /* hide the close button */
  display: none;
}

/* STICKY NAVIGATION */
/* Sticky class will be added to body in script.js */
.sticky .header {
  /* fixing element in viewport, not moving as we scroll, taking header out of the flow */
  position: fixed;
  top: 0;
  bottom: 0;
  width: 100%;
  height: 8rem;
  padding-top: 0;
  padding-bottom: 0;
  background-color: rgba(255, 255, 255, 0.97);
  /* less z-index than navigation button which is 9999 in (queries.css) */
  z-index: 999;
  box-shadow: 0 1.2rem 3.2rem rgba(0, 0, 0, 0.03);
}
/* A margin-top of 9.6rem is added in hero section to compensate for the header */
.sticky .section-hero {
  margin-top: 9.6rem;
}

/* ***************************** */
/* HERO SECTION */
/* ***************************** */
.section-hero {
  background-color: #fdf2e9;
  /* Padding - spacing inside of the element */
  /* Usually lot of space as it is between the sections */
  /* padding: top/bottom left/right; */
  /* padding: top right bottom left; (clockwise) */
  padding: 4.8rem 0 9.6rem 0;
}

.hero {
  max-width: 130rem;
  display: grid;
  margin: 0 auto;
  padding: 0 3.2rem;
  grid-template-columns: 1fr 1fr;
  gap: 9.6rem;
  align-items: center;
}

.hero-description {
  font-size: 2rem;
  line-height: 1.6;
  margin-bottom: 4.8rem;
}

.hero-img {
  /* Usually images take full height and width according to their size */
  /* To make the image flexible, provide width of 100% to fill the entire parent element which is a column of the grid */
  width: 100%;
}

.delivered-meals {
  display: flex;
  align-items: center;
  margin-top: 8rem;
  gap: 1.6rem;
}
.delivered-imgs {
  display: flex;
}
.delivered-imgs img {
  border-radius: 50%;
  height: 4.8rem;
  width: 4.8rem;
  margin-right: -1.6rem;
  border: 3px solid #fdf2e9;
}
.delivered-imgs img:last-child {
  margin: 0;
}
.delivered-text {
  font-size: 1.8rem;
  font-weight: 600;
}
.delivered-text span {
  color: #cf711f;
  font-weight: 700;
}

/* ***************************** */
/* FEATURED IN SECTION */
/* ***************************** */
.section-featured {
  /* half of 9.6rem */
  padding: 4.8rem 0 3.2rem 0;
}

.heading-featured-in {
  font-size: 1.4rem;
  /* consistent with the subheading */
  text-transform: uppercase;
  letter-spacing: 0.75px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 2.4rem;
  color: #888;
}

.logos {
  display: flex;
  justify-content: space-around;
}
.logos img {
  height: 3.2rem;
  filter: brightness(0);
  opacity: 50%;
}

/* ***************************** */
/* HOW IT WORKS SECTION */
/* ***************************** */

.section-how {
  padding: 9.6rem 0;
}

.step-img-box {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
/* using a pseudo element that inserts a child element in the parent element */
.step-img-box::before,
.step-img-box::after {
  /* to make it visible there must be some content or empty */
  content: "";
  /* use block to make shapes */
  display: block;
  border-radius: 50%;
  position: absolute;
  /* centering technique */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.step-img-box::before {
  /* image occupies 35% so it's 60% */
  width: 60%;
  /* height: 60%; */
  /* trick adding padding to all height */
  padding-bottom: 60%;
  background-color: #fdf2e9;
}

.step-img-box::after {
  width: 45%;
  padding-bottom: 45%;
  background-color: #fae5d3;
}

.step-img {
  width: 35%;
  z-index: 1;
}

.step-number {
  font-size: 8.6rem;
  font-weight: 600;
  /* grayscale is betweeon #000 - #fff in hexcode */
  color: #ddd;
  /* can mix first few characters prior - of css property and after of - then tab to autocomplete css property in vs code */
  margin-bottom: 1.2rem;
}

.step-description {
  font-size: 1.8rem;
  line-height: 1.8;
}

/* ***************************** */
/* MEALS SECTION */
/* ***************************** */

.section-meals {
  padding: 9.6rem 0;
}

.meal {
  box-shadow: 0 2.4rem 4.8rem rgba(0, 0, 0, 0.075);
  border-radius: 1.1rem;
  /* image is overflowing the meal container so the border radius is not visible, fix by setting overflow to hidden */
  overflow: hidden;
  transition: all 0.4s;
}

.meal:hover {
  transform: translateY(-1.2rem);
  box-shadow: 0 3.2rem 6.4rem rgba(0, 0, 0, 0.06);
}

.meal-content {
  padding: 3.2rem 4.8rem 4.8rem 4.8rem;
}

.meal-tags {
  margin-bottom: 1.2rem;
  display: flex;
  gap: 0.4rem;
}

.tag {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  font-size: 1.2rem;
  text-transform: uppercase;
  color: #333;
  border-radius: 10rem;
  font-weight: 600;
}
/* use -- for variation(tag to tag--) */
.tag--vegetarian {
  background-color: #51cf66;
}
.tag--vegan {
  background-color: #94d82d;
}
.tag--paleo {
  background-color: #ffd43b;
}

.meal-title {
  font-size: 2.4rem;
  color: #333;
  font-weight: 600;
  margin-bottom: 3.2rem;
}

.meal-attributes {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.meal-attribute {
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.meal-attribute span {
  padding-top: 3.9px;
}

.meal-icon {
  height: 2.4rem;
  width: 2.4rem;
  color: #e67e22;
}

.meal-img {
  width: 100%;
}

.all-recipes {
  text-align: center;
  font-size: 1.8rem;
}

/* ***************************** */
/* TESTIMONIALS SECTION */
/* ***************************** */

.section-testimonials {
  background-color: #fdf2e9;
  display: grid;
  /* 1 column gets 55/100(55+45) another gets 45% */
  grid-template-columns: 55fr 45fr;
  align-items: center;
}

.testimonials-container {
  padding: 9.6rem;
}

.testimonials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 4.8rem;
  column-gap: 8rem;
}

.testimonial-img {
  width: 6.4rem;
  border-radius: 50%;
  margin-bottom: 1.2rem;
}

.testimonial-text {
  font-size: 1.8rem;
  /* multiply the font size by 1.8x18px =32.4px  */
  line-height: 1.8;
  margin-bottom: 1.6rem;
}

/* 
Establishing visual heirarchy ----
to draw more attention to important things use bold, bigger text, darker colors 
*/

.testimonial-name {
  /* less important text in visual heirarchy so make it smaller, lighter color */
  font-size: 1.6rem;
  color: #6f6f6f;
}

/* images are inline elements and they contain a bit of whitespace around to remove make them inline-block */

/* not using reusable grid as the gap is too big */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  padding: 1.6rem;
}

.gallery-item {
  overflow: hidden;
}

.gallery-item img {
  display: block;
  width: 100%;
  transition: all 0.4s;
}

.gallery-item img:hover {
  transform: scale(1.1);
}

/* ***************************** */
/* PRICING SECTION */
/* ***************************** */

.section-pricing {
  padding: 9.6rem 0;
}

.pricing-plan {
  border-radius: 11px;

  width: 75%;
}

.pricing-plan--starter {
  /* overwrite justify-items of grid-container */
  justify-self: end;
  border: 2px solid #fdf2e9;
  /* same trick as .btn--outline */
  /* box-shadow: inset 0 0 0 2px #fdf2e9; */
  padding: 4.6rem;
}
.pricing-plan--complete {
  background-color: #fdf2e9;
  padding: 4.8rem;
  /* parent element of absolute element get postion relative */
  position: relative;
  overflow: hidden;
}

.pricing-plan--complete::after {
  content: "Best Value";
  text-transform: uppercase;
  font-size: 1.4rem;
  font-weight: 700;
  background-color: #ffd43b;
  color: #333;
  padding: 0.8rem 8rem;
  transform: rotate(45deg);

  position: absolute;
  top: 6%;
  right: -18%;
}

.plan-header {
  text-align: center;
  margin-bottom: 4.8rem;
}

.plan-name {
  color: #cf711f;
  font-size: 2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  margin-bottom: 3.2rem;
}
.plan-price {
  font-size: 6.2rem;
  font-weight: 600;
  color: #333;
  /* the plan-text and plan-price belong together, rather than plan-name and plan-price so they should have less margin - that's the law of proximity */
  margin-bottom: 1.6rem;
}

.plan-price span {
  font-size: 3rem;
  font-weight: 500;
  margin-right: 0.8rem;
}

.plan-text {
  font-size: 1.6rem;
  line-height: 1.6;
  color: #6f6f6f;
}

.plan-sign-up {
  text-align: center;
  /* same margin as plan-header */
  margin-top: 4.8rem;
}

.plan-details {
  font-size: 1.6rem;
  line-height: 1.6;
  text-align: center;
}

.feature-icon {
  color: #e67e22;
  height: 3.2rem;
  width: 3.2rem;
  background-color: #fdf2e9;
  margin-bottom: 3.2rem;
  /* padding half of the margin */
  padding: 1.6rem;
  border-radius: 50%;
}

/* for visual heirarchy title and the text has to be closer than title and icon */

.feature-title {
  font-size: 2.4rem;
  color: #333;
  font-weight: 700;
  margin-bottom: 1.6rem;
}
.feature-text {
  font-size: 1.8rem;
  line-height: 1.8;
}

/* ***************************** */
/* CTA SECTION */
/* ***************************** */

.section-cta {
  /* adding same padding-bottom as padding-top of footer */
  /* top and bottom | left and right */
  /* top | right | bottom | left */
  /* padding: 9.6rem 0 12.8rem 0; */
  /* top | left and right | bottom */
  padding: 4.8rem 0 12.8rem;
}

.cta {
  display: grid;
  /* 2/3 = 66.6% + 1/3 = 33.3% */
  grid-template-columns: 2fr 1fr;
  /* background-color: #e67e22; */

  /* with darker background the shadow needs to be darker */
  box-shadow: 0 2.4rem 4.8rem rgba(0, 0, 0, 0.15);
  border-radius: 11px;

  /* 90deg left to right */
  /* 180 deg top to bottom */
  /* 360deg bottom to top */
  /* from corner: left bottom, right bottom etc.  */
  background-image: linear-gradient(to right bottom, #eb984e, #e67e22);

  /* temp (giving it a fixed height to work initially)removing it the height of grid container will be decided by the content */
  /* height: 50rem; */

  overflow: hidden;
}

.cta-text-box {
  color: #45260a;
  padding: 4.8rem 6.4rem 6.4rem 6.4rem;
}

.cta .heading-secondary {
  /* color: #45260a; */
  /* inheriting color of its parent element cta-text-box */
  color: inherit;
  margin-bottom: 3.2rem;
}

.cta-text {
  font-size: 1.8rem;
  line-height: 1.8;
  margin-bottom: 4.8rem;
}

.cta-img-box {
  /* we can have multiple backgrounds in background-image property that will be layered on each other */
  background-image: linear-gradient(
      to right bottom,
      rgba(235, 151, 77, 0.35),
      rgba(232, 127, 36, 0.35)
    ),
    url("../img/eating.jpg");
  /* whatever the dimension of the image, it will cover the element entirely */
  background-size: cover;
  background-position: center;
}

.cta-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 3.2rem;
  row-gap: 2.4rem;
}

.cta-form label {
  display: block;
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: 1.2rem;
}

.cta-form input,
.cta-form select {
  width: 100%;
  padding: 1.2rem;
  font-size: 1.8rem;

  /* this will make them inherit the body font, usually input fields don't */
  font-family: inherit;
  color: inherit;
  border: none;
  background-color: #fdf2e9;
  /* small element so small border-radius */
  border-radius: 0.9rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
/* placeholder pseudo element */
/* pseudo elements = element that we can select and style which do no exist in the page e.g. first line, first letter, placeholder etc */
.cta-form input::placeholder {
  color: #aaa;
}

/* select everything inside cta class */
.cta *:focus {
  outline: none;
  box-shadow: 0 0 0 0.8rem rgb(253, 242, 233, 0.5);
}

/* ***************************** */
/* FOOTER */
/* ***************************** */

.footer {
  /* padding: 9.6rem 0; */
  /* going one up from 96px to 128px */
  padding: 12.8rem 0;
  /* add subtle border to create distinction from CTA section and footer */
  border-top: 1px solid #eee;
}

.grid--footer {
  grid-template-columns: 1.5fr 1.5fr 1fr 1fr 1fr;
}

.logo-col {
  display: flex;
  flex-direction: column;
}

.footer-logo {
  /* to add spacing make the link block,
  to use complete box-model on it that includes margins */
  display: block;
  margin-bottom: 3.2rem;
}

.social-links {
  list-style: none;
  /* make them side-by-side */
  display: flex;
  gap: 2.4rem;
}

.social-icon {
  height: 2.4rem;
  width: 2.4rem;
}

.copyright {
  /* footer heading - 1.8rem, footer links - 1.6rem */
  /* copyright - 1.4rem */
  font-size: 1.4rem;
  line-height: 1.6;
  color: #767676;
  /* make the margin auto to push it to bottom of flex container */
  margin-top: auto;
}

.footer-heading {
  font-size: 1.8rem;
  font-weight: 500;
  margin-bottom: 4rem;
}

.contacts {
  font-style: normal;
  font-size: 1.6rem;
  line-height: 1.6;
}
.address {
  margin-bottom: 2.4rem;
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
}

.footer-link:link,
.footer-link:visited {
  text-decoration: none;
  font-size: 1.6rem;
  color: #767676;
  /* transition all properties */
  transition: all 0.3s;
}

.footer-link:hover,
.footer-link:active {
  color: #555;
}
