/* ðŸ•Šï¸ Yo Os Digo â€” Network Styles (Premium Social UI) */

:root {
  --sidebar-w: 240px;
  --aside-w: 300px;
  --radius-lg: 20px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  overflow-x: hidden;
  padding-bottom: 0 !important; /* Managed by social-layout */
}

/* Layout Container */
.social-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
}

/* Desktop Sidebar Left */
.social-sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  position: sticky;
  top: 0;
  display: none;
  flex-direction: column;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px;
  z-index: 50;
}

@media (min-width: 1024px) {
  .social-sidebar { display: flex; }
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.sidebar-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
  color: var(--text);
  letter-spacing: -0.04em;
  display: flex;
  flex-direction: column;
}

.sidebar-title span {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-top: -4px;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.nav-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.nav-btn.active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 700;
}

.nav-btn .badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: auto;
}

.sidebar-footer { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--border); }

.btn-sidebar-post {
  background: var(--accent);
  color: #fff;
  border: none;
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(224, 124, 60, 0.3);
  transition: all 0.2s;
}

.btn-sidebar-post:hover {
  transform: translateY(-2px);
  background: var(--accent-hover);
  box-shadow: 0 6px 20px rgba(224, 124, 60, 0.4);
}

.back-to-bible {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.2s;
}

.back-to-bible:hover { color: var(--accent); }

/* Main Content Area */
.social-content {
  flex: 1;
  max-width: 100%;
  padding: 0 0 80px 0; /* Space for bottom nav */
}

@media (min-width: 1024px) {
  .social-content {
    max-width: 800px;
    padding: 32px 40px;
  }
}

/* Mobile Header */
.mobile-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

@media (min-width: 1024px) {
  .mobile-header { display: none; }
}

.mobile-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
}

/* Views Management */
.view { display: none; }
.view.active {
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Post Creator Trigger */
.post-creator-trigger {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  margin-top: 0;
}

@media (min-width: 1024px) { 
  .post-creator-trigger { 
    margin-top: 0; 
  } 
}

.user-avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.trigger-btn {
  flex: 1;
  height: 40px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  text-align: left;
  padding: 0 20px;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.trigger-btn:hover { border-color: var(--accent); background: var(--accent-light); }

/* Feed */
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 0 20px;
}

@media (min-width: 1024px) { .view-header { padding: 0; } }

.view-header h2 { font-size: 1.5rem; font-weight: 800; margin: 0; letter-spacing: -0.04em; }

.feed-tabs { display: flex; gap: 8px; }

.tab {
  padding: 6px 14px;
  border-radius: 20px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: 0.2s;
}

.tab.active { background: var(--accent); color: #fff; }

/* Desktop Aside (Right Sidebar) */
.social-aside {
  width: var(--aside-w);
  height: 100vh;
  position: sticky;
  top: 0;
  display: none;
  flex-direction: column;
  padding: 32px 24px;
  gap: 32px;
}

@media (min-width: 1280px) {
  .social-aside { display: flex; border-left: 1px solid var(--border); }
}

.aside-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.church-empty {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.church-empty p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; }

.btn-secondary {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

/* Mobile Bottom Nav */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 10px;
  z-index: 100;
}

@media (min-width: 1024px) {
  .mobile-bottom-nav { display: none; }
}

.m-nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.m-nav-btn.active { color: var(--accent); }

.plus-btn {
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #fff !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(224, 124, 60, 0.4);
}

/* Premium Button-sm */
/* Post Cards */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s;
}

.post-card:hover { transform: translateY(-2px); }

.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.user-info { display: flex; align-items: center; gap: 12px; }

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.user-details { display: flex; flex-direction: column; }

.user-name { font-weight: 700; color: var(--text); font-size: 0.95rem; }

.post-time { font-size: 0.8rem; color: var(--text-muted); }

.more-btn { background: transparent; border: none; color: var(--text-muted); cursor: pointer; }

/* Verse Component inside Post */
.post-verse-card {
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
  padding: 16px;
  border-radius: 4px 12px 12px 4px;
  margin-bottom: 16px;
}

.verse-ref {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.verse-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text);
  margin: 0;
  font-style: italic;
}

.post-content {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 20px;
}

.post-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.action-btn {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s;
}

.action-btn:hover { background: var(--bg); color: var(--text); }

.pray-btn.active { color: var(--accent); }

.pray-btn.active i { fill: var(--accent); stroke: var(--accent); }

/* Skeletons */
.post-skeleton {
  height: 250px;
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  opacity: 0.6;
}

.post-skeleton::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Groups Layout */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 0 20px;
}

@media (min-width: 1024px) { .groups-grid { padding: 0; } }

