/* books.css - специфические стили для страницы книг */

/* Statistics for books page */
.books-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* Author Cards */
.authors-section {
  padding: 2rem 0 4rem;
}

.author-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease;
  scroll-margin-top: 240px;
}

.author-card:hover {
  box-shadow: var(--shadow-md);
}

.author-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px dashed var(--border-color);
  flex-wrap: wrap;
}

.author-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
  transition: transform 0.3s ease;
}

.author-card:hover .author-photo {
  transform: scale(1.05);
}

.author-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

.author-name span {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-left: 0.5rem;
}

/* Book List */
.book-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.book-item {
  margin: 0;
  transition: transform 0.2s ease;
}

.book-item:hover {
  transform: translateY(-3px);
}

.book-link {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.book-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.book-link:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--bg-primary) 0%, color-mix(in srgb, var(--primary-color) 5%, var(--bg-secondary)) 100%);
}

.book-link:hover::before {
  opacity: 1;
}

.book-title-en {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.35rem;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.book-link:hover .book-title-en {
  color: var(--primary-dark);
}

.book-title-ru {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.4;
  transition: color 0.2s ease;
  position: relative;
  padding-left: 1rem;
}

.book-title-ru::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--border-color);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.stat-card {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Tips Grid (переиспользуем из main.css, но при желании можно доопределить) */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.tip-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: left;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.tip-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.tip-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: var(--primary-color);
}

.tip-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Responsive adjustments for author cards */
@media (max-width: 768px) {
  .author-card {
    padding: 1rem;
    scroll-margin-top: 60px;
  }

  .author-info {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .author-name {
    font-size: 1.5rem;
  }

  .author-name span {
    display: block;
    margin-left: 0;
    font-size: 1.1rem;
  }

  .book-list {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .book-link {
    padding: 1rem 1.25rem;
  }
  
  .book-title-en {
    font-size: 1rem;
  }
  
  .book-title-ru {
    font-size: 0.9rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .books-stats {
    gap: 1rem;
  }

  .stat-card {
    min-width: 100px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .book-link {
    padding: 0.875rem 1rem;
  }
  
  .book-title-ru {
    padding-left: 0.75rem;
  }
}