/* GLOBALS */

html {
  scroll-behavior: smooth;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

p {
  padding: 0;
  margin: 0;
}

button {
  display: inline-block;
  border: none;
  padding: 0;
  margin: 0;
  text-decoration: none;
  line-height: 1;
  cursor: pointer;
  text-align: center;
  -webkit-appearance: none;
  -moz-appearance: none;
}

h1,
h2,
h3,
h4,
h5 {
  padding: 0;
  margin: 0;
}

/* VARIABLES */

:root {
  --orange: #d0a25f;
  --green: #4d8057;
  --dark-grey: #464343;
  --light-grey: #e5e5e5;
  --orange-text-contrast: #917140;
  --text-normal: 1rem;
  --text-h1: 2rem;
  --border: 1px solid;
  --arrow-size: 3rem;
  --card-gap: 0.25rem;
}

/* CONTENT CONTAINER */

.content-container {
  max-width: 1920px;
  margin: 0 auto;
}

/* FLEX REUSABLES */

.flex {
  display: flex;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

/* MAIN ELEMENTS */

body {
  font-family: "Commissioner", sans-serif;
  font-size: 1rem;
  margin: 0;
  height: 100vh;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  margin: 0;
  padding: 1rem 0.5rem;
  width: 100%;
  height: 100px;
  align-items: center;
  justify-content: space-between;
}

main {
  display: flex;
  color: black;
  width: 100%;
  height: fit-content;
  flex-grow: 1;
  flex-direction: column;
  align-items: center;
  align-content: center;
  min-height: 80vh;
}

footer {
  width: 100%;
  padding-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  color: black;
  background-color: var(--orange);
  margin-top: auto;
}

/* SCROLLBAR */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background-color: var(--orange);
  border-radius: 10px;
}

/* OTHER ELEMENTS */

.page-title {
  font-family: "Square Peg";
  font-size: var(--text-h1);
}

h2 {
  margin: 1rem 0;
}

h4 {
  margin-top: 1rem;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: black;
}

.separator-line {
  border-left: var(--border) grey;
  margin: 0 auto;
  height: 30px;
}

.quick-link-containers {
  display: flex;
  flex-direction: column;
  width: 90%;
  gap: 1rem;
  margin: 2rem 0;
}

.quick-link-content,
.about-blog {
  display: flex;
  flex-direction: column;
  background-color: var(--orange);
  border-radius: 10px;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 0 1em rgb(0 0 0 / 0.3);
}

.quick-link-content {
  width: 100%;
  padding: 1rem 0;
}

.quick-link-content .card-small {
  width: 100%;
}

.about-blog {
  width: 90%;
  margin-top: 1rem;
  padding: 1rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-content a {
  text-decoration: none;
  color: black;
}

.footer-content a:hover {
  text-decoration: underline;
}

.about-author,
.author-of {
  width: 90%;
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 10px;
  background-color: var(--orange);
}

.about-author {
  display: flex;
  gap: 1rem;
}

.author-image > .user-profile-image {
  width: 100%;
}

.author-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.author-of {
  display: flex;
  flex-direction: column;
}

.author-image-title {
  gap: 2rem;
}

.btn {
  background-color: var(--green);
  box-shadow: 0 0 1em rgb(0 0 0 / 0.3);
  width: 140px;
  height: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 1rem;
}

.btn:hover {
  box-shadow: 0 0 1em rgba(255, 255, 255, 0.3);
}

.footer-copyright {
  align-self: flex-end;
  font-weight: bold;
}

.content-title {
  margin: 1rem 0 1rem 5rem;
  align-self: normal;
}

.card,
.card-small {
  width: 100%;
  max-width: 300px;
  background-color: var(--light-grey);
  box-shadow: 0 0 1em rgb(0 0 0 / 0.3);
  border-radius: 5px;
  text-decoration: none;
  color: black;
  padding-bottom: 2rem;
}

.card {
  max-height: 400px;
}

.card a {
  text-decoration: none;
  color: black;
}

.card h3,
.card p {
  margin: 0.5rem 0 0 1rem;
}

.card-small {
  display: flex;
  height: 80px;
  padding-bottom: 0;
}

.card-small .card-image {
  width: 50%;
  height: 80px;
  padding-top: 0;
  border-radius: 5px 0 0 5px;
}

.card-small-text {
  display: flex;
  flex-direction: column;
  margin: 0.5rem 0 0 1rem;
  width: 50%;
}

.card-small-text h3,
.card-small-text p,
.card-small-text h4 {
  font-size: 0.9rem;
}

.card-small-text p {
  font-weight: 100;
}

.card-small-text h4 {
  margin: 0;
}

.blog-page-content {
  display: grid;
  margin: 1rem 0 3rem 0;
  width: 90%;
  grid-gap: 3rem;
  grid-template-areas:
    "blog-grid1"
    "blog-grid2"
    "blog-grid3"
    "blog-grid4";
}

.blog-grid1 {
  grid-area: blog-grid1;
}

.blog-grid2 {
  grid-area: blog-grid2;
}

.blog-grid3 {
  grid-area: blog-grid3;
}

.blog-grid4 {
  grid-area: blog-grid4;
}

.blog-page-card {
  display: flex;
  flex-direction: column;
  background-color: var(--orange);
  box-shadow: 0 0 1em rgb(0 0 0 / 0.3);
  border-radius: 10px;
  padding: 1rem;
}

.blog-page-content h3,
.blog-comments h3 {
  margin: 1rem 0;
}

.blog-page-card iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.blog-author-info {
  display: flex;
  gap: 1rem;
}

.blog-author-info p {
  font-size: 1rem;
}

.author-name-title {
  margin-top: 0;
  margin-bottom: 1rem;
}

.blog-post-info {
  margin-top: 2rem;
  font-size: 0.9rem;
  align-self: center;
}

.index-list-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 90%;
}

.previous-articles-link {
  text-decoration: none;
  color: black;
}

.previous-articles-link:hover {
  text-decoration: underline;
}

.previous-articles-list {
  align-items: normal;
}

.blog-list-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90%;
}

