/* ============================================================
   AUTHOR STYLES
   - Author box in single posts
   - All Authors listing page  (horizontal cards)
   - Author detail / archive page (flat, no box)
   Main color: #188ffe | Background: #ffffff
============================================================ */

/* ===== Author box avatar fix (overrides global img rules) ===== */
.author-avatar img {
  width: 80px !important;
  min-width: 80px !important;
  max-width: 80px !important;
  height: 80px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  object-position: center !important;
  border: 3px solid #188ffe;
  box-shadow: 0 4px 12px rgba(24, 143, 254, 0.15);
  display: block;
  flex-shrink: 0;
}

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

/* Author name link in single-post box */
.author-name {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  text-decoration: none;
  margin-bottom: 4px;
  transition: color 0.2s;
}
.author-name:hover {
  color: #188ffe;
}

/* Learn more link in single-post box */
.author-learn-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #188ffe;
  text-decoration: none;
  transition: gap 0.2s ease;
}
.author-learn-more:hover {
  gap: 10px;
  text-decoration: underline;
}

/* ===================================================================
   ALL AUTHORS PAGE  — horizontal cards
=================================================================== */

.authors-page-wrapper {
  background: #fff;
  min-height: 60vh;
  padding-top: 100px;
}

.authors-page {
  padding: 32px 20px 80px;
  max-width: 960px;
  margin: 0 auto;
}

.authors-page-breadcrumb,
.author-detail-breadcrumb {
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 18px;
}

.authors-page-breadcrumb p,
.author-detail-breadcrumb p {
  margin: 0;
}

.authors-page-breadcrumb a,
.author-detail-breadcrumb a {
  color: #188ffe;
  text-decoration: none;
}

.authors-page-breadcrumb a:hover,
.author-detail-breadcrumb a:hover {
  text-decoration: underline;
}

.authors-page-breadcrumb .separator,
.author-detail-breadcrumb .separator {
  color: #9ca3af;
}

/* Page Header */
.authors-page-header {
  text-align: center;
  margin-bottom: 50px;
}
.authors-page-header h1 {
  font-size: 38px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 14px;
  line-height: 1.2;
}
.authors-page-header p {
  font-size: 16px;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Authors list — vertical stack of horizontal cards */
.authors-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Horizontal author card */
.author-card {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 24px 28px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.author-card:hover {
  border-color: #188ffe;
  box-shadow: 0 6px 22px rgba(24, 143, 254, 0.1);
}

/* Left identity block (fixed width, centred) */
.author-card-identity {
  flex-shrink: 0;
  text-align: center;
  width: 130px;
}
.author-card-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #188ffe;
  box-shadow: 0 3px 12px rgba(24, 143, 254, 0.18);
  display: block;
  margin: 0 auto 10px;
}
.author-card-name {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
  line-height: 1.2;
}
.author-card-position {
  font-size: 11px;
  color: #188ffe;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.3;
}

/* Center body (bio + meta) */
.author-card-body {
  flex: 1;
  min-width: 0;
}
.author-card-bio {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.65;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.author-card-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #9ca3af;
}
.author-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.author-card-meta i {
  color: #188ffe;
  font-size: 13px;
}

/* Right action */
.author-card-action {
  flex-shrink: 0;
}
.author-card-btn {
  display: inline-block;
  padding: 9px 20px;
  background: #fff;
  color: #188ffe;
  border: 2px solid #188ffe;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.25s ease;
}
.author-card-btn:hover {
  background: #188ffe;
  color: #fff;
}

/* ===================================================================
   AUTHOR DETAIL PAGE  — flat, no card/border on profile header
=================================================================== */

.author-detail-page-wrapper {
  background: #fff;
  min-height: 60vh;
  padding-top: 100px; /* clear fixed header */
}

.author-detail-page {
  padding: 50px 20px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ---- Profile block: 2-column grid ---- */
/* Left (≈30%): avatar + name + position + stats  */
/* Right (≈70%): bio / about text                  */
.author-detail-profile {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid #f0f4f8;
  margin-bottom: 48px;
  align-items: start;
}

/* ---- Left column ---- */
.author-detail-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.author-detail-avatar {
  width: 200px !important;
  height: 200px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  object-position: center !important;
  border: 3px solid #188ffe;
  box-shadow: 0 4px 16px rgba(24, 143, 254, 0.18);
  display: block;
}

.author-detail-name {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
  margin: 0;
}

.author-detail-position {
  font-size: 12px;
  color: #188ffe;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.author-detail-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  align-items: center;
}

.author-detail-stat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #6b7280;
}
.author-detail-stat i {
  color: #188ffe;
  font-size: 13px;
  width: 14px;
  text-align: center;
}

/* ---- Right column: bio ---- */
.author-detail-right {
  padding-top: 4px;
}

.author-detail-bio-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 14px;
}

