/* ------------------------- */
/* Tablet (<= 1024px)        */
/* ------------------------- */
@media (max-width: 1024px) {

    /* HERO SECTION */
    .hero-container {
        flex-direction: column;
        text-align: center;
        padding: 60px 20px;
    }

    .hero-content {
        max-width: 600px;
        margin: 0 auto 20px auto;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1rem;
        line-height: 1.6;
    }

    .hero-visual {
        display: flex;
        justify-content: center;
    }

    .book-image {
        width: 100%;
    }

    /* CATEGORY SECTION - TABLET */
    .section-header p {
        font-size: 1rem;
    }

    .category-card {
        padding: 1.6rem 1rem !important;
    }

    .books-category-grid {
        gap: 1rem;
    }



    .book-item h3 {
        font-size: 1rem;
    }

    .features-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .feature-item {
        padding: 1.5rem 1rem;
        text-align: center;
    }

    .feature-item h3 {
        font-size: 1.2rem;
    }

    .feature-item p {
        font-size: 0.95rem;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
    }

    .feature-icon i {
        width: 28px;
        height: 28px;
    }

    /* ⭐ TESTIMONIALS - TABLET */
    .testimonials-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .testimonial-card p {
        font-size: 1rem;
    }

    .testimonial-author img {
        width: 50px;
        height: 50px;
    }

    .author-name {
        font-size: 1rem;
    }

}



/* ------------------------- */
/* Mobile (<= 768px)         */
/* ------------------------- */
@media (max-width: 768px) {

    section {
        padding: 0;
    }
    .notification-box{
        left: -210px;
    }
    .dropdown-menu {
        left: -25%;
        min-width: 165px;
    }

    /* HERO SECTION */
    .hero-container {
        padding: 40px 0px;
        gap: 0;
    }

    .hero-bg {
        padding: 0 1rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 0.8rem;
    }

    .search-wrapper {
        width: 100%;
    }

    .header-content {
        height: 40px;
    }

    .search-input {
        font-size: 0.9rem;
        height: 44px;
    }

    .btn.primary-btn {
        justify-content: center;
        height: 40px;
    }

    .searchb {
        width: 40%;
    }

    .book-image {
        width: 100%;
    }

    .glass-box {
        max-width: 400px;
        height: auto;
        border-radius: 10px;
        padding: 2px;
    }

    /* CATEGORY SECTION - MOBILE */
    .section-header h2 {
        font-size: 1.2rem;
    }

    .section-header p {
        font-size: 0.9rem;
    }

    .category-card {
        padding: 0.2rem 0 0.2rem 0px !important;
        font-size: 0.6rem;
    }

    .category-card i {
        width: 1.6rem !important;
        height: 1.6rem !important;
    }

    .books-category-grid {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 1rem !important;
    }

    .book-item h3 {
        font-size: 0.9rem;
        font-weight: 700;
    }

    .btn-donate {
        margin: 10% auto auto auto;
    }

    .bookscontainer {
        padding-left: 0;
        padding-right: 0;
    }

    .faq-question h3 {
        font-size: 14px;
    }

    .faq-answer p {
        font-size: 12px;
    }

    .faq-item {
        padding: 0.6rem
    }

    .faq-icon {
        width: 30px;
        height: 30px;
    }

    .faq-grid {
        width: 100%;
        margin: auto;
    }


    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }

    .last {
        width: 100%;
        margin-left: 57%;
    }

    .feature-item {
        padding: 1.2rem 0.6rem;
    }

    .cta-wrapper {
        flex-direction: column;
    }

    .cta-description {
        font-size: 0.8rem;
    }

    .cta-features {
        font-size: 0.8rem;
    }

    .feature-item h3 {
        font-size: 1rem;
    }

    .feature-item p {
        font-size: 0.85rem;
    }

    .feature-icon {
        width: 55px;
        height: 55px;
    }

    .feature-icon i {
        width: 24px;
        height: 24px;
    }

    /* librarypage filter section */
    .left-scroll-btn {
        margin-left: 5px !important;
    }

    .right-scroll-btn {
        margin-right: 5px !important;
    }

    /* TESTIMONIALS - MOBILE */
    .testimonials-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 1.2rem;
    }

    .testimonial-card {
        padding: 1.5rem 1rem;
    }

    .testimonial-card p {
        font-size: 0.95rem;
    }

    .testimonial-author img {
        width: 45px;
        height: 45px;
    }

    .author-title {
        font-size: 0.8rem;
    }

    .post-content {
        font-size: 12px;
    }

    .contentbox,
    .post-card {
        padding: 10px;
        margin: 0;
    }

    .post-image {
        max-height: 250px;
    }

    .post-images {
        max-height: 250px;
    }

    .action-btn {
        background: rgb(242 242 242);
    }

    body.dark-mode .action-btn {
        background: var(--bg-secondary);
    }

    .tool-btn {
        padding: 0;
        font-size: 0.8rem;
    }

    .commentsection {
        max-height: 250px !important;
    }

    .openpost {
        width: 370px;
    }

    .wrap {
        padding: 10px;
    }

    /* Header */
    .comment_header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .comment_header h4 {
        font-size: 1.2rem;
    }

    /* Post Owner */
    #commentOwner {
        padding: 8px !important;
    }

    #commentOwner .username {
        font-size: 0.9rem;
    }

    #commentOwner .post-meta {
        font-size: 10px !important;
    }

    #commentOwner .ownertext {
        font-size: 11px !important;
    }

    /* Comment List */
    .commentsection {
        max-height: 320px !important;
    }

    .comment-card {
        display: flex;
        gap: 10px;
        padding: 8px;
    }

    .comment-card .profileimage {
        width: 38px;
        height: 38px;
    }

    .comment-lines div {
        font-size: 13px !important;
    }

    .comment-lines span {
        font-size: 12px !important;
    }

    /* Input area */
    .input-area {
        display: flex;
        gap: 8px;
        margin-top: 10px;
    }

    .input-box {
        font-size: 14px;
        padding: 10px;
    }

    .send-btn svg {
        width: 22px;
        height: 22px;
    }

    .mentionedbook {
        width: 95%;
        left: 2%;
    }
}




