/* Default: Extra-small devices such as small phones (less than 640px) */
/* Small devices such as large phones (640px and up) */
@media only screen and (max-width: 640px) {
    body p {
        font-size: var(--base-size);
        line-height: 1.4;
    }

    .hamburger {
        display: block;
        cursor: pointer;
    }

    .nav-links {
        position: absolute;
        z-index: 999;
        left: -100%;
        top: 3rem;
        flex-direction: column;
        background-color: #fff;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        row-gap: 1rem;
        padding: 8px 0;
    }

    .nav-links>div>* {
        flex-direction: column;
        align-items: center;
        row-gap: 1rem;
        cursor: pointer;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-item {
        margin: 2.5rem 0;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .search-box input {
        font-size: 1rem;
    }
}

@media only screen and (max-width: 1024px) {
    .hero-content {
        padding: 1rem;
        width: 100%;
    }
}

@media only screen and (max-width: 375px) {
    #section-archive .cards {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media only screen and (max-width: 425px) {
    .hero-content form input{
        font-size: var(--small) !important;
    }
}

@media only screen and (min-width: 320px) {
    :root {
        --scale: 1.1;
    }

    .hero-content form input {
        width: 100% !important;
        height: 35px !important;
    }

    .header-logo img,
    footer figure img {
        height: 50px !important;
    }

    .hero-content .hero-title h1 {
        font-size: var(--h3);
    }

    .hero-title p {
        font-size: var(--h5);
    }


    .swiper {
        height: 350px;
    }

    .swiper .card-header figure img {
        height: 2rem;
    }

    #recent-searches article {
        row-gap: 1rem;
        padding: 25px;
        justify-content: center;
    }

    #recent-searches article .card-content {
        font-size: 0.875rem;
    }

    .card-container .btn,
    #recent-searches article .btn {
        padding: 0.5rem 1rem;
    }

    #section-categories .container {
        justify-content: center;
    }

    #section-categories .card {
        width: 300px;
        justify-content: center;
    }

    .card-container {
        height: 300px;
        width: 300px;
        padding: 25px;
        justify-content: center;
    }

    .cards figure img {
        height: 50px;
    }

    #section-archive .section-heading .divider {
        margin: 1.5rem auto;
    }

    #section-archive .card-container {
        margin-bottom: 1rem;
    }

    .section-description {
        font-size: var(--base-size);
        margin: 0 10%;
    }

    footer .row>*:not(h4) {
        font-size: 1rem;
    }

    footer .row:nth-child(2) p {
        font-size: 0.8rem;
    }

    .footer-body .row {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    #section-about .section-body {
        display: grid;
    }

    #section-about .section-body div:nth-child(2) {
        grid-area: 2 / 2;
    }

    #section-about .section-body p {
        text-align: justify;
        grid-area: 1 / 1 / 2 / 3;
    }

    footer .footer-body .container {
        display: block;
    }

    .footer-body .container .row:nth-child(1) {
        padding: 0;
    }

    .footer-body .container ul li {
        margin-bottom: 0.5rem;
    }

    .footer-body .copyright {
        margin-top: 1rem;
    }

    .footer-body .copyright p {
        font-size: 0.875rem;
        opacity: 50%;
    }

    /* Search Page */
    .search-box {
        padding: 0 1rem;
    }

    .search-box input {
        font-size: 1.25rem;
    }

    .search-box .btn {
        font-size: 1.25rem;
    }

    #search-result-section .cards {
        display: block;
        margin-bottom: 1rem;
    }

    #search-result-section .card-container {
        width: 350px;
        height: 350px;
    }

    #section-department-detail .row {
        display: block;
    }

    #contact .container .contact-body .container,
    #contact .container .contact-body .container .content,
    #departments .cards,
    #section-service-detail .row,
    #section-service-detail .documents,
    #section-department-detail .filter-container,
    #section-department-detail .maps {
        display: block;
    }

    #departments .item,
    #section-department-detail .location-card {
        margin-bottom: 1rem;
    }

    #contact .heading p {
        padding: 0 10%;
    }

    #contact .container .contact-body .container {
        width: 100%;
    }
}

