* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: sans-serif;
}

/* Banner section */
.banner {
    background: url(../img/library/banner.png) center center no-repeat;
    background-size: cover;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    padding: 4rem;
    text-align: justify;
}

.banner-left {
    width: 60%;
    font-size: 20px;
    color: #fff;
}

.banner-head {
    color: #fdb311;
    position: relative;
    font-family: Roboto Condensed, sans-serif;
}

.banner-head::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 23%;
    border-radius: 4px;
    background-color: #fff;
    transition: width 0.3s ease;
}

.counter-wrapper {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.counter {
    margin: 2rem;
}

.count {
    color: #fff;
    display: inline;
    font-family: Roboto Condensed, sans-serif;

}

.counter span {
    font-size: 35px;
    color: #fff;
}

.counter p {
    color: #fff;
    font-family: poppins, sans-serif;
}


/* Section-2 */
.section2 {
    /* padding: 20px; */
    /* margin-top: 0.2rem; */
    display: flex;
    justify-content: center;
    /* background-color: rgb(224, 224, 224); */
    height: 250px;
    box-sizing: border-box;
    overflow: hidden;
}

.section2-main {
    display: flex;
    gap: 30px;
    /* flex-wrap: nowrap; */
    /* overflow-x: hidden; */
    padding-bottom: 10px;
    padding-right: 40px;
    scroll-behavior: smooth;
    align-items: center;
    scrollbar-width: none;
}

.section2-main::-webkit-scrollbar {
    display: none;
}

.slide {
    /* background: linear-gradient(145deg, #ffffff, #f0f0f0); */
    /* border-radius: 16px; */
    /* box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2); */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    min-width: 200px;
    height: 260px;
    flex-shrink: 0;
    margin-right: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.slide:hover {
    transform: translateY(-10px) scale(1.05);
    /* box-shadow: 0 16px 30px rgba(0, 0, 0, 0.4); */
}

.slide img {
    width: 100%;
    height: 70px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 10px;
}

.slide p {
    margin: 4px 0;
    font-weight: bold;
    color: #d1143e;
    font-size: 15px;
    text-align: center;
    font-family: poppins, sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}


/* JIMS para section */
.jims-para {
    font-weight: 500;
    padding: 0 7rem;
    margin-bottom: 3rem;
}

.jims-para p {
    font-size: 17px;
    text-align: center;
    font-family: sans-serif;
}


/* Accordion section */
:root {
    --size-header: 2.25rem;
    --size-accordion-title: 1.25rem;
    --size-accordion-content: 1rem;
    --animation-speed: 100;
    --slide-ease: cubic-bezier(0.86, 0, 0.07, 1);
    --slide-duration: calc(400ms * 100 / var(--animation-speed));
    --slide-delay: calc(450ms * 100 / var(--animation-speed));
    --circle-duration: calc(900ms * 100 / var(--animation-speed));
}

.sec4-body *,
.sec4-body *::before,
.sec4-body *::after {
    position: relative;
    box-sizing: border-box;
}

.sec4-body {
    font-family: 'Nunito', Arial, Helvetica, sans-serif;
    font-weight: 600;
    margin: 0;
    display: flex;
    justify-content: center;
    padding: 2rem;
    min-height: 100vh;
    scroll-behavior: smooth;
}

.sec4-main {
    max-width: 1200px;
    width: 100%;
}

.sec4-main>h1 {
    font-size: var(--size-header);
    color: #d1143e;
    text-align: center;
    margin-bottom: 2rem;
    font-family: Roboto Condensed, sans-serif;

}

.section4 {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.column {
    flex: 1 1 45%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.accordion {
    --circle-x: 1.8rem;
    --circle-y: 0;
    --circle-r: 200%;
    --circle-bg: #5a5cbdd3;
    /* ripple color */
    color: #fff;

    background: linear-gradient(320deg, rgba(253, 179, 17, 0.41) 0%, rgba(90, 92, 189, 0.35) 100%);

    background-color: #fff;
    border-radius: min(8px, 0.5rem);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 0fr;
    transition-timing-function: var(--slide-ease);
    transition-duration: 200ms, 200ms, var(--slide-duration);
    transition-property: opacity, box-shadow, grid-template-rows;
    transition-delay: 0ms, 0ms, var(--slide-delay);
    opacity: 0.9;
    position: relative;
    /* needed for ::before ripple */
}

.accordion:hover {
    box-shadow: 0 0 0 4px #d1143e;
}

.accordion.open {
    grid-template-rows: auto 1fr;
    transition: grid-template-rows var(--slide-ease) var(--slide-duration) var(--slide-delay);
}

.accordion,
.content {
    overflow: hidden;
}

.title button {
    width: 100%;
    text-align: left;
    padding: 0 1.25rem;
    font-size: var(--size-accordion-title);
    font-weight: 800;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    /* keep text above ripple */
    z-index: 1;
    font-family: Roboto Condensed, sans-serif;
}

.title button:focus-visible {
    background-color: hsl(0, 100%, 90%);
    outline: none;
}

.accordion.open .title button:focus-visible {
    background-color: hsl(183, 100%, 93%);
}

.title button::before {
    --chevron-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath fill='white' d='M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z'/%3E%3C/svg%3E");
    content: "";
    width: 0.65rem;
    aspect-ratio: 320 / 512;
    background-color: currentColor;
    mask-image: var(--chevron-icon);
    mask-size: 100% 100%;
    -webkit-mask-image: var(--chevron-icon);
    -webkit-mask-size: 100% 100%;
    transform: rotate(0deg);
    transition: transform var(--slide-ease) var(--slide-duration) var(--slide-delay);
}

.accordion.open .title button::before {
    transform: rotate(90deg);
}

.content {
    font-size: var(--size-accordion-content);
    line-height: 1.5;
    padding: 0 1.25rem;
    overflow: hidden;
}

.wrapper {
    padding: 0 0 1rem 0;
}

.content li {
    list-style: none;
    padding: 0.2rem 0;
}

.content a {
    color: currentColor;
    font-weight: 700;
    text-decoration: underline;
    font-family: poppins, sans-serif;

}

.accordion::before,
.accordion::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--circle-bg);
    /* solid ripple color */
    /* mix-blend-mode removed */
    transform-style: preserve-3d;
    transition-timing-function: ease;
    transition-property: opacity, clip-path, visibility;
    pointer-events: none;
    clip-path: circle(var(--r) at var(--circle-x) var(--circle-y));
    border-radius: inherit;
    z-index: 0;
    /* send behind text */
}

.accordion::before {
    --r: 0%;
    transition-delay: var(--circle-duration), var(--circle-duration), 0ms;
    transition-duration: 0ms, var(--circle-duration), 0ms;
    opacity: 0;
}

.accordion.open::before {
    --r: var(--circle-r);
    transition-delay: 0ms, 0ms, 0ms;
    transition-duration: 0ms, var(--circle-duration), 0ms;
    opacity: 1;
}

.accordion::after {
    --r: var(--circle-r);
    transition-delay: 0ms, 0ms, var(--circle-duration);
    transition-duration: 0ms, var(--circle-duration), 0ms;
    visibility: hidden;
    opacity: 1;
}

.accordion.open::after {
    --r: 0%;
    transition-delay: 0ms, 0ms, 0ms;
    transition-duration: 0ms, 0ms, 0ms;
    visibility: visible;
    opacity: 0;
}

@media (max-width: 768px) {
    .section4 {
        flex-direction: column;
    }

    .column {
        flex: 1 1 100%;
    }
}


/* Gallery section */

.gallery {
    margin-top: 1rem;
    margin-bottom: 7rem;
}

.main-gallery {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 0;
    width: 600px;
    height: 150px;
}

.main-gallery li {
    list-style: none;
    position: absolute;
    width: 200px;
    height: 200px;
    background: #000;
    transform: rotate(45deg);
    transition: 0.5s;
    margin: -100px;
    overflow: hidden;
    opacity: 0.5;
}

.main-gallery li:hover {
    opacity: 1;
}

.main-gallery li.item1 {
    top: 0;
    left: 0;
}

.main-gallery li.item2 {
    bottom: 0;
    left: 25%;
}

.main-gallery li.item3 {
    top: 0;
    left: 50%;
}

.main-gallery li.item4 {
    bottom: 0;
    left: 75%;
}

.main-gallery li.item5 {
    top: 0;
    left: 100%;
}

.main-gallery li .bg {
    width: 100%;
    height: 100%;
    transform: scale(1.1);
}

.main-gallery li.item1 .bg {
    background: url(../img/library/library2.jpg);
    background-size: cover;
    background-position: center;
}

.main-gallery li.item2 .bg {
    background: url(../img/library/library4.jpeg);
    background-size: cover;
    background-position: center;
}

.main-gallery li.item3 .bg {
    background: url(../img/library/library.jpg);
    background-size: cover;
    background-position: center;
}

.main-gallery li.item4 .bg {
    background: url(../img/library/library3.jpg);
    background-size: cover;
    background-position: center;
}

.main-gallery li.item5 .bg {
    background: url(../img/library/library2.jpg);
    background-size: cover;
    background-position: center;
}


/* Contact-section */
.hours {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hours p {
    font-size: 17.5px;
    font-weight: 500;
    font-family: poppins, sans-serif;
    /* margin-bottom: 3px; */
}

.hours h3 {
    font-size: 19px;
    margin-bottom: 4px;
    color: rgb(50, 41, 40);
    font-family: poppins, sans-serif;
}



/* ========== RESPONSIVE STYLES ========== */

@media (max-width: 1200px) {
    .banner {
        padding: 2rem;
    }

    .banner-right {
        padding-top: 3rem;
        padding-left: 3rem;
    }

    .jims-para {
        padding: 0 4rem;
    }
}

@media (max-width: 992px) {
    .counter-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }

    .banner-right {
        padding-top: 3rem;
        padding-left: 3rem;
    }

    .banner-head {
        font-size: 2rem;
        /* padding-top: 9rem; */
    }

    .count {
        font-size: 1.8rem;
    }

    .section2-main {
        padding-right: 10px;
    }

    .slide {
        min-width: 160px;
        height: 220px;
    }

    .jims-para {
        padding: 0 2rem;
    }

    .main-gallery {
        /* width: 100%;
        height: auto;
        flex-direction: column;
        transform: none;
        position: static; */
        display: none;
    }

    /* .main-gallery li {
        position: static;
        transform: none;
        margin: 10px;
        opacity: 1;
        width: 100%;
        height: 150px;
        rotate: 0deg;
    }

    .main-gallery li .bg {
        transform: none;
    } */

    .hours {
        margin-top: -3rem;
    }
}

/* Hide arrows by default */
.section2 .prev,
.section2 .next {
    display: none;
}

@media (max-width: 768px) {
    .banner {
        background: #5A5CBD !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 2rem 1rem;
        height: auto;
        text-align: center;
        background-position: center;
        gap: 1rem;
    }

    .banner-left {
        display: none;
        /* hide empty left section */
    }

    .banner-right {
        width: 100%;
    }

    .banner-head {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .counter-wrapper {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        justify-items: center;
        margin-top: 1.5rem;
    }

    .counter {
        margin: 0;
    }

    .count {
        font-size: 1.5rem;
    }

    .counter p {
        font-size: 0.95rem;
        text-align: center;
    }

    .banner-head::after {
        display: none;
    }

    /* .section2 {
        height: 100%;
    } */

    .section2 {
        overflow: hidden;
        position: relative;
        width: 100%;
    }

    .section2-main {
        display: flex;
        scroll-behavior: smooth;
        overflow-x: scroll;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        padding: 0 20px;
    }

    .section2-main::-webkit-scrollbar {
        display: none;
    }

    .slide {
        flex: 0 0 50%;
        /* Show 2 slides per view */
        scroll-snap-align: center;
        box-sizing: border-box;
    }

    .section2 .prev,
    .section2 .next {
        display: block;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background-color: #5A5CBD;
        color: white;
        border: none;
        font-size: 20px;
        padding: 0.5rem 0.8rem;
        cursor: pointer;
        z-index: 2;
        border-radius: 50%;
    }

    .section2 .prev {
        left: 10px;
    }

    .section2 .next {
        right: 10px;
    }

    /* .section2-main {
        overflow-x: auto;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .section2-main::-webkit-scrollbar {
        display: block;
        height: 6px;
    }

    .section2-main::-webkit-scrollbar-thumb {
        background-color: #ccc;
        border-radius: 10px;
    }

    .section2-main::-webkit-scrollbar-track {
        background-color: transparent;
    } */

    .jims-para p {
        font-size: 16px;
        text-align: justify;
    }

    .hours h3,
    .hours p {
        font-size: 16px;
    }
}

.read-more-btn {
    display: none;
    /* Hidden by default */
}

@media (max-width: 480px) {
    .banner {
        padding-right: 3rem;
    }

    .banner-head {
        font-size: 1.5rem;
    }

    /* .counter-wrapper {
        grid-template-columns: 1fr;
    } */

    .banner-head::after {
        display: none;
    }

    /* .slide {
        min-width: 120px;
        height: 180px;
    }

    .slide img {
        height: 60px;
    }

    .slide p {
        font-size: 13px;
    } */

    /* .jims-para {
        padding: 0 1rem;
    } */

    #jims-text {
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .read-more-btn {
        display: inline-block;
        /* Visible only below 480px */
        color: #5A5CBD;
        cursor: pointer;
        font-weight: bold;
        margin-top: 2px;
    }

    .expanded {
        display: block !important;
        -webkit-line-clamp: unset !important;
        overflow: visible !important;
    }

    .banner-head {
        font-size: 1.5rem;
    }

    .sec4-main>h1 {
        font-size: 1.75rem;
    }

    .title button {
        font-size: 1.1rem;
    }

    .content {
        font-size: 0.95rem;
    }
}