/* Viewport Alignment Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Custom Variables */
/* Element Tags */
body {
  background-color: #106E71;
  color: #F7E7CE;
  font-size: 1.3rem;
  line-height: 1.5rem;
  height: 1080px;
}

a {
  color: #F7E7CE;
  text-decoration: none;
  letter-spacing: 1px;
  position: relative;
}

li {
  display: inline-block;
  margin: 5px 20px;
  padding: 0 1.3rem;
  list-style: none;
}

nav {
  width: 100%;
  height: 104px;
}

h1, h2, h3 {
  font-family: "Comfortaa";
  font-weight: bold;
}

h4, h5, p, span {
  font-family: "Poppins";
}

h1 {
  font-size: 3rem;
  line-height: 3.5rem;
}

h2 {
  font-size: 2.5rem;
  line-height: 3rem;
}

h3 {
  font-size: 1.7rem;
  line-height: 2.5rem;
}

h4 {
  font-size: 1.7rem;
  line-height: 2.5rem;
}

h5 {
  font-size: 1.3rem;
  line-height: 2.5rem;
  font-weight: lighter;
}

p {
  width: 500px;
  font-size: 1.3rem;
}

button {
  display: inline-block;
  background-color: #106E71;
  color: #F7E7CE;
  border: 0.5px solid #F7E7CE;
  cursor: pointer;
  font-size: 20px;
  transition: background-color 0.3s ease;
  padding: 1rem;
  border-radius: 0.2rem;
  box-shadow: 0 12px 20px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

/* Navigation Bar */
.navbar {
  font-family: "Italianno";
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-right: 20px;
  border-bottom: 0.4px solid #F7E7CE;
}

.logo {
  height: 150px;
  width: 200px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  grid-template-rows: 1fr 8fr 1fr;
  grid-template-areas: "header header header header" "left content content right" "left content content right" "left content content right" "left content content right";
  gap: 20px;
  height: 1080px;
  padding-bottom: 30px;
}

.grid-header {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-area: header;
}

.grid-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  grid-area: content;
  padding-left: 240px;
  background: linear-gradient(rgba(0, 0, 0, 0.262), rgba(0, 0, 0, 0.565));
  border: 2px solid #F7E7CE;
  border-radius: 0.5rem;
}

.grid-content-journal {
  display: flex;
  flex-direction: column;
  justify-content: center;
  grid-area: content;
  background: linear-gradient(rgba(0, 0, 0, 0.262), rgba(0, 0, 0, 0.565));
  border-radius: 0.5rem;
}

.grid-left-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  grid-area: left;
}

.grid-right-side {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  grid-area: right;
  width: 300px;
}

.grid-left-side p {
  margin-bottom: 20px;
  text-align: center;
  width: 200px;
  padding-bottom: 10px;
}

/* Journal Grid */
.journal-grid {
  display: grid;
  grid-template-columns: 100px 1fr 1fr;
  grid-template-rows: auto;
  grid-template-areas: "jheader jheader jheader jheader" "jleft jmeal jmood jmood" "jleft jmeal jmood jmood" "jleft jmeal jmood jmood" "jleft jmeal jmood jmood ";
  gap: 5px;
  padding: 0 1rem;
  border: 3px solid #d1edf2;
  border-radius: 0.5rem;
  height: 100vh;
  background-color: #0B0B45;
}

.journal-time, .journal-meal, .journal-mood {
  font-family: "Poppins";
  font-weight: lighter;
  border: 1px solid #F7E7CE;
}

.journal-header {
  grid-area: jheader;
  border-bottom: 1px solid #F7E7CE;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  align-items: center;
}

.journal-time {
  grid-area: jleft;
  border-radius: 0.2rem 0rem 0rem 0.2rem;
}

.journal-meal {
  grid-area: jmeal;
  padding-left: 1rem;
}

.journal-mood {
  grid-area: jmood;
  border-radius: 0rem 0.2rem 0.2rem 0rem;
  padding-left: 1rem;
}

/* Containers */
.food-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  line-height: 0.8rem;
  height: 230px;
  width: 210px;
  margin-top: 40px;
  background: linear-gradient(0.5turn, rgba(0, 0, 0, 0.668), rgba(0, 0, 0, 0.668));
  border: 2px solid #F7E7CE;
  border-radius: 0.5rem;
}

#food-fact-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  margin-top: 35px;
  padding: 1.5rem;
  height: 300px;
  background: linear-gradient(0.5turn, rgba(0, 0, 0, 0.668), rgba(0, 0, 0, 0.668));
  overflow-x: hidden;
  border: 2px solid #F7E7CE;
  border-radius: 0.5rem;
}

#landingPageContainer {
  background-image: url("placeholder.jpg");
  background-size: cover;
  background-position: center;
}

.hero-content {
  padding: 2rem;
  border-radius: 0.5rem;
  transform: translateX(-20%) translateY(30px);
  background: linear-gradient(rgba(0, 0, 0, 0.262), rgba(0, 0, 0, 0.565));
}

.hero-content h3 {
  margin-bottom: 10px;
}