/* ------------------------- */
/* Small Mobile (<= 480px)   */
/* ------------------------- */
@media (max-width: 480px) {

    /* HERO SECTION */
    .hero-container {
        padding: 30px 0px;
    }

    .hero-content p {
        font-size: 0.8rem;
    }

    .search-input {
        font-size: 0.85rem;
        height: 42px;
    }

    .btn.primary-btn span {
        font-size: 0.85rem;
    }

    .section-header p {
        font-size: 0.85rem;
    }

    .category-card {
        padding: 0.2rem 0 0.2rem 0px !important;
        font-size: 0.6rem;
    }

    .category-card i {
        width: 1.4rem !important;
        height: 1.4rem !important;
    }

    .books-category-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 1rem;
    }

    .book-item h3 {
        font-size: 0.85rem;
    }

    .feature-item {
        padding: 1rem 0.5rem;
    }

    .feature-item h3 {
        font-size: 0.95rem;
    }

    .feature-item p {
        font-size: 0.8rem;
    }

    .feature-icon {
        width: 48px;
        height: 48px;
    }

    .feature-icon i {
        width: 22px;
        height: 22px;
    }

    /* ⭐ TESTIMONIALS - SMALL MOBILE */
    .testimonials-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .testimonial-card {
        padding: 1.2rem;
    }

    .testimonial-card p {
        font-size: 0.85rem;
    }

    .testimonial-author img {
        width: 40px;
        height: 40px;
    }

    .author-name {
        font-size: 0.9rem;
    }

    .author-title {
        font-size: 0.75rem;
    }
}