*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  background-color: #edf2f8;
  font-family: "Manrope", sans-serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  border: none;
  background: none;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

ul,
ol {
  list-style: none;
}

#root,
#__next {
  isolation: isolate;
}

.article-card-wrapper {
  position: relative;
  overflow: visible;
  border-radius: 9px;
  height: auto;
}

.article-card {
  display: flex;
  width: 731px;
  height: 281px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 81px -20px #a9b5b980;
  background-color: #fff;
  border-radius: 9px;
}

section.article-image-wrap {
  width: 286px !important;
  height: 281px;
  background-image: url("images/drawers.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: -5px center;
}

.content-wrap {
  display: flex;
  width: 445px;
  flex-direction: column;
  background-color: #fff;
  padding: 33px 40px 32px 40px;
}

h2.article-title {
  font-weight: bold;
  font-size: 20px;
  line-height: 28px;
  letter-spacing: 0.2px;
  margin-bottom: 11px;
}

p.article-paragraph {
  font-weight: 500;
  font-size: 13px;
  line-height: 20px;
  letter-spacing: -0.13px;
  color: #4a5163;
  color: #6e798d;
  margin-bottom: 20px;
}

.author-published-date-wrap {
  display: flex;
  gap: 17px;
  position: relative;
  z-index: 0;
}

.author-published-date-wrap img {
  border-radius: 50%;
  width: 40px;
  height: 40px;
}
.author-date-share {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.name-date-wrap {
  display: flex;
  flex-direction: column;
}

p.author-name {
  font-weight: 700;
  font-size: 13px;
  line-height: 20px;
  letter-spacing: 0.39px;
}

.publish-date {
  font-weight: 500;
  font-size: 13px;
  line-height: 20px;
  letter-spacing: 0.39px;

  color: #6e798d;
}

.share-tooltip {
  display: none;
  position: absolute;
  top: 131px;
  left: 550px;
  width: 248px;
  height: 55px;
  z-index: 8;
  overflow: visible;
}

.tooltip-wrapper {
  width: 100%;
  height: 100%;
  background-color: #49556b;
  border-radius: 10px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3); /* Drop shadow */
  position: relative;
}

.tooltip-wrapper img {
  width: 100%;
  height: auto;
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 10px;
  border: none;
}

.share-tooltip img {
  width: 100%;
  height: auto;
  border: none;
  display: block;
}

.share-tooltip p {
  position: absolute;
  bottom: 13px;
  left: 35px;
  font-weight: 400;
  font-size: 13px;
  line-height: 28px;
  letter-spacing: 5px;
  display: flex;
  justify-content: center;
  color: #aeb8c9;
}

.social-icons {
  display: flex;
  gap: 17px;
  position: absolute;
  bottom: 18px;
  left: 165px;
  transform: translateX(-50%);
  align-items: center;
  justify-content: center;
}

.social-icons a {
  display: flex;
  width: 20px;
  height: 20px;
}

.social-icons img {
  width: 100%;
  height: 100%;
}

.share-tooltip.show-tooltip {
  display: flex;
  z-index: 1002;
}

button.share-button {
  width: 32px;
  height: 32px;
  background-color: #edf2f8;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  display: inline-block;
  transition: background-color 0.3s ease;
  z-index: 1003;
}
button.share-button svg {
  width: 15px;
  left: 8px;
  top: 9px;
  position: absolute;
  height: 13px;
  fill: #6e8098;
  transition: fill 0.3s ease;
}

button.share-button.clicked {
  background-color: #6b8097;
  z-index: 1004;
}

button.share-button.clicked svg path {
  z-index: 1004;
  fill: #fff;
}

/* ====== Responsive Design ====== */

@media (max-width: 921px) {
  body {
    padding: 0px 24px 0px 24px;
  }

  .article-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 81px -20px #a9b5b980;
    background-color: #fff;
    border-radius: 9px;
  }

  .article-card-wrapper {
    position: relative;
    width: 100%;
    height: auto;

    overflow: visible;
    padding: 0;
    margin: 0;
  }

  h2.article-title {
    font-weight: bold;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.2px;
  }

  p.article-paragraph {
    margin-bottom: 41px;
  }

  .share-tooltip {
    display: none;
    position: absolute;
    top: unset;
    border-bottom-left-radius: 9px;
    border-bottom-right-radius: 9px;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: #49556b;
    outline: 2px solid #49556b;
    padding: 21px 21px 21px 21px;
    gap: 20px;
    justify-content: center;
    align-items: center;
    box-shadow: 0px -4px 8px rgba(0, 0, 0, 0.1);
    pointer-events: none;
  }

  .share-tooltip img {
    display: none;
  }

  .share-tooltip.show-tooltip {
    display: flex;
    z-index: 9;
    position: absolute;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
  }

  .share-tooltip p {
    display: none;
    position: static;
    bottom: unset;
    left: unset;
    right: unset;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 1px;
    margin: 0;
    order: -1;

    flex-shrink: 0;
  }

  .share-tooltip p.show-text {
    display: block;
  }

  button.share-button {
    width: 32px;
    height: 32px;
    background-color: #edf2f8;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
  }

  .tooltip-wrapper {
    display: none;
  }

  .social-icons {
    display: none;
    gap: 15px;
    justify-content: center;
    align-items: center;
    position: static;
    bottom: unset;
    left: unset;
    top: unset;
    transform: unset;
  }
  .social-icons a {
    display: flex;
    width: 20px;
    height: 20px;
  }

  .social-icons img {
    display: flex;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
  }

  .social-icons.show-icons {
    display: flex;
  }

  .content-wrap {
    width: 100%;
    padding: 33px 32px 20px 32px;
  }

  section.article-image-wrap {
    width: 100% !important;
    height: 281px;
    background-image: url("images/drawers.jpg");
    background-repeat: no-repeat;
    background-size: fill;
    background-position: 0px center;
  }

  .author-published-date-wrap {
    display: flex;
    position: relative;
    gap: 17px;
    z-index: 8;
  }

  .author-date-share {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .share-tooltip-wrapper img {
    display: none;
  }
}

@media (max-width: 380px) {
  .share-tooltip {
    padding: 21px 21px 21px 21px;
    gap: 20px;
    justify-content: flex-start;
  }

  .social-icons {
    display: none;
    gap: 15px;
    justify-content: center;
    align-items: center;
    position: static;
    bottom: unset;
    left: unset;
    top: unset;
    transform: unset;
    margin-right: 90px;
  }

  .share-tooltip {
    padding: 21px 1px 21px 1px;
  }
}
