@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* CSS Reset */
*,
*::after,
*::before {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

*,
button,
input,
select,
textarea {
  font-family: 'Roboto', sans-serif;
}

/* Vars */
:root {
  --primary: hsl(0, 0%, 100%);
  --secondary: hsl(0, 0%, 98%);
  --border: hsl(0, 0%, 86%);

  --story-border: hsl(0, 0%, 78%);
  --img-border: hsla(0, 0%, 0%, 0.1);

  --text-dark: hsl(0, 0%, 15%);
  --text-light: hsl(0, 0%, 60%);

  --like: hsl(355, 82%, 61%);
  --link: hsl(204, 100%, 48%);

  --header-height: 44px;
  --nav-height: 44px;
}

svg {
  display: block;
}

img {
  max-width: 100%;
}

#posts{
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  margin: auto;
  align-items: center;
  justify-content: center;
}

/* Post */
.post {
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  text-align: left;

}

.post__header {
  background-color: var(--primary);

  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
}
.post__profile {
  display: flex;
  align-items: center;
  gap: 12px;
}
.post__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
}
.post__avatar::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;

  border: 1px solid var(--img-border);
  border-radius: 50%;
}
.post__user {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  text-decoration: none;
  text-transform: lowercase;
}
.post__user:hover {
  text-decoration: underline;
}
.post__more-options {
  background-color: transparent;
  border: none;
  cursor: pointer;
}

.post__content {
  display: flex;
  position: relative;
}
.post__medias {
  display: flex;
  overflow-y: hidden;
  overflow-x: auto;

  width: 100%;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.post__medias::-webkit-scrollbar {
  display: none;
}
.post__media {
  width: 100%;
  height: 400px;
  flex: none;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.post__footer {
  background-color: var(--primary);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 4px;
}
.post__buttons {
  display: flex;
  position: relative;
}
.post__button {
  background-color: transparent;
  border: none;
  cursor: pointer;

  padding: 8px;
}
.post__button--align-right {
  margin-left: auto;
}
.post__indicators {
  display: flex;
  align-items: center;
  gap: 4px;

  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -100%);
}
.post__indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--text-light);
}
.post__indicator--active {
  background-color: var(--link);
}

.post__infos {
  display: flex;
  flex-direction: column;
  padding: 0 8px;
  gap: 10px;
}
.post__likes {
  display: flex;
}

.post__likes {
  align-items: center;
  gap: 6px;
}
.post__likes-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
}
.post__likes-avatar::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;

  border: 1px solid var(--img-border);
  border-radius: 50%;
}
.post__likes span,
.post__description small {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-dark);
}
.post__likes a,
.post__description a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  text-decoration: none;
}
.post__name--underline:hover {
  text-decoration: underline;
}
.post__date-time {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-light);
  text-transform: uppercase;
  text-align: right;
}
.post__content{
  margin: 10px 0;
  color: gray;
}

#liked{
  display: none;
}
#reported{
  display: none;
}

@media only screen and (max-width: 992px) {
  #posts {
    grid-template-columns: repeat(2, 1fr);
  }

}
@media only screen and (max-width: 576px) {
  #posts {
    grid-template-columns: repeat(1, 1fr);
  }
}
