/****************************************************************************/
/* VARIABLES */
/****************************************************************************/

:root {
  /*** COLORS ***/
  --clr-main-txt: #4d352d;
  --clr-light-txt: #9d9592;

  --clr-main-background: #fff3e0;
  --clr-sec-background: #eed5ba;
  --clr-white-background: #fff;

  --clr-main-acc: #daa428;

  --clr-icons: #795648;

  /*** BOX-SHADOW ***/
  /* --bs-main: 3px 3px 13px #d5cbc7; */
  --bs-main: 0 4px 8px rgba(0, 0, 0, 0.1);

  /*** FONT FAMILY ***/
  --ff-bodytext: "Source Sans 3", Arial, sans-serif;
  --ff-heading: "Playfair Display", "Times New Roman", serif;

  /*** FONT STYLE ***/
  --f-style-italic: Italic;

  /*** FONT SIZES ***/
  --f-size-h1: 1.75rem;
  --f-size-h2: 1.5rem;
  --f-size-h3: 1.25rem;
  --f-size-h4: 1.15rem;
  --f-size-body-std: 1rem;
  --f-size-body-medium: 0.75rem;
  --f-size-body-small: 0.5rem;

  /*** FONT WEIGHTS ***/
  --fw-semibold: 600;
  --fw-medium: 500;
  --fw-regular: 400;
  --fw-light: 300;

  /*** LINE HEIGHT ***/
  --line-height-std: 1.5;
  --line-height-medium: 1;
  --line-height-small: 1.2;

  /*** VERTICAL SPACING ***/
  --mb-main: 4rem;
  --mb-medium: 3rem;
  --mb-small: 2rem;
  --mt-main: 4rem;

  /*** BORDER RADIUS ***/
  --br-main: 6px;
}

/****************************************************************************/
/* GLOBAL STYLING */
/****************************************************************************/

/*** RESET ***/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ASSURING FOOTER STAYS AT BOTTOM*/
body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  background-color: var(--clr-main-background);
}

/* LOADER */
.loader-container {
  width: 120px;
  margin: 0 auto;
}

.loader {
  width: 120px;
  height: 120px;
  font-size: 120px;
  color: var(--clr-icons);
  margin: 0 auto;
  animation: loaderSpin 2s linear infinite;
}

.loading-txt {
  font-family: "Press Start 2P", "VT323", Arial, sans-serif;
  color: var(--clr-icons);
  font-size: 1rem;
  margin: 1rem auto;
  line-height: 2;
}

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

/* HEADER */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  position: sticky;
  z-index: 99;
  top: 0;
  background-color: var(--clr-sec-background);
}

.nav-list {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4rem;
  text-align: center;
  list-style: none;
}

.nav-list a {
  font-family: var(--ff-bodytext);
  font-size: var(--f-size-h2);
  text-decoration: none;
  color: var(--clr-main-txt);
}

.nav-list a:hover {
  font-style: italic;
}

.current-page {
  font-weight: var(--fw-semibold);
  font-style: italic;
}

.menu-icon,
.close-menu-icon {
  color: var(--clr-main-txt);
  font-size: 2.5rem;
  display: none;
}

.menu-checkbox {
  display: none;
}

/* MAIN SECTIONS */
main {
  background-color: var(--clr-main-background);
}

/* HEADINGS */
.main-heading {
  font-family: var(--ff-heading);
  font-size: var(--f-size-h1);
  color: var(--clr-main-txt);
  margin-top: var(--mt-main);
  margin-bottom: var(--mb-main);
}

.section-heading {
  font-family: var(--ff-heading);
  font-size: var(--f-size-h2);
  color: var(--clr-main-txt);
}

/* BODY TEXT */
.txt,
.txt-medium {
  font-family: var(--ff-bodytext);
  color: var(--clr-main-txt);
  line-height: var(--line-height-std);
}

.txt {
  font-size: var(--f-size-body-std);
}

.txt-medium {
  font-size: var(--f-size-body-medium);
}

