/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Mulish:wght@300;400;500;700&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  /*========== Colors ==========*/
  --black-color: hsl(240, 20%, 2%);
  --white-color: hsl(60, 67%, 99%);

  /*========== Font and typography ==========*/
  --body-font: "Mulish", sans-serif;
  --biggest-font-size: 2rem;
  --small-font-size: 14px;

  /*========== Font weight ==========*/
  --font-bold: 700;
  --font-medium: 500;
  --font-light: 300;

  /*========== Margins ==========*/
  --space-xsmall: 0.5rem;
  --space-small: 1rem;
  --space-medium: 1.5rem;
  --space-large: 2rem;
  --space-xlarge: 3rem;
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body {
  font-family: var(--body-font);
  background: var(--white-color);
  color: var(--black-color);
  width: 100vw;
  min-height: 100vh;
  padding: 6vh 5vw 3vh;
}

a,
a:visited,
a:active {
  text-decoration: none;
  color: inherit;
}

a:hover {
  text-decoration: underline;
  color: inherit;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1100px;
}

.flexColumnCenter {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.flexColumnBetween {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.flexRowCenter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.flexRowStart {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
}

/*=============== BASIC HEADER & FOOTER ===============*/
header {
  margin-bottom: 4vh;
}

header h1 {
  font-size: var(--biggest-font-size);
  font-weight: var(--font-light);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

footer p {
  font-size: var(--small-font-size);
}

/*=============== PROJECT RELATED ===============*/
main {
  margin-bottom: 4vh;
}

.feed {
  margin-bottom: 2vh;
}

figure.imageContainer {
  width: 350px;
  height: 350px;
  overflow: hidden;
  margin: 0.125rem;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
}

/* Animación que será visible mientras carga la imagen */
@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

figure img {
  width: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease-in-out;
}

/* Imágenes se desvanecen antes recargar la página mediante el botón */
body.reloading figure img {
  transition: opacity 0.5s ease-in-out;
  opacity: 0;
}

#btn {
  font-size: 1.75rem;
  color: var(--black-color);
  background-color: transparent;
  transition: all 0.3s ease;
  border: 0;
  opacity: 0.75;
  margin: 2rem auto;
  cursor: pointer;
}

#btn:hover {
  opacity: 1;
  transform: scale(1.05);
}

#btn:disabled,
#btn:disabled:hover {
  opacity: 0;
}

#btn:focus {
  outline: 0;
}

#btn:active {
  transform: scale(0.98);
}
