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

@import url('./variables.css');

h1,
header,
.footer-links,
.writing,
.p-1,
.home-p,
.terms-section,
.privacy-section,
label,
input,
button,
.latest-posts,
.carousel-title,
.filter-label,
.thumbnail-title {
  font-family: 'Tillana', Verdana, Geneva, Tahoma, sans-serif;
}

h1 {
  position: relative;
  background-color: var(--dusty-pink-h1);
  color: var(--white);
  font-size: 1.3rem;
  width: 100%;
  font-weight: bold;
  padding: 10px 20px;
  border: solid 2px var(--raspberry);
  height: auto;
  margin: 0 20px;
  width: calc(100% - 40px);
}

.mobile-header i {
  font-size: 2.8rem;
  color: var(--raspberry);
}

nav,
#menu-checkbox {
  display: none;
}

#menu-checkbox:checked + nav {
  display: block;
}

nav {
  position: absolute;
  background: var(--off-white);
  width: 100%;
  left: 0px;
  top: 85px;
  z-index: 10;
}

nav a {
  display: block;
  color: var(--raspberry);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  padding: 20px;
  border: solid 2px var(--dusty-pink);
}

nav a:hover,
nav a:checked {
  text-decoration: underline;
  background-color: var(--dusty-pink);
  color: #000;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  flex-wrap: wrap;
  background-color: var(--header-footer);
  border-bottom: solid 2px var(--raspberry);
}

.user-info {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

#welcome-text {
  font-size: 1rem;
  font-weight: 500;
  margin-right: 10px;
  padding: 0;
}

#logout-button {
  display: inline-block;
  padding: 5px 10px;
  background-color: var(--raspberry);
  border: solid 3px var(--dusty-pink);
  color: var(--white);
  letter-spacing: 1px;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 20px;
  cursor: pointer;
  margin: 0;
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 10px 20px 10px;
  padding: 0 20px;
}

.logo {
  width: 100%;
  max-width: 480px;
  height: auto;
}

.cta:hover,
.cta:focus {
  color: var(--dusty-pink);
  background-color: var(--off-white);
}

body {
  background: var(--background-all);
}

.button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 40px;
  background-color: var(--raspberry);
  border: solid 3px var(--dusty-pink);
  color: var(--off-white);
  text-decoration: none;
  font-size: 1rem;
  text-align: center;
  font-weight: bold;
  border-radius: 20px;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  margin: 0;
}

.logo-container-footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-top: 2px solid var(--dusty-pink);
  border-bottom: 2px solid var(--dusty-pink);
  margin-top: 50px;
}

.logo-footer {
  width: 250px;
  height: auto;
  padding: 10px;
}

.footer-section {
  background-color: var(--header-footer);
}

.social-icons a {
  font-size: 1.4rem;
  gap: 30px;
  color: var(--raspberry);
}

.footer-links {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  align-items: center;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 8px;
}

.footer-links a {
  color: var(--raspberry);
  text-decoration: none;
}

.follow-p {
  font-family: 'Tillana', Verdana, Geneva, Tahoma, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  color: var(--raspberry);
}

.social-icons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.copyright {
  font-family: 'Tillana', Verdana, Geneva, Tahoma, sans-serif;
  text-align: center;
  color: var(--raspberry);
  font-size: 0.8rem;
  padding-bottom: 10px;
}

body.loading {
  overflow: hidden;
}

#loading-spinner {
  position: fixed;
  top: 50%;
  left: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translate(-50%, -50%);
  z-index: 9999;
  backdrop-filter: blur(2px);
}

.loader {
  margin: 0 auto;
  border: 5px solid var(--raspberry);
  border-top: 6px solid var(--light-pink);
  border-bottom: 6px solid var(--light-pink);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1.2s ease-in-out infinite;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
}

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

@media (min-width: 550px) {
  #menu-checkbox,
  .hamburger-icon,
  .mobile-header {
    display: none;
  }

  #nav-container.nav-logged-out {
    display: flex;
    justify-content: space-evenly;
    flex: 1;
    flex-wrap: wrap;
  }

  #nav-container.nav-logged-in {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 20px;
  }

  nav {
    position: static;
    display: flex;
    align-items: center;
    background: none;
    margin: 0;
    padding-top: 0;
    width: auto;
    z-index: auto;
  }

  nav a {
    padding: 8px 12px;
    border: none;
    line-height: 1.2;
  }

  #logout-button {
    display: inline-block;
    font-size: 0.8rem;
    z-index: 100;
    margin: 0;
  }

  h1 {
    margin: 0px 50px;
    width: calc(100% - 100px);
  }

  nav a:hover,
  nav a:focus {
    text-decoration: underline;
  }

  header {
    border-bottom: solid 3px var(--raspberry);
  }

  .loader {
    border: 10px solid var(--raspberry);
    border-top: 12px solid var(--light-pink);
    border-bottom: 12px solid var(--light-pink);
    width: 100px;
    height: 100px;
  }
}

@media (min-width: 900px) {
  h1 {
    margin: 0 100px;
    width: calc(100% - 200px);
    font-size: 1.6rem;
  }
}