.txt-light {
  font-family: var(--ff-bodytext);
  color: var(--clr-main-txt);
  font-weight: 300;
  font-style: italic;
  font-size: 1rem;
}

/* LINKS */
a:link,
a:visited,
a:hover,
a:active {
  color: var(--clr-main-txt);
  text-decoration: none;
}

/* FOOTERS */
footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--clr-main-txt);
  background-color: var(--clr-white-background);
}

/***** FOOTER NEWSLETTER SECTION *****/
.newsletter-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 1.5rem;
  color: var(--clr-main-txt);
  background-color: var(--clr-sec-background);
  width: 100%;
}

.newsletter-txt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  font-family: var(--ff-heading);
  margin-bottom: 1rem;
}

.newsletter-sec-heading {
  font-size: var(--f-size-body-);
}

.newsletter-form-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.newsletter-form {
  display: flex;
  gap: 1rem;
  margin: 0 auto;
}

.newsletter-input {
  border: none;
  padding-left: 0.5rem;
  width: 15rem;
}

/* FOOTER LINKS */

.footer-links {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  color: var(--clr-main-txt);
  width: 100%;
  flex-wrap: wrap;
}

.footer-nav-list {
  display: flex;
  gap: 1rem;
  list-style: none;
  font-family: var(--ff-bodytext);
  font-size: var(--f-size-body-std);
  color: var(--clr-main-txt);
}

.footer-social-icons {
  display: flex;
  gap: 1.5rem;
  font-size: 2rem;
}

.footer-social-icon {
  color: var(--clr-icons);
}

.copyright-txt {
  font-size: var(--f-size-body-medium);
  font-family: var(--ff-bodytext);
}

.footer-link:hover,
.footer-nav-list li:hover {
  transform: scale(1.2);
  font-weight: bold;
}

/* CARDS FOR BLOG POSTS */

.post-card-container {
  overflow: hidden;
  transition: transform 0.25s ease-in-out;
}

.post-card-container:hover {
  transform: scale(0.96);
}

.post-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 350px;
}

.post-card-img {
  width: 100%;
  max-width: 350px;
}

.post-card-meta-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem;
  width: 100%;
  background-color: var(--clr-white-background);
  /* Pushing the text content back towards the center of the card. Temp quickfix!*/
  /* The content was likely moved to the right due to some javascript*/
  padding-right: 3.5rem;
}

.post-card-heading {
  font-family: var(--ff-heading);
  font-size: var(--f-size-h2);
  text-align: center;
}

.post-txt-date-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
}

.category-date-container {
  display: flex;
  justify-content: space-between;
}

/* FORM FEEDBACK */

.form-success {
  color: green;
}

.form-error {
  color: darkred;
  padding: 0 0.3rem;
  border-radius: var(--br-main);
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.4);
  }
  100% {
    transform: scale(1);
  }
}

.error-triangle {
  animation: pulse 1s infinite;
}

/* BOX SHADOW */
.bs {
  box-shadow: var(--bs-main);
}

/* BORDER RADIUS */
.br {
  border-radius: var(--br-main);
}

/* BUTTONS */
.btn {
  text-decoration: none;
  font-family: var(--ff-bodytext);
  color: var(--clr-main-txt);
  text-align: center;
  padding: 0.5rem 1rem;
  border-radius: var(--br-main);
  border: none;
  background-color: var(--clr-main-acc);
}

.btn:hover {
  box-shadow: 5px 5px 23px rgba(132, 125, 122, 0.4);
  background-color: #f4c557;
}

.btn:active {
  background-color: var(--clr-white-background);
  box-shadow: 5px 5px 23px rgba(132, 125, 122, 0.4);
}

/****************************************************************************/
/* PAGE SPECIFIC STYLING */
/****************************************************************************/

/****************************************************************************/
/* HOMEPAGE */
/****************************************************************************/

/***** Hero Section *****/

.homepage-hero-section {
  height: 50vh;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  justify-content: left;
  align-items: center;
  margin-bottom: var(--mb-main);
  top: 350px;
}

