/* General Reset and Typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  color: #333;
  line-height: 1.6;
}

/* Container for 1200px width */
.wbam-container {
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 20px;
  margin-bottom: 50px !important;
}

/* Full-width container for header */
.wbam-container-full {
  width: 100vw;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

/* Main Content Wrapper */
.wbam-writer-content {
  padding: 60px 0 40px 0;
}

/* Bio Section */
.wbam-writer-bio-section {
  display: flex;
  gap: 30px;
  margin-bottom: 40px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 30px;
  animation: slideUp 0.8s ease-in-out;
}

.wbam-writer-bio-image {
  flex: 0 0 200px;
}

.wbam-writer-bio-image img {
  max-width: 100%;
  margin-top:15px;
  height: auto;
  border: 2px solid #ddd;  
  border-radius: 5px;
}

.wbam-writer-bio-text {
  flex: 1;
}

.wbam-writer-bio-text h2 {
  font-size: 1.8em;
  color: #222;
  margin-bottom: 15px;
  border-bottom: 2px solid #0073aa;
  padding-bottom: 10px;
}

.wbam-writer-bio-text h1 {
  font-size: 1.8em;
  color: #222;
  margin-bottom: 15px;
  border-bottom: 2px solid #0073aa;
  padding-bottom: 10px;
}

.wbam-writer-bio-content {
  font-size: 1.1em;
  color: #444;
}

.wbam-writer-bio-content p {
  margin-bottom: 15px;
}

/* Books Grid */
.wbam-writer-books-grid {
  margin-top: 40px;
}

.wbam-writer-books-grid h3 {
  font-size: 1.8em;
  color: #222;
  margin-bottom: 20px;
  border-bottom: 2px solid #0073aa;
  padding-bottom: 10px;
}

.wbam-books-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px;
}

.wbam-book-item {
  background: #fff;
  border-radius: 8px;
  text-align: center;
}

.wbam-book-item img {
  width: 100%;
  height: auto;
  border-radius: 5px;
  margin-bottom: 8px;
  max-height: none;
  object-fit: cover;
}

/* Related Books Grid (for Single Author Page) */
.wbam-related-books-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px;
  margin-top: 30px !important;
}

.wbam-related-book-item {
  background: #fff;
  border-radius: 8px;
  text-align: center;
}

.wbam-related-book-item img {
  width: 100%;
  height: auto;
  border-radius: 5px;
  margin-bottom: 8px;
  max-height: none;
  object-fit: cover;
}

.wbam-book-title {
  font-size: 15px;
  font-weight: 500;
  color: #333;
  margin-bottom: 5px;
  line-height: 1.3;
}

/* Authors Container Archive Grid */
.wbam-writers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 10px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  background: #fff;
  padding: 30px;
  border-radius: 10px;
}

/* Authors Archive Grid */
.wbam-writers-grid .wbam-writer-card {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 30px 20px 20px 20px;
  text-align: center;
  border: 1px solid #ddd;
  transition: transform 0.3s ease;
}

.wbam-writers-grid .wbam-writer-card:hover {
  transform: translateY(-5px);
}

/* authors-archive.php */
.wbam-writer-card img {
  max-width: 100%;
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 0;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.wbam-writer-card h3 {
  font-size: 1em;
  color: #222;
  margin-bottom: 10px;
  margin-top: -5px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
}

.wbam-writer-card h3 a {
  text-decoration: none;
  color: #000;
  font-size: 18px;
  line-height: 24px;
  display: inline-block;
  text-align: center;
}

.wbam-writer-card h3 a:hover {
  color: #005177;
}

/* Author Filter */
.wbam-writer-filter {
  margin-bottom: 20px;
}

.wbam-writer-filter select {
  padding: 10px;
  font-size: 1em;
  border-radius: 5px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
}

/* Product Page Author */
.book-writer {
  font-size: 1em;
  margin: 10px 0;
  color: #333;
}

.book-writer strong {
  color: #fff;
}

.wbam-by-text {
    color: #000;
}

/* Style for archive header */
.authors-archive-container-header {
  background: #272727;
  margin-bottom: 30px;
  padding-top: 9px;
  padding-bottom: 9px;
  text-align: center;
  width: 100%;
}

.authors-archive-header-background {
  padding: 20px;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.our-authors {
  color: #FFFFFF;
  font-family: "Roboto", Sans-serif;
  font-size: 33px;
  font-weight: 600;
  margin: 0;
  padding: 10px 0;
}

/* Pagination Styles */
.wbam-pagination {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  padding: 20px;
}

.wbam-pagination ul {
  list-style: none;
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.wbam-pagination ul li {
  display: inline-block;
}

.wbam-pagination ul li a,
.wbam-pagination ul li span {
  display: inline-block;
  padding: 10px 15px;
  font-size: 1em;
  color: #0073aa;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.wbam-pagination ul li a:hover {
  background-color: #0073aa;
  color: #fff;
}

.wbam-pagination ul li span.current {
  background-color: #0073aa;
  color: #fff;
  font-weight: 500;
}

.wbam-pagination ul li .prev,
.wbam-pagination ul li .next {
  font-weight: 500;
}

/* Slide-up Animation */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .wbam-books-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .wbam-related-books-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .wbam-books-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .wbam-related-books-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .wbam-writer-bio-section {
    flex-direction: column;
    padding: 20px;
  }
  .wbam-writer-bio-image {
    flex: 0 0 auto;
    text-align: center;
    margin-bottom: 10px;
  }
  .wbam-writer-bio-image img {
    max-width: 250px;
  }
  .wbam-container {
    padding: 0 15px;
    margin-bottom: 50px !important;
  }
  .wbam-writer-content {
    padding: 40px 0 20px 0;
  }
}

@media (max-width: 480px) {
  .wbam-books-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .wbam-related-books-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .wbam-writers-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 15px;
  }
  .wbam-writer-card {
    padding: 10px;
  }
  .wbam-writer-card h3 {
    font-size: 0.9em;
  }
  .wbam-writer-bio-text h1 {
    font-size: 1.7em;
    line-height: 1.2;
  }
  .wbam-pagination ul {
    flex-wrap: wrap;
    gap: 8px;
  }
  .wbam-pagination ul li a,
  .wbam-pagination ul li span {
    padding: 8px 12px;
    font-size: 1.1em;
  }
}

.wbam-writer-name {
  font-weight: 500;
  color: #2162a1;
}

.wbam-writer-name a {
  text-decoration: none;
  color: #0073aa;
}

.wbam-writer-name a:hover {
  text-decoration: none;
}

.ui-autocomplete {
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid #ddd;
  background: #fff;
}

.ui-menu-item {
  padding: 8px;
  cursor: pointer;
}

.ui-menu-item:hover {
  background: #f0f0f0;
}