.blog-list-container,
.search-content {
  display: grid;
  margin-bottom: 2rem;
  gap: 1rem;
  grid-template-columns: 1fr;
  justify-items: center;
  width: 90%;
  min-height: 50vh;
}

.blog-hidden {
  display: none;
}

.welcome-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.blog-list-button {
  align-self: end;
  justify-self: end;
}

.blog-similar-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.author-of-content {
  display: grid;
  padding: 1rem 0;
  justify-items: center;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.blog-recipe-ingredients {
  margin-bottom: 1rem;
}

.blog-comments {
  width: 90%;
  margin-bottom: 2rem;
}

.blog-comments-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.blog-user-comment {
  display: grid;
  gap: 0.5rem;
  grid-template-areas:
    "comment-grid1 comment-grid2"
    "comment-grid3 comment-grid3";
  background-color: var(--light-grey);
  padding: 0.5rem;
  border-radius: 5px;
}

.comment-grid1 {
  grid-area: comment-grid1;
}

.comment-grid2 {
  grid-area: comment-grid2;
}

.comment-grid3 {
  grid-area: comment-grid3;
}

.blog-user-comment h4 {
  margin: 0 0 0.5rem 0;
}

.user-comment-date {
  font-size: 60%;
}

.missing-comments {
  margin: 0 auto;
}

.random-element-container {
  display: flex;
  width: 90%;
  justify-content: center;
}

.random-element-container .card {
  display: block;
}

.page-heading {
  text-align: center;
}

/* NAVIGATION */

.navbar,
.navbar ul,
.nav-item {
  padding: 0;
  margin: 0;
  text-decoration: none;
  list-style-type: none;
}

.navbar,
.category-dropdown {
  background-color: var(--orange);
  position: absolute;
  display: none;
  top: 100px;
  padding: 1rem 0;
  width: 100%;
  left: 0;
}

.category-dropdown {
  min-width: 150px;
}

.tag-dropdown {
  background-color: var(--orange);
  display: none;
  padding: 1rem 0;
}

.nav-menu {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
  justify-items: center;
  align-items: center;
}

.nav-link {
  display: flex;
  justify-content: center;
  align-items: center;
  color: black;
  text-decoration: none;
  width: 100%;
  height: 100%;
  padding: 1rem;
}

.nav-item,
.category-dropdown a,
.category-dropdown p,
.tag-dropdown a {
  width: 80%;
  height: 80%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: var(--border) black;
}

.tag-dropdown a {
  width: 100%;
  height: 100%;
}

.nav-link:hover,
.category-dropdown a:hover,
.category-dropdown p:hover,
.tag-dropdown a:hover {
  background-color: white;
  color: var(--orange-text-contrast);
  text-decoration: none;
  cursor: pointer;
}

.hamburger-active {
  display: flex;
  z-index: 999;
}

.page-active {
  background-color: white;
  color: var(--orange-text-contrast);
  text-decoration: none;
}

.category-label {
  display: flex;
  flex-direction: column;
  height: auto;
}

.category-dropdown,
.tag-dropdown {
  position: static;
}

/* FORMS */

.validator-container {
  display: none;
  border: var(--border) green;
  color: green;
  width: 300px;
  margin: 1rem auto;
  padding: 0.3rem 0.5rem;
  text-align: center;
}

.form-error {
  display: none;
  color: red;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.contact-form,
.blog-comments-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: black;
  padding: 1rem;
  background-color: var(--orange);
  width: 90%;
}

.contact-form {
  border: 1px solid black;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.contact-form input,
.message-input,
.blog-comments-form input {
  font-family: "Commissioner", sans-serif;
  width: 100%;
  margin: 0.5rem 0;
  padding: 0.5rem;
  font-size: 1rem;
}

.form-input {
  width: 80%;
}

.form-btn {
  color: black;
  margin: 1rem 0;
}

textarea {
  resize: none;
}

.search-dropdown {
  background-color: white;
  position: absolute;
  display: none;
  top: 100px;
  padding: 1rem 0;
  width: 100%;
  left: 0;
  border: var(--border) black;
}

.searchbar-pos {
  display: flex;
}

.searchbar-pos > input {
  width: 60vw;
  height: 50px;
  padding: 1rem;
  border: var(--border) var(--orange);
}

.searchbar-pos > button {
  text-decoration: none;
  color: white;
  background-color: var(--orange);
  padding: 0.7rem 1rem;
  border: var(--border) var(--orange);
  height: 50px;
}

.search-active,
.category-active,
.tag-active {
  display: flex;
  justify-content: center;
  z-index: 999;
}

.category-active,
.tag-active {
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.tag-active {
  width: 60%;
}

/* IMAGES */

.header-image {
  width: 100%;
}

.about-image {
  width: 100%;
}

.user-profile-image {
  border-radius: 50%;
}

.author-image-title img {
  width: 200px;
  height: 200px;
}

.card-image {
  border-radius: 5px 5px 0 0;
  padding-top: 50%;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.blog-page-banner {
  width: 100%;
}

.blog-page-banner-image {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

/* ICONS */

.material-icons {
  position: relative;
  color: black;
}

.material-icons:hover {
  cursor: pointer;
}

.material-icons.md-48 {
  font-size: 3rem;
}

.material-icons.md-36 {
  font-size: 2.25rem;
}

.material-icons.md-24 {
  font-size: 1.5rem;
}

.material-icons.md-18 {
  font-size: 1.12rem;
}

.page-logo {
  color: var(--green);
  text-align: center;
  font-size: 36px;
}

.header-right-icons {
  display: flex;
  gap: 0.5rem;
}

.footer-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
}

.footer-icons i {
  font-size: 2rem;
}

/* MODAL */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: rgba(0, 0, 0, 0.6);
  cursor: pointer;
  visibility: hidden;
  opacity: 0;
  transition: all 350ms ease-in;
  z-index: 9999;
}

.modal.modal-active {
  visibility: visible;
  opacity: 1;
}

.modal-dialog {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  height: auto;
  border-radius: 5px;
  background: white;
  overflow: auto;
  cursor: default;
}

.modal-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.close-modal {
  align-self: flex-end;
}

.modal-text {
  align-self: center;
  font-size: 1.5rem;
}

.modal-dialog > * {
  padding: 0.5rem;
}

/* CAROUSEL */

.carousel-section {
  display: flex;
  flex-direction: column;
  width: 90%;
}

.blog-carousel {
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 1rem 0;
}

.carousel-container {
  --items-per-screen: 1;
  --carousel-index: 0;
  display: flex;
  flex-direction: row;
  flex-grow: 1;
  margin: 0 var(--card-gap);
  width: calc(100% - var(--arrow-size) * 2);
  transform: translateX(calc(var(--carousel-index) * -100%));
  transition: transform 300ms ease-in-out;
}

.carousel-container > .card {
  flex: 0 0 calc(100% / var(--items-per-screen));
  max-width: calc(100% / var(--items-per-screen));
  aspect-ratio: 16 / 9;
  padding: var(--card-gap) var(--card-gap) 1rem var(--card-gap);
  margin-right: 0;
}

.arrow {
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 2;
  flex-grow: 0;
  flex-shrink: 0;
  width: var(--arrow-size);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background-color 150ms ease-in-out;
}

.arrow:hover {
  background-color: rgba(0, 0, 0, 0.5);
}

.arrow-icon {
  font-size: 48px;
  color: white;
}

/* LOADER */

.loader {
  border: 15px solid #f3f3f3;
  border-top: 15px solid purple;
  border-radius: 100%;
  width: 100px;
  height: 100px;
  animation: spin 2s linear infinite;
  margin: auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* HIDDEN TEXT FOR ACCESSIBILITY */

.visually-hidden:not(:focus):not(:active) {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* MEDIA QUERIES */

/* TABLET */

@media only screen and (min-width: 767px) {
  .carousel-container {
    --items-per-screen: 2;
  }

  .carousel-container > .card {
    flex: 0 0 calc(100% / var(--items-per-screen) - 2rem);
    margin-right: 2rem;
  }

  .blog-list-container {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      "blog-list-grid1 blog-list-grid2"
      "blog-list-grid3 blog-list-grid4"
      "blog-list-grid5 blog-list-grid6"
      "blog-list-grid7 blog-list-grid8"
      "blog-list-grid9 blog-list-grid10"
      "blog-list-grid0 blog-list-grid11";
    width: 100%;
  }

  .blog-page-content,
  .blog-comments {
    width: 70%;
  }

  .index-list-container {
    width: 70%;
  }

  .card,
  .card-small {
    width: 300px;
  }
}

/* DESKTOP */

@media only screen and (min-width: 1080px) {
  header {
    padding: 1rem;
    justify-content: normal;
    padding: 1rem 3rem;
  }

  .menu-icon {
    display: none;
  }

  .separator-line {
    margin: 0 3rem;
  }

  .header-right-icons {
    margin: 0 30px 0 auto;
  }

  .blog-page-banner-image {
    height: 500px;
  }

  .blog-page-content {
    margin: 2rem 0;
    grid-template-areas:
      "blog-grid1 blog-grid1 blog-grid3"
      "blog-grid2 blog-grid2 blog-grid4";
  }

  .about-blog {
    display: grid;
    gap: 2rem;
    width: 80%;
    justify-items: center;
    grid-template-areas: "about-grid1 about-grid2 about-grid2";
    margin: 2rem 0;
    padding: 2rem;
  }

  .about-grid1 {
    grid-area: about-grid1;
  }

  .about-grid2 {
    grid-area: about-grid2;
  }

  .welcome-content {
    width: 70%;
  }

  .welcome-content h2 {
    margin-bottom: 1rem;
  }

  .quick-link-containers {
    flex-direction: row;
  }

  footer {
    flex-direction: row;
    align-items: normal;
    gap: 2rem;
    text-align: left;
    padding: 2rem 0;
  }

  .footer-first,
  .footer-second,
  .footer-third {
    margin-left: 3rem;
  }

  .footer-fourth {
    display: flex;
    margin: 0 3rem 0 auto;
  }

  .author-section {
    width: 60%;
  }

  .contact-form {
    width: 40%;
    padding-top: 2rem;
    margin-bottom: 3rem;
  }

  h2 {
    margin: 2rem 0;
  }

  .footer-icons {
    justify-content: normal;
  }

  .search-content {
    gap: 2rem;
    grid-template-columns: repeat(5, 1fr);
    min-height: 0;
  }

  .navbar {
    background-color: transparent;
    position: static;
    display: flex;
    top: 0;
    padding: 1rem 0;
    width: auto;
  }

  .nav-menu {
    display: flex;
    gap: 1rem;
    width: auto;
    justify-items: normal;
    align-items: normal;
  }

  .nav-link {
    justify-content: normal;
    align-items: normal;
    color: black;
    text-decoration: none;
    width: 100%;
    height: 100%;
    padding: 0;
    text-align: center;
  }

  .nav-item {
    width: auto;
    height: auto;
    display: block;
    border: none;
  }

  .nav-link:hover {
    background-color: transparent;
    color: var(--orange-text-contrast);
    text-decoration: none;
  }

  .page-active {
    color: var(--orange-text-contrast);
  }

  .page-active:hover {
    color: black;
  }

  .category-dropdown {
    position: absolute;
    display: none;
    padding: 1rem;
    border-radius: 0 0 10px 10px;
    width: auto;
    left: auto;
    top: auto;
    box-shadow: 0 0 1em rgb(0 0 0 / 0.3);
  }

  .category-dropdown a,
  .category-dropdown p,
  .tag-dropdown a {
    width: 100%;
    padding: 0.5rem;
    background-color: var(--orange);
  }

  .category-active,
  .tag-active {
    display: flex;
  }

  .tag-active {
    width: 90%;
  }

  .carousel-container {
    --items-per-screen: 4;
  }

  .blog-list-container {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas:
      "blog-list-grid1 blog-list-grid2 blog-list-grid3"
      "blog-list-grid4 blog-list-grid5 blog-list-grid6"
      "blog-list-grid7 blog-list-grid8 blog-list-grid9"
      "blog-list-grid10 blog-list-grid0 blog-list-grid11";
  }

  .blog-list-grid1 {
    grid-area: blog-list-grid1;
  }

  .blog-list-grid2 {
    grid-area: blog-list-grid2;
  }

  .blog-list-grid3 {
    grid-area: blog-list-grid3;
  }

  .blog-list-grid4 {
    grid-area: blog-list-grid4;
  }

  .blog-list-grid5 {
    grid-area: blog-list-grid5;
  }

  .blog-list-grid6 {
    grid-area: blog-list-grid6;
  }

  .blog-list-grid7 {
    grid-area: blog-list-grid7;
  }

  .blog-list-grid8 {
    grid-area: blog-list-grid8;
  }

  .blog-list-grid9 {
    grid-area: blog-list-grid9;
  }

  .blog-list-grid10 {
    grid-area: blog-list-grid10;
  }

  .blog-list-grid11 {
    grid-area: blog-list-grid11;
  }

  .author-of-content {
    grid-template-columns: 1fr 1fr;
  }

  .blog-comments {
    width: 70%;
  }

  .blog-comments-form {
    width: 60%;
    align-self: center;
  }

  .blog-comments-container {
    width: 50%;
    align-self: center;
    gap: 3rem;
    grid-template-columns: 1fr 1fr;
  }

  .author-of {
    margin: 1rem 0 3rem 0;
  }

  .footer-content {
    justify-content: space-between;
    gap: 0;
  }
}
/* LARGE DESKTOP */
@media only screen and (min-width: 1380px) {
  .about-blog {
    width: 80%;
  }

  .blog-list-container {
    grid-template-columns: repeat(4, 1fr);
    grid-template-areas:
      "blog-list-grid1 blog-list-grid2 blog-list-grid3 blog-list-grid4"
      "blog-list-grid5 blog-list-grid6 blog-list-grid7 blog-list-grid8"
      "blog-list-grid9 blog-list-grid10 blog-list-grid0 blog-list-grid11";
  }
}
