.share-card {
  background-color: #dadada;
  border: 1px solid #c4c4c4;
  border-left: 4px solid #1090c7;
  border-radius: 10px;
  padding: 20px;
  align-items: center;
}

.share-content {
  display: flex;
  gap: 45px;
  flex-wrap: nowrap;
  align-items: flex-start;
}


.share-qr {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-shrink: 0;
}

.share-qr img {
  width: 80px;
  height: 80px;
  max-width: 80px;
  max-height: 80px;
  object-fit: contain;
  border-radius: 0px;
}

.share-qr .qr-code-img {
  border-radius: 0px;
}

.share-qr-caption {
  font-size: 14px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  opacity: 0.6;
  user-select: none;
  -webkit-user-select: none;
}

.share-text-and-icons {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 220px;
  gap: 12px;
}

.share-heading-text {
  font-size: 15px;
  margin-top: 10px;
  margin-bottom: 4px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  white-space: normal;
  max-width: 100%;
}

.share-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}


.share-icons a {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.18s ease;
  background: inherit;
}

.share-icon-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  transition: filter 0.18s ease;
}

.share-icons a:hover .share-icon-bg {
  filter: brightness(0.8);
}

.share-icons img {
  width: 22px;
  height: 22px;
  max-width: 22px;
  max-height: 22px;
  display: block;
  margin: 0 auto;
  border-radius: 0;
  position: relative;
  z-index: 1;
}

.share-icons .twitter img {
  width: 22px;
  height: 22px;
  max-width: 22px;
  max-height: 22px;
  display: block;
  margin: 0 auto;
}

