@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

:root {
  --bg-body: #f8f2e5;
  --bg-logo: #ffffff;
  --font-primary: "Poppins", sans-serif;
  --font-weight-bold: 500;
  --color-dark-gray: #212121;
}

#menuBar {
  background-color: #ffffffcc;
  width: 100%;
  text-align: center;
  padding-top: 10px;
  padding-bottom: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#logoImg {
  max-width: 100%;
  height: auto;
  width: auto; 
  display: block;
}


#first_container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}
/* Added this to prevent button shrink */
#right_container > * {
  flex-shrink: 0;
}
/* Only on very wide screens do we restore the 48rem gap */
@media (min-width: 1440px) {
  #first_container {
    gap: 48rem;
  }
}

#left_container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#textContainer {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

#textContainer p:first-of-type {
  font-size: 1.25rem;
  font-weight: 500;
  color: #212121;
}

#editContainer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  cursor: pointer;
  opacity: 0.7;
}

#editContainer:hover {
  opacity: 1;
  transition: all ease 0.3s;
}

#textContainer p:nth-of-type(2) {
  font-size: 0.95rem;
  color: #212121b2;
  margin-bottom: 40px;
}

#textContainer span {
  font-size: 0.9rem;
  color: #212121;
}

#textContainer span p {
  font-size: 0.58rem;
  color: #212121;
}

#right_container {
  display: flex;
  width: 120px;
  height: 40px;
  flex-direction: row;
  justify-self: center;
  align-content: center;
  align-items: center;
  border: 1px solid #212121;
  border-radius: 5px;
  background-color: #111;
  gap: 0.4rem;
  font-size: 1rem;
  margin-top: 160px;
  padding: 0.5rem;
}

#right_container:hover {
  background-color: rgb(52, 51, 51);
  cursor: pointer;
  transition: all ease 0.3s;
}

#right_container img {
  height: 20px;
  width: 20px;
  filter: invert(1);
}

#right_container p {
  color: #ffffff;
}

body {
  background-color: var(--bg-body);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: var(--font-primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

#bodyPart {
  max-width: 90%;
  padding: 2.5rem 0;
  margin: 2rem auto;
  border-block: 1px solid rgba(33, 33, 33, 0.4);
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem 1.25rem;
}

.card-component {
  min-width: 100%;
}

.card-data {
  margin-top: 0.5rem;
  display: flex;
  justify-content: space-between;
}

.card-data p {
  color: var(--color-dark-gray);
  font-size: 1rem;
  font-weight: var(--font-weight-bold);
  flex-basis: 75%;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.like-button {
  background: transparent;
  outline: none;
  border: none;
}

.like-button svg {
  cursor: pointer;
  stroke: #212121;
  opacity: 0.4;
  transition: all ease 0.3s;
}

.like-button svg:hover {
  opacity: 1;
}

.sr-only {
  clip: rect(1px 1px 1px 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
}

#image-3 {
  border-radius: 10px;
}

/* Devices: Tablets, ipads */
@media (min-width: 768px) and (max-width: 1024px) {
  #menuBar {
    padding-top: 15px;
    padding-bottom: 15px;
  }

  #logoImg {
    width: 200px;
  }

  #first_container {
    flex-direction: row;
    justify-content: space-between;
    gap: 9rem;
  }

  #left_container {
    gap: 1.5rem;
  }

  #textContainer p:first-of-type {
    font-size: 1.7rem;
  }

  #textContainer p:nth-of-type(2) {
    font-size: 0.95rem;
  }

  #right_container {
    margin-top: auto;
    justify-content: flex-end;
  }
  #textContainer {
    gap: 2.7rem;
  }
}

/* Target: landscape mode tablets, ipads */
@media (min-width: 1025px) and (max-width: 1043px) {
  #menuBar {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  #logoImg {
    width: 250px;
  }

  #first_container {
    flex-direction: row;
    justify-content: space-between;
    gap: 3rem;
  }

  #left_container {
    gap: 1.5rem;
  }

  #textContainer p:first-of-type {
    font-size: 1.75rem;
  }

  #textContainer p:nth-of-type(2) {
    font-size: 1rem;
  }

  #right_container {
    margin-top: auto;
    justify-content: flex-end;
  }
}

/* Devices: Low resolution tablets, mobile */
@media (min-width: 481px) and (max-width: 767px) {
  #menuBar {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  #logoImg {
    width: 180px;
  }

  #first_container {
    flex-direction: row;
    gap: 3rem;
    padding: 1rem;
  }

  #right_container {
    margin-top: 0;
  }
  #textContainer {
    gap: 1.6rem;
  }
}

/* Devices: Smartphones, mobile */
@media (min-width: 320px) and (max-width: 480px) {
  #menuBar {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  #logoImg {
    width: 150px;
    display: block;
  }

  #first_container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }

  #left_container {
    flex-direction: column;
    align-items: center;
  }

  #right_container {
    width: 190%;
    display: flex;
    justify-content: center;
    margin-top: 1rem;
  }

  .new-post-btn {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 300px;
    padding: 0.8rem 1rem;
  }

  .edit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 16px;
    letter-spacing: 0;
    color: #000;
    opacity: 0.7;
    border-radius: 90px;
    width: fit-content;
    padding: 0;
    height: 16px;
    margin: 0 auto;
    cursor: pointer;
    background: none;
    border: none;
  }

  .edit-btn img {
    width: 16px;
    height: 16px;
    object-fit: contain;
  }

  .edit-btn p {
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 16px;
    margin: 0;
    padding: 0;
    white-space: nowrap;
  }

  img#avatarImg {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    object-fit: cover;
  }

  #editContainer {
    justify-content: center;
    margin: 0 auto;
    margin-top: 1px;
  }

  #textContainer {
    gap: 0.5rem;
  }
}

/* Media Queries for body section */

/* Devices: Smartphones, mobile */
@media (max-width: 480px) {
  .card-data p {
    font-size: 0.85rem;
    flex-basis: 60%;
  }
}

/* Devices: Tablets, ipads */
@media (min-width: 600px) {
  #bodyPart {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-data p {
    font-size: 0.9rem;
    flex-basis: 70%;
  }
}

/* Devices: Laptops, desktops */
@media (min-width: 1024px) {
  #bodyPart {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Target: large screens */
@media (min-width: 1280px) {
  #bodyPart {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.75rem 1.5rem;
  }
}
@media (min-width: 1057px) and (max-width: 1219px) {
  #first_container {
    gap: 38rem;
  }
  #right_container {
    margin-left: -1rem;
  }
}
