.linkListContainer {
  color: #1a1a1a;
  padding-top: 2.5rem;
  padding-bottom: 4rem;
  padding-left: 1rem;
  padding-right: 1rem;
  text-align: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Title and description spacing */
.linkListContainer .profile-photo {
  margin-bottom: 0.25rem;
}

.linkListContainer #link-title {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.3;
  color: #1a1a1a;
}

.linkListContainer #link-description {
  margin-top: 0;
  margin-bottom: 0;
}

.linkGroup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: white;
  margin-top: 0;
}

/* Only apply margin-top when linkGroup has link items */
.linkGroup:has(.link-item) {
  margin-top: 3rem;
}

/* Fallback: check if group has any child elements (not just whitespace) */
@supports not selector(:has(*)) {
  .linkGroup:has(*) {
    margin-top: 3rem;
  }
  
  /* Additional fallback for very old browsers */
  .linkGroup.has-items {
    margin-top: 3rem;
  }
}

.linkGroup .link-item,
.ll-widgets-group .link-item {
  background-color: #ffffff;
  color: #1a1a1a;
  width: 94vw !important;
  max-width: 436px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  text-decoration: none;
  border-radius: 0.75rem;
  box-sizing: border-box;
  padding: 1.125rem 1.375rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.linkGroup .link-item::before,
.ll-widgets-group .link-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--theme-color, #797ef6) 0%, var(--theme-color, #797ef6) 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.linkGroup .link-item:hover,
.ll-widgets-group .link-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.1);
}

.linkGroup .link-item:hover::before,
.ll-widgets-group .link-item:hover::before {
  opacity: 1;
}

.linkGroup .link-item:active,
.ll-widgets-group .link-item:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
}

h4 {
  font-size: 1rem;
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  margin: 0;
  color: #1a1a1a;
  letter-spacing: -0.01em;
}

.link-image {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  padding: 0;
  margin-left: 0;
  margin-right: 1rem;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.linkGroup .link-item:hover .link-image,
.ll-widgets-group .link-item:hover .link-image {
  transform: scale(1.05);
}

.linksSocialGroup {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  max-width: 436px;
  margin: 2.5rem auto 4rem;
  padding: 0 1rem;
}

.social-link-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.social-link-item:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.social-link-item:active {
  transform: translateY(0) scale(1);
}

.social-link-item img {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  object-fit: contain;
}

.description {
  margin-top: 0.75rem;
  margin-bottom: 0;
  font-size: 0.875rem;
  color: #666;
  line-height: 1.6;
  font-weight: 400;
}

.ll-widgets-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  color: white;
  width: 100%;
  margin-top: 0;
}

/* Only apply margin-top when widgets group has children */
.ll-widgets-group:has(.ll-widget-container),
.ll-widgets-group:has(.link-item) {
  margin-top: 3rem;
}

.ll-widget-container {
  width: 96%;
  max-width: 436px;
  box-sizing: border-box;
}

.ll-image-carousel::-webkit-scrollbar,
.ll-video-carousel::-webkit-scrollbar {
  display: none;
}

/* Enhanced link item content styling */
.link-item-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.link-item-title {
  font-size: 1rem;
  font-weight: 500;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.4;
  word-break: break-word;
}

.link-item-description {
  font-size: 0.8125rem;
  color: #666;
  margin-top: 0.25rem;
  line-height: 1.4;
}

/* Arrow icon for links */
.link-item-arrow {
  margin-left: auto;
  color: #999;
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.linkGroup .link-item:hover .link-item-arrow,
.ll-widgets-group .link-item:hover .link-item-arrow {
  transform: translateX(4px);
  color: var(--theme-color, #797ef6);
}

/* Desktop/Laptop improvements - ensure proper margins */
@media screen and (min-width: 476px) {
  .linkListContainer {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .linkGroup .link-item,
  .ll-widgets-group .link-item {
    width: calc(100% - 2rem);
    max-width: 436px;
  }

  .ll-widget-container {
    width: calc(100% - 2rem);
    max-width: 436px;
  }
}

/* Mobile responsive improvements */
@media (max-width: 480px) {
  .linkListContainer {
    padding-top: 1.75rem;
    padding-bottom: 2.5rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .linkGroup:has(.link-item) {
    margin-top: 2rem;
  }
  
  .linkGroup {
    gap: 0.875rem;
  }

  .linkGroup .link-item,
  .ll-widgets-group .link-item {
    width: 100%;
    padding: 1rem 1.125rem;
    border-radius: 0.625rem;
  }

  .ll-widgets-group:has(.ll-widget-container),
  .ll-widgets-group:has(.link-item) {
    margin-top: 2rem;
  }
  
  .ll-widgets-group {
    gap: 1.25rem;
  }

  .link-image {
    width: 2.25rem;
    height: 2.25rem;
    margin-right: 0.875rem;
  }

  h4 {
    font-size: 0.9375rem;
  }

  .linksSocialGroup {
    margin-top: 2rem;
    margin-bottom: 3rem;
  }
}

/* Smooth scroll behavior */
.linkListContainer {
  scroll-behavior: smooth;
}

/* Focus states for accessibility */
.linkGroup .link-item:focus,
.ll-widgets-group .link-item:focus,
.social-link-item:focus {
  outline: 2px solid var(--theme-color, #797ef6);
  outline-offset: 2px;
}