 /* Estilos generales */
 :root {
    --primary-color: #3498db;
    --primary-hover: #2980b9;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --bg-color: #f9f9f9;
    --card-shadow: 0 5px 15px rgba(0,0,0,0.1);
    --card-shadow-hover: 0 10px 25px rgba(0,0,0,0.15);
    --border-radius: 8px;
  }
  
  body {
    font-family: 'Noto Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
  }
  
  /* Estructura principal */
  .articles-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
  }
  
  .main-content {
    position: relative;
  }
  
  /* Sección destacados */
  .featured-section {
    grid-column: 1 / -1;
    margin-bottom: 50px;
  }
  
  .section-title {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
  }
  
  .section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background: var(--primary-color);
  }
  
  .featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
  }
  
  /* Tarjetas de artículos (MANTENIENDO LAS CARD ORIGINALES) */
  .article-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  }
  
  .card-large {
    grid-column: span 1;
  }
  
  .article-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
  }
  
  .article-content {
    padding: 20px;
  }
  
  .article-meta {
    display: flex;
    justify-content: space-between;
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 10px;
  }
  
  .article-title {
    font-size: 1.3rem;
    margin: 0 0 15px 0;
    color: #2c3e50;
  }
  
  .article-excerpt {
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
  }
  
  .read-more {
    display: inline-block;
    padding: 8px 20px;
    background: #3498db;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
  }
  
  .read-more:hover {
    background: #2980b9;
  }
  
  /* Grid de artículos */
  .articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
  }
  
  /* Sidebar */
  .sidebar {
    position: sticky;
    top: 20px;
    align-self: start;
  }
  
  .sidebar-section {
    background: #fff;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
  }
  
  .sidebar-title {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f1f1;
  }
  
  .sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .sidebar-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f1f1;
  }
  
  .sidebar-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
  }
  
  .sidebar-list a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
    display: block;
  }
  
  .sidebar-list a:hover {
    color: var(--primary-color);
  }
  
  .sidebar-list small {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 5px;
  }
  
  /* Filtros y búsqueda */
  .filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }
  
  .filter-btn {
    padding: 8px 15px;
    background: #f1f1f1;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    font-size: 0.9rem;
  }
  
  .filter-btn:hover, .filter-btn.active {
    background: var(--primary-color);
    color: white;
  }
  
  .search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
  }
  
  .search-box {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
  }
  
  .search-btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    font-family: inherit;
  }
  
  .search-btn:hover {
    background: var(--primary-hover);
  }
  
  /* Paginación */
  .pagination {
    display: flex;
    justify-content: center;
    margin: 50px 0 30px;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .pagination button, .pagination span {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s;
    background: white;
    cursor: pointer;
    font-family: inherit;
  }
  
  .pagination button:hover:not(.active) {
    background: #f1f1f1;
  }
  
  .pagination .active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
  }
  
  .pagination .dots {
    border: none;
    padding: 8px 12px;
    cursor: default;
  }
  
  /* Mensaje sin resultados */
  .no-results {
    text-align: center;
    padding: 40px 20px;
    grid-column: 1 / -1;
    color: #666;
    font-size: 1.1rem;
  }
  
  .no-results .emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
  }
  
  /* Resaltado de búsqueda */
  .search-highlight {
    background-color: rgba(255, 255, 0, 0.3); /* Azul claro semitransparente */
    font-weight: bold;
    padding: 0 2px;
    border-radius: 2px;
    color: inherit; /* Mantiene el color original del texto */
  }
  
  /* Efecto de carga */
  .loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    z-index: 1000;
    animation: loading 1s infinite;
    display: none;
  }
  
  @keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
  }
  
  /* Responsive */
  @media (max-width: 992px) {
    .articles-page {
      grid-template-columns: 1fr;
    }
    
    .featured-grid {
      grid-template-columns: 1fr;
    }
    
    .sidebar {
      display: none;
    }
  }
  
  @media (max-width: 768px) {
    .section-title {
      font-size: 1.6rem;
    }
    
    .filters {
      justify-content: center;
    }
  }
  
  @media (max-width: 600px) {
    .pagination {
      gap: 5px;
    }
    
    .pagination button, .pagination span {
      padding: 6px 12px;
      font-size: 0.9rem;
    }
    
    .articles-grid {
      grid-template-columns: 1fr;
    }
    
    .search-container {
      flex-direction: column;
    }
    
    .search-btn {
      width: 100%;
    }
  }
  /* Estilos específicos para la sección de destacados */
.featured-section {
  width: 100%;
  padding: 30px;
  background: #f9f9f9;
  margin-bottom: 40px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

/* Asegura que los artículos destacados mantengan el diseño */
.featured-grid .card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.featured-grid .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #3498db;
  z-index: 9999;
  transform: scaleX(0);
  transform-origin: left;
  animation: load 2s ease-in-out;
}

@keyframes load {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

/* Estructura principal */
.featured-section {
  width: 100%;
  padding: 20px 0;
  overflow: hidden;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Corrección definitiva para móviles */
@media (max-width: 768px) {
  .featured-section {
      padding: 0;
  }
  
  .featured-grid {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 20px;
      padding: 0 15px;
  }
  
  .article-card {
      width: 100%;
      max-width: 400px;
      margin: 0 auto;
  }
  
  .card-large {
      order: -1; /* Opcional: coloca el artículo grande primero */
  }
}