/* ===== Author Page ========== */
.author-profile-hero {
  background-color: var(--color-primary-light);
  padding: 60px 0;
  text-align: center;
  margin-bottom: 40px;
}
.featured-layout{
  padding-top: 4rem;
  padding-bottom: 2rem;

}
.author-profile-hero .author-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--color-text-dark);
}

.author-profile-hero img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  border: 5px var(--accent-primary) solid;
  box-shadow: var(--shadow-medium);
}

.author-profile-hero h1 {
  font-size: 3em;
  margin-bottom: 10px;
  color: var(--color-primary-dark);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.author-profile-hero p {
  font-size: 1.2em;
  max-width: 800px;
  margin: 0 auto 20px;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.about-author {
  background-color: var(--color-background-light);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 30px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-small);
}

.about-author h2 {
  font-size: 2em;
  margin-bottom: 20px;
  color: var(--color-primary-dark);
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 10px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.about-author p {
  font-size: 1.1em;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.author-articles h2 {
  font-size: 2em;
  margin-bottom: 20px;
  color: var(--color-primary-dark);
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 10px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.button {
    display: inline-block;
    padding: 5px 10px;
    margin: 2px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

.button.active {
    background-color: #0056b3;
}
.articles-grid a{
  text-decoration: none;
}
/* Responsive adjustments */
@media (max-width: 1024px) {
  .content-with-sidebar {
    flex-direction: column;
  }

  .main-column {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .sidebar {
    width: 100%;
    padding-right: 0;
    margin-top: 40px;
  }
}

@media (max-width: 768px) {
  .author-profile-hero {
    padding: 40px 15px;
  }
  
  .author-profile-hero img {
    width: 120px;
    height: 120px;
    border-width: 3px;
  }

  .author-profile-hero h1 {
    font-size: 2.2em;
    margin-bottom: 15px;
    padding: 0 15px;
  }

  .author-profile-hero p {
    font-size: 1em;
    padding: 0 15px;
    max-width: 100%;
  }

  .about-author {
    padding: 20px 15px;
    margin: 0 15px 30px;
  }

  .about-author h2,
  .author-articles h2 {
    font-size: 1.6em;
  }

  .articles-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  .author-profile-hero {
    padding: 30px 10px;
    margin-bottom: 30px;
  }
  
  .author-profile-hero img {
    width: 100px;
    height: 100px;
    margin-bottom: 15px;
    border-width: 2px;
  }

  .author-profile-hero h1 {
    font-size: 1.8em;
    margin-bottom: 10px;
    padding: 0 10px;
    line-height: 1.2;
  }

  .author-profile-hero p {
    font-size: 0.9em;
    padding: 0 10px;
    line-height: 1.5;
  }

  .about-author {
    padding: 15px 10px;
    margin: 0 10px 20px;
    border-radius: 8px;
  }

  .about-author h2,
  .author-articles h2 {
    font-size: 1.4em;
    margin-bottom: 15px;
  }

  .about-author p {
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 12px;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 0 10px;
  }

  .article-card {
    margin-bottom: 15px;
  }

  .article-card .article-content {
    padding: 15px;
  }

  .article-title {
    font-size: 1.1em !important;
    line-height: 1.4;
    margin-bottom: 8px;
  }

  .article-excerpt {
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 10px;
  }

  .article-meta {
    font-size: 0.85em;
  }

  .author-avatar {
    width: 24px !important;
    height: 24px !important;
  }

  /* Fix container padding */
  .container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  /* Fix featured layout */
  .featured-layout {
    flex-direction: column;
    gap: 20px;
  }

  .articles-section {
    width: 100%;
    margin-bottom: 2rem;
  }

  .trending-sidebar {
    width: 100%;
    padding: 0;
  }

  .sidebar-card {
    margin: 0 10px 15px;
    padding: 15px;
  }

  .sidebar-title {
    font-size: 1.2em;
  }

  /* Fix newsletter form */
  .newsletter-form {
    flex-direction: column;
    gap: 10px;
  }

  .newsletter-input {
    width: 100%;
    margin-bottom: 0;
  }

  .newsletter-btn {
    width: 100%;
    padding: 12px;
  }

  /* Fix browse button */
  .browse-more {
    padding: 20px 10px;
  }

  .browse-btn {
    padding: 12px 20px;
    font-size: 0.9em;
  }
}

/* للشاشات من 320px إلى 420px */
@media (max-width: 420px) {
  .author-profile-hero {
    padding: 25px 8px;
    overflow: hidden;
  }

  .author-profile-hero img {
    width: 90px;
    height: 90px;
    margin-bottom: 12px;
    border-width: 2px;
    flex-shrink: 0;
  }

  .author-profile-hero h1 {
    font-size: 1.5em;
    margin-bottom: 8px;
    padding: 0 5px;
    line-height: 1.1;
    hyphens: auto;
    word-break: break-word;
  }

  .author-profile-hero p {
    font-size: 0.8em;
    padding: 0 5px;
    line-height: 1.4;
    margin-bottom: 15px;
  }

  .about-author {
    margin: 0 5px 15px;
    padding: 10px 8px;
    border-radius: 6px;
    overflow: hidden;
  }

  .about-author h2 {
    font-size: 1.2em;
    margin-bottom: 12px;
    padding-bottom: 6px;
  }

  .about-author p {
    font-size: 0.85em;
    line-height: 1.5;
    margin-bottom: 10px;
  }

  .container {
    padding-left: 5px !important;
    padding-right: 5px !important;
    max-width: 100%;
    overflow-x: hidden;
  }

  .articles-grid {
    padding: 0 5px;
    gap: 12px;
  }

  .article-card {
    margin-bottom: 12px;
    overflow: hidden;
    min-width: 0;
  }

  .article-card .article-content {
    padding: 12px;
  }

  .article-title {
    font-size: 1em !important;
    line-height: 1.3;
    margin-bottom: 6px;
    word-break: break-word;
  }

  .article-excerpt {
    font-size: 0.85em;
    line-height: 1.4;
    margin-bottom: 8px;
    word-break: break-word;
  }

  .article-meta {
    font-size: 0.8em;
    flex-wrap: wrap;
    gap: 5px;
  }

  .author-info {
    flex-shrink: 0;
  }

  .author-avatar {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0;
  }

  .author-name {
    font-size: 0.9em;
    margin-right: 5px;
  }

  .article-date {
    font-size: 0.8em;
  }

  .sidebar-card {
    margin: 0 5px 12px;
    padding: 10px;
    overflow: hidden;
  }

  .sidebar-title {
    font-size: 1.1em;
    margin-bottom: 10px;
  }

  .newsletter-description {
    font-size: 0.85em;
    line-height: 1.4;
  }

  .newsletter-input {
    padding: 8px;
    font-size: 0.9em;
  }

  .newsletter-btn {
    padding: 10px;
    font-size: 0.85em;
  }

  .browse-more {
    padding: 15px 5px;
  }

  .browse-btn {
    padding: 10px 15px;
    font-size: 0.85em;
  }

  /* تحسينات للتخطيط العام */
  .featured-layout {
    overflow-x: hidden;
  }

  .articles-section {
    min-width: 0;
    overflow: hidden;
  }

  .trending-sidebar {
    min-width: 0;
    overflow: hidden;
  }

  /* تحسينات للعناصر النصية */
  * {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* إصلاح مشاكل الفيض */
  body {
    overflow-x: hidden;
  }

  .header-content {
    padding: 0 5px;
  }

  .footer {
    overflow-x: hidden;
  }

  .footer-content {
    padding: 0 5px;
  }
}

@media (max-width: 360px) {
  .author-profile-hero {
    padding: 20px 5px;
  }

  .author-profile-hero img {
    width: 80px;
    height: 80px;
  }

  .author-profile-hero h1 {
    font-size: 1.3em;
  }

  .author-profile-hero p {
    font-size: 0.75em;
  }

  .about-author {
    margin: 0 3px 12px;
    padding: 8px 6px;
  }

  .about-author h2 {
    font-size: 1.1em;
  }

  .about-author p {
    font-size: 0.8em;
  }

  .container {
    padding-left: 3px !important;
    padding-right: 3px !important;
  }

  .articles-grid {
    padding: 0 3px;
    gap: 10px;
  }

  .sidebar-card {
    margin: 0 3px 10px;
    padding: 8px;
  }

  .article-title {
    font-size: 0.9em !important;
  }

  .article-excerpt {
    font-size: 0.8em;
  }
}

@media (max-width: 320px) {
  .author-profile-hero {
    padding: 15px 3px;
  }

  .author-profile-hero img {
    width: 70px;
    height: 70px;
  }

  .author-profile-hero h1 {
    font-size: 1.2em;
    line-height: 1.0;
  }

  .author-profile-hero p {
    font-size: 0.7em;
    line-height: 1.3;
  }

  .about-author {
    margin: 0 2px 10px;
    padding: 12px 6px;
  }

  .about-author h2 {
    font-size: 1em;
    margin-bottom: 8px;
  }

  .about-author p {
    font-size: 0.75em;
    line-height: 1.4;
  }

  .container {
    padding-left: 2px !important;
    padding-right: 2px !important;
  }

  .articles-grid {
    padding: 0 2px;
    gap: 8px;
  }

  .article-card .article-content {
    padding: 8px;
  }

  .article-title {
    font-size: 0.85em !important;
    line-height: 1.2;
  }

  .article-excerpt {
    font-size: 0.75em;
    line-height: 1.3;
  }

  .sidebar-card {
    margin: 0 2px 8px;
    padding: 20px;
  }

  .sidebar-title {
    font-size: 1em;
  }
}.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border, #ddd);
  background: var(--color-background, #fff);
  color: var(--color-text-dark, #333);
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s ease;
}

.pagination button:hover {
  background: var(--color-primary-light, #f0f0f0);
}

.pagination button.active {
  background: var(--color-primary, #007bff);
  color: #fff;
  border-color: var(--color-primary, #007bff);
}
