/*
1. Posicionamiento
2. Box model
3. Tipografía
4. Visuales
5. Otros
*/

:root {
  --deep-blue: #0080a8;
  --sky-blue: #58c3db;
  --off-grey: #e9e9e9;
  --primary-black: #292929;
  --nav-height: 15vh;
  --aside-width: 250px;
  --card-height: 300px;
}

* {
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%;
  font-family: "Ubuntu", sans-serif;
  scroll-behavior: smooth;
  margin-top: var(--nav-height);
}

/* body {
} */

h1,
h2 {
  font-family: "Urbanist", sans-serif;
  font-size: 3.6rem;
}

a {
  color: var(--primary-black);
}

aside {
  position: fixed;
  top: var(--nav-height);
  bottom: 0;
  left: -250px;
  width: var(--aside-width);
  background-color: var(--off-grey);
  color: var(--primary-black);
  transition: all 500ms;
  z-index: 2;
}
aside ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

aside li {
  padding: 0;
  width: 100%;
}

aside .final-item {
  position: absolute;
  bottom: 10px;
}

aside li a {
  text-decoration: none;
  font-size: 1.8rem;
  display: block;
  padding: 10px 10px 10px 40px;
  width: 100%;
  box-sizing: border-box;
  transition: background-color 200ms;
}
aside li a:hover {
  background-color: #d9d9d9;
}
#menu-opt {
  position: absolute;
  display: none;
}

header {
  height: calc(80vh - var(--nav-height));
  /* height: 80vh; */
  /* padding-top: var(--nav-height); */
  background-color: var(--sky-blue);
  background-image: linear-gradient(
    30deg,
    var(--sky-blue),
    var(--deep-blue) 90%
  );
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  text-align: center;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background-color: var(--deep-blue);
  color: white;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

nav :first-child {
  position: inherit;
  left: 30px;
}

#menu-icon {
  width: 40px;
  height: 40px;
  background-repeat: no-repeat;
  background-size: cover;
  transition: all 300ms;
  cursor: pointer;
}

#menu-icon:hover {
  width: 35px;
  height: 35px;
  transform: translateX(2.5px);
}

#nav-logo {
  cursor: pointer;
  user-select: none;
}

.header__content {
  width: 80%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
}
.header__content form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.header__content form > input,
#goto-login form > input,
#goto-login form > button,
.user-input {
  margin: 20px 0;
  padding: 15px 5px;
  color: white;
  font-size: 2.4rem;
  font-weight: 300;
  font-family: "Ubuntu", sans-serif;
}

/* TO-DO: CREATE A CLASS FOR THE ABOVE TO SEPARATE LOGIC */

.header__content form > input::placeholder {
  color: white;
}

.header__content > span {
  margin: 10px 0;
  font-size: 1.8rem;
}

.header__content ul {
  margin: 0 -10px;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: stretch;
  align-items: baseline;
  font-size: 1.4rem;
}

.header__content ul > li {
  margin: 7px 10px;
}

header a {
  text-decoration: none;
  font-size: 3rem;
  font-weight: 500;
  color: white;
}

main {
  color: var(--primary-black);
  text-align: center;
}

main #latest-posts--title,
main #explore--title {
  margin-top: 25px;
}

main #latest-posts,
main #explore {
  padding: 25px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  transition: all 200ms;
  pointer-events: none;
}

#latest-posts > *,
#explore > * {
  pointer-events: auto;
}

#latest-posts:hover > *,
#explore:hover > * {
  opacity: 0.6;
}
#latest-posts:hover > *:hover,
#explore:hover > *:hover {
  transform: scale(1.05);
  opacity: 1;
}

.card {
  overflow: hidden;
  margin: 15px;
  width: 80%;
  height: var(--card-height);
  max-width: 300px;
  min-width: 200px;
  border-radius: 20px;
  text-align: left;
  box-shadow: 0px 0px 10px -5px #000000;
  text-decoration: none;
  transition: all 200ms;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
}

/* .card > * {
  flex-grow: 1;
} */

.card__img {
  max-height: calc(var(--card-height) / 2);
  flex-grow: 1;
  background-image: linear-gradient(
    30deg,
    var(--sky-blue),
    var(--deep-blue) 90%
  );
}

.card__content {
  padding: 0 15px 15px;
  font-size: 1.4rem;
  /* display: flex;
  flex-direction: column;
  justify-content: space-around; */
}

.card__content h3 {
  overflow: hidden;
  white-space: nowrap;
  font-size: 2.4rem;
  font-weight: 400;
}

.card__content span,
.card__content a {
  font-weight: 300;
  font-size: 1.4rem;
}
.card__content p {
  font-weight: 400;
  font-size: 1.4rem;
}

.card__content--tags {
  margin: 5px 0 10px 0;
  display: flex;
  flex-wrap: wrap;
  white-space: pre-wrap;
}

.input-and-buttons,
.user-input {
  text-align: center;
  display: block;
  border: none;
  outline: none;
  border-radius: 10rem;
  background-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 10px -5px #000;
  transition: padding 300ms;
}

.home-tags {
  overflow: hidden;
  display: flex;
  flex-grow: 1;
  transition: all 300ms;
}

.home-tags > a {
  flex-grow: 1;
  padding: 5px 10px;
  font-size: inherit;
}

.home-tags:hover {
  cursor: pointer;
  transform: scale(1.05);
}

#goto-login {
  margin: 50px auto;
  padding: 20px;
  width: 60%;
  max-width: 600px;
  min-width: 200px;
  background-color: var(--off-grey);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

