.articles-hero {
  background: linear-gradient(135deg, var(--secondary-dark), var(--darker));
  padding: 12rem 0 8rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  outline: none;
  scroll-behavior: smooth;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -moz-tap-highlight-color: transparent;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.articles-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../content/image/backgforadminpanel/classic.webp")
    no-repeat center center/cover;
  opacity: 0.15;
  z-index: 0;
}

.articles-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.articles-hero h1 {
  font-size: 4.5rem;
  margin-bottom: 2rem;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.articles-hero p {
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 3rem;
}

.search-box {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  outline: none;
  scroll-behavior: smooth;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -moz-tap-highlight-color: transparent;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.search-box input {
  width: 100%;
  padding: 1.5rem 2rem;
  border-radius: 50px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  color: white;
  font-size: 1.6rem;
  padding-right: 5rem;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-box input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.search-box button {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

.search-box svg {
  width: 20px;
  height: 20px;
}

.articles-container {
  padding: 6rem 0;
  background-color: var(--darker);
  outline: none;
  scroll-behavior: smooth;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -moz-tap-highlight-color: transparent;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.articles-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 4rem;
  justify-content: center;
}

.filter-btn {
  padding: 0.8rem 2rem;
  border-radius: 50px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--gray);
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 3rem;
}

.article-card {
  background: var(--dark);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.article-image {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  
}

.article-card:hover .article-image img {
  transform: scale(1.05);
}

.article-badge {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  background: var(--primary);
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 100;
}

.article-content {
  padding: 2.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  
}

.article-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.article-excerpt {
  color: var(--gray);
  margin-bottom: 2rem;
  flex: 1;
    word-wrap: break-word; /* برای مرورگرهای قدیمی */
    overflow-wrap: break-word; /* استاندارد جدید */
}

.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.article-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.article-author img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.article-author span {
  font-size: 1.4rem;
}

.article-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 100;
  direction: ltr;
}

.article-link svg {
  width: 16px;
  height: 16px;
  transition: var(--transition);
}

.article-link:hover svg {
  transform: translateX(5px);
}

/* استایل‌های ریسپانسیو */
@media (max-width: 992px) {
  .articles-hero h1 {
    font-size: 3.8rem;
  }

  .articles-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .articles-hero {
    padding: 10rem 0 6rem;
  }

  .articles-hero h1 {
    font-size: 3.2rem;
  }

  .articles-hero p {
    font-size: 1.6rem;
  }
}

@media (max-width: 576px) {
  .articles-hero h1 {
    font-size: 2.8rem;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .article-card {
    max-width: 400px;
    margin: 0 auto;
  }
}


/* استایل‌های لودینگ و پیام‌ها */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #7c3aed;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    grid-column: 1 / -1;
}

.empty-state svg {
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #666;
}

.empty-state p {
    color: #888;
}