/**
    item container
**/
.item-container {
    font-family: 'Source Sans Pro Topnav', 'Arial', sans-serif;
    display: flex;
    overflow-x: auto;
    gap: 10px; /* Spacing between items */
    padding: 1.2rem;
    margin: 1rem auto;
    border-radius: 10px;
    background-color: #1a1a1a; /* Match nav bar color */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    max-width: 80vw;
}

.item-container::-webkit-scrollbar {
    display: none;
}

.item-container-title {
    flex-shrink: 0;
    padding-right: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 3px #000;
    border-right: 1px solid #333;
    margin-right: 15px;
    display: flex;
    align-items: center;
}

/* Item Box (formerly category) */
.item-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 10px;
    border-radius: 8px;
    background-color: #282828; /* Slightly lighter than container */
    color: #eee;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease-in-out;
    position: relative; /* For tooltip positioning */
}

.item-box:hover {
    background-color: #333;
    transform: scale(1.05);
    color: #e99 !important;
}

.item-box img {
    width: 32px;
    height: 32px;
}

.item-box-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 5px;
}

.item-box-text {
    font-weight: bold;
    font-size: 0.9rem;
}

.item-box .tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.item-box:hover .tooltip {
    visibility: visible;
    opacity: 1;
}


/** book cards **/

.card-container {
    flex: 1;
    padding: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    justify-items: center;
    margin: 0 auto;
    max-width: 97vw;

}

.book-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    padding: 25px;
    text-align: left;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
}

.book-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.book-card::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 0, 0, 0.12);
    border-radius: 50%;
    z-index: 0;
}

.book-card h3 {
    margin-top: 0;
    color: #000;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.book-card p {
    color: #777;
    font-size: 0.95em;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.book-card a {
    transition: background-color 0.3s ease, transform 0.2s ease-in-out;
}

.book-card a:hover {
    transform: scale(1.02);
}

.book-card .btn-dark {
    background-color: #000;
}

.book-card .btn-dark:hover {
    background-color: #222;
}

.featured-book {
    animation: pulse 2s infinite;
}