.author-detail-bio {
  font-size: 15px;
  color: #374151;
  line-height: 1.85;
  margin: 0;
}

/* ===== Author Posts Section ===== */
.author-posts-section {
  margin-top: 0;
}

.author-posts-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.author-posts-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}
.author-posts-count-badge {
  background: #188ffe;
  color: #fff;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 13px;
  font-weight: 600;
}

/* Posts grid */
.author-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.author-post-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  display: block;
}
.author-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(24, 143, 254, 0.12);
  border-color: #188ffe;
}

.author-post-img {
  width: 100%;
  height: 185px;
  object-fit: cover;
  display: block;
}
.author-post-img-placeholder {
  width: 100%;
  height: 185px;
  background: linear-gradient(135deg, #e8f4fe 0%, #dbeafe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.author-post-img-placeholder i {
  font-size: 36px;
  color: #93c5fd;
}

.author-post-info {
  padding: 16px 18px 18px;
}

.author-post-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.author-post-tag {
  font-size: 11px;
  background: rgba(24, 143, 254, 0.08);
  color: #188ffe;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(24, 143, 254, 0.18);
  font-weight: 500;
}

.author-post-title {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 7px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}
.author-post-card:hover .author-post-title {
  color: #188ffe;
}

.author-post-excerpt {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.author-post-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #9ca3af;
  flex-wrap: wrap;
}
.author-post-meta i {
  color: #188ffe;
  margin-right: 3px;
}

/* Pagination */
.author-posts-pagination {
  margin-top: 44px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}
.author-posts-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: #374151;
  border: 1px solid #e5e7eb;
  background: #fff;
  transition: all 0.2s ease;
}
.author-posts-pagination .page-numbers:hover,
.author-posts-pagination .page-numbers.current {
  background: #188ffe;
  color: #fff;
  border-color: #188ffe;
}
.author-posts-pagination .page-numbers.dots {
  border: none;
  background: transparent;
  color: #9ca3af;
  pointer-events: none;
}

/* No posts */
.author-no-posts {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}
.author-no-posts i {
  font-size: 48px;
  color: #d1d5db;
  margin-bottom: 14px;
  display: block;
}
.author-no-posts p {
  font-size: 15px;
}

/* ===================================================================
   RESPONSIVE
=================================================================== */

@media (max-width: 900px) {
  .author-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .author-detail-profile {
    grid-template-columns: 200px 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  /* All Authors cards — stack on mobile */
  .author-card {
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
  }
  .author-card-identity {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
  }
  .author-card-avatar {
    margin: 0;
    flex-shrink: 0;
  }
  .author-card-action {
    width: 100%;
  }

  /* Author detail — single column on mobile */
  .author-detail-profile {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .author-detail-left {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
  }
  .author-detail-stats {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .author-detail-page-wrapper {
    padding-top: 80px;
  }

  .authors-page-wrapper {
    padding-top: 80px;
  }
}

@media (max-width: 600px) {
  .authors-page {
    padding: 24px 15px 60px;
  }
  .authors-page-header h1 {
    font-size: 26px;
  }
  .author-detail-page {
    padding: 30px 15px 60px;
  }
  .author-posts-grid {
    grid-template-columns: 1fr;
  }
  .author-posts-header h2 {
    font-size: 20px;
  }
  .author-detail-left {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
