/*
CSS reset
*/
/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
* {
  margin: 0;
}

body {
  /* 3. Add accessible line-height */
  line-height: 1.5;
  /* 4. Improve text rendering */
  -webkit-font-smoothing: antialiased;
  font-family: "Rubik", sans-serif;
}

/* 5. Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 6. Inherit fonts for form controls */
input,
button,
textarea,
select {
  font: inherit;
}

/* 7. Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* 8. Improve line wrapping */
p {
  text-wrap: pretty;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

:root {
  --Blue: hsl(246, 80%, 60%);
  --Light-red-work: hsl(15, 100%, 70%);
  --Soft-blue-play: hsl(195, 74%, 62%);
  --Light-red-study: hsl(348, 100%, 68%);
  --Lime-green-exercise: hsl(145, 58%, 55%);
  --Violet-social: hsl(264, 64%, 52%);
  --Soft-orange-self-care: hsl(43, 84%, 65%);

  --Very-dark-blue: hsl(226, 43%, 10%);
  --Dark-blue: hsl(235, 46%, 20%);
  --Desaturated-blue: hsl(235, 45%, 61%);
  --Pale-Blue: hsl(236, 100%, 87%);
}

.container {
  min-height: 100vh;
  display: grid;
  place-content: center;
  background-color: var(--Very-dark-blue);
}
.dashboard-container {
  width: 100%;
  max-width: 1000px;
  min-width: 300px;
  min-height: 500px;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.card {
  background-position: top -4% right 5%;
  background-repeat: no-repeat;
  border-radius: 1rem;
  color: white;
  display: grid;
  align-items: end;
  overflow: hidden;
}

/*
User categorie
*/

.user-section {
  grid-row: 1 / span 2;
}

.user-article {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  background-color: var(--Dark-blue);
}

.user-profile {
  display: grid;
  align-content: center;
  background-color: var(--Blue);
  border-radius: 1rem;
  flex: 2;
  padding-left: 2rem;
}

.user-img {
  width: 70px;
  border: 4px solid white;
  border-radius: 50%;
  margin-bottom: 2.5rem;
}

.report-for {
  font-size: 0.8rem;
  color: var(--Pale-Blue);
}

.user-name {
  font-size: 1.2rem;
  font-size: clamp(1.2rem, 0.98rem + 1.0999999999999999vw, 2.3rem);
  font-weight: 100;
}

.time-frecuency {
  display: grid;
  align-content: center;

  flex: 1;
}

.time-frecuency ul {
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.time-frecuency li {
  color: var(--Pale-Blue);
  cursor: pointer;
}

.time-frecuency li:hover {
  color: white;
}

/*
Card categories
*/

.card-categories {
  display: grid;
  align-content: space-evenly;
  background-color: var(--Dark-blue);
  height: 85%;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  padding: 1.5rem;
  cursor: pointer;
}

.card-categories:hover {
  background-color: var(--Desaturated-blue);
}

.card-categories img {
  height: 4px;
}

.card-categories h1 {
  font-size: 0.9rem;
}

.card-categories .hours {
  font-size: 1.5rem;
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 3rem);
  font-weight: 100;
}

.card-categories .previous-hours {
  font-size: 0.7rem;
  color: var(--Pale-Blue);
}

.work-section {
  background-image: url(images/icon-work.svg);
  background-color: var(--Light-red-work);
}

.category-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.play-section {
  background-image: url(images/icon-play.svg);
  background-color: var(--Soft-blue-play);
}

.study-section {
  background-image: url(images/icon-study.svg);
  background-color: var(--Light-red-study);
}

.exercise-section {
  background-image: url(images/icon-exercise.svg);
  background-color: var(--Lime-green-exercise);
}
.social-section {
  background-image: url(images/icon-social.svg);
  background-color: var(--Violet-social);
}

.self-care-section {
  background-image: url(images/icon-self-care.svg);
  background-color: var(--Soft-orange-self-care);
}

/*
Media query
*/

@media (width < 875px) {
  .container {
    padding: 50px 20px;
  }

  .user-profile {
    grid-auto-flow: column;
    align-items: center;
    justify-items: center;
    padding: 0;
    gap: 1rem;
    padding: 1rem;
  }

  .user-img {
    margin: 0;
  }

  .time-frecuency {
    padding: 1rem 0;
  }

  .time-frecuency ul {
    grid-auto-flow: column;
    justify-items: center;
    padding: 0;
  }
  .time-period {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .card-categories .hours {
    font-size: 1.5rem;
  }
}