/* Individual platform colors */
.share-icons .twitter .share-icon-bg      { background-color: #1da1f2; }
.share-icons .facebook .share-icon-bg     { background-color: #1877f2; }
.share-icons .reddit .share-icon-bg       { background-color: #ff4500; }
.share-icons .telegram .share-icon-bg     { background-color: #229ed9; }
.share-icons .linkedin .share-icon-bg     { background-color: #0077b5; }
.share-icons .blogger .share-icon-bg      { background-color: #ed6b3d; }
.share-icons .whatsapp .share-icon-bg     { background-color: #25d366; }
.share-icons .messenger .share-icon-bg    { background-color: #0084ff; }
.share-icons .bluesky .share-icon-bg      { background-color: #0085ff; }
.share-icons .teams .share-icon-bg        { background-color: #464eb8; }
.share-icons .mail .share-icon-bg         { background-color: #4caf50; }
.share-icons .copy .share-icon-bg         { background-color: #4caf50; }
.share-icons .native-share .share-icon-bg { background-color: #1090c7; }

/* Wide native share button with text */
.share-icons .share-button-wide {
  width: auto;
  min-width: 80px;
  padding: 0 12px;
  gap: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.share-icons .share-button-wide .share-text {
  color: white;
  font-size: 14px;
  font-weight: 500;
  z-index: 2;
  position: relative;
  white-space: nowrap;
  text-decoration: none;
  /* margin-top: -2px; */
}

/* Smaller icons when space becomes tight - FORCE single row */
@media (max-width: 360px) {
  .share-icons {
    flex-wrap: nowrap;
    gap: 8px;
  }
  
  .share-icons a {
    width: 32px;
    height: 32px;
  }
  
  .share-icons img {
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
  }
  
  .share-icons .twitter img {
    width: 16px;
    height: 16px;
    max-width: 16px;
    max-height: 16px;
  }
  
  .share-icons .share-button-wide {
    min-width: 60px;
    padding: 0 8px;
  }
  
  .share-icons .share-button-wide .share-text {
    font-size: 11px;
  }
}

/* Force 2-row layout when icons really can't fit horizontally */
@media (max-width: 300px) {
  .share-icons {
    display: grid;
    grid-template-columns: repeat(3, 32px);
    grid-template-rows: repeat(2, 32px);
    gap: 6px;
    justify-content: center;
  }
  
  .share-icons a {
    width: 32px;
    height: 32px;
  }
  
  .share-icons img {
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
  }
  
  .share-icons .twitter img {
    width: 16px;
    height: 16px;
    max-width: 16px;
    max-height: 16px;
  }
  
  .share-icons .share-button-wide {
    grid-column: span 2;
    min-width: 55px;
    padding: 0 6px;
  }
  
  .share-icons .share-button-wide .share-text {
    font-size: 10px;
  }
}

/* Responsive adjustments for wide share button */
@media (max-width: 430px) {
  .share-icons .share-button-wide {
    min-width: 60px;
    padding: 0 8px;
  }
  
  .share-icons .share-button-wide .share-text {
    font-size: 12px;
  }
}

.share-button-wide .native-share-img {
  width: 16px;
  height: 16px;
  max-width: 16px;
  max-height: 16px;
}

/* Responsive layout */
@media (max-width: 600px) {
  .share-content {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  /* .share-qr img {
    width: 110px;
    height: 110px;
    max-width: 110px;
    max-height: 110px;
  } */
  .share-heading-text {
    font-size: 14px;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  .share-qr-caption {
    font-size: 12px;
    display: none;
  }
}

@media (max-width: 500px) {
  .share-icons {
    gap: 10px;
  }
  .share-heading-text {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.3;
  }
  .share-qr {
    display: none;
  }
}

@media (max-width: 430px) {
  .share-heading-text {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.3;
  }
  .share-text-break {
    display: block;
  }
  .share-qr {
    display: none;
  }
}

@media (max-width: 340px) {
  .share-qr {
    display: none;
  }
  .share-heading-text {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.3;
  }
}

/* Smartwatch and ultra-small screens */
@media (max-width: 280px) {
  .share-card {
    padding: 12px 8px;
  }
  .share-content {
    gap: 8px;
  }
  .share-qr {
    display: none;
  }
  .share-text-and-icons {
    min-width: auto;
    width: 100%;
  }
  .share-heading-text {
    font-size: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.2;
    white-space: normal;
    max-width: 100%;
    width: 100%;
  }
  .share-icons {
    gap: 6px;
    justify-content: center;
  }
  .share-icons a {
    width: 32px;
    height: 32px;
  }
  .share-icons img {
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
  }
  
  .share-icons .twitter img {
    width: 16px;
    height: 16px;
    max-width: 16px;
    max-height: 16px;
  }
}

/* Extra small screens - 3 row layout */
@media (max-width: 200px) {
  .share-card {
    padding: 8px 4px;
  }
  .share-text-and-icons {
    min-width: auto;
    width: 100%;
  }
  .share-heading-text {
    font-size: 11px;
    line-height: 1.1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    white-space: normal;
    max-width: 100%;
    width: 100%;
  }
  .share-icons {
    display: grid;
    grid-template-columns: repeat(2, 32px);
    grid-template-rows: repeat(3, 32px);
    gap: 6px;
    justify-content: center;
  }
  .share-icons a {
    width: 32px;
    height: 32px;
  }
  .share-icons img {
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
  }
  
  .share-icons .twitter img {
    width: 16px;
    height: 16px;
    max-width: 16px;
    max-height: 16px;
  }
  
  .share-icons .share-button-wide {
    grid-column: span 2;
    min-width: 70px;
    padding: 0 6px;
  }
  .share-icons .share-button-wide .share-text {
    font-size: 10px;
  }
}

/* Ultra small screens - single column layout */
@media (max-width: 124px) {
  .share-card {
    padding: 6px 2px;
  }
  .share-text-and-icons {
    min-width: auto;
    width: 100%;
  }
  .share-heading-text {
    font-size: 10px;
    line-height: 1.1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    white-space: normal;
    max-width: 100%;
    width: 100%;
    text-align: center;
  }
  .share-icons {
    display: grid;
    grid-template-columns: 30px;
    grid-template-rows: repeat(5, 30px);
    gap: 4px;
    justify-content: center;
  }
  .share-icons a {
    width: 30px;
    height: 30px;
  }
  .share-icons img {
    width: 16px;
    height: 16px;
    max-width: 16px;
    max-height: 16px;
  }
  
  .share-icons .twitter img {
    width: 14px;
    height: 14px;
    max-width: 14px;
    max-height: 14px;
  }
  
  .share-icons .share-button-wide {
    grid-column: 1;
    min-width: 30px;
    max-width: 30px;
    padding: 0;
  }
  .share-icons .share-button-wide .share-text {
    display: none;
  }
}


.main-content article section img { 
    margin-top: 10px;
}

.main-content article #share .share-icons img { 
    margin-top: 0;
    border-radius: 0;
}

/* Override margin-top for share section heading text */
.main-content article section#share .share-card .share-content .share-text-and-icons .share-heading-text {
    margin-top: 0 !important;
}

/* Override margin-top for QR code image in share section */
.main-content article section#share .share-card .share-content .share-qr img {
    margin-top: 0 !important;
}

