/* ============================================
   PROFILE MOBILE OPTIMIZATION
   User profile, tabs, content sections
   ============================================ */

@media (max-width: 768px) {

/* Profile Page Container */
.profile-page {
  padding-bottom: 80px !important;
}

/* Profile Hero - Compact */
.profile-hero {
  min-height: auto !important;
  padding: 24px 16px 80px 16px !important;
  position: relative !important;
}

/* Profile Header Card */
.profile-header-card {
  margin: 0 16px !important;
  padding: 20px !important;
  border-radius: 16px !important;
  transform: translateY(-40px) !important;
  margin-bottom: -20px !important;
}

/* Avatar Section */
.avatar-section {
  text-align: center !important;
  margin-bottom: 20px !important;
}

.avatar-container {
  position: relative !important;
  width: 100px !important;
  height: 100px !important;
  margin: 0 auto 16px !important;
}

.profile-avatar {
  width: 100px !important;
  height: 100px !important;
  border-radius: 50% !important;
  border: 4px solid white !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

.online-indicator {
  position: absolute !important;
  bottom: 4px !important;
  right: 4px !important;
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  border: 3px solid white !important;
}

.online-indicator.online {
  background: #28a745 !important;
}

.online-indicator.offline {
  background: #6c757d !important;
}

/* Camera Button for Edit */
.avatar-edit-btn {
  position: absolute !important;
  bottom: 0 !important;
  right: 0 !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: #19861C !important;
  color: white !important;
  border: 3px solid white !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 14px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
}

/* User Info */
.user-info-section {
  text-align: center !important;
}

.username {
  font-size: 22px !important;
  font-weight: 700 !important;
  color: #212529 !important;
  margin-bottom: 6px !important;
}

.role-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 12px !important;
  background: rgba(25, 134, 28, 0.1) !important;
  color: #19861C !important;
  border-radius: 12px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  margin-bottom: 12px !important;
}

.user-bio {
  font-size: 14px !important;
  color: #6c757d !important;
  line-height: 1.5 !important;
  margin-bottom: 16px !important;
}

/* Profile Stats */
.profile-stats {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 16px !important;
  padding: 20px 0 !important;
  border-top: 1px solid #e9ecef !important;
  border-bottom: 1px solid #e9ecef !important;
}

.stat-item {
  text-align: center !important;
}

.stat-number {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #212529 !important;
  display: block !important;
  margin-bottom: 4px !important;
}

.stat-label {
  font-size: 12px !important;
  color: #6c757d !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
}

/* Action Buttons */
.profile-actions {
  display: flex !important;
  gap: 12px !important;
  margin-top: 20px !important;
}

.edit-profile-btn,
.follow-btn {
  flex: 1 !important;
  padding: 12px 20px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
  min-height: 48px !important;
}

.edit-profile-btn {
  background: white !important;
  border: 2px solid #e9ecef !important;
  color: #495057 !important;
}

.follow-btn {
  background: linear-gradient(135deg, #19861C 0%, #5cb85c 100%) !important;
  border: none !important;
  color: white !important;
}

.follow-btn.following {
  background: white !important;
  border: 2px solid #e9ecef !important;
  color: #495057 !important;
}

/* Profile Tabs */
.profile-tabs {
  display: flex !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  padding: 0 16px !important;
  margin-bottom: 20px !important;
  border-bottom: 1px solid #e9ecef !important;
}

.profile-tabs::-webkit-scrollbar {
  display: none !important;
}

.tab-btn {
  padding: 14px 20px !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 3px solid transparent !important;
  color: #6c757d !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.tab-btn:active {
  background: #f8f9fa !important;
}

.tab-btn.active {
  color: #19861C !important;
  border-bottom-color: #19861C !important;
}

.tab-counter {
  padding: 2px 8px !important;
  background: #e9ecef !important;
  border-radius: 10px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

.tab-btn.active .tab-counter {
  background: rgba(25, 134, 28, 0.15) !important;
  color: #19861C !important;
}

/* Tab Content */
.tab-content-container {
  padding: 0 16px !important;
}

.tab-content {
  display: none !important;
}

.tab-content.active {
  display: block !important;
}

/* Overview Tab */
.profile-overview {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

/* Quick Stats Card */
.quick-stats-card {
  background: white !important;
  border-radius: 12px !important;
  padding: 20px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}

.quick-stats-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #212529 !important;
  margin-bottom: 16px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.quick-stats-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 16px !important;
}

.quick-stat-item {
  text-align: center !important;
  padding: 16px !important;
  background: #f8f9fa !important;
  border-radius: 10px !important;
}

.stat-icon-small {
  font-size: 24px !important;
  color: #19861C !important;
  margin-bottom: 8px !important;
}

.stat-value {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #212529 !important;
  display: block !important;
  margin-bottom: 4px !important;
}

.stat-label-small {
  font-size: 12px !important;
  color: #6c757d !important;
  font-weight: 600 !important;
}

/* Recent Activity Card */
.recent-activity-card {
  background: white !important;
  border-radius: 12px !important;
  padding: 20px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}

.activity-item {
  display: flex !important;
  gap: 12px !important;
  padding: 12px !important;
  background: #f8f9fa !important;
  border-radius: 10px !important;
  margin-bottom: 12px !important;
}

.activity-item:last-child {
  margin-bottom: 0 !important;
}

.activity-icon {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  background: rgba(25, 134, 28, 0.1) !important;
  color: #19861C !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 18px !important;
  flex-shrink: 0 !important;
}

.activity-content {
  flex: 1 !important;
  min-width: 0 !important;
}

.activity-title {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #212529 !important;
  margin-bottom: 4px !important;
}

.activity-time {
  font-size: 12px !important;
  color: #6c757d !important;
}

/* Events Tab Content */
.events-grid,
.publications-grid,
.signals-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

/* User's Event Card (Compact) */
.user-event-card {
  background: white !important;
  border-radius: 12px !important;
  padding: 16px !important;
  border: 1px solid #e9ecef !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04) !important;
  cursor: pointer !important;
  transition: transform 0.2s ease !important;
}

.user-event-card:active {
  transform: scale(0.98) !important;
}

.event-card-type {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 10px !important;
  background: rgba(25, 134, 28, 0.1) !important;
  color: #19861C !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  margin-bottom: 8px !important;
}

.event-card-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #212529 !important;
  margin-bottom: 8px !important;
  line-height: 1.3 !important;
}

.event-card-stats {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  font-size: 13px !important;
  color: #6c757d !important;
  padding-top: 12px !important;
  border-top: 1px solid #f1f3f5 !important;
}

.event-stat {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

/* Followers/Following Tab */
.users-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.user-card {
  background: white !important;
  border-radius: 12px !important;
  padding: 16px !important;
  border: 1px solid #e9ecef !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.user-card-avatar {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background: #e9ecef !important;
  flex-shrink: 0 !important;
}

.user-card-info {
  flex: 1 !important;
  min-width: 0 !important;
}

.user-card-name {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #212529 !important;
  margin-bottom: 2px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.user-card-meta {
  font-size: 13px !important;
  color: #6c757d !important;
}

.user-card-follow-btn {
  padding: 8px 20px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  white-space: nowrap !important;
  min-height: 36px !important;
}

.user-card-follow-btn.following {
  background: white !important;
  border: 2px solid #e9ecef !important;
  color: #495057 !important;
}

.user-card-follow-btn.follow {
  background: #19861C !important;
  border: none !important;
  color: white !important;
}

/* Empty States */
.tab-empty-state {
  text-align: center !important;
  padding: 60px 20px !important;
}

.empty-state-icon {
  font-size: 64px !important;
  color: #dee2e6 !important;
  margin-bottom: 16px !important;
}

.empty-state-title {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #495057 !important;
  margin-bottom: 8px !important;
}

.empty-state-description {
  font-size: 14px !important;
  color: #6c757d !important;
  line-height: 1.5 !important;
}

/* Settings Modal (Edit Profile) */
.settings-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

.settings-avatar-upload {
  text-align: center !important;
  margin-bottom: 24px !important;
}

.settings-avatar {
  width: 100px !important;
  height: 100px !important;
  border-radius: 50% !important;
  margin: 0 auto 16px !important;
  background: #e9ecef !important;
}

.avatar-upload-btn {
  padding: 10px 20px !important;
  background: #f8f9fa !important;
  border: 2px solid #e9ecef !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #495057 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

/* Loading States */
.profile-loading {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 60px 20px !important;
}

.profile-loading-spinner {
  width: 48px !important;
  height: 48px !important;
  border: 4px solid #f1f3f5 !important;
  border-top-color: #19861C !important;
  border-radius: 50% !important;
  animation: spin 0.8s linear infinite !important;
  margin-bottom: 16px !important;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.profile-loading-text {
  font-size: 15px !important;
  color: #6c757d !important;
}

/* Swipe Gestures Hint */
.swipe-hint {
  position: fixed !important;
  bottom: calc(var(--mobile-bottom-nav-height) + 80px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  padding: 10px 20px !important;
  background: rgba(0,0,0,0.8) !important;
  color: white !important;
  border-radius: 20px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.3s ease !important;
  z-index: 1000 !important;
}

.swipe-hint.show {
  opacity: 1 !important;
}

/* Pull to Refresh */
.profile-pull-refresh {
  position: absolute !important;
  top: -60px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 40px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #19861C !important;
  transition: top 0.3s ease !important;
}

.profile-pull-refresh.active {
  top: 80px !important;
}

.profile-pull-refresh i {
  font-size: 24px !important;
  animation: spin 1s linear infinite !important;
}


} /* End of @media (max-width: 768px) */