.group-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.group-banner {
  height: 100px;
  background: linear-gradient(135deg, #e07c3c 0%, #8b5a3c 100%);
  opacity: 0.8;
}

.group-info { padding: 16px; }

.group-info h4 { margin: 0 0 4px; font-size: 1.1rem; font-weight: 700; }

.group-info p { margin: 0 0 16px; font-size: 0.85rem; color: var(--text-muted); }

/* Utilities */
.empty-msg { text-align: center; padding: 40px; color: var(--text-muted); font-style: italic; }

.error-msg { color: #e74c3c; text-align: center; padding: 20px; }


/* Modals General */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 48px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(20px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.modal.is-open .modal-panel {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 { margin: 0; font-size: 1.25rem; font-weight: 800; color: var(--text); }

.close-btn {
  background: var(--bg);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-body { padding: 24px; display: flex; flex-direction: column; gap: 20px; }

.post-user-info { display: flex; align-items: center; gap: 12px; }

.user-name-modal { font-weight: 700; color: var(--text); font-size: 1rem; }

#postContent {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 1.15rem;
  color: var(--text);
  resize: none;
  outline: none;
  padding: 0;
}

#postContent::placeholder { color: var(--text-muted); opacity: 0.6; }

.verse-reference-input {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.verse-reference-input input {
  border: none;
  background: transparent;
  flex: 1;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
}

.input-icon { color: var(--accent); opacity: 0.7; }

.verse-text-preview {
  background: var(--accent-light);
  padding: 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  min-height: 48px;
}

.preview-placeholder { margin: 0; color: var(--text-muted); font-style: italic; font-size: 0.8rem; }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
}

.privacy-option { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-muted); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(224, 124, 60, 0.3);
  transition: all 0.2s;
}

.btn-primary:hover { transform: scale(1.05); background: var(--accent-hover); }

.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

@media (max-width: 600px) {
  .modal { padding: 0; align-items: flex-end; }
  .modal-panel { border-radius: 24px 24px 0 0; max-width: 100%; transform: translateY(100%); }
  .modal.is-open .modal-panel { transform: translateY(0); }
}



/* Verse Picker Suggestions */
.verse-reference-container {
  position: relative;
  width: 100%;
}

.verse-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 300;
  overflow: hidden;
  max-height: 250px;
  overflow-y: auto;
}

.verse-suggestions.hidden { display: none; }

.suggestion-item {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background 0.2s;
  color: var(--text);
  font-size: 0.9rem;
}

.suggestion-item:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.suggestion-item i {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

.verse-ref-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 8px;
}

#postVersePreview .error {
  color: #e74c3c;
  font-size: 0.85rem;
  font-style: italic;
}



/* Rich Suggestions */
.suggestion-rich {
  flex-direction: column;
  align-items: flex-start !important;
  gap: 4px !important;
  padding: 10px 16px !important;
  border-bottom: 1px solid var(--border);
}

.suggestion-rich:last-child { border-bottom: none; }

.s-ref {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
}

.s-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}



/* Notifications Styling */
.btn-clear-notif {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-clear-notif:hover {
  background: var(--bg);
  color: var(--text);
}

/* Mentions Styling */
.mention-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  background: var(--accent-light);
  padding: 1px 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

.mention-link:hover {
  background: var(--accent);
  color: #fff;
}

/* Mention Suggestions Dropdown */
.mention-suggestions {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  overflow: hidden;
  max-height: 200px;
  overflow-y: auto;
  display: none;
}

.mention-suggestions.active {
  display: block;
  animation: slideUpMention 0.2s ease-out;
}

@keyframes slideUpMention {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.mention-item {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.2s;
  color: var(--text);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.mention-item:last-child { border-bottom: none; }

.mention-item:hover, .mention-item.selected {
  background: var(--accent-light);
  color: var(--accent);
}

.mention-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

/* Gamification Badges */
.badges-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: left;
}

.badges-section h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 12px;
}

.badge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.badge-icon-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 2px solid var(--border);
  position: relative;
  transition: all 0.3s;
}

.badge-icon-circle i { width: 24px; height: 24px; }

.badge-name {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

/* Badge Variants */
.badge-card.guerrero .badge-icon-circle { 
  background: linear-gradient(135deg, #ff9d00 0%, #ff5e00 100%); 
  color: #fff; 
  border-color: #ff9d00;
  box-shadow: 0 4px 12px rgba(255, 157, 0, 0.3);
}

.badge-card.escriba .badge-icon-circle { 
  background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%); 
  color: #fff; 
  border-color: #00d2ff;
  box-shadow: 0 4px 12px rgba(0, 210, 255, 0.3);
}

.badge-card.embajador .badge-icon-circle { 
  background: linear-gradient(135deg, #8e2de2 0%, #4a00e0 100%); 
  color: #fff; 
  border-color: #8e2de2;
  box-shadow: 0 4px 12px rgba(142, 45, 226, 0.3);
}

.badge-card.lector .badge-icon-circle { 
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); 
  color: #fff; 
  border-color: #11998e;
  box-shadow: 0 4px 12px rgba(17, 153, 142, 0.3);
}

.badge-icon-circle::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.3;
  animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
  0% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.1); opacity: 0; }
  100% { transform: scale(1); opacity: 0.3; }
}

.notifications-list {
  display: flex;
  flex-direction: column;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
  cursor: pointer;
}

.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: var(--accent-light); }

.n-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.n-icon.reaccion { background: #fee2e2; color: #ef4444; }
.n-icon.comentario { background: #e0f2fe; color: #0ea5e9; }
.n-icon.comunidad { background: #f0fdf4; color: #22c55e; }

.n-body p {
  margin: 0 0 4px;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.4;
}

.n-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}



/* Post Comments Section */
.post-comments-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-comments-section.hidden { display: none; }

.comment-item {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.4;
  padding: 4px 8px;
  background: var(--bg);
  border-radius: 8px;
}

.comment-item strong { color: var(--accent); }

.comment-input-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border-radius: 20px;
  padding: 4px 14px;
  border: 1px solid var(--border);
}

.comment-input-box input {
  flex: 1;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text);
  padding: 8px 0;
  outline: none;
}

