/* Variables CSS para diseño consistente */
:root {


  --primary-color: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --success-color: #10b981;
  --success-light: #34d399;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #06b6d4;
  --secondary-color: #6b7280;
  
  --bg-white: #ffffff;
  --bg-gray-50: #f9fafb;
  --bg-gray-100: #f3f4f6;
  --bg-gray-200: #e5e7eb;
  
  --text-gray-900: #111827;
  --text-gray-700: #374151;
  --text-gray-500: #6b7280;
  --text-gray-400: #9ca3af;
  
  --border-gray-200: #e5e7eb;
  --border-gray-300: #d1d5db;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 4px;
  --radius: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

/* Reset base */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Ensure page takes full viewport height */
}

.admin-container {
  flex-grow: 1; /* Allow admin-container to take up remaining space */
  display: flex; /* Make it a flex container */
  flex-direction: column; /* Stack its children vertically */
}

.admin-container .container-fluid {
  flex-grow: 1; /* Allow container-fluid to take up remaining space */
  display: flex;
  flex-direction: column;
}

.admin-container .row {
  flex-grow: 1; /* Allow the row to take up remaining space */
  display: flex;
  flex-wrap: wrap; /* For responsiveness */
  align-items: stretch; /* Make columns stretch to equal height */
}

/* Make the columns fill height */
.admin-container .row > div[class*="col-"] {
  display: flex;
  flex-direction: column;
}

/* Make the post list fill its column height */
#postList {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  max-height: none; /* Ensure no max-height is limiting it */
  height: 100%; /* Explicitly set height to 100% of parent */
}

#postList .admin-main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100%; /* Explicitly set height to 100% of parent */
}

#postsContainer {
  flex-grow: 1;
  overflow-y: auto;
}

.admin-container-new * {
  box-sizing: border-box;
}

/* HEADER SECTION */
.admin-header-section {
  background: var(--bg-white);
  border: 1px solid var(--border-gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px 32px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 4px solid var(--primary-color);
}

.admin-header-left h3 {
  margin: 0 0 8px 0;
  color: var(--text-gray-900);
  font-weight: 700;
  font-size: 28px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-info span {
  color: var(--text-gray-500);
  font-size: 14px;
  font-weight: 500;
}

.btn-logout {
  background: none;
  border: 1px solid var(--border-gray-300);
  padding: 6px 12px;
  border-radius: var(--radius);
  color: var(--text-gray-500);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: var(--bg-gray-50);
  border-color: var(--danger-color);
  color: var(--danger-color);
}

.admin-header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* BOTONES BASE */
.btn-admin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.btn-admin:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-admin.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-admin.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-admin.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-admin.btn-success:hover {
  background: #059669;
}

.btn-admin.btn-secondary {
  background: var(--secondary-color);
  color: white;
}

.btn-admin.btn-secondary:hover {
  background: #4b5563;
}

.btn-admin.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-admin.btn-danger:hover {
  background: #dc2626;
}

.btn-admin.btn-info {
  background: var(--info-color);
  color: white;
}

.btn-admin.btn-info:hover {
  background: #0891b2;
}

/* AI SECTION */
.admin-ai-section {
  margin-bottom: 24px;
}

.ai-panel {
  background: linear-gradient(135deg, #2A93C9 0%, #764ba2 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.ai-panel-header {
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.ai-panel-header:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ai-title {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-weight: 600;
  font-size: 18px;
}

.ai-title i {
  font-size: 20px;
}

.ai-toggle-icon {
  color: white;
  font-size: 16px;
  transition: transform 0.3s ease;
}

.ai-toggle-icon.rotated {
  transform: rotate(180deg);
}

.ai-panel-content {
  padding: 24px 32px;
  transition: all 0.3s ease;
  overflow: hidden;
}

.ai-panel-content.collapsed {
  max-height: 0;
  padding: 0 32px;
  opacity: 0;
}

.ai-content-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
}

.ai-input-section label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: 14px;
}

#initialContent {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  padding: 12px;
  color: white;
  font-family: inherit;
  resize: vertical;
  transition: all 0.2s ease;
  font-size: 14px;
}

#initialContent:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.15);
}