.homepage-main-heading {
  margin-left: 10%;
}

/***** Latest Posts Section *****/

.latest-posts-section {
  margin: 0 auto;
}

.latest-posts-heading {
  text-align: center;
  margin-bottom: var(--mb-medium);
}

.carousel-container {
  width: 100%;
  max-width: calc((350px * 3) + 2rem);
  height: auto;
  margin: 50px auto;
  position: relative;
}

.carousel-inner {
  overflow: hidden;
}

.track {
  display: flex;
  gap: 1rem;
  transition: transform 0.7s;
  flex-wrap: nowrap;
}

.track .post-card-container {
  max-width: 350px;
  flex-shrink: 0;
}

.track .post-card-container:hover {
  box-shadow: none;
}

.carousel-nav i {
  width: 60px;
  height: 60px;
  text-align: center;
  border-radius: 50%;
  cursor: pointer;
  font-size: 2rem;
  color: var(--clr-main-txt);
  padding: 1rem;
  background-color: var(--clr-sec-background);
  position: absolute;
  top: 50%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(-50%);
}

.carousel-nav i:active {
  /* color: var(--clr-main-acc); */
  color: var(--clr-white-background);
}

.prev-arrow {
  left: -30px;
}

.prev-arrow:hover {
  transform: translateX(-5px) translateY(-50%);
  background-color: #d4baa0;
}

.next-arrow {
  right: -30px;
}

.next-arrow:hover {
  transform: translateX(5px) translateY(-50%);
  background-color: #d4baa0;
}

/***** Welcome Section *****/

.welcome-section {
  display: flex;
  gap: 1rem;
  width: 62.5rem;
  background-color: var(--clr-white-background);
  margin: 0 auto;
  margin-bottom: var(--mb-main);
}

.author-img {
  max-width: 475px;
  border-radius: 50%;
  padding: 1rem;
}

.welcome-txt-container {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  justify-content: space-around;
}

.rm-btn-cont {
  align-self: center;
}

/***** Quotes Section *****/

.quote-section {
  padding: 3rem;
  /* text-align: center; */
  color: var(--clr-main-background);
  line-height: 2.5;
  background-color: var(--clr-main-txt);
}

.quote-txt {
  font-family: var(--ff-heading);
  font-size: var(--f-size-h2);
  text-align: center;
  color: var(--clr-white-background);
}

/****************************************************************************/
/* POSTS PAGE */
/****************************************************************************/

.bloglist-main-heading {
  text-align: center;
}

/* Category links */
/* .category-links-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  margin-bottom: var(--mb-medium);
} */

/* Bloglist section */
.bloglist-section {
  max-width: 62.5rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--mb-main);
}

.bloglist-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem 1.1rem;
  margin-bottom: var(--mb-main);
}

/****************************************************************************/
/* ABOUT PAGE */
/****************************************************************************/

.about-main-heading {
  text-align: center;
}

.about-content-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 75rem;
  margin: 0 auto;
  margin-bottom: 6rem;
}

.about-intro-txt-container {
  width: 100%;
  background-color: var(--clr-white-background);
  padding: 1rem;
  min-width: 350px;
}

.about-main-txt-container,
.about-outro-txt-container {
  display: flex;
  overflow: hidden;
  background-color: var(--clr-white-background);
  min-width: 350px;
}