.send-comment-btn {
  background: transparent;
  border: none;
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.no-comments { font-size: 0.8rem; color: var(--text-muted); text-align: center; font-style: italic; }

.spinner-sm { font-size: 0.75rem; color: var(--text-muted); text-align: center; }



/* Spinner Sm */
.spinner-sm {
  border: 2px solid rgba(0,0,0,0.1);
  border-top: 2px solid var(--accent);
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.no-comments, .error {
  font-size: 0.85rem;
  padding: 10px;
  text-align: center;
  color: var(--text-muted);
}



/* Group Actions Styles */
.group-actions {
  margin-top: 12px;
}

.btn-primary-sm.is-member {
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn-primary-sm.join-btn:hover {
  transform: scale(1.05);
  background: var(--accent-hover);
}

.group-banner {
  background: linear-gradient(135deg, var(--accent) 0%, #d35400 100%);
  position: relative;
}

.group-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('https://www.transparenttextures.com/patterns/cubes.png');
  opacity: 0.1;
}



/* Post Modal Options Header/Footer */
.post-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#postDestino {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  outline: none;
  padding: 2px 4px;
}

.privacy-option select:hover { color: var(--accent); }



/* Premium Button-SM */
.btn-primary-sm {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(224, 124, 60, 0.2);
}

.btn-primary-sm:hover {
  transform: translateY(-2px);
  background: var(--accent-hover);
  box-shadow: 0 6px 15px rgba(224, 124, 60, 0.3);
}

/* Input Groups for Modal */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.input-group input, .input-group textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
}

.input-group input:focus, .input-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}



/* Fix for Modal Overlap and Visibility */
.modal {
  z-index: 10000 !important;
}

.modal.is-open {
  display: flex !important;
}



/* Premium Select Styling for Post Destination */
.post-options .privacy-option {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  width: 100%;
}

.post-options .privacy-option:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

#postDestino {
  flex: 1;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  outline: none;
  cursor: pointer;
  padding: 4px 0;
  -webkit-appearance: none;
  appearance: none;
}

/* Custom Arrow for Select */
.privacy-option::after {
  content: '?';
  font-size: 0.7rem;
  color: var(--text-muted);
  pointer-events: none;
}

.privacy-option i {
  color: var(--accent);
}



/* Correcting visibility for Dropdown options (Dark Mode Support) */
#postDestino {
  background: var(--bg-card) !important;
  color: #fff !important;
}

#postDestino option {
  background-color: #1a1a1a !important;
  color: #ffffff !important;
  padding: 10px;
}

/* Fix for the custom arrow rendering */
.privacy-option::after {
  content: '?' !important;
  margin-left: auto;
  font-size: 0.6rem !important;
  opacity: 0.6;
}

/* Modern styling for the checkbox area */
.post-options .privacy-option:last-child {
  margin-top: 5px;
  background: transparent;
  border: none;
  padding: 0 12px;
}

#postPublic {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  cursor: pointer;
}



#postDestino {
  padding: 8px 4px !important;
  font-size: 0.95rem !important;
}

#postDestino option {
  background-color: #222 !important;
  color: #fff !important;
  padding: 12px !important;
}

/* Ensure the white-on-white bug doesn't happen */
@media screen and (max-width: 768px) {
  #postDestino option {
    color: initial;
    background-color: initial;
  }
}



/* Modern Footer Layout Fix */
.modal-footer {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 16px !important;
}

.modal-footer .btn-primary {
  width: 100% !important;
  padding: 14px !important;
  font-size: 1rem !important;
  border-radius: 14px !important;
}

.post-options {
  width: 100% !important;
}

/* Enhancing the privacy selector */
.post-options .privacy-option {
  width: auto !important;
}

/* Fix for the strange characters like '?' */
.privacy-option::after {
  content: '' !important; /* Remove the custom arrow for now to avoid '?' bugs */
}

/* Ensuring selectivity for the checkbox area */
.post-options .privacy-option:last-child {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: var(--text-muted) !important;
  font-size: 0.85rem !important;
}



/* Group Filter Bar (Muro Mis Iglesias) */
.group-filter-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 4px;
  scrollbar-width: none; /* Hide scrollbar Firefox */
  -ms-overflow-style: none; /* Hide scrollbar IE/Edge */
}

.group-filter-scroll::-webkit-scrollbar {
  display: none; /* Hide scrollbar Chrome/Safari */
}

.filter-pill {
  flex: 0 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 10px rgba(224, 124, 60, 0.3);
}

.filter-pill:hover {
  border-color: var(--accent);
  color: var(--text);
}



/* Correcting View Header Layout for Filters Stacking */
.view-header {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 12px !important;
  padding-bottom: 15px !important;
}

.feed-tabs {
  display: flex !important;
  gap: 15px !important;
}

.group-filter-scroll {
  width: 100% !important;
  padding: 5px 0 !important;
  margin-top: 5px !important;
}

/* Ensure the title is always on top */
.view-header h2 {
  margin: 0 !important;
}



/* Community Badge in Posts */
.post-community-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(224, 124, 60, 0.1);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 10px;
  vertical-align: middle;
}

.post-community-badge i {
  width: 10px;
  height: 10px;
}



/* Community Card Actions (Owner) */
.group-card-actions {
  display: flex !important;
  gap: 8px !important;
  margin-top: 10px !important;
  border-top: 1px solid var(--border) !important;
  padding-top: 10px !important;
}

.btn-icon-sm {
  background: var(--bg-muted) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-muted) !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
}

.btn-icon-sm:hover {
  background: var(--accent-light) !important;
  color: var(--accent) !important;
  border-color: var(--accent) !important;
}

.btn-icon-sm.delete:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #ef4444 !important;
  border-color: #ef4444 !important;
}



/* Professional Confirmation Modal */
.modal-confirm {
  max-width: 380px !important;
  text-align: center !important;
  border-radius: 20px !important;
}

.modal-confirm .alert-icon {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #ef4444 !important;
  width: 64px !important;
  height: 64px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto 20px !important;
}

.modal-confirm .alert-icon i {
  width: 32px !important;
  height: 32px !important;
}

.modal-confirm h3 {
  margin-bottom: 10px !important;
  font-size: 1.3rem !important;
}

.modal-confirm p {
  color: var(--text-muted) !important;
  margin-bottom: 25px !important;
  line-height: 1.5 !important;
}