#initialContent::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.ai-buttons-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-buttons-section .btn-admin {
  white-space: nowrap;
}

/* MAIN CONTENT */
.admin-main-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  margin-bottom: 24px;
}

/* EDITOR AREA */
.admin-editor-area {
  display: flex;
  flex-direction: column;
}

.editor-container {
  background: var(--bg-white);
  border: 1px solid var(--border-gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  flex: 1;
}

.editor-toolbar {
  padding: 20px 32px;
  background: var(--bg-gray-50);
  border-bottom: 1px solid var(--border-gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.editor-toolbar label {
  margin: 0;
  font-weight: 600;
  color: var(--text-gray-900);
  font-size: 16px;
}

#postContent {
  width: 100%;
  min-height: 450px;
  border: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* SIDEBAR AREA */
.admin-sidebar-area {
  height: fit-content;
}

.sidebar-panel {
  background: var(--bg-white);
  border: 1px solid var(--border-gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px;
}

.sidebar-panel h4 {
  margin: 0 0 24px 0;
  color: var(--text-gray-900);
  font-weight: 600;
  font-size: 18px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--bg-gray-100);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text-gray-700);
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea,
.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-gray-300);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s ease;
  background: var(--bg-white);
  color: var(--text-gray-900);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
  display: block;
  margin-top: 4px;
  color: var(--text-gray-500);
  font-size: 12px;
}

/* IMAGE PREVIEW */
.image-preview {
  margin-top: 12px;
  border: 2px dashed var(--border-gray-300);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  background: var(--bg-gray-50);
  transition: all 0.3s ease;
  position: relative;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview.empty::before {
  content: "📷 Arrastra una imagen aquí o selecciona un archivo";
  color: var(--text-gray-400);
  font-size: 14px;
}

.image-preview:not(.empty) {
  border-style: solid;
  border-color: var(--success-color);
  background: var(--bg-white);
  padding: 12px;
}

.image-preview img,
.image-preview video {
  max-width: 100%;
  max-height: 120px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* POSTS SECTION */
.admin-posts-section {
  background: var(--bg-white);
  border: 1px solid var(--border-gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.posts-header {
  padding: 20px 32px;
  background: var(--bg-gray-50);
  border-bottom: 1px solid var(--border-gray-200);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease;
}

.posts-header:hover {
  background: var(--bg-gray-100);
}

.posts-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--text-gray-900);
  font-size: 16px;
}

.posts-badge {
  background: var(--primary-color);
  color: white;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
}

.posts-toggle-icon {
  color: var(--text-gray-500);
  font-size: 16px;
  transition: transform 0.3s ease;
}

.posts-toggle-icon.rotated {
  transform: rotate(180deg);
}

.posts-content {
  transition: all 0.3s ease;
  overflow: hidden;
}

.posts-content.collapsed {
  max-height: 0;
}

.posts-filters {
  padding: 16px 32px;
  background: var(--bg-gray-50);
  border-bottom: 1px solid var(--border-gray-200);
  display: flex;
  gap: 16px;
}

.posts-filters select {
  min-width: 150px;
}

#postsContainer {
  list-style: none;
  padding: 0;
  margin: 0;
}

#postsContainer li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border-gray-200);
  transition: background-color 0.2s ease;
}

#postsContainer li:hover {
  background: var(--bg-gray-50);
}

#postsContainer li:last-child {
  border-bottom: none;
}

.post-info {
  flex: 1;
}

.post-title {
  font-weight: 600;
  color: var(--text-gray-900);
  margin-bottom: 4px;
}

.post-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  color: var(--text-gray-500);
}

.status-badge {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
}

.status-draft {
  background: #fef3c7;
  color: #92400e;
}

.status-published {
  background: #d1fae5;
  color: #065f46;
}

.status-archived {
  background: #e5e7eb;
  color: #374151;
}

.post-actions {
  display: flex;
  gap: 8px;
}

.post-actions .btn-admin {
  padding: 6px;
  min-width: auto;
}

