/* https://www.bestjquery.com/lab/pagination/ */

.pagination-outer {
    text-align: center;
}

/* Custom pagination styles */
.pagination {
    font-family: 'Abel', sans-serif;
}

.pagination .page-item .page-link,
.pagination .page-item-nav .page-nav-link { 
    color: #3d2862;
    background: #eee;
    font-size: 20px;
    font-weight: 600;
    line-height: 40px;
    height: 40px;
    width: 40px;
    padding: 0;
    margin: 0 7px;
    border: none;
    border-radius: 10px;
    display: block;
    position: relative;
    z-index: 1;
    transition: all 0.4s ease;
}

.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    color: #777;
    font-size: 25px;
    line-height: 35px;
}

/* Hover effect for page-item-nav */
.pagination .page-item-nav .page-nav-link:hover {
    color: #fff;
    background: #7651ba; /* Hover background color */
    transition: background-color 0.3s ease; /* Smooth transition for background color */
    cursor: pointer;  /* Add cursor pointer for hover */
}

/* Remove active state and prevent toggling for page-item-nav */
.pagination .page-item-nav .page-nav-link {
    background: #eee;  /* Reset background */
    color: #777;  /* Reset color */
}

/* Remove focus styles for page-item-nav to ensure it's non-focusable */
.pagination .page-item-nav .page-nav-link:focus {
    outline: none; /* Remove the default focus outline */
    box-shadow: none; /* Remove the default focus box-shadow */
}

/* Hover effect for regular page-items */
.pagination .page-item .page-link:hover, 
.pagination .page-item .page-link:focus {
    color: #fff;
    background: #7651ba; /* Hover background color */
    transition: background-color 0.3s ease; /* Smooth transition for background color */
}

/* Active page styles */
.pagination .page-item.active .page-link {
    background: #7651ba; /* Active background color */
    color: white; /* Active text color */
    border-radius: 10px; /* Border radius to match the others */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Optional: subtle shadow to highlight the active item */
}

/* Active state effect */
.pagination .page-item.active .page-link::before {
    opacity: 1;
    transform: scale(0.15); /* Visual effect like hover */
}

/* Add before element like in your original code */
.pagination .page-item .page-link::before,
.pagination .page-item-nav .page-nav-link::before {
    content: '';
    background-color: #fff;
    border-radius: 30px;
    opacity: 0;
    transform-origin: top right;
    position: absolute;
    left: 0;
    top: 5px;
    right: 5px;
    bottom: 0;
    z-index: -1;
    transition: all 0.3s ease;
}

/* Hover effect for active page-items */
.pagination .page-item .page-link:hover::before,
.pagination .page-item .page-link:focus::before,
.pagination .page-item.active .page-link:hover::before,
.pagination .page-item.active .page-link::before,
.pagination .page-item-nav .page-nav-link:hover::before,
.pagination .page-item-nav .page-nav-link:focus::before {
    opacity: 1;
    transform: scale(0.15);
}

/* Media Query for smaller screens */
@media only screen and (max-width: 480px) {
    .pagination {
        font-size: 0;
        display: inline-block;
    }

    .pagination .page-item,
    .pagination .page-item-nav {
        display: inline-block;
        vertical-align: top;
    }
}

@media (max-width: 490px) {
    .pagination .page-item .page-link,
    .pagination .page-item-nav .page-nav-link {
      height: 30px;
      width: 30px;
      line-height: 30px;
      font-size: 15px;
    }
}

@media (max-width: 350px) {
    .pagination .page-item .page-link,
    .pagination .page-item-nav .page-nav-link {
      height: 20px;
      width: 20px;
      line-height: 20px;
      font-size: 10px;
    }
}
  