.modal-confirm .modal-footer {
  border-top: none !important;
  padding: 0 !important;
  display: flex !important;
  gap: 12px !important;
}

.btn-secondary {
  flex: 1 !important;
  background: var(--bg-muted) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  padding: 12px !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  transition: all 0.2s !important;
}

.btn-secondary:hover {
  background: var(--border) !important;
}



/* Premium Group Icon Styling */
.group-icon {
  width: 50px !important;
  height: 50px !important;
  background: var(--bg-muted) !important;
  border-radius: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.5rem !important;
  margin-right: 15px !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
}

.group-icon i {
  width: 24px !important;
  height: 24px !important;
}

.group-card.private .group-icon {
  background: rgba(224, 124, 60, 0.1) !important;
  color: var(--accent) !important;
  border-color: var(--accent-light) !important;
}

.group-card.public .group-icon {
  background: rgba(34, 197, 94, 0.1) !important;
  color: #22c55e !important;
  border-color: rgba(34, 197, 94, 0.2) !important;
}



/* Fix for Mobile Header Icons */
.icon-btn {
  background: transparent !important;
  border: none !important;
  color: var(--text) !important;
  padding: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  position: relative !important;
}

.icon-btn:hover {
  background: var(--bg-muted) !important;
}

.icon-btn i {
  width: 22px !important;
  height: 22px !important;
}

/* Red Dot Placement for Mobile Bell */
#mobile-notif-btn #notif-count {
  position: absolute !important;
  top: 4px !important;
  right: 4px !important;
  background: #ef4444 !important;
  color: #fff !important;
  font-size: 0.6rem !important;
  padding: 2px 5px !important;
  border-radius: 10px !important;
  font-weight: bold !important;
  border: 2px solid var(--bg-card) !important;
}



/* Correcting Mobile Badge Name in CSS */
#mobile-notif-btn #m-notif-count {
  position: absolute !important;
  top: 2px !important;
  right: 2px !important;
  background: #ef4444 !important;
  color: #fff !important;
  font-size: 0.65rem !important;
  padding: 1px 5px !important;
  border-radius: 50px !important;
  font-weight: bold !important;
  border: 2px solid var(--bg-card) !important;
  min-width: 16px !important;
  text-align: center !important;
}



/* Sidebar Footer & Profile Card */
.sidebar-footer {
  margin-top: auto !important;
  padding: 20px !important;
  border-top: 1px solid var(--border) !important;
}

.user-profile-card {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  background: var(--bg-muted) !important;
  padding: 12px !important;
  border-radius: 12px !important;
  border: 1px solid var(--border) !important;
}

.user-profile-card .user-data {
  flex: 1 !important;
  overflow: hidden !important;
}

.user-profile-card .user-name {
  display: block !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.user-profile-card .user-email {
  display: block !important;
  font-size: 0.75rem !important;
  color: var(--text-muted) !important;
}

.logout-btn {
  background: transparent !important;
  border: none !important;
  color: var(--text-muted) !important;
  cursor: pointer !important;
  padding: 5px !important;
  transition: color 0.2s !important;
}

.logout-btn:hover {
  color: #ef4444 !important;
}

.login-trigger-btn {
  width: 100% !important;
  background: var(--accent) !important;
  color: #fff !important;
  border: none !important;
  padding: 12px !important;
  border-radius: 12px !important;
  font-weight: bold !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  cursor: pointer !important;
}

.modal-login {
  max-width: 400px !important;
}

.login-subtitle {
  text-align: center !important;
  color: var(--text-muted) !important;
  margin-bottom: 20px !important;
  font-size: 0.9rem !important;
}

.accent-link {
  color: var(--accent) !important;
  text-decoration: none !important;
  font-weight: bold !important;
}

.accent-link:hover {
  text-decoration: underline !important;
}

.w-full { width: 100% !important; }



/* Account View (Mobile/Guest Dashboard) */
.user-profile-large {
  padding: 40px 20px !important;
  text-align: center !important; 
  background: var(--bg-card) !important;
  border-radius: 24px !important;
  border: 1px solid var(--border) !important;
  margin-top: 20px !important;
}

.user-avatar-large {
  width: 100px !important;
  height: 100px !important;
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 2.5rem !important;
  font-weight: bold !important;
  margin: 0 auto 20px !important;
  box-shadow: 0 10px 20px rgba(224, 124, 60, 0.3) !important;
}

.account-guest-view {
  padding: 40px 20px !important;
  text-align: center !important;
}

.account-guest-view p {
  color: var(--text-muted) !important;
  margin-bottom: 30px !important;
  font-size: 1.1rem !important;
}

.register-link {
  display: block !important;
  margin-top: 20px !important;
  color: var(--accent) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
}



/* Premium Login Modal Layout Fixes */
.form-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin-bottom: 20px !important;
  text-align: left !important;
}

.form-group label {
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  margin-left: 2px !important;
}

.form-group input {
  background: var(--bg-muted) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  padding: 12px 15px !important;
  border-radius: 12px !important;
  width: 100% !important;
  font-size: 1rem !important;
  transition: all 0.2s !important;
}

.form-group input:focus {
  outline: none !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(224, 124, 60, 0.1) !important;
}

.login-subtitle {
  text-align: center !important;
  max-width: 250px !important;
  margin: 0 auto 25px !important;
  line-height: 1.4 !important;
}

.modal-login .modal-body {
  padding: 0 10px 10px !important;
}



/* Global Modal Enhancements */
.modal-panel {
  box-shadow: 0 15px 40px rgba(0,0,0,0.4) !important;
  border: 1px solid rgba(255,255,255,0.05) !important;
}