/* PAGINATION */
.pagination-wrapper {
  padding: 16px 32px;
  border-top: 1px solid var(--border-gray-200);
  background: var(--bg-gray-50);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-item {
  margin: 0;
}

.page-link {
  display: block;
  padding: 8px 12px;
  color: var(--text-gray-700);
  text-decoration: none;
  border: 1px solid var(--border-gray-300);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.page-link:hover {
  background: var(--bg-gray-50);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.page-item.active .page-link {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .admin-main-content {
    grid-template-columns: 1fr;
  }
  
  .admin-sidebar-area {
    order: -1;
  }
  
  .ai-content-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .ai-buttons-section {
    flex-direction: row;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .admin-header-section {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  
  .admin-header-actions {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .admin-ai-section,
  .editor-toolbar,
  .sidebar-panel,
  .posts-header,
  .posts-filters {
    padding-left: 20px;
    padding-right: 20px;
  }
  
  .ai-content-grid {
    gap: 12px;
  }
  
  .ai-buttons-section {
    flex-direction: column;
  }
  
  .posts-filters {
    flex-direction: column;
    gap: 12px;
  }
  
  #postsContainer li {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 480px) {
  .admin-container-new {
    padding: 10px 0;
  }
  
  .admin-header-section,
  .ai-panel-content,
  .editor-toolbar,
  .sidebar-panel {
    padding: 16px;
  }
  
  .admin-header-left h3 {
    font-size: 24px;
  }
  
  .user-info {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}

/* ANIMACIONES */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* LOADING STATE */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  color: var(--text-gray-500);
  font-style: italic;
}
/* BOTÓN FLOTANTE */
.floating-posts-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-xl);
    z-index: 999;
    transition: all 0.3s ease;
    color: white;
    font-size: 20px;
}

.floating-posts-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.3);
}

.floating-posts-btn:active {
    transform: scale(0.95);
}

/* Contador en el botón flotante */
.posts-count-float {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* OVERLAY DEL SIDEBAR */
.floating-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.floating-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* SIDEBAR FLOTANTE */



/* SIDEBAR FLOTANTE - ALTURA COMPLETA */
.floating-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: var(--bg-white);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
}

.floating-sidebar.active {
    transform: translateX(0);
}

/* Header del sidebar - ALTURA FIJA */
.floating-sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-gray-50);
    height: 80px; /* ALTURA FIJA */
    flex: none;
}

.floating-sidebar-header h4 {
    margin: 0;
    color: var(--text-gray-900);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

.close-sidebar-btn {
    background: none;
    border: none;
    padding: 8px;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-gray-500);
    transition: all 0.2s ease;
    font-size: 18px;
}

.close-sidebar-btn:hover {
    background: var(--bg-gray-200);
    color: var(--text-gray-700);
}

/* Contenido del sidebar - ALTURA CALCULADA */
/* Contenido del sidebar - ALTURA FLEXIBLE */

/* Filtros - ALTURA FIJA */
.posts-search-floating {
    padding: 15px 24px;
    border-bottom: 1px solid var(--border-gray-200);
    background: var(--bg-gray-50);
}

.posts-filters-floating {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-gray-200);
    display: flex;
    flex-direction: column; /* Stack rows vertically */
    gap: 15px; /* Space between rows */
    background: var(--bg-gray-50);
}

.filter-row {
    display: flex;
    gap: 12px;
}

.filter-group {
    flex: 1; /* Each group takes equal space */
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group.full-width {
    flex-basis: 100%;
}

.filter-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-gray-700);
    padding-left: 2px; /* Align with select border */
}

.posts-filters-floating select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-gray-300);
    border-radius: var(--radius);
    font-size: 14px;
    background: white;
    color: var(--text-gray-700);
}

.posts-filters-floating select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Lista de posts - SOLUCIÓN DEFINITIVA */
.floating-posts-list {    
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    min-height: 0;
}

.floating-posts-list #postsContainer {
    flex: 1;
    list-style: none;
    padding: 0;
    margin: 0 0 60px 0; /* Margen para la paginación */
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

/* Estilo de cada post */
.floating-posts-list #postsContainer li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-gray-200);
    transition: all 0.2s ease;
    min-height: auto;
}