#goto-login a {
  margin: 5px auto;
  color: var(--primary-black);
  font-size: 2.4rem;
  width: 50%;
  max-width: 300px;
}
#goto-login a {
  display: block;
  padding: 10px;
}
#goto-login a,
.user-auth-form form button,
.new-post form button {
  background-color: var(--sky-blue);
  background-image: linear-gradient(
    30deg,
    var(--sky-blue),
    var(--deep-blue) 90%
  );
}

#goto-login a,
.user-auth-form form button > span {
  text-decoration: none;
  color: white;
  font-weight: 500;
}

footer {
  background-color: #292929;
  height: 150px;
  color: white;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

footer span {
  margin: 20px auto auto;
  font-size: 1.8rem;
  font-weight: 300;
}

footer a {
  color: white;
}

.footer__social-media {
  width: 110px;
  margin: 10px auto;
}
.footer__column {
  min-width: 250px;
  text-align: center;
}
footer ul {
  list-style: none;
  display: flex;
  justify-content: space-between;
}

/*
* SPECIFIC FOR LOGIN PAGE
*/

.user-auth-form,
.new-post {
  height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.user-auth-form form {
  width: 70%;
  min-width: 200px;
  max-width: 500px;
  margin: 0 auto;
}

.user-auth-form form > .user-input {
  text-decoration: none;
  display: block;
  box-sizing: border-box;
  color: var(--primary-black);
  width: 100%;
}

.login__gotoregister--button {
  position: relative;
  border: 3px solid transparent;
  background-color: #fff;
  background-clip: padding-box;
}

.login__gotoregister--button::after {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: -3px;
  right: -3px;
  background-image: linear-gradient(
    30deg,
    var(--sky-blue),
    var(--deep-blue) 90%
  );
  content: "";
  z-index: -1;
  border-radius: 20rem;
}

#go-to-main-section-button {
  cursor: pointer;
}

.user-auth-form > a,
.user-auth-form > span {
  font-size: 1.8rem;
  color: var(--primary-black);
}

/*
* SPECIFIC FOR NEW POST PAGE
*/

.new-post {
  height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  align-items: center;
}

.new-post form {
  width: 70%;
  min-width: 200px;
  max-width: 1200px;
  margin: 0 auto;
}

#new-post-form {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  width: 90%;
}

#input__article__title,
#input__article__tags {
  text-align: left;
  border-radius: 5px;
  padding: 5px;
  margin: 10px 0;
  color: var(--primary-black);
}

#input__article__content {
  text-align: left;
  border-radius: 5px;
  padding: 5px;
  margin: 10px 0;
  flex-grow: 1;
  resize: none;
  color: var(--primary-black);
}

#input__article__cancel-confirm {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
}

.hola {
  border-radius: 5px;
  padding: 5px;
  margin: 5px;
  margin-bottom: 20px;
  flex-grow: 1;
}

#cancelbutton {
  color: var(--primary-black);
  text-decoration: none;
}
#cancelbutton::after {
  border-radius: 5px;
}

/*
* SPECIFIC FOR ARTICLE PAGE
*/
.article h1,
.article h2 {
  text-align: left;
}
.article h1 {
  padding-top: 20px;
  font-size: 3.6rem;
}

.article h2 {
  font-size: 2.8rem;
}

.article {
  color: var(--primary-black);
  width: 90%;
  text-align: justify;
  margin: auto;
  min-height: calc(100vh - var(--nav-height));
}

.article span {
  font-size: 1.6rem;
}

.article div {
  margin-top: 10px;
}

.article a {
  background-color: var(--off-grey);
  margin-right: 5px;
  padding: 5px;
  border-bottom: 1px solid var(--primary-black);
}

.article a:hover {
  cursor: pointer;
  background-color: var(--primary-black);
  color: var(--off-grey);
}

.article hr {
  margin: 10px 0 20px;
}

.article p {
  font-size: 1.6rem;
  margin-bottom: 10px;
  line-height: 2.4rem;
}

/*
* SPECIFIC FOR EXPLORE PAGE
*/
#explore {
  min-height: calc(100vh - var(--nav-height));
}

/*
* SPECIFIC FOR 404 PAGE
*/
.Error404 {
  height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.Error404 h3 {
  font-size: 2.4rem;
  width: 80%;
  max-width: 380px;
}

/*
* GENERAL
*/

#profile {
  position: inherit;
  right: 30px;
  width: 45px;
  height: 45px;
  background-size: cover;
  border-radius: 50%;
  transition: all 200ms;
  border: 2px solid var(--off-grey);
}
#profile:hover {
  cursor: pointer;
  transform: translateX(2.5px);
  width: 50px;
  height: 50px;
}
#button__login-with-google {
  cursor: pointer;
}
#button__login-with-google {
  text-decoration: underline;
}

.card__tag {
  margin-right: 15px;
  border-bottom: solid 1px var(--primary-black);
}

/*
* LOADER
*/

.lds-ring {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}
.lds-ring div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 64px;
  height: 64px;
  margin: 8px;
  border: 8px solid #000;
  border-radius: 50%;
  animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: rgba(200, 200, 200, 1) transparent transparent transparent;
}
.lds-ring div:nth-child(1) {
  animation-delay: -0.45s;
}
.lds-ring div:nth-child(2) {
  animation-delay: -0.3s;
}
.lds-ring div:nth-child(3) {
  animation-delay: -0.15s;
}
@keyframes lds-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