.modal-header {
  padding: 20px 25px !important;
  border-bottom: 1px solid var(--border) !important;
}

.modal-body {
  padding: 25px !important;
}

.modal-footer {
  padding: 15px 25px 25px !important;
  border-top: 1px solid var(--border) !important;
}

.modal-footer p {
  width: 100% !important;
  text-align: center !important;
  margin: 0 !important;
  font-size: 0.95rem !important;
}



/* Ultimate Hidden Hack */
.hidden { display: none !important; }

/* Refining sidebar footer spacing */
.sidebar-footer {
  margin-top: auto !important;
  padding: 24px 20px !important;
  border-top: 1px solid rgba(255,255,255,0.05) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.user-profile-card {
  padding: 14px !important;
  background: rgba(255,255,255,0.03) !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
}

.login-trigger-btn {
  margin-top: 0 !important;
  box-shadow: 0 4px 14px rgba(224, 124, 60, 0.2) !important;
}

.back-to-bible {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: var(--text-muted) !important;
  text-decoration: none !important;
  font-size: 0.95rem !important;
  padding: 8px 5px !important;
  transition: color 0.2s !important;
}

.back-to-bible:hover {
  color: var(--text) !important;
}



/* Ensuring Sidebar Footer is forced to the absolute bottom */
.sidebar {
  display: flex !important;
  flex-direction: column !important;
  height: 100vh !important;
  position: sticky !important;
  top: 0 !important;
}

.sidebar-nav {
  flex: 1 !important; /* This pushes the footer down */
  display: flex !important;
  flex-direction: column !important;
}

.sidebar-footer {
  margin-top: auto !important; /* Final push */
  padding: 20px !important;
  background: var(--bg-card) !important;
  border-top: 1px solid var(--border) !important;
}



/* Root Layout must occupy full screen */
.social-layout {
  display: grid !important;
  grid-template-columns: 280px 1fr 320px !important;
  min-height: 100vh !important;
  background: var(--bg) !important;
}

.sidebar {
  display: flex !important;
  flex-direction: column !important;
  height: 100vh !important;
  position: sticky !important;
  top: 0 !important;
  border-right: 1px solid var(--border) !important;
  background: var(--bg-card) !important;
}

/* Ensure the middle content scrolls independent */
.social-content {
  height: 100vh !important;
  overflow-y: auto !important;
}



/* Ultimate 2-Column Premium Layout */
.social-layout {
  display: flex !important; /* Switch to flex for better control */
  width: 100% !important;
  min-height: 100vh !important;
  background: var(--bg) !important;
}

.sidebar {
  width: 320px !important;
  min-width: 320px !important;
  flex-shrink: 0 !important;
  /* (height and sticky inherited from last fix) */
}

.social-content {
  flex: 1 !important;
  max-width: 800px !important; /* Centered feed for better reading */
  margin: 0 auto !important;
  border-left: 1px solid var(--border) !important;
  border-right: 1px solid var(--border) !important;
}

/* Sidebar Extra Section Styling */
.sidebar-extra-info {
  margin-bottom: 25px !important;
}

.sidebar-extra-info h4 {
  font-size: 0.8rem !important;
  text-transform: uppercase !important;
  color: var(--text-muted) !important;
  margin-bottom: 12px !important;
  letter-spacing: 0.5px !important;
}

.church-empty {
  background: rgba(255,255,255,0.02) !important;
  border: 1px dashed rgba(255,255,255,0.1) !important;
  padding: 15px !important;
  border-radius: 12px !important;
  text-align: center !important;
}

.church-empty p {
  font-size: 0.85rem !important;
  color: var(--text-muted) !important;
  margin-bottom: 10px !important;
}

.btn-secondary-xs {
  background: transparent !important;
  border: 1px solid var(--accent) !important;
  color: var(--accent) !important;
  padding: 5px 12px !important;
  border-radius: 20px !important;
  font-size: 0.75rem !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
}

.btn-secondary-xs:hover {
  background: var(--accent) !important;
  color: #fff !important;
}

/* Red Dot Placement for Mobile Bell */
.social-content .mobile-header .logo {
  display: none !important; /* Remove Y logo from mobile header if sidebar is visible */
}

/* Responsividad: Ocultar Sidebar en móvil si es necesario */
@media (max-width: 1024px) {
  .sidebar {
    display: none !important;
  }
}



/* Reset Social Layout to Single Column */
.social-layout-single {
  width: 100% !important;
  min-height: 100vh !important;
  background: var(--bg) !important;
  display: block !important;
}

.social-content {
  max-width: 700px !important; /* Optimizado para lectura en 1 columna */
  margin: 0 auto !important;
  padding-bottom: 100px !important;
  border: none !important;
}

/* Premium Top Navbar */
.top-navbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 15px 25px !important;
  background: rgba(18, 18, 18, 0.8) !important;
  backdrop-filter: blur(15px) !important;
  border-bottom: 1px solid var(--border) !important;
  margin-bottom: 20px !important;
}

.nav-brand {
  font-weight: 800 !important;
  font-size: 1.2rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.nav-links {
  display: flex !important;
  gap: 10px !important;
}

.nav-link {
  background: transparent !important;
  border: none !important;
  color: var(--text-muted) !important;
  padding: 8px 16px !important;
  border-radius: 20px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
}

.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,0.05) !important;
  color: var(--accent) !important;
}

.nav-user .user-pill {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  background: rgba(255,255,255,0.03) !important;
  padding: 5px 5px 5px 15px !important;
  border-radius: 30px !important;
  border: 1px solid var(--border) !important;
}

.logout-mini-btn {
  background: var(--bg-muted) !important;
  border: none !important;
  color: var(--text-muted) !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}