.floating-posts-list #postsContainer li:hover {
    background: var(--bg-gray-50);
    transform: translateX(-2px);
    border-left: 3px solid var(--primary-color);
    padding-left: 21px;
}

.floating-posts-list #postsContainer li:last-child {
    border-bottom: none;
}

.floating-posts-list #postsContainer li.loading {
    justify-content: center;
    align-items: center;
    padding: 40px 24px;
    color: var(--text-gray-500);
    font-style: italic;
    border-left: none;
}

/* Contenido de cada post */
.floating-posts-list .post-info {
    flex: 1;
    padding-right: 12px;
    min-width: 0;
}

.floating-posts-list .post-title {
    font-weight: 600;
    color: var(--text-gray-900);
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.floating-posts-list .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-size: 11px;
    color: var(--text-gray-500);
}

.floating-posts-list .status-badge {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
}

.floating-posts-list .post-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.floating-posts-list .post-actions .btn-admin {
    padding: 6px 8px;
    font-size: 12px;
    min-width: auto;
    border-radius: 4px;
}

/* Paginación - ALTURA FIJA AL FONDO */
.floating-posts-list .pagination-wrapper {
    padding: 16px 24px;
    border-top: 1px solid var(--border-gray-200);
    background: var(--bg-gray-50);
    height: 60px; /* ALTURA FIJA */
    flex: none;
    position: absolute; /* POSICIÓN ABSOLUTA */
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-posts-list .pagination {
    justify-content: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}

.floating-posts-list .page-item {
    margin: 0;
}

.floating-posts-list .page-link {
    display: block;
    padding: 8px 10px;
    font-size: 12px;
    color: var(--text-gray-700);
    text-decoration: none;
    border: 1px solid var(--border-gray-300);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.floating-posts-list .page-link:hover {
    background: var(--bg-gray-100);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.floating-posts-list .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* SCROLLBAR PERSONALIZADO */
.floating-posts-list #postsContainer::-webkit-scrollbar {
    width: 6px;
}

.floating-posts-list #postsContainer::-webkit-scrollbar-track {
    background: var(--bg-gray-100);
}

.floating-posts-list #postsContainer::-webkit-scrollbar-thumb {
    background: var(--border-gray-300);
    border-radius: 3px;
}

.floating-posts-list #postsContainer::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}
.floating-sidebar-content {
  flex: 1; /* Esto es clave: permite que este contenedor ocupe todo el espacio vertical restante */
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Para manejar el desbordamiento si es necesario */
}
/* RESPONSIVE */
@media (max-width: 768px) {
    .floating-sidebar {
        width: 100vw;
    }
    
    .floating-sidebar-content {
        height: calc(100vh - 80px);
    }
    
    .floating-posts-list {
        height: calc(100vh - 280px);
    }
}







/* RESPONSIVE MEJORADO */
@media (max-width: 768px) {
    .floating-sidebar {
        width: 100vw; /* Ancho completo en móvil */
    }
    
    .floating-sidebar-header,
    .posts-filters-floating,
    .floating-posts-list .pagination-wrapper {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .floating-posts-list #postsContainer li {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .floating-posts-list #postsContainer li:hover {
        padding-left: 17px; /* Ajustar por el border */
    }
}

@media (max-width: 480px) {
    .floating-sidebar-header {
        padding: 20px 16px;
    }
    
    .floating-sidebar-header h4 {
        font-size: 16px;
    }
    
    .posts-filters-floating {
        padding: 16px;
    }
    
    .floating-posts-list #postsContainer li {
        padding: 12px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .floating-posts-list #postsContainer li:hover {
        padding-left: 13px;
    }
    
    .floating-posts-list .post-actions {
        flex-direction: row;
        justify-content: center;
        gap: 8px;
    }
    
    .floating-posts-list .pagination-wrapper {
        padding: 12px 16px;
    }
}

/* ANIMACIONES ADICIONALES */
.floating-posts-list #postsContainer li {
    animation: slideInFromRight 0.2s ease-out;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Estado cuando no hay posts */
.floating-posts-list .no-posts {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    color: var(--text-gray-400);
    text-align: center;
}

.floating-posts-list .no-posts i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}