* {
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    margin: 0;
    padding: 0;
}

.include-header {
    background: linear-gradient(180deg, #c8e2ef 0%, #f5f5f5 100%) no-repeat padding-box;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    margin-top: 2%;
    padding-top: 5%;
}

.whole-section {
    background-color: #f5f5f5;
    overflow: hidden;
    min-height: 100vh;
}

body .container-fluid {
    width: 90%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 15px;
}

.head-quick-links {
    margin-left: 5%;
    margin-top: 1%;
}

.filter-by {
    padding: 1.1rem;
    color: #808285;
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.filter-option {
    font-size: 0.8rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    color: #212529;
}

.filter-option-acc {
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.sup-text {
    font-size: 0.6rem;
}

.study-material-heading {
    display: flex;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 500;
    text-align: center;
}

/* Horizontal Scrollable Cards Container */
.cards-container {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.cards-container::-webkit-scrollbar {
    height: 6px;
}

.cards-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.cards-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.cards-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.cards-row {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    min-width: fit-content;
    padding: 1rem 0;
}

.book-card {
    flex: 0 0 auto;
    width: 320px;
    background-color: transparent;
    border: none;
    text-decoration: none;
    color: #212529;
    transition: transform 0.2s ease;
}

.book-card:hover {
    transform: translateY(-2px);
    text-decoration: none;
    color: #212529;
}

.card-img-wrapper {
    background: #ededed;
    justify-content: center;
    display: flex;
    padding: 5%;
    border-radius: 15px 15px 0 0;
    height: 350px;
    align-items: center;
}

.card-img-wrapper img {
    height: 100%;
    width: 75%;
    object-fit: contain;
}

.card-body {
    padding: 1rem;
    flex: 1;
}

.card-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-text {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.text-col {
    flex: 1;
    padding-left: 0.5rem;
}

.chapter-icon {
    width: 18px;
    height: 18px;
}

.arrow-icon {
    width: 36px;
    height: 36px;
}

.text-icon-section {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

.icon-text {
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
}

.icon-text img {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
}

.course-material {
    font-size: 0.8rem;
    margin: 0;
}

.price {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.icon-text-group {
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .include-header {
        padding-top: 2%;
        margin-top: 1%;
    }

    body .container-fluid {
        width: 95%;
        padding: 0 10px;
    }

    .filter-sidebar {
        display: none;
    }

    .main-content {
        width: 100%;
    }

    .study-material-heading {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .book-card {
        width: 280px;
    }

    .card-title {
        font-size: 0.9rem;
    }

    .card-text {
        font-size: 0.7rem;
    }

    .course-material,
    .price {
        font-size: 0.7rem;
    }

    .chapter-icon,
    .arrow-icon {
        width: 26px;
        height: 26px;
    }

    .icon-text img {
        width: 16px;
        height: 16px;
    }

    .cards-row {
        gap: 1rem;
    }

    .head-quick-links {
        margin-left: 3%;
        margin-top: 2%;
    }

    /* Mobile Filter Dropdown */
    .mobile-filter-dropdown {
        /* background-color: #fff; */
        border-bottom: 1px solid #e0e0e0;
        position: relative;
        z-index: 999;
        margin-bottom: 1rem;
    }

    .filter-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        font-size: 14px;
        color: #333;
        font-weight: 500;
        cursor: pointer;
    }

    .filter-options {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, opacity 0.3s ease;
        /* background-color: #fff; */
    }

    .filter-options.show {
        max-height: 500px;
        opacity: 1;
    }

    .filter-options .filter-option {
        display: block;
        padding: 1rem;
        border-top: 1px solid #e0e0e0;
        color: #333;
        font-size: 0.8rem;
        text-decoration: none;
    }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 991px) {
    body .container-fluid {
        width: 92%;
    }

    .book-card {
        width: 300px;
    }

    .study-material-heading {
        font-size: 1.3rem;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .book-card {
        width: 340px;
    }
}

/* Content row styling */
.content-section {
    border-bottom: 1px solid #ddd;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.content-section:last-child {
    border-bottom: none;
}

/* Row with icon and text */
.info-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.info-row .icon-col {
    flex: 0 0 auto;
    margin-right: 0.5rem;
}

.info-row .text-col {
    flex: 1;
}
    /* Additional scroll indicator styles */
    .cards-container.scrollable {
        position: relative;
    }

    .cards-container.scrollable::before,
    .cards-container.scrollable::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 20px;
        width: 30px;
        pointer-events: none;
        z-index: 2;
        transition: opacity 0.3s ease;
        opacity: 0;
    }

    .cards-container.scrollable.scroll-left::before {
        left: 0;
        background: linear-gradient(to right, rgba(245, 245, 245, 1) 0%, rgba(245, 245, 245, 0) 100%);
        opacity: 1;
    }

    .cards-container.scrollable.scroll-right::after {
        right: 0;
        background: linear-gradient(to left, rgba(245, 245, 245, 1) 0%, rgba(245, 245, 245, 0) 100%);
        opacity: 1;
    }

    /* Enhanced hover effects */
    .book-card:hover .card-img-wrapper {
        transform: scale(1.02);
        transition: transform 0.3s ease;
    }

    .book-card:hover .arrow-icon {
        transform: translateX(3px);
        transition: transform 0.3s ease;
    }

    /* Focus states for accessibility */
    /* .book-card:focus {
        outline: 2px solid #f05969;
        outline-offset: 2px;
        border-radius: 15px;
    } */

    .filter-option:focus {
        background-color: #f8f9fa;
        outline: 1px solid #f05969;
    }

    /* Grab cursor for draggable containers */
    .cards-container {
        cursor: grab;
    }

    .cards-container:active {
        cursor: grabbing;
    }

    /* Smooth scrolling */
    .cards-container {
        scroll-behavior: smooth;
    }

    /* Better mobile touch handling */
    @media (max-width: 768px) {
        .filter-header {
            min-height: 48px;
            padding: 1rem;
            user-select: none;
        }

        .filter-options .filter-option {
            min-height: 48px;
            padding: 1rem;
            display: block;
            width: 100%;
        }

        .cards-container {
            -webkit-overflow-scrolling: touch;
            scroll-snap-type: x mandatory;
        }

        .book-card {
            scroll-snap-align: start;
        }
    }

    /* Loading animation for better UX */
    .cards-container {
        opacity: 0;
        animation: fadeIn 0.5s ease-in-out forwards;
    }

    @keyframes fadeIn {
        to {
            opacity: 1;
        }
    }

    /* High contrast mode support */
    @media (prefers-contrast: high) {
        .book-card {
            border: 2px solid #000;
        }

        .card-img-wrapper {
            border: 1px solid #000;
        }
    }

    /* Reduced motion support */
    @media (prefers-reduced-motion: reduce) {

        .book-card:hover .card-img-wrapper,
        .book-card:hover .arrow-icon,
        .cards-container,
        .filter-options {
            transition: none;
        }

        .cards-container {
            animation: none;
        }
    }