@media only screen and (max-width: 425px) {
    .arrow {
        display: none;
    }
}

@media only screen and (min-width: 640px) {
    :root {
        --scale: 1.2;
    }

    header .btn {
        width: 100%;
    }

    .header-logo img,
    footer figure img {
        height: 100px !important;
    }

    .nav-links {
        top: 5rem;
    }

    .hero-content .hero-title h1 {
        font-size: var(--h1);
    }

    .hero-content form input {
        height: 60px !important;
    }

    #section-categories .container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        justify-content: center;
        align-items: center;
    }

    #section-categories .card {
        margin: 0 auto;
    }

    #section-archive .card-container {
        padding: 1rem;
        margin-bottom: 0;
    }

    #section-archive .card-container .card-header {
        text-align: center;
    }

    .card-container .card-header figure {
        margin: 0 auto;
    }

    #section-archive .card-container .card-footer a.btn {
        font-size: 0.875rem;
        padding: 8px 1rem;
        margin: 0 auto;
    }

    #section-about .section-body p {
        font-size: 1rem;
    }

    #section-about .section-body img {
        width: 100%;
    }

    #section-about .section-body p:nth-child(3) {
        grid-area: 2/1/3/3;
    }
}

/* Medium devices such as tablets (768px and up) */
@media only screen and (min-width: 768px) {
    #section-categories .container {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        justify-content: center;
        align-items: center;
    }

    #section-categories .card {
        width: 200px;
    }

    #departments .cards,
    #section-department-detail .filter-container {
        display: grid;
    }

    #departments .cards {
        grid-template-columns: repeat(2, 1fr);
    }

    #departments .item {
        margin: 0;
    }
}

/* Large devices such as laptops (1024px and up) */
@media only screen and (min-width: 1024px) {
    .swiper {
        height: 450px;
    }

    .swiper-slide {
        width: 500px;
        height: 400px;
    }

    #recent-searches article {
        row-gap: 3rem;
        padding: 50px;
    }

    #recent-searches article .card-content {
        font-size: var(--base-size);
    }

    #section-categories .container {
        grid-template-columns: repeat(4, 1fr);
    }

    #departments .item,
    #section-archive .card-container {
        height: 400px;
        width: 400px;
        padding: 50px;
        row-gap: 2rem;
    }

    #section-archive .card-container .card-header {
        text-align: left;
    }

    .cards figure img {
        height: 100px;
    }

    .card-container .card-header figure {
        margin: 0;
    }

    #section-archive .card-container .card-footer a.btn {
        font-size: 1rem;
        padding: 8px 1rem;
        margin: 0;
    }

    #section-service-detail .row,
    #section-department-detail .row {
        display: grid;
    }

    #section-service-detail .documents,
    #section-department-detail .maps {
        display: grid;
    }

    #contact .container .contact-body .container {
        display: flex;
        padding: 0 2rem;
    }

    #contact .container .contact-body .container .content {
        display: grid;
    }

}

/* Largest devices such as desktops (1280px and up) */
@media only screen and (min-width: 1280px) {
    #section-categories .container {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media only screen and (min-width: 1300px) {
    #departments .cards {
        grid-template-columns: repeat(3, 1fr);
    }

    .search-box input {
        font-size: 1.5rem;
    }
}

@media only screen and (min-width: 1600px) {
    :root {
        --scale: 1.25;
    }

    #section-categories .section-content {
        max-width: 1440px;
        margin: 3rem auto;
    }

    #section-about .section-body {
        max-width: 1440px;
        margin: 0 auto;
    }

    #departments .item,
    #search-result-section .card-container {
        width: 450px;
        height: 450px;
    }

    #departments .cards {
        max-width: 1440px;
    }


    #search-result-section .cards {
        grid-template-columns: repeat(4, 1fr);
    }

}