.hero-content p {
  margin-bottom: 22px;
}

#foodInput {
  padding: 0.5rem 2rem;
  width: 80%;
  margin-bottom: 20px;
  border-radius: 0.2rem;
}

#food-fact-content {
  font-family: "Poppins";
  position: relative;
  animation-duration: 1s;
  animation-fill-mode: forwards;
  font-size: 1.3rem;
  width: 210px;
  justify-self: center;
  align-self: center;
}

footer {
  text-align: center;
  font-weight: lighter;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

/* Modal Properties */
.modal-container {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  width: 80%;
  height: 50%;
  transform: translate(-50%, -50%);
  background-color: #0B0B45;
}

.modal-content {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background-color: #0B0B45;
  padding: 20px;
  width: 500px;
  height: auto;
  box-shadow: 0 4px 8px #434b56;
  border-radius: 5px;
}

.thecontent {
  display: flex;
}

.thecontent span {
  padding: 1rem;
}

#nutrition-button {
  padding: 0.5rem 1.5rem;
  border-radius: 0.2rem;
  cursor: pointer;
  border: 0.5px solid #F7E7CE;
}

#openModal {
  width: 250px;
  padding: 0.8rem 1.4rem;
}

#themodal {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 100%;
  max-width: 760px;
  height: 100%;
  max-height: 760px;
  border: 2px solid #F7E7CE;
  transform: translate(-50%, -50%);
  background-color: #106E71;
  border-radius: 0.5rem;
  height: 640px;
}

.left-side {
  flex: 1;
  padding: 1rem;
  background: linear-gradient(rgba(0, 0, 0, 0.262), rgba(0, 0, 0, 0.565));
  border-top-left-radius: 0.5rem;
  border-bottom-left-radius: 0.5rem;
  height: 635px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 3rem;
}

.left-side {
  background-image: url("../images/modal.jpg");
}

.right-side {
  display: flex;
  justify-content: center;
  flex-direction: column;
  flex: 1;
  padding: 1rem;
}

.right-side input {
  border-radius: 2rem;
  display: flex;
  justify-content: center;
  padding: 5px 10px;
  margin-bottom: 2rem;
  box-sizing: border-box;
  width: 100%;
}

#foodinput {
  background-position: 1%;
  background-image: url("../images/food.jpg");
  padding-left: 1rem;
  background-repeat: no-repeat;
  background-size: 2.2rem;
  padding: 10px 22px 10px 44px;
}

#feelWhile {
  background-position: 1%;
  background-image: url("../images/thoughts.jpg");
  padding-left: 1rem;
  background-size: 2.2rem;
  padding: 10px 22px 10px 44px;
}

#feelAfter {
  background-position: 1%;
  background-image: url("../images/feeling.png");
  padding-left: 1rem;
  background-repeat: no-repeat;
  background-size: 2.2rem;
  padding: 10px 22px 10px 44px;
}

#conclusion {
  background-position: 1%;
  background-image: url("../images/foodforthought.png");
  padding-left: 1rem;
  background-repeat: no-repeat;
  background-size: 2.2rem;
  padding: 10px 22px 10px 44px;
}

#modalSubmit {
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  width: 50%;
  display: block;
  justify-content: center;
  margin-left: 25%;
  padding: 1rem;
  text-transform: lowercase;
  border-radius: 1rem;
  cursor: pointer;
}

.closeBtn {
  padding-right: 0.5rem;
  cursor: pointer;
}

/* Page Specific Styles */
.resources,
.about {
  gap: 20px;
}

.about h1,
#grid-content-resources h1 {
  padding-bottom: 14px;
  text-align: left;
}

.about {
  gap: 16px;
}

#grid-content-resources p {
  width: 440px;
  text-align: left;
}

.authors {
  gap: 5px;
}

.emphasis {
  background-color: #106E71;
  font-weight: bold;
  font-family: "Comfortaa";
}

.journal-grid {
  gap: 16px;
}

.heart {
  color: #ff5349;
}

.fa {
  font-weight: lighter;
}

/* Hover and Highlight Effects */
.slide-in {
  animation-name: slideIn;
}

.slide-out {
  animation-name: slideOut;
}

.underline {
  font-size: 1.6rem;
  position: relative;
}

button:hover {
  background-color: #0B0B45;
}

.underline::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background-color: #0B0B45;
  bottom: -6px;
  left: 0;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 300ms ease-in-out;
}

.underline:hover::before {
  transform-origin: left;
  transform: scaleX(1);
}

.highlight {
  box-shadow: inset 0 0 0 0 #0B0B45;
  color: #F7E7CE;
  margin: 0 -0.25rem;
  padding: 0 0.25rem;
  transition: color 300ms ease-in-out, box-shadow 300ms ease-in-out;
}

.highlight:hover {
  box-shadow: inset 200px 0 0 0 #0B0B45;
  color: #F7E7CE;
}

/* Keyframes Animations */
@keyframes slideIn {
  0% {
    transform: translateX(120%);
  }
  100% {
    transform: translateX(0);
  }
}
@keyframes slideOut {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-120%);
  }
}