/* Floating Action Button (FAB) */
.fab-post {
  position: fixed !important;
  bottom: 30px !important;
  right: 30px !important;
  width: 60px !important;
  height: 60px !important;
  background: var(--accent) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 50% !important;
  box-shadow: 0 10px 25px rgba(224, 124, 60, 0.4) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 90 !important;
  transition: transform 0.2s !important;
}

.fab-post:hover {
  transform: scale(1.1) !important;
}

.back-to-bible-floating {
  position: fixed !important;
  bottom: 30px !important;
  left: 30px !important;
  width: 50px !important;
  height: 50px !important;
  background: var(--bg-card) !important;
  color: var(--text) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  border: 1px solid var(--border) !important;
  z-index: 90 !important;
  text-decoration: none !important;
}

/* Hide Desktop Nav on small screens (Use existing mobile header) */
@media (max-width: 768px) {
  .top-navbar { display: none !important; }
}



/* Adjusting Max Width to 80% on Desktop (Screens > 1024px) */
@media (min-width: 1024px) {
  .social-content {
    max-width: 80% !important;
  }
  
  .top-navbar {
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}



/* Global container Centering to 80% max-width on Desktop */
@media (min-width: 1024px) {
  .top-navbar, .social-content {
    max-width: 80% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}



/* Global Scrollbar Styling (Premium Dark) */
::-webkit-scrollbar {
  width: 8px !important;
  height: 8px !important;
}

::-webkit-scrollbar-track {
  background: transparent !important;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px !important;
  border: 2px solid var(--bg) !important;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent) !important;
}

/* Hide horizontal scrollbar if not needed */
body, .social-layout-single {
  overflow-x: hidden !important;
}



/* Global Sync: Navbar & Content Align to 80% Body width */
@media (min-width: 1024px) {
  .top-navbar {
    width: 80% !important;
    max-width: 80% !important;
    left: 10% !important; /* Forces centering of the sticky bar */
    margin-left: auto !important;
    margin-right: auto !important;
    border-radius: 0 0 20px 20px !important; /* Optional: adds a premium curve at the base */
  }
}

/* Ensuring no background leaks fuera del 80% en escritorio */
.social-layout-single {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}



/* Fix Top Navbar for Desktop (Fixed at top) */
@media (min-width: 1024px) {
  .top-navbar {
    position: fixed !important;
    top: 0 !important;
    left: 10% !important;
    width: 80% !important;
    z-index: 200 !important;
    border-radius: 0 0 16px 16px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
  }
  
  .social-content {
    padding-top: 100px !important; /* Space for the fixed nav */
  }
}

/* Ensure Floating Buttons are ALWAYS on top */
.fab-post, .back-to-bible-floating {
  display: flex !important;
  z-index: 1000 !important;
}

/* Hide floating buttons from mobile header overlaps? No, they are fixed. */



/* Premium Mini Login Button Style */
.login-mini-btn {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  padding: 8px 16px !important;
  border-radius: 30px !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
}

.login-mini-btn:hover {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
  box-shadow: 0 4px 14px rgba(224, 124, 60, 0.3) !important;
}

.login-mini-btn i {
  width: 16px !important;
  height: 16px !important;
}

/* Ensure only one is visible at a time in the navbar */
.nav-user .hidden {
  display: none !important;
}



/* Global View Sync: Ensuring 80% for ALL sections */
@media (min-width: 1024px) {
  .view {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }
}

.groups-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
  gap: 25px !important;
  width: 100% !important;
}



/* Global Expansion Fix: No more 700px limits */
.social-content, .view, .posts-list, #groups-container, .notifications-list {
  max-width: 100% !important;
  width: 100% !important;
}

@media (min-width: 1024px) {
  .social-content {
    max-width: 80% !important;
    margin: 0 auto !important;
  }
}



