    :root {
          --primary-color: #0840af;
          --secondary-color: #0d41ab;
      }
 .resource-card {
        position: relative;
        background: #fff;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
        padding: 1rem;
        margin-bottom: 1.5rem;
        transition: transform 0.3s ease;
      }

      .resource-card:hover {
        transform: translateY(-3px);
      }

      .resource-card img {
        width: 160px;
        height: 120px;
        object-fit: contain;
        margin-right: 1rem;
        flex-shrink: 0;
        border-radius: 8px;
      }

      .wave-container {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 80px;
        overflow: hidden;
        z-index: 1;
        pointer-events: none;
      }

      .wave {
        position: absolute;
        width: 200%;
        height: 100%;
        background: rgba(0, 123, 255, 0.25);
        border-radius: 33% 57% 55% 45% / 2% 41% 59% 65%;
        transform: translateX(0) translateY(30%);
        transition: transform 1s ease;
      }

      .resource-card:hover .wave {
        transform: translateX(-25%) translateY(15%) scaleY(1.1);
      }

      .card-content {
        position: relative;
        z-index: 2;
      }

      .text-decoration-none {
        text-decoration: none !important;
        color: inherit;
        display: block;
      }

      h6,
      small {
        text-decoration: none !important;
      }

      .top-bar-header, .search__btn {
        background-color: var(--primary-color) !important;
      }
      .text__color_1 {
        color: var(--secondary-color) !important;
      }


      /* homepage scrollable book list */
      .scrollable-section {
        max-height: 100vh;
        overflow-y: auto;
        padding-right: 10px;
      }
      .sticky-section {
        position: sticky;
        top: 0;
      }
      .category-thumb {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        object-fit: cover;
      }
      .resource-card,
      .resource-list {
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 10px;
        margin-bottom: 15px;
        background-color: #fdfdfd;
      }
      .toggle-buttons .btn {
        margin-left: 5px;
      }

      .category-box {
        transition: all 0.3s ease-in-out;
      }
      .category-box:hover {
        background-color: #0d6efd10; /* Light primary hover */
        border-color: var(--primary-color);
        color: var(--primary-color) !important;
      }
      .category-thumb {
        width: 60px;
        height: 60px;
        object-fit: cover;
        border-radius: 50%;
        margin: 0 auto;
        display: block;
      }

      #loginSection.active {
        border: 2px solid var(--primary-color);
        background-color: #e7f1ff;
        border-radius: 8px;
        padding: 15px;
        transition: background-color 0.3s, border 0.3s;
      }

      .hover-shadow:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        background-color: #f8f9fa;
      }
      .transition {
        transition: all 0.3s ease;
      }
      .header__text__32 {
        color: #fff;
        text-decoration: none;
        margin: 5px;
      }


       .card {
      border-radius: 12px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    }

    .left-card {
      padding: 20px;
    }

    .category-box {
      display: flex;
      align-items: center;
      gap: 12px;
      background-color: #ffffff;
      padding: 10px 12px;
      border-radius: 10px;
      border: 1px solid #dee2e6;
      margin-bottom: 10px;
      transition: all 0.2s ease;
    }

    .category-box:hover {
      border-color: #0d6efd;
      background-color: #f0f8ff;
    }

    /* .category-box img {
      width: 36px;
      height: 36px;
      object-fit: contain;
    } */

    .toggle-buttons button {
      margin-left: 5px;
    }

    .resource-grid .card img {
      height: 160px;
      object-fit: cover;
    }

    .resource-list .card {
      flex-direction: row;
    }

    .resource-list .card img {
      width: 150px;
      height: 100%;
      object-fit: cover;
      border-right: 1px solid #dee2e6;
    }

    .form-control {
      border-radius: 10px;
    }

 /* Container and resource item */
    #resourceContainer {
      /* display: flex; */
      /* flex-wrap: wrap; */
      /* gap: 1rem; */
    }

    .resource-item {
      /* List view default: full width */
      flex: 1 1 100%;
      max-width: 100%;
    }

    /* Grid view: 2 per row */
    #resourceContainer.grid-view .resource-item {
      flex: 1 1 calc(50% - 1rem);
      max-width: calc(50% - 1rem);
    }

    /* Card styling */
    .card {
      height: 100%;
      display: flex;
      flex-direction: column;
      transition: box-shadow 0.3s ease;
      cursor: pointer;
      border: 1px solid #ddd;
      border-radius: 0.5rem;
    }

    .card:hover {
      box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }

    .card-img-top {
      width: 100%;
      height: 70%;
      object-fit: contain;
      object-position: top center;
      box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3);
      z-index: 1;
      border-radius: 5px;
      background-color: #f0f0f0;
    }

    .card-body {
      padding: 1rem;
      flex-grow: 1;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .card-title {
      font-weight: 600;
      margin-bottom: 0.5rem;
    }

    .card-text {
      flex-grow: 1;
      color: #555;
      font-size: 0.9rem;
    }

    /* Toggle buttons */
    .toggle-buttons {
      margin-bottom: 1rem;
    }

    .toggle-buttons .btn {
      min-width: 80px;
    }


    /* detail page css */

            .m-50 {
            margin: 50px;
        }

        /* Sticky container for tabs and controls */
        .sticky-top-container {
            position: sticky;
            top: 0;
            z-index: 1030;
            background: white;
            border-bottom: 1px solid #ddd;
            padding-bottom: 0.5rem;
        }

        /* Container holding tabs and controls aligned horizontally */
        .tab-and-controls {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
        }

        /* Scrollable container for PDF pages */
        #pdf-container {
            width: 100%;
            height: 70vh; /* fixed height for scrolling */
            overflow-y: auto;
            overflow-x: hidden;
            border: 1px solid #ccc;
            -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
            padding: 10px;
            box-sizing: border-box;
        }

        /* Each canvas styling */
        #pdf-container canvas {
            display: block;
            margin: 0 auto 20px auto;
            width: 100% !important;
            height: auto !important;
            box-shadow: 0 0 5px rgba(0,0,0,0.1);
        }

        @media (max-width: 576px) {
            .m-50 {
                margin: 10px;
            }

            #pdf-container {
                height: 60vh;
            }
        }

        /* Buttons & input small and consistent size */
        .tab-and-controls button,
        .tab-and-controls input {
            flex-shrink: 0;
            height: 32px;
        }

        /* Allow input to grow but limit max width */
        #pageNumInput {
            max-width: 60px;
        }


          .custom-card {
      transition: background-color 0.3s ease, transform 0.3s ease;
    }

    .custom-card:hover {
      background-color: #f0f0f0;
      transform: translateY(-5px);
    }

    .card-img-top {
      height: 200px;
      object-fit: cover;
    }

    .card-title {
      text-align: center;
      margin-top: 10px;
      font-weight: bold;
    }

    .btn-outline-primary:hover
    {
      background-color: var(--secondary-color);
      color: #fff;
      border: 1px solid var(--secondary-color);
    }

    .search__btn:hover {
      background-color: var(--secondary-color);
      color: #fff;
    }
    a:hover {
        color:var(--primary-color);
    }
    .text-primary {
        color: var(--primary-color) !important;
    }
    .category-image {
        height: 36px;
        width: 36px;
        object-fit: cover;
        object-position: top center;
        border-radius: 50%;
    }
