/* Custom Variables */
:root {
  --base: ghostwhite;
  --light: #106E71;
  --bright: #F7E7CE;
  --dark: #0B0B45;
  --second-base: #ff5349;
  --third-base: #d1edf2;
  --shaddy: #434b56;
}


/* Viewport Alignment Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Element Tags */
body {
  background-color: var(--light);
  color: var(--bright);
  font-size: 16px;
  line-height: 22px;
  height: 100vh;
}

nav {
  width: 100%;
  height: 104px;
}

h1 {
  font-family: 'Comfortaa', sans-serif;
  font-size: 3rem;
  margin-bottom: 10px;
}

h2 {
  font-family: 'Comfortaa', sans-serif;
  font-size: 2.5rem;
  line-height: 2rem;
  margin-bottom: 14px;
}

h3 {
  font-family: 'Comfortaa', sans-serif;
  font-size: 1.7rem;
}

h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  line-height: 1.5rem;
}

h5 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  line-height: 1.3rem;
  letter-spacing: 1px;
  font-weight: lighter;
}

p {
  font-family: 'Poppins', sans-serif;
  width: 500px;
  letter-spacing: 1px;
}

li {
  list-style: none;
  padding-top: 14px;
}

button {
  display: inline-block;
  background-color: var(--light);
  color: var(--bright);
  border: 0.5px solid var(--bright);
  cursor: pointer;
  font-size: 20px;
  transition: background-color 0.3s ease;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 12px 20px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

span {
  font-family: 'Poppins', sans-serif;
}

/* Navbar */
.navbar {
  font-family: 'Italianno';
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-right: 20px;
  border-bottom: 0.4px solid var(--bright);
}

.logo {
  height: 150px;
  width: 200px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.toggle-menu {
  display: none;
  cursor: pointer;
}

.hamburger-bar {
  width: 25px;
  height: 3px;
  margin: 3px 0;
  background-color: var(--bright);
  color: var(--base);
  transition: 400ms;
}

.nav-links {
  list-style: none;
  display: flex;
  margin-left: auto;
  gap: 0.5rem;
}

.nav-links li {
  display: inline-block;
  margin-right: 20px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--base);
  font-weight: bold;
  letter-spacing: 1px;
  position: relative;
}

/* 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"
    "footer footer footer footer";
  gap: 20px;
  height: 100vh;
  padding-bottom: 30px;
}

.grid-header {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-area: header;
}

.grid-left-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  grid-area: left;
}

.grid-left-side p {
  line-height: 24px;
  text-align: center;
  padding-bottom: 10px;
  width: 200px;
}

.grid-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  grid-area: content;
  background: linear-gradient(0.5turn, rgba(0, 0, 0, 0.726), rgba(0, 0, 0, 0.714));
  border: 3px solid var(--bright);
  border-radius: 0.5rem;
}

#grid-content-about {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  grid-area: content;
  border: 3px solid var(--bright);
  border-radius: 0.5rem;
}

.grid-right-side {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  grid-area: right;
  width: 300px;
}

.grid-footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 10px;
  margin-top: 20px;
  grid-area: footer;
}

/* 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"
    "footer footer footer footer";
  gap: 5px;
  margin: 0 1rem;
  padding: 0 1rem;
  border: 3px solid var(--bright);
  border-radius: 0.5rem;
  background-color: var(--dark);
  height: 100vh;
}

.journal-header {
  grid-area: jheader;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--bright);
  text-align: center;
}

.journal-time {
  grid-area: jleft;
  border-right: 1px solid var(--bright);
}

.journal-meal {
  grid-area: jmeal;
  padding-left: 1rem;
  border-right: 1px solid var(--bright);
}

.journal-mood {
  grid-area: jmood;
  padding-left: 1rem;
}

/* Containers */
#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;
}

.food-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  line-height: 0.8rem;
  height: 270px;
  width: 220px;
  margin-top: 40px;
  background: linear-gradient(0.5turn, rgba(0, 0, 0, 0.668), rgba(0, 0, 0, 0.668));
  border: 2px solid var(--bright);
  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 var(--bright);
  border-radius: 0.5rem;
}

#foodInput {
  padding: 0.5rem 2rem;
  width: 80%;
  margin-bottom: 20px;
  border-radius: 0.2rem;
}

#food-fact-content {
  font-family: 'Poppins', sans-serif;
  position: relative;
  animation-duration: 1s;
  animation-fill-mode: forwards;
  font-size: 1.3rem;
  width: 210px;
  justify-self: center;
  align-self: center;
}

/* Modal Properties */
.modal-container {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  width: 80%;
  height: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--dark);
}