/* Responsive visibility cleanup */
@media (max-width: 768px) {
  /* Hide Desktop specific things on mobile */
  .top-navbar, .fab-post, .back-to-bible-floating {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  /* Hide Mobile specific things on desktop */
  .mobile-header, .mobile-bottom-nav {
    display: none !important;
  }
}



/* Premium Communities Search Bar */
.view-header-search {
  margin-bottom: 30px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

.header-main {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.search-bar-communities {
  position: relative !important;
  width: 100% !important;
}

.search-bar-communities i {
  position: absolute !important;
  left: 18px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: var(--text-muted) !important;
  width: 20px !important;
  pointer-events: none !important;
  transition: color 0.3s !important;
}

.search-bar-communities input {
  width: 100% !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid var(--border) !important;
  padding: 16px 20px 16px 52px !important;
  border-radius: 16px !important;
  color: var(--text) !important;
  font-size: 1.05rem !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

.search-bar-communities input:focus {
  outline: none !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 10px 40px rgba(224, 124, 60, 0.15) !important;
  transform: translateY(-2px) !important;
}

.search-bar-communities input:focus + i {
  color: var(--accent) !important;
}

.search-bar-communities input::placeholder {
  color: var(--text-muted) !important;
  opacity: 0.6 !important;
}

/* No results state */
.no-results {
  text-align: center !important;
  padding: 60px 20px !important;
  color: var(--text-muted) !important;
}

.no-results i {
  display: block !important;
  margin: 0 auto 15px !important;
  opacity: 0.3 !important;
}



/* Fix: Centering Lupa inside Search Bar */
.search-bar-communities {
  position: relative !important;
  display: block !important; /* Forces block context for absolute children */
  height: auto !important;
}

.search-bar-communities i {
  position: absolute !important;
  left: 16px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
  z-index: 10 !important;
}

/* Ensure the input doesn't have weird margins pushing it */
.search-bar-communities input {
  margin: 0 !important;
  display: block !important;
}



/* Indestructible Search Bar Sync */
.search-bar-communities {
  display: flex !important;
  align-items: center !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border-radius: 16px !important;
  border: 1px solid var(--border) !important;
  padding: 0 15px !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

.search-bar-communities i {
  position: static !important; /* Forces it to stay in the flex flow */
  margin-right: -25px !important; /* Overlaps slightly with text start (if needed) or just margin */
  margin: 0 12px 0 5px !important;
  color: var(--text-muted) !important;
  width: 20px !important;
  flex-shrink: 0 !important;
}

.search-bar-communities input {
  flex: 1 !important;
  background: transparent !important;
  border: none !important;
  padding: 16px 5px !important;
  margin: 0 !important;
  box-shadow: none !important;
  font-size: 1.05rem !important;
  color: var(--text) !important;
}

.search-bar-communities:focus-within {
  border-color: var(--accent) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  box-shadow: 0 10px 40px rgba(224, 124, 60, 0.15) !important;
  transform: translateY(-2px) !important;
}

.search-bar-communities:focus-within i {
  color: var(--accent) !important;
}



/* Community Card Hero Design */
.group-card {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: var(--bg-card) !important;
  border-radius: 20px !important;
  border: 1px solid var(--border) !important;
  transition: all 0.3s ease !important;
}

.group-card:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 15px 40px rgba(0,0,0,0.4) !important;
  border-color: var(--accent) !important;
}

.group-card-hero {
  height: 100px !important;
  width: 100% !important;
  position: relative !important;
}

.group-info {
  padding: 20px !important;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.group-privacy-icon {
  position: absolute !important;
  bottom: 0px !important;
  right: 0px !important;
  background: rgba(0, 0, 0, 0.4) !important;
  backdrop-filter: blur(5px) !important;
  color: #fff !important;
  width: 44px !important;
  height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 16px 0 0 0 !important;
  border-left: 1px solid rgba(255,255,255,0.1) !important;
  border-top: 1px solid rgba(255,255,255,0.1) !important;
}

.group-privacy-icon i {
  width: 18px !important;
  height: 18px !important;
}

.group-card-footer {
  padding: 15px 20px 20px !important;
}

.color-picker-simple {
  display: flex !important;
  align-items: center !important;
  gap: 15px !important;
  margin-top: 5px !important;
}

.color-picker-simple input[type='color'] {
  width: 50px !important;
  height: 50px !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  background: none !important;
}

.color-picker-simple span {
  font-size: 0.85rem !important;
  color: var(--text-muted) !important;
}



/* ==============================================
   LIGHT / DARK MODE THEME SYSTEM
   ============================================== */

/* DARK MODE (default) */
:root {
  --bg: #0f1117;
  --bg-card: #1a1d27;
  --bg-elevated: #1e2130;
  --text: #e8eaf6;
  --text-muted: #7c83a0;
  --border: rgba(255,255,255,0.07);
  --accent: #e07c3c;
  --accent-hover: #c96a2a;
  --accent-light: rgba(224,124,60,0.12);
  --shadow: rgba(0,0,0,0.5);
  --input-bg: rgba(255,255,255,0.04);
  --nav-bg: rgba(15,17,23,0.85);
}

/* LIGHT MODE */
[data-theme='light'] {
  --bg: #f0f2f8;
  --bg-card: #ffffff;
  --bg-elevated: #e8eaf0;
  --text: #1a1d2e;
  --text-muted: #6b7080;
  --border: rgba(0,0,0,0.09);
  --accent: #e07c3c;
  --accent-hover: #c96a2a;
  --accent-light: rgba(224,124,60,0.10);
  --shadow: rgba(0,0,0,0.12);
  --input-bg: rgba(0,0,0,0.04);
  --nav-bg: rgba(240,242,248,0.90);
}

/* Apply theme vars to key elements */
[data-theme='light'] body {
  background: var(--bg) !important;
  color: var(--text) !important;
}

[data-theme='light'] .top-navbar {
  background: var(--nav-bg) !important;
  border-bottom: 1px solid var(--border) !important;
}

[data-theme='light'] .post-card,
[data-theme='light'] .group-card,
[data-theme='light'] .modal-panel,
[data-theme='light'] .mobile-bottom-nav {
  background: var(--bg-card) !important;
  border-color: var(--border) !important;
}

[data-theme='light'] input,
[data-theme='light'] textarea,
[data-theme='light'] select {
  background: var(--input-bg) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

[data-theme='light'] .search-bar-communities {
  background: rgba(0,0,0,0.04) !important;
}

[data-theme='light'] .nav-link,
[data-theme='light'] .m-nav-btn {
  color: var(--text-muted) !important;
}

[data-theme='light'] .nav-link.active,
[data-theme='light'] .m-nav-btn.active {
  color: var(--accent) !important;
}

[data-theme='light'] .stat-pill {
  background: var(--bg-elevated) !important;
  color: var(--text-muted) !important;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: transparent !important;
  border: 1px solid var(--border) !important;
  color: var(--text-muted) !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  flex-shrink: 0 !important;
}

.theme-toggle-btn:hover {
  background: var(--accent-light) !important;
  color: var(--accent) !important;
  border-color: var(--accent) !important;
  transform: rotate(20deg) !important;
}

.theme-toggle-btn i {
  width: 16px !important;
  height: 16px !important;
}



/* Fix: Nav-User alignment - theme button and profile pill side by side */
.nav-user {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
}

.nav-user .theme-toggle-btn {
  position: static !important;
  flex-shrink: 0 !important;
}



/* ============================
   COMMUNITY DETAIL — REDESIGN PREMIUM
   ============================ */

#view-community-detail {
  padding: 0 !important;
  width: 100% !important;
}

/* Hero Banner */
.community-detail-hero {
  position: relative !important;
  width: 100% !important;
  height: 260px !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  margin-bottom: 28px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  padding: 22px 26px !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4) !important;
  background: linear-gradient(135deg, #e07c3c, #1a1d27) !important;
}

/* Vignette overlay for readability */
.community-detail-hero::after {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 100%) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

.community-detail-hero > * {
  position: relative !important;
  z-index: 1 !important;
}

/* Back Button */
.back-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  background: rgba(0, 0, 0, 0.35) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  border-radius: 30px !important;
  padding: 9px 18px !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  align-self: flex-start !important;
  transition: all 0.25s ease !important;
  letter-spacing: 0.02em !important;
}

.back-btn:hover {
  background: rgba(0,0,0,0.55) !important;
  border-color: rgba(255,255,255,0.4) !important;
  transform: translateX(-4px) !important;
}

.back-btn i {
  width: 15px !important;
  height: 15px !important;
}

/* Bottom Meta Row */
.community-detail-overlay {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-end !important;
  gap: 15px !important;
}

.community-detail-meta {
  flex: 1 !important;
  min-width: 0 !important;
}

.community-detail-meta h1 {
  font-size: 2rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  margin: 0 0 6px !important;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.2 !important;
}

.community-detail-meta p {
  color: rgba(255,255,255,0.8) !important;
  font-size: 0.92rem !important;
  margin: 0 0 14px !important;
  line-height: 1.4 !important;
}

.community-detail-stats {
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

.community-detail-stats span {
  background: rgba(0,0,0,0.35) !important;
  backdrop-filter: blur(6px) !important;
  color: rgba(255,255,255,0.95) !important;
  padding: 5px 14px !important;
  border-radius: 20px !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
}

.community-detail-stats span i {
  width: 13px !important;
  height: 13px !important;
}

/* Action buttons on the right */
.community-detail-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  align-items: flex-end !important;
  flex-shrink: 0 !important;
}

/* Community Feed Header */
.community-feed-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 20px !important;
  padding: 0 4px !important;
}

.community-feed-header h3 {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: var(--text) !important;
}

/* Empty feed state */
.empty-feed {
  text-align: center !important;
  padding: 60px 20px !important;
  color: var(--text-muted) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 10px !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .community-detail-hero {
    height: 220px !important;
    padding: 16px !important;
    border-radius: 16px !important;
  }

  .community-detail-meta h1 {
    font-size: 1.4rem !important;
  }

  .community-detail-overlay {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .community-detail-actions {
    align-items: flex-start !important;
    flex-direction: row !important;
  }
}



/* Fix: Allow JS to override hero background color - remove !important from default */
.community-detail-hero {
  background: linear-gradient(135deg, #e07c3c, #1a1d27) !important;
}

/* Use attribute selector to allow JS inline style to take effect */
.community-detail-hero[style] {
  background: unset !important;
}



/* DEFINITIVE FIX: Hero background via CSS custom property */
.community-detail-hero {
  background: var(--hero-bg, linear-gradient(135deg, #e07c3c, #1a1d27)) !important;
}



/* ============================
   COVER IMAGE UPLOAD AREA
   ============================ */

.cover-upload-area {
  width: 100% !important;
  height: 140px !important;
  border: 2px dashed var(--border) !important;
  border-radius: 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  overflow: hidden !important;
  position: relative !important;
  background: var(--input-bg) !important;
  transition: all 0.25s ease !important;
}

.cover-upload-area:hover {
  border-color: var(--accent) !important;
  background: var(--accent-light) !important;
}

.cover-upload-area:hover #coverPlaceholder {
  color: var(--accent) !important;
}

#coverPlaceholder {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 8px !important;
  color: var(--text-muted) !important;
  font-size: 0.88rem !important;
  text-align: center !important;
  padding: 10px !important;
  transition: color 0.2s !important;
}

#coverPlaceholder i {
  width: 32px !important;
  height: 32px !important;
  opacity: 0.5 !important;
}

#coverPlaceholder small {
  font-size: 0.75rem !important;
  opacity: 0.6 !important;
}

#coverPreview {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.cover-upload-area.has-image {
  border-style: solid !important;
  border-color: var(--accent) !important;
}



/* ============================
   MOBILE QA TWEAKS (Paso 3)
   ============================ */

/* 1. Modal scrolling and keyboard behavior on mobile */
@media (max-width: 768px) {
  .modal-panel {
    width: 95% !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    border-radius: 20px !important;
    padding: 20px !important;
  }
  
  /* Fix cover upload area for small screens */
  .cover-upload-area {
    height: 120px !important;
  }
  
  #coverPlaceholder span {
    font-size: 0.8rem !important;
  }
  
  /* Adjust community detail view for mobile */
  .community-detail-hero {
    min-height: 280px !important;
    padding: 15px !important;
    margin-bottom: 20px !important;
    border-radius: 16px !important;
  }

  .community-detail-meta h1 {
    font-size: 1.5rem !important;
    white-space: normal !important; /* Allow wrapping on small screens */
  }

  .community-detail-actions {
    margin-top: 10px !important;
    align-items: flex-start !important;
  }
  
  /* Make stats wrap properly */
  .community-detail-stats {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
}

/* 2. Extra padding at the bottom of feeds to prevent bottom-nav from covering content */
.posts-list, #groups-container, .notifications-list {
  padding-bottom: 90px !important; /* Leaves room for mobile bottom nav */
}

/* 3. Make comment inputs always accessible above the mobile keyboard */
.post-comments-section {
  padding-bottom: 10px !important;
}

.comment-input-box {
  background: var(--card-bg) !important;
  position: relative !important;
  z-index: 10 !important;
}


