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

html,
body {
  overflow-x: hidden;
  height: 100%;
}

body {
  font-family: "Montserrat", Verdana, Geneva, Tahoma, sans-serif;
  background-color: var(--background-all);
  padding-top: 80px;
}

h1 {
  position: relative;
  background-color: var(--orange);
  color: var(--black);
  font-size: 1.3rem;
  text-align: center;
  text-transform: uppercase;
  max-width: 100%;
  font-weight: bold;
  padding: 10px 20px;
  margin: 0 10px;
  border-bottom: solid 3px var(--black);
  height: auto;
}

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

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

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

nav {
  position: absolute;
  background: var(--grey);
  width: auto;
  left: 0;
  right: 0;
  top: 85px;
  z-index: 10;
}

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

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

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  padding: 15px;
  width: 100%;
  flex-wrap: wrap;
  background-color: var(--header-footer);
  border-bottom: solid 4px var(--orange);
}

.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;
  color: var(--white);
}

#logout-button {
  display: inline-block;
  padding: 5px 10px;
  background-color: var(--soft-orange);
  border: solid 2px var(--white);
  color: var(--black);
  letter-spacing: 1px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 10px;
  cursor: pointer;
  margin: 0;
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.logo {
  max-width: 150px;
  height: auto;
  padding-top: 10px;
}

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

.button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 35px;
  background-color: var(--soft-orange);
  border: solid 3px var(--white);
  color: var(--black);
  text-decoration: none;
  font-size: 1.1rem;
  text-align: center;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 5px;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  margin: 0;
}

#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(--orange);
  border-top: 6px solid var(--white);
  border-bottom: 6px solid var(--black);
  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);
  }
}

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

.post-thumbnail {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  min-height: 300px;
  padding: 15px;
  background-color: var(--off-black);
  border: solid 3px var(--orange);
  border-radius: 5px;
  box-sizing: border-box;
}

.post-body,
.post-author a,
.post-date {
  color: var(--soft-white);
  font-weight: 400;
  font-size: 0.9rem;
}

.thumbnail-image {
  width: 100%;
  height: clamp(190px, 40vw, 250px);
  object-fit: cover;
  object-position: center;
  border: solid 3px var(--orange);
  border-radius: 5px;
  box-sizing: border-box;
}

.thumbnail-title {
  display: flex;
  justify-content: center;
  font-size: 1rem;
  color: var(--white);
  font-weight: 600;
  text-align: center;
  padding: 10px;
  text-decoration: none;
}

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

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

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

.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(--orange);
  text-decoration: none;
}

.follow-p {
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  color: var(--orange);
}

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

.copyright {
  font-family: "Montserrat", Verdana, Geneva, Tahoma, sans-serif;
  text-align: center;
  color: var(--orange);
  font-size: 0.8rem;
  padding-bottom: 10px;
  margin-bottom: 0;
}

@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;
    z-index: 100;
    margin: 0;
  }

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

@media (min-width: 600px) {
  main {
    margin: 0 10px;
  }
}

@media (min-width: 750px) {
  main {
    margin: 0 50px;
  }
}

@media (min-width: 900px) {
  main {
    margin: 0 100px;
  }
}
