/* ════════════════════════════════════════
   NEWEST AUTHORS SECTION
════════════════════════════════════════ */
.authors-section {
  position: relative;
  background: #fff;
  padding: 80px 24px 88px;
  overflow: hidden;
  margin-top: 40px;
}

.authors-bg {
  position: absolute;
  inset: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  background: rgba(245, 245, 245, 0.85);
  z-index: 0;
}

@media (min-width: 1280px) {
  .authors-bg {
    max-width: 1340px;
    border-radius: 40px;
  }
}

.authors-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
}

.authors-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 40px;
}

.authors-title {
  font-size: 34px;
  font-weight: 800;
  font-family: var(--font-heading);
  color: #111;
  letter-spacing: -0.6px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.authors-sub {
  font-size: 16px;
  color: #6b7280;
}

.authors-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 4px;
}

.authors-nav-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  display: grid; place-items: center;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.authors-nav-btn:hover { background: #f3f4f6; border-color: #d1d5db; }

/* Scroll wrapper */
.authors-track-wrap {
  overflow: hidden;
}

/* Cards grid — flex so it can scroll */
.authors-grid {
  display: flex;
  gap: 20px;
  transition: transform 0.4s ease;
  will-change: transform;
}

/* Single author card */
.author-card {
  flex: 0 0 calc((100% - 80px) / 5); /* 5 visible, 4 gaps of 20px */
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.author-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.1); }

.author-card-img {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.author-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* Article count badge — top left */
.author-card-count {
  position: absolute;
  top: 12px; left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border-radius: 100px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #111;
  box-shadow: 0 1px 6px rgba(0,0,0,0.12);
}

/* Body — avatar absolutely positioned to overlap image bottom */
.author-card-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 44px 12px 20px; /* top padding makes room for avatar */
  text-align: center;
}

.author-card-avatar {
  position: absolute;
  top: -36px; /* half the avatar height */
  left: 50%;
  transform: translateX(-50%);
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

.author-card-name {
  font-size: 16px;
  font-weight: 600;
  color: #111;
  text-align: center;
  margin-bottom: 4px;
}

.author-card-role {
  font-size: 14px;
  color: #6b7280;
  text-align: center;
}

@media (max-width: 1100px) {
  .author-card { flex: 0 0 calc((100% - 60px) / 4); }
}
@media (max-width: 768px) {
  .author-card { flex: 0 0 calc((100% - 40px) / 3); }
  .authors-title { font-size: 26px; }
}
@media (max-width: 540px) {
  .author-card { flex: 0 0 calc((100% - 20px) / 2); }
  .authors-section { padding: 48px 16px 56px; }
}