.about-img-1,
.about-img-2 {
  background-image: url(/resources/About-image_2.jpg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  width: 50%;
  height: 400px;
}

.about-img-1 {
  background-image: url(/resources/About-image_2.jpg);
}

.about-img-2 {
  background-image: url(/resources/About-image_1.jpg);
}

.about-txt-container {
  display: flex;
  align-items: center;
  width: 50%;
  padding: 4rem;
}

.about-gallery {
  display: flex;
  width: 100%;
}

.about-gallery-img {
  width: calc(100vw / 4);
}

/****************************************************************************/
/* CONTACT PAGE  */
/****************************************************************************/

.contact-main-heading {
  text-align: center;
}

.contact-form-section {
  max-width: 75rem;
  background-color: var(--clr-sec-background);
  display: flex;
  margin: 0 auto;
  margin-bottom: var(--mb-main);
  overflow: hidden;
}

.contact-img {
  background-image: url(/resources/Contact_image_1.jpg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  flex: 1;
}

.contact-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.75rem;
  padding: 2rem;
}

.contact-txt {
  text-align: center;
  margin-top: var(--mt-main);
  margin-bottom: 1rem;
  font-weight: var(--fw-semibold);
  width: 100%;
  padding: 0.7rem;
}

.contact-input-container,
.comment-input-container {
  display: flex;
  flex-direction: column;
}

.contact-label,
.comment-label {
  margin-bottom: 1rem;
}

.contact-input,
.comment-input {
  padding: 0.75rem;
  border: none;
  color: var(--clr-main-txt);
  min-width: 100%;
  font-style: var(--f-style-italic);
}

.contact-message-container,
.comment-message-container {
  margin-bottom: var(--mb-small);
}

.contact-textarea-wrapper,
.contact-subject-wrapper {
  position: relative;
}

.msg-char-count,
.sub-char-count {
  position: absolute;
  top: 5px;
  right: 10px;
}

.contact-form-feedback {
  text-align: center;
}

.contact-finger-up {
  animation: moveUpDown 1s infinite;
}

@keyframes moveUpDown {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.contact-btn-container {
  align-self: center;
}

.contact-btn {
  text-align: center;
  width: 7rem;
  cursor: pointer;
}

/****************************************************************************/
/* POST SPECIFIC PAGE */
/****************************************************************************/

.specific-main-heading {
  text-align: center;
}

.specific-content-container {
  display: flex;
  flex-direction: column;
  max-width: 50rem;
  background-color: var(--clr-white-background);
  margin: 0 auto;
  margin-bottom: var(--mb-main);
  overflow: hidden;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  padding-top: 50px;
  left: 0;
  top: 100px;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 80%;
  max-height: 80%;
  border: 10px solid white;
  border-radius: var(--br-main);
}

.close-modal {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 60px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.1s ease-in-out;
}

.close-modal:hover {
  transform: scale(1.5);
}

.close-modal:active {
  transform: rotate(90deg);
}

.specific-meta-bar {
  display: flex;
  justify-content: space-between;
  background-color: var(--clr-white-background);
}

.specific-meta-item {
  padding: 0.5rem 1rem;
}

.spec-meta-next {
  display: none;
}

.meta-nav:hover {
  background-color: var(--clr-sec-background);
}

.specific-img {
  width: 100%;
  cursor: pointer;
}

.specific-txt-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem;
  background-color: var(--clr-white-background);
}

.spec-back-btn {
  width: 10rem;
  align-self: center;
}

.specific-category-container {
  align-self: center;
  margin-top: var(--mt-main);
}

/* Comment section */

.posted-comments-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: var(--mb-main);
}

.posted-comments-heading,
.comment-form-heading {
  text-align: center;
  width: 100%;
  max-width: 75rem;
  background-color: var(--clr-sec-background);
  padding: 1rem;
  margin: 0 auto;
}

.posted-comment-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 75rem;
  padding: 1.5rem;
  margin: 0 auto;
  background-color: var(--clr-white-background);
}

.posted-comment-meta-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--mb-small);
}

/* Comment form section */

.comment-form-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  max-width: 75rem;
  margin: 0 auto;
}

.comment-btn-container {
  align-self: center;
  margin-bottom: var(--mb-main);
}

.comment-btn {
  width: 7rem;
}

.error-message {
  color: #ff0000;
  background-color: var(--clr-white-background);
  width: auto;
}

.error-handling {
  font-family: var(--ff-bodytext);
  font-size: 1.5rem;
  color: orangered;
  font-weight: bold;
  text-align: center;
  padding: 6rem;
  margin: 0 auto;
}
