/* سیستم شبکه‌های اجتماعی - نسخه نهایی */
.socials-section {
  padding: 0 1rem 1rem;
  background: var(--bg-primary);
}

.socials-action {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%); 
  color: #000;
  border: none; 
  padding: 0.75rem 1.5rem; 
  border-radius: 0.5rem; 
  font-weight: 600; 
  cursor: pointer;
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  gap: 0.5rem; 
  font-family: inherit;
  font-size: 0.875rem; 
  flex: 1;
  min-height: 44px;
  white-space: nowrap;
  flex-shrink: 1;
}

.btn-socials-toggle {
  background: var(--bg-primary);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  width: 44px;
  height: 44px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 1.125rem;
  transition: all 0.2s ease;
}

.btn-socials-toggle.active {
  background: var(--primary-color);
  color: #000;
  border-color: var(--primary-color);
}

.socials-slider {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.socials-slider.open {
  max-height: 160px;
}

.socials-track {
  display: flex;
  gap: 1.5rem;
  padding: 1rem 0 0 0;
  overflow-x: auto;
  scrollbar-width: none;
  flex-wrap: nowrap;
}

.socials-track::-webkit-scrollbar {
  display: none;
}

.socials-header {
  padding: 0.75rem 0;
  display: none;
}

.socials-slider.open .socials-header {
  display: flex;
}

.socials-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: 0.875rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.show-all-text {
  color: var(--primary-color);
  cursor: pointer;
  font-weight: 600;
  padding: 0.5rem 0;
  flex-shrink: 0;
  white-space: nowrap;
  text-align: right;
}

.socials-title {
  color: var(--text-secondary);
  font-weight: 500;
  flex-shrink: 0;
  white-space: nowrap;
  text-align: left;
}

.social-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  flex-shrink: 0;
  min-width: 70px;
  background: transparent;
  border: none;
  padding: 0;
}

.social-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-accent);
  background: transparent;
  transition: border-color 0.3s ease;
}

.social-circle:hover .social-icon-wrapper {
  border-color: var(--primary-color);
}

.social-icon-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-icon {
  font-size: 1.5rem;
  color: var(--text-primary);
}

.social-name {
  font-size: 0.75rem;
  color: var(--text-primary);
  text-align: center;
  font-weight: 500;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.socials-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.socials-modal {
  background: var(--bg-primary);
  width: 100%;
  max-width: 700px;
  border-radius: 1rem;
  padding: 1rem;
  max-height: 90vh;
  overflow: auto;
  border: 1px solid var(--bg-accent);
}

.socials-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--bg-accent);
}

.socials-modal-header strong {
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 700;
}

.socials-close-btn {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-secondary);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.socials-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
}

.socials-modal-card {
  background: var(--bg-secondary);
  border-radius: 0.875rem;
  padding: 0.625rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  border: 1px solid var(--bg-accent);
}

.socials-modal-card .social-icon-wrapper {
  width: 60px;
  height: 60px;
  margin-bottom: 0.5rem;
}

.socials-modal-card .social-icon {
  font-size: 1.75rem;
}

.socials-modal-card .social-name {
  font-size: 0.875rem;
  max-width: 100px;
  font-weight: 600;
}

.socials-modal-card .social-handle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.socials-modal-card .social-btn {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: #000;
  border: none;
  border-radius: 0.625rem;
  padding: 0.375rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  width: 100%;
  font-weight: 600;
  font-family: inherit;
}

/* ریسپانسیو */
@media (max-width: 768px) {
  .socials-section {
    padding: 0 0.75rem 0.75rem;
  }
  
  .socials-action {
    gap: 0.5rem;
  }
  
  .btn-primary {
    padding: 0.625rem 1.25rem;
    font-size: 0.8rem;
    min-height: 40px;
  }
  
  .btn-socials-toggle {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .socials-track {
    gap: 1.25rem;
  }
  
  .social-circle {
    min-width: 60px;
  }
  
  .social-icon-wrapper {
    width: 56px;
    height: 56px;
  }
  
  .social-icon {
    font-size: 1.25rem;
  }
  
  .social-name {
    font-size: 0.7rem;
    max-width: 60px;
  }
  
  .socials-slider.open {
    max-height: 140px;
  }
}

@media (max-width: 480px) {
  .btn-primary {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    min-height: 36px;
  }
  
  .btn-socials-toggle {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
  
  .socials-track {
    gap: 1rem;
  }
  
  .social-circle {
    min-width: 55px;
  }
  
  .social-icon-wrapper {
    width: 50px;
    height: 50px;
  }
  
  .social-icon {
    font-size: 1.125rem;
  }
  
  .social-name {
    font-size: 0.65rem;
    max-width: 55px;
  }
}

@media (max-width: 360px) {
  .socials-action {
    gap: 0.375rem;
  }
  
  .btn-primary {
    padding: 0.375rem 0.75rem;
    font-size: 0.7rem;
    min-height: 32px;
  }
  
  .btn-socials-toggle {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }
}

@media (max-width: 280px) {
  .socials-section {
    padding: 0 0.5rem 0.5rem;
  }
  
  .socials-action {
    gap: 0.375rem;
  }
  
  .btn-primary {
    padding: 0.375rem 0.5rem;
    font-size: 0.65rem;
    min-height: 30px;
  }
  
  .btn-socials-toggle {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
  }
  
  .socials-track {
    gap: 0.75rem;
  }
  
  .social-circle {
    min-width: 50px;
  }
  
  .social-icon-wrapper {
    width: 45px;
    height: 45px;
  }
  
  .social-icon {
    font-size: 1rem;
  }
  
  .social-name {
    font-size: 0.6rem;
    max-width: 50px;
  }
}