.modal-content {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--dark);
  padding: 20px;
  width: 500px;
  height: auto;
  box-shadow: 0 4px 8px var(--shaddy);
  border-radius: 0.5rem;
}

.thecontent {
  display: flex;
}

.thecontent span {
  padding: 1rem;
}

#openModal {
  width: 250px;
  padding: 0.8rem 1.4rem;
}

.closeBtn {
  padding-right: .5rem;
  cursor: pointer;
}

#themodal {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 100%;
  max-width: 760px;
  height: 100%;
  max-height: 760px;
  border: 2px solid var(--bright);
  transform: translate(-50%, -50%);
  background-color: var(--light);
  border-radius: 0.5rem;
  height: 640px;
}

#nutrition-button {
  padding: 0.5rem 1.5rem;
  border-radius: 0.2rem;
  cursor: pointer;
  border: 0.5px solid var(--bright);
}

.left-side {
  flex: 1;
  padding: 1rem;
  background: linear-gradient(rgba(0, 0, 0, 0.262), rgba(0, 0, 0, 0.565)), url(../images/modal.jpg);
  border-radius: 0.5rem;
  height: 635px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 60px;
}

.right-side {
  display: flex;
  justify-content: center;
  flex-direction: column;
  flex: 1;
  padding: 1rem;
}

.right-side input {
  border-radius: 0.5rem;
  display: flex;
  justify-content: center;
  padding: 5px 10px;
  margin-bottom: 2rem;
  box-sizing: border-box;
  width: 100%;
}

#food-input {
  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;
}

#feel-input {
  background-position: 1%;
  background-image: url(../images/thoughts.jpg);
  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: 0.5rem;
  cursor: pointer;
}

#modalSubmit a {
  color: var(--base);
  text-decoration: none;
}

/* Page Specific Styles */
.resources {
  gap: 20px;
  text-align: center;
}

.about {
  gap: 8px;
  text-align: center;
  font-size: 14px;
}


.resources h1 {
  padding-bottom: 14px;
}

.resources p {
  width: 440px;
}

.authors {
  gap: 10px;
}

.emphasis {
  background-color: var(--light);
  font-weight: bold;
}

.heart {
  color: var(--second-base);
}

.fa {
  font-weight: lighter;
}

/* Hover and Highlight Effects */
button:hover {
  background-color: var(--dark);
}

.underline {
  font-size: 1.6rem;
  position: relative;
}

.underline::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background-color: var(--dark);
  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 var(--second-base);
  color: var(--base);
  margin: 0 -.25rem;
  padding: 0 .25rem;
  transition: color 300ms ease-in-out, box-shadow 300ms ease-in-out;
}

.highlight:hover {
  box-shadow: inset 200px 0 0 0 var(--second-base);
  color: var(--base);
}

.slide-in {
  animation-name: slideIn;
}

.slide-out {
  animation-name: slideOut;
}

/* Keyframes Animations */
@keyframes slideIn {
  0% {
    transform: translateX(120%);
  }

  100% {
    transform: translateX(0);
  }
}

@keyframes slideOut {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-120%);
  }
}

/* Responsive Design Properties */
@media screen and (max-width: 1480px) {
  .hero-content {
    transform: translateX(0) translateY(0);
  }
}

@media screen and (max-width: 1210px) {
  .hero-content {
    width: 90%;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content h3 {
    font-size: 1.3rem;
  }

  .hero-content p {
    font-size: 14px;
    width: auto;
  }
}

@media screen and (max-width: 1140px) {
  .grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      'header header header'
      'content content content'
      'left right right'
      'left footer footer'
      'left footer footer';
    width: 100%;
    height: 100%;
  }

  .grid-content {
    height: 100vh;
  }

  .grid-left-side {
    padding-bottom: 30px;
  }

  .grid-right-side {
    width: 100%;
  }

  .authors {
    grid-area: left;
  }
}

@media screen and (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .logo {
    height: 75px;
    width: 100px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
  }

  .hero-content {
    height: auto;
  }

  #foodInput {
    width: 260px;
  }

  .grid-right-side {
    width: 100%;
  }

  .grid-left-side h2,
  .grid-right-side h2 {
    font-size: 1.7rem;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 10px;
    background-color: var(--light);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 100;
  }

  .nav-links.active {
    display: flex !important;
  }

  .nav-links li {
    margin: 15px 0;
  }

  .toggle-menu {
    display: block;
  }
}

.hero-content {
  position: relative;
  padding: 2rem;
  border-radius: 0.5rem;
  text-align: center;
  font-size: 1rem;
}

@media screen and (max-width: 480px) {
  body {
    font-size: 12px;
  }

  .grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      'header'
      'content'
      'right'
      'left'
      'footer';
    width: 100%;
  }
}