/* Book Details Page Specific Styles */
  .book-details-hero {
    background: linear-gradient(rgba(26, 54, 93, 0.9), rgba(26, 54, 93, 0.95)), url('https://images.unsplash.com/photo-1524578271613-d550eacf6090?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    min-height: 250px;
    padding: 80px 0;
    color: white;
    text-align: center;
  }

  .book-details-hero .hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: white;
    font-family: 'Crimson Text', serif;
  }

  .breadcrumbs {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
  }

  .breadcrumbs a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.3s ease;
  }

  .breadcrumbs a:hover {
    color: white;
  }

  .separator {
    margin: 0 10px;
  }

  /* Book Details Section */
  .book-details-section {
    padding: 100px 0;
    background-color: var(--light);
  }

  .book-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
  }

  .book-cover {
    width: 60%;
    height: auto;
    max-width: 400px;
    border-radius: 8px;
    display: block;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .book-info {
    padding: 0;
  }

  .book-title {
    font-family: 'Crimson Text', serif;
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
    line-height: 1.2;
  }

  .book-description {
    color: black;
    line-height: 1.8;
    margin-bottom: 30px;
    font-size: 1.05rem;
  }

  .book-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
  }

  .book-meta-item {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-left: 4px solid var(--secondary);
  }

  .book-meta-label {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 5px;
    font-size: 0.9rem;
  }

  .book-meta-value {
    color: var(--dark);
    font-size: 1.1rem;
  }

  .action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 40px;
  }

  .action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    min-width: 180px;
  }

  .action-btn-primary {
    background-color: var(--secondary);
    color: var(--primary);
  }

  .action-btn-primary:hover {
    background-color: #d4b87a;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    color: var(--primary);
  }

  .action-btn-secondary {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--secondary);
  }

  .action-btn-secondary:hover {
    background-color: rgba(201, 169, 110, 0.1);
    transform: translateY(-3px);
  }

  /* About the Book Section */
  .about-book-section {
   
    padding: 10px;
    background-color: white;
  }

  .section-heading {
    font-family: 'Crimson Text', serif;
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
  }

  .section-heading:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 70px;
    height: 3px;
    background-color: var(--secondary);
  }

  .editor-info {
    background: rgba(201, 169, 110, 0.1);
    padding: 40px;
    border-radius: var(--radius);
    line-height: 1.8;
    color: var(--dark);
    border-left: 4px solid var(--secondary);
  }

  /* Authors Section */
  .authors-section {
    padding: 80px 0;
    background-color: #f8f9fa;
  }

  .authors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
  }

  .author-card {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
  }

  .author-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
  }

  .author-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
  }

  .author-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--secondary);
  }

  .author-image-placeholder {
    width: 80px;
    height: 80px;
    background: rgba(201, 169, 110, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--secondary);
  }

  .author-image-placeholder i {
    font-size: 30px;
    color: var(--secondary);
  }

  .author-name {
    font-family: 'Crimson Text', serif;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 5px;
  }

  .author-details {
    color: var(--gray);
    line-height: 1.6;
    max-height: 150px;
    overflow: hidden;
    position: relative;
  }

  .author-details.expanded {
    max-height: none;
  }

  .author-details:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, white 100%);
  }

  .author-details.expanded:after {
    display: none;
  }

  .more-link {
    color: var(--secondary);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    transition: var(--transition);
  }

  .more-link:hover {
    color: #d4b87a;
  }

  .more-link i {
    transition: transform 0.3s ease;
  }

  .more-link.expanded i {
    transform: rotate(180deg);
  }

  /* Archives Section (Modeled after nrjbe.in) */
  .archives-section {
    padding: 80px 0;
    background-color: #f8fafc;
    border-top: 1px solid rgba(0,0,0,0.06);
  }

  .archive-header-wrapper {
    margin-bottom: 30px;
    text-align: left;
  }

  .archive-subtitle {
    color: var(--gray, #64748b);
    font-size: 1.05rem;
    margin-top: 10px;
  }

  .archive-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 35px;
    background: white;
    padding: 16px 20px;
    border-radius: var(--radius, 10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
  }

  .year-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .year-pill-btn {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: var(--primary, #1a365d);
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition, all 0.3s ease);
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .year-pill-btn:hover {
    border-color: var(--secondary, #c9a96e);
    color: var(--secondary, #c9a96e);
    background: rgba(201, 169, 110, 0.08);
  }

  .year-pill-btn.active {
    background: var(--primary, #1a365d);
    color: white;
    border-color: var(--primary, #1a365d);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.2);
  }

  .archive-search-box {
    position: relative;
    min-width: 280px;
    flex: 0 1 340px;
  }

  .archive-search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.9rem;
  }

  .archive-search-box input {
    width: 100%;
    padding: 9px 36px 9px 38px;
    border: 1px solid #e2e8f0;
    border-radius: 25px;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition, all 0.3s ease);
    background: #f8fafc;
  }

  .archive-search-box input:focus {
    border-color: var(--secondary, #c9a96e);
    background: white;
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
  }

  .clear-search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    font-size: 0.85rem;
  }

  .archive-year-card {
    background: white;
    border-radius: var(--radius, 10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-bottom: 35px;
    overflow: hidden;
    border-left: 5px solid var(--primary, #1a365d);
    transition: var(--transition, all 0.3s ease);
  }

  .archive-year-header {
    background: #ffffff;
    padding: 20px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #edf2f7;
    flex-wrap: wrap;
    gap: 15px;
  }

  .year-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .year-calendar-badge {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(201, 169, 110, 0.15);
    color: var(--secondary, #c9a96e);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
  }

  .year-title {
    font-family: 'Crimson Text', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary, #1a365d);
    margin: 0;
  }

  .year-count-badge {
    background: rgba(26, 54, 93, 0.08);
    color: var(--primary, #1a365d);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .archive-papers-grid {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .paper-card {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 22px 24px;
    transition: var(--transition, all 0.3s ease);
    position: relative;
    border-left: 3px solid var(--secondary, #c9a96e);
  }

  .paper-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border-color: #cbd5e1;
  }

  .paper-meta-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
  }

  .paper-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
  }

  .paper-meta-badge.badge-year {
    background: rgba(26, 54, 93, 0.08);
    color: var(--primary, #1a365d);
  }

  .paper-meta-badge.badge-oa {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
  }

  .paper-meta-badge.badge-doi {
    background: rgba(201, 169, 110, 0.15);
    color: #926f2a;
  }

  .paper-card-title {
    font-family: 'Crimson Text', serif;
    font-size: 1.35rem;
    color: var(--primary, #1a365d);
    margin: 0 0 10px 0;
    line-height: 1.35;
    font-weight: 600;
  }

  .paper-author-info {
    color: #475569;
    font-size: 0.92rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  .paper-author-info .author-icon {
    color: var(--secondary, #c9a96e);
  }

  .paper-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
  }

  .paper-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }

  .paper-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition, all 0.25s ease);
  }

  .paper-btn-pdf {
    background: var(--secondary, #c9a96e);
    color: var(--primary, #1a365d);
  }

  .paper-btn-pdf:hover {
    background: #d4b87a;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(201, 169, 110, 0.3);
    color: var(--primary, #1a365d);
  }

  .paper-btn-cert {
    background: #f1f5f9;
    color: var(--primary, #1a365d);
    border: 1px solid #cbd5e1;
  }

  .paper-btn-cert:hover {
    background: #e2e8f0;
    color: var(--primary, #1a365d);
  }

  .paper-btn-doi {
    background: transparent;
    color: var(--secondary, #c9a96e);
    border: 1px solid var(--secondary, #c9a96e);
  }

  .paper-btn-doi:hover {
    background: rgba(201, 169, 110, 0.1);
    color: #926f2a;
  }

  .archive-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--radius, 10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
  }

  .archive-empty-state .empty-icon {
    font-size: 2.5rem;
    color: #cbd5e1;
    margin-bottom: 15px;
  }

  .archive-empty-state h4 {
    font-family: 'Crimson Text', serif;
    font-size: 1.5rem;
    color: var(--primary, #1a365d);
    margin-bottom: 8px;
  }

  .archive-empty-state p {
    color: var(--gray, #64748b);
    font-size: 0.95rem;
  }

  @media (max-width: 768px) {
    .archive-controls {
      flex-direction: column;
      align-items: stretch;
    }
    .archive-search-box {
      min-width: 100%;
      flex: 1 1 100%;
    }
    .archive-year-header {
      padding: 16px 20px;
    }
    .archive-papers-grid {
      padding: 18px 20px;
    }
    .paper-actions {
      flex-direction: column;
      width: 100%;
    }
    .paper-btn {
      width: 100%;
      justify-content: center;
    }
  }

  /* Related Books Section */
  .related-books-section {
    padding: 80px 0;
    background-color: #f8f9fa;
  }

  .related-books-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
  }

  .related-book-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    aspect-ratio: 2/3;
    background: white;
  }

  .related-book-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  }

  .related-book-link {
    display: block;
    height: 100%;
  }

  .related-book-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
  }

  .related-book-item:hover .related-book-image {
    transform: scale(1.05);
  }

  /* Responsive Design */
  @media (max-width: 1200px) {
    .book-content-grid {
      gap: 40px;
    }
   
    .related-books-grid {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  @media (max-width: 992px) {
    .book-content-grid {
      grid-template-columns: 1fr;
      gap: 40px;
    }
   
    .book-cover-container {
      max-width: 500px;
      margin: 0 auto;
    }
   
    .book-meta-grid {
      grid-template-columns: 1fr;
    }
   
    .related-books-grid {
      grid-template-columns: repeat(2, 1fr);
    }
   
    .section-heading {
      font-size: 1.8rem;
    }
  }

  @media (max-width: 768px) {
    .book-details-hero .hero-content h1 {
      font-size: 2rem;
    }
   
    .book-title {
      font-size: 2rem;
    }
   
    .authors-grid {
      grid-template-columns: 1fr;
    }
   
    .action-buttons {
      flex-direction: column;
    }
   
    .action-btn {
      width: 100%;
      justify-content: center;
    }
   
    .related-books-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 20px;
    }
   
    .chapter-files {
      flex-direction: column;
    }
   
    .file-link {
      justify-content: center;
    }
  }

  @media (max-width: 576px) {
    .book-details-section {
      padding: 60px 0;
    }
   
    .authors-section,
    .chapters-section,
    .related-books-section {
      padding: 60px 0;
    }
   
    .book-title {
      font-size: 1.8rem;
    }
   
    .editor-info {
      padding: 25px;
    }
   
    .author-card,
    .chapter-card {
      padding: 25px;
    }
   
    .related-books-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 15px;
    }
  }

  @media (max-width: 480px) {
    .book-details-hero {
      padding: 60px 0;
    }
   
    .related-books-grid {
      grid-template-columns: 1fr;
      max-width: 300px;
      margin: 40px auto;
    }
  }

/* Related Books Section - Mobile Focused Layout */
  .related-books-section {
    padding: 60px 0;
    background-color: #f8f9fa;
    margin-top: 40px;
  }

  .section-heading {
    font-family: 'Crimson Text', serif;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 30px;
    text-align: center;
    position: relative;
  }

  .section-heading:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 3px;
    background-color: var(--secondary);
    border-radius: 2px;
  }

  .related-books-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
  }

  .related-book-item {
    flex: 0 0 calc(50% - 20px);
    max-width: calc(50% - 20px);
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    background: white;
    position: relative;
  }

  .related-book-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
  }

  .related-book-link {
    display: block;
    height: 100%;
    text-decoration: none;
  }

  .related-book-image-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    padding-top: 140%; /* Taller aspect ratio for mobile */
  }

  .related-book-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
  }

  .related-book-item:hover .related-book-image {
    transform: scale(1.05);
  }

  /* For tablets and larger mobile screens */
  @media (min-width: 576px) {
    .related-book-item {
      flex: 0 0 calc(50% - 20px);
      max-width: calc(50% - 20px);
    }
   
    .related-book-image-container {
      padding-top: 130%;
    }
  }

  /* For tablets in landscape */
  @media (min-width: 768px) {
    .related-book-item {
      flex: 0 0 calc(33.333% - 20px);
      max-width: calc(33.333% - 20px);
    }
   
    .related-book-image-container {
      padding-top: 120%;
    }
  }

  /* For desktop/laptop */
  @media (min-width: 992px) {
    .related-books-container {
      justify-content: flex-start;
    }
   
    .related-book-item {
      flex: 0 0 calc(25% - 20px);
      max-width: calc(25% - 20px);
    }
   
    .related-book-image-container {
      padding-top: 100%; /* Square aspect ratio for desktop */
    }
  }

  /* For large desktops */
  @media (min-width: 1200px) {
    .related-book-item {
      flex: 0 0 calc(25% - 20px);
      max-width: calc(25% - 20px);
    }
  }

  /* For very small mobile devices */
  @media (max-width: 375px) {
    .related-books-container {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 15px;
    }
   
    .related-book-item {
      flex: 0 0 100%;
      max-width: 100%;
      margin-bottom: 0;
    }
   
    .related-book-image-container {
      padding-top: 150%;
    }
  }

  /* Touch-friendly improvements */
  @media (hover: none) {
    .related-book-item:hover {
      transform: none;
      box-shadow: var(--shadow);
    }
   
    .related-book-item:active {
      transform: scale(0.98);
    }
  }

  /* Performance optimization for mobile */
  @media (max-width: 768px) {
    .related-book-image {
      transform: none;
    }
  }

  /* Better spacing for mobile */
  @media (max-width: 576px) {
    .related-books-section {
      padding: 40px 0;
      margin-top: 30px;
    }
   
    .section-heading {
      font-size: 1.8rem;
      margin-bottom: 25px;
    }
   
    .related-books-container {
      gap: 15px;
    }
   
    .related-book-item {
      flex: 0 0 calc(50% - 15px);
      max-width: calc(50% - 15px);
    }
  }

  @media (max-width: 480px) {
    .related-books-section {
      padding: 30px 0;
    }
   
    .related-books-container {
      gap: 12px;
    }
   
    .related-book-item {
      flex: 0 0 calc(50% - 12px);
      max-width: calc(50% - 12px);
    }
   
    .related-book-image-container {
      padding-top: 140%;
    }
  }