/* ==========================================
   BOOK LIST 
   ========================================== */

/* Page Container */
.bk-page-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
  }
  
  /* Filters Container */
  .bk-filters-container {
    width: 100%;
    background-color: #ffffff;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
    font-family: 'Open Sans', sans-serif;
  }
  
  .bk-filters-container:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  }
  
  /* Filter form layout */
  .bk-filters-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
  }
  
  /* Search filter styling */
  .bk-search-filter {
    position: relative;
    flex: 1;
    min-width: 240px;
    max-width: 460px;
  }
  
  .bk-search-filter input {
    padding: 10px 16px;
    padding-left: 38px; /* Space for icon */
    padding-right: 80px; /* Space for button */
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    width: 100%;
    color: #333;
    background-color: #f9f9f9;
    font-family: 'Open Sans', sans-serif;
  }
  
  /* Search icon */
  .bk-search-filter::before {
    content: "🔍";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #9e9e9e;
    pointer-events: none;
    z-index: 1;
  }
  
  .bk-search-filter input:focus {
    border-color: rgba(39, 143, 255, 0.8);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(39, 143, 255, 0.1);
    outline: none;
  }
  
  .bk-search-filter .bk-search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 12px;
    background-color: rgba(39, 143, 255, 0.7);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 32px;
    font-size: 14px;
  }
  
  .bk-search-filter .bk-search-btn:hover {
    background-color: rgba(39, 143, 255, 0.9);
  }
  
  /* Filters group */
  .bk-filters-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
  }
  
  /* Individual filter containers */
  .bk-genre-filter, 
  .bk-level-filter, 
  .bk-access-filter, 
  .bk-sort-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
  }
  
  /* Label styling */
  .bk-filters-group label {
    white-space: nowrap;
    font-weight: 500;
    color: #555;
    font-size: 14px;
    margin: 0;
    font-family: 'Open Sans', sans-serif;
  }
  
  /* Select inputs styling */
  .bk-filters-group select {
    appearance: none;
    background-color: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 30px 8px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
    transition: all 0.3s ease;
    flex: 1;
    font-family: 'Open Sans', sans-serif;
  }
  
  .bk-filters-group select:hover {
    border-color: #bdbdbd;
  }
  
  .bk-filters-group select:focus {
    border-color: rgba(39, 143, 255, 0.8);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(39, 143, 255, 0.1);
    outline: none;
  }
  
  /* Active filter indication */
  .bk-filters-group select:not([value=""]) {
    border-left: 3px solid rgba(39, 143, 255, 0.7);
  }
  
  /* Books grid container */
  .bk-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
    gap: 30px;
    width: 100%;
    margin: 60px 0;
  }
  
  /* No books message */
  .bk-no-books {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 8px;
    color: #666;
    font-size: 16px;
    font-family: 'Open Sans', sans-serif;
  }
  
  /* Individual Book */
  .bk-book {
    position: relative;
    width: 100%;
    max-width: 225px;
    height: 350px;
    text-align: center;
    margin: 0 auto;
    transform-style: preserve-3d;
    transition: transform 0.5s ease-in-out;
  }
  
  /* Book Cover */
  .bk-book-cover {
    position: absolute;
    z-index: 1;
    width: 100%;
    height: 100%;
    transform-origin: 0 50%;
    background: #111;
    border: solid 1px rgba(218, 218, 218, 0.8);
    background-size: cover;
    border-radius: 3px;
    box-shadow:
        inset 4px 1px 3px rgba(255, 255, 255, 0.375),
        inset 0 -1px 2px rgba(0, 0, 0, 0.5),
        4px 4px 15px rgba(0, 0, 0, 0.4);
    perspective: 1000px;
    transform: rotateY(-10deg);
    transition: transform 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
    transition-property: transform, box-shadow;
  }
  
  /* Fallback for object-fit */
  .bk-book-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
    background-size: cover;
    background-position: center;
  }
  
  /* Placeholder Cover */
  .bk-placeholder-cover {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background-color: #333;
    border-radius: 3px;
    overflow: hidden;
  }
  
  /* Book Effect */
  .bk-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 100%;
    margin-left: 10px;
    border-left: 3px solid rgba(0, 0, 0, 0.118);
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
    transition: all 0.5s ease;
  }
  
  /* Light Effect */
  .bk-light {
    position: absolute;
    top: 0;
    right: 0;
    width: 90%;
    height: 100%;
    border-radius: 3px;
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.2) 100%);
    opacity: 0.1;
    transition: all 0.5s ease;
  }
  
  /* Hover Effects */
  .bk-book:hover {
    cursor: pointer;
  }
  
  .bk-book:hover .bk-book-cover {
    transform: perspective(2000px) rotateY(-75deg);
    transform-style: preserve-3d;
    box-shadow:
        inset 4px 1px 3px rgba(255, 255, 255, 0.375),
        inset 0 -1px 2px rgba(0, 0, 0, 0.5),
        10px 0px 10px -5px rgba(0, 0, 0, 0.188);
  }
  
  .bk-book:hover .bk-effect {
    width: 40px;
  }
  
  .bk-book:hover .bk-light {
    opacity: 1;
    width: 70%;
  }
  
  /* Book Inside */
  .bk-book-inside {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    position: relative;
    top: 2%;
    right: -7px;
    width: calc(100% - 2px);
    height: 96%;
    border: 1px solid grey;
    border-radius: 3px;
    background: white;
    box-shadow:
        10px 40px 40px -10px rgba(0, 0, 0, 0.188),
        inset -2px 0 0 grey,
        inset -3px 0 0 #dbdbdb,
        inset -4px 0 0 white,
        inset -5px 0 0 #dbdbdb,
        inset -6px 0 0 white,
        inset -7px 0 0 #dbdbdb,
        inset -8px 0 0 white,
        inset -9px 0 0 #dbdbdb;
  }
  
  /* Download Badge */
  .bk-download-bdg {
    min-width: 30px;
    margin-left: 18%;
    margin-right: 7px;
    padding: 10px;
    color: #3d3d3d;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1;
    border-radius: 10px;
    background: rgba(237, 251, 255, 0.5);
    border: 1px solid #ebebeb;
    cursor: pointer;
    transition: transform 0.3s ease;
  }
  
  .bk-download-bdg a {
    text-decoration: none;
    color: #3d3d3d;
  }
  
  .bk-download-bdg:hover {
    background: rgba(142, 231, 255, 0.51);
  }
  
  .bk-download-bdg:active {
    transform: scale(0.9);
  }
  
  /* Free Sample Title */
  .bk-free-sample-title {
    padding: 0 3px 0 10px;
    margin-left: 20%;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
  }
  
  /* Book Title */
  .bk-title {
    position: absolute;
    opacity: 0;
    top: -30px;
    font-size: 0.8rem;
    width: 100%;
    color: #333;
    text-align: center;
    height: 1px;
    display: flex;
    align-items: flex-end;
    transition: all 1s ease-in-out;
  }
  
  .bk-title p {
    width: 100%;
    margin: 0;
    line-height: 1.3;
    font-family: 'Open Sans', sans-serif;
  }
  
  /* Button Styles */
  .bk-btn {
    position: relative;
    background: rgba(190, 240, 255, 0.467);
    color: #495b63;
    font-weight: bold;
    padding: 10px 15px;
    font-size: 1rem;
    letter-spacing: 1px;
    border-radius: 20px;
    bottom: -20px;
    display: inline-block;
    opacity: 1;
    transition: all 0.3s ease-in-out;
    font-family: 'Open Sans', sans-serif;
    text-decoration: none;
  }
  
  .bk-book:hover .bk-btn {
    background-color: rgba(39, 143, 255, 0.63);
    color: #f3f3f3;
  }
  
  /* Book Title Hover */
  .bk-book:hover .bk-title {
    opacity: 1;
  }
  
  /* Pagination container */
  .bk-pagination-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
  }
  
  /* Animations */
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  .bk-filters-container {
    animation: fadeIn 0.3s ease-out;
  }
  
  /* ==========================================
     BOOK DETAILS
     ========================================== */
  
  .bk-detail-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  
  /* Detail Title */
  .bk-detail-title {
    text-align: center;
    font-size: 32px;
    color: #333;
    margin-bottom: 30px;
    font-family: 'Open Sans', sans-serif; 
  }
  
  /* Main Content Area */
  .bk-main-content {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
    margin-bottom: 40px;
  }
  
  /* Left Panel */
  .bk-left-panel {
    width: 35%;
    min-width: 300px;
    padding: 15px;
    font-family: 'Open Sans', sans-serif;
  }
  
  .bk-left-panel .bk-book:hover .bk-book-cover {
    transform: perspective(2000px) rotateY(-40deg);
    transform-style: preserve-3d;
    box-shadow:
      inset 4px 1px 3px rgba(255, 255, 255, 0.375),
      inset 0 -1px 2px rgba(0, 0, 0, 0.5),
      10px 0px 10px -5px rgba(0, 0, 0, 0.188);
  }
  
  /* Right Panel */
  .bk-right-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 60%;
    padding: 15px;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-family: 'Open Sans', sans-serif;
  }
  
  /* Right Panel Title */
  .bk-right-panel h2 {
    padding: 10px 15px;
    font-size: 1.5rem;
    color: #636363;
    margin-bottom: 20px;
    font-family: 'Open Sans', sans-serif;
  }
  
  /* Detail Properties */
  .bk-right-panel .bk-detail-prop {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 15px;
    font-family: 'Open Sans', sans-serif;
  }
  
  /* Property Unit */
  .bk-detail-prop .bk-prop-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px 15px;
    font-family: 'Open Sans', sans-serif;
  }
  
  /* Icon within Property Unit */
  .bk-prop-unit i {
    font-size: 24px;
    color: #636363;
  }
  
  /* Paragraph within Property Unit */
  .bk-prop-unit p {
    font-size: 12px;
    color: #6b6b6b;
    padding: 5px 0;
    font-family: 'Open Sans', sans-serif;
  }
  
  /* Detail Download Section */
  .bk-detail-dwn {
    padding: 15px;
    font-family: 'Open Sans', sans-serif;
  }
  
  .bk-detail-dwn p {
    font-size: 14px;
    color: #636363;
    line-height: 1.4;
    margin: 3px 10px;
  }
  
  /* Download Links */
  .bk-detail-dwn a {
    text-decoration: none;
    border: 1px solid #afafaf;
    border-radius: 5px;
    padding: 3px 7px;
    color: #636363;
    display: inline-block;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.1s ease;
    font-family: 'Open Sans', sans-serif;
  }
  
  .bk-detail-dwn a:hover {
    background-color: #eeeeee;
    color: #7c7c7c;
  }
  
  .bk-detail-dwn a:active {
    transform: scale(0.9);
  }
  
  /* Book Information */
  .bk-book-info {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
    font-family: 'Open Sans', sans-serif;
  }
  
  .bk-book-info p {
    margin-bottom: 10px;
  }
  
  /* Long Description */
  .bk-long-description {
    font-size: 16px; 
    color: #6b6b6b;
    line-height: 1.6;
    padding: 10px;
    text-indent: 25px;
    font-family: 'Arial', sans-serif;
    margin-bottom: 1em; 
    text-align: justify; 
    letter-spacing: 0.5px; 
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale; 
  }
  
  /* ==========================================
     SECTIONS - UPDATED ACCORDION STYLING
     ========================================== */
  
  /* Sections Container */
  .bk-sections {
    margin-top: 40px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: 'Open Sans', sans-serif;
  }
  
  /* Sections Header */
  .bk-sections-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid #eee;
  }
  
  .bk-sections-header:hover {
    background-color: #eaecef;
  }
  
  .bk-sections-header h2 {
    font-size: 20px;
    color: #444;
    margin: 0;
    font-weight: 600;
  }
  
  /* Sections container (holds all individual sections) */
  .bk-sections-container {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.5s ease;
  }
  
  .bk-sections-container.active {
    max-height: 2000px; /* Large enough to fit all content */
  }
  
  /* Toggle Icon */
  .bk-toggle-icon, .bk-section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
  }
  
  .bk-toggle-icon i, .bk-section-icon i {
    color: #666;
    font-size: 14px;
  }
  
  .bk-toggle-icon.active i, .bk-section-icon.active i {
    transform: rotate(180deg);
  }
  
  /* Individual Section */
  .bk-section {
    margin: 10px;
    background-color: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
  }
  
  .bk-section:hover {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  }
  
  /* Section Title */
  .bk-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    background-color: #f8f8f8;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
  }
  
  .bk-section-title:hover {
    background-color: #f0f0f0;
  }
  
  .bk-section-title.active {
    background-color: #f0f0f0;
    border-left: 3px solid #278fff;
  }
  
  .bk-section-title h3 {
    margin: 0;
    color: #555;
    font-size: 15px;
    font-weight: 500;
  }
  
  /* Section Description */
  .bk-section-description {
    height: 0;
    overflow: hidden;
    background-color: #fff;
    transition: height 0.3s ease;
    padding: 0 16px;
  }
  
  .bk-section-description.active {
    height: auto;
    padding: 15px 16px;
    border-top: 1px solid #eee;
  }
  
  .bk-section-description p {
    margin: 0;
    color: #666;
    font-size: 14px;
    text-align: justify;
    letter-spacing: 0.3px;
    line-height: 1.5;
  }
  
  /* ==========================================
     RESPONSIVE STYLES
     ========================================== */
  
  @media (max-width: 992px) {
    .bk-filters-form {
      flex-direction: column;
      align-items: stretch;
    }
    
    .bk-search-filter {
      max-width: none;
      width: 100%;
    }
    
    .bk-filters-group {
      width: 100%;
    }
    
    .bk-right-panel, .bk-left-panel {
      width: 100%;
    }
  }
  
  @media (max-width: 768px) {
    .bk-genre-filter, 
    .bk-level-filter, 
    .bk-access-filter, 
    .bk-sort-filter {
      flex-direction: column;
      align-items: flex-start;
      width: 100%;
    }
    
    .bk-filters-group select {
      width: 100%;
    }
    
    .bk-books-grid {
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 20px;
    }
    
    .bk-book {
      height: 280px;
    }
    
    .bk-download-bdg {
      margin-left: 10%;
      margin-right: 5px;
      padding: 8px;
      font-size: 0.7rem;
    }
    
    .bk-free-sample-title {
      font-size: 0.9rem;
      margin-left: 10%;
    }
    
    .bk-btn {
      padding: 10px 20px;
      font-size: 14px;
    }
    
    .bk-main-content {
      flex-direction: column;
      align-items: center;
    }
    
    .bk-left-panel,
    .bk-right-panel {
      width: 100%;
      min-width: unset;
    }
    
    .bk-detail-prop {
      justify-content: center;
    }
    
    .bk-prop-unit {
      margin: 10px 0;
    }
    
    .bk-detail-dwn a {
      padding: 5px 10px;
      font-size: 14px;
    }
    
    /* Responsive section styles */
    .bk-sections-header h2 {
      font-size: 18px;
    }
    
    .bk-section-title h3 {
      font-size: 14px;
    }
    
    .bk-section-description p {
      font-size: 13px;
    }
  }
  
  @media (max-width: 480px) {
    .bk-books-grid {
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
      gap: 15px;
    }
    
    .bk-book {
      height: 250px;
      max-width: 190px;
    }
    
    .bk-detail-title {
      font-size: 24px;
    }
    
    /* Additional responsive styles for sections */
    .bk-sections {
      margin-top: 30px;
    }
    
    .bk-sections-header {
      padding: 12px 15px;
    }
    
    .bk-section {
      margin: 8px;
    }
    
    .bk-section-title {
      padding: 10px 12px;
    }
    
    .bk-section-description.active {
      padding: 12px;
    }
  }