/* Extra large devices (1200px and down) */
@media screen and (max-width: 1200px) {
    #home-hero img#flag {
        top: 26%;
        right: 11%;
    }
}

/* Large devices (992px and down) */
@media screen and (max-width: 992px) {
    .why-choose .bull-img {
        max-width: 250px;
    }
    .why-choose .matador-img {
        max-height: 300px;
    }
    #home-hero .h1 {
        font-size: 100px;
    }
    #home-hero p {
        margin-bottom: 20px;
    }
    #blog-page #mainBlog .h3 {
        color: var(--th-color-3);
        font-size: 60px;
    }
    footer .bg-black,
    footer .bg-black a {
        font-size: 18px;
    }
    .footer a,
    .footer p {
        font-size: 22px;
    }
    .course-box {   
        flex-basis: 30%;
        max-width: 30%;
        border-radius: 30px;
    }
    .course-box-1 .co-box,
    .course-box-2 .co-box,
    .course-box-3 .co-box {
        padding: 20px 20px 60px 20px;
    }
    .h2 {
        font-size: 70px;
        line-height: 110%;
    }
    .h1 .text-red {
        font-size: 30px;
    }
    .h2 .text-red {
        font-size: 45px;
    }
    #home-hero img#flag {
        max-width: 120px;
        top: -45%;
        right: -15%;
    }
    .c-course-box h3 {
        font-size: 100px;
    }
    .os-btn {
        display: flex;
        flex-direction: column;
        gap: 20px;
        justify-content: center;
        text-align: center;
    }
    .osb-text {
        gap: 10px;
    }
}

/* Medium devices (768px and down) */
@media screen and (max-width: 768px) {
    #header {
        max-width: 768px;
    }
    .sa-img {
        max-width: 300px;
    }
    #blog-page #mainBlog .h3 {
        font-size: 40px;
    }
    .main-blog {
        padding: 100px 0 0 0;
    }
    .swiper-btn .fas {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 18px;
    }
    .why-choose .bull-img {
        bottom: 20px;
        left: 0;
        z-index: 2;
        width: 100%;
        max-width: 250px;
    }
    .why-choose .matador-img {
        position: absolute;
        bottom: 20px;
        right: 0;
        z-index: 1;
        width: auto;
        max-height: 250px;
    }
    .nav {
        padding: 15px;
    }
    .nav .nav-logo {
        max-width: 50px;
    }
    #btn-menu,
    #btn-close {
        cursor: pointer;
        max-width: 100px !important;
    }
    #home-hero .h1 {
        font-size: 80px;
        text-align: center;
    }
    #home-hero img#flag {
        max-width: 150px;
        top: -109%;
        right: -22%;
    }
    .course-container {
        justify-content: space-evenly;
    }
    .course-box {
        flex-basis: 45%;
        max-width: 45%;
        border-radius: 30px;
        transform: rotate(0deg);
        margin-top: 20px;
    }
    .course-box-1 .co-box,
    .course-box-2 .co-box,
    .course-box-3 .co-box,
    .course-box-4 .co-box {
        padding: 20px;
    }
    .know-box {
        flex-direction: column;
        padding: 20px;
    }
    .know-mid {
        width: 0px !important;
        min-height: 0px !important;
    }
    .know-left {
        max-width: 100%;
    }
    .know-right {
        max-width: 100%;
        padding: 0;
        margin-top: 30px;
    }
    .course-box h3 {
        font-size: 50px;
    }
    .know-left p {
        margin-bottom: 20px;
    }
    .h1 .text-red {
        font-size: 45px;
    }
    .h2 {
        font-size: 55px;
    }
    .h2 .text-red {
        font-size: 32px;
    }
    .h3 {
        font-size: 32px;
        line-height: 110%;
    }
    .h3 .text-red {
        font-size: 20px;
    }
    .th-btn {
        font-size: 22px;
        padding: 10px 24px;
    }
    .testimonal-box {
        transform: rotate(0deg) !important;
    }
    #testimonial-b .col-6 {
        padding: 0px;
    }
    .footer img {
        max-width: 100px;
    }
    .footer {
        padding: 50px 15px;
    }
    #flag {
        display: none;
    }
    #home-hero img#ball {
        max-width: 120px;
        bottom: 65px;
        left: 5px;
    }
    .os-btn-box {
        display: flex;
        height: auto;
        overflow-y: scroll;
        padding-right: 10px;
    }
    .os-btn-box::-webkit-scrollbar {
        height: 4px;
    }
    .os-tab {
        max-width: 700px;
        text-align: center;
    }
    .os-btn {
        flex: 1;
    }
    .osb-img {
        width: 100%;
        max-width: 90px !important;
        min-width: 90px !important;
        margin: auto;
    }
    .osb-text {
        display: none;
    }
    .os-tab-box {
        padding: 20px;
    }
    .ost-h h5 {
        font-size: 24px;
    }
    .ost-h h6 {
        font-size: 16px;
    }
    .sot-quotes img {
        max-width: 40px;
    }
    .sot-text p {
        font-size: 16px;
        padding: 0 20px;
    }
    .we-are-head .h2 {
        line-height: 100%;
        margin-bottom: 0;
    }
    .we-are-head .certifide {
        max-width: 120px;
    }
    .about-our-team .team-box img {
        max-width: 150px;
    }
    .about-our-team .team-box h4 {
        font-size: 20px;
    }
    .about-our-team .team-box li {
        font-size: 18px;
    }
    .gallery-img {
        max-width: 160px;
        min-width: 160px;
    }
    .gallery-box {
        margin-top: 30px;
        animation: slideAnimation 55s linear infinite alternate;
    }
    @keyframes slideAnimation {
        from {
            transform: translateX(0px);
        }
        to {
            transform: translateX(-5000px);
        }
    }
    #service-hero,
    #resource-hero {
        padding: 150px 0 50px 0;
    }
    .contact-student .form-control,
    .contact-student .form-select,
    .contact-student input::placeholder {
        font-size: 22px;
        padding: 10px;
    }
    .fh-text {
        color: var(--th-color-3);
        font-family: var(--th-font-2);
        font-size: 24px;
        font-weight: 600;
    }
    .fh-icon {
        width: 60px;
        height: 60px;
        line-height: 60px;
        font-size: 18px;
        font-weight: 400;
        transition: all .5s;
        cursor: pointer;
    }
    .faq-text {
        color: var(--th-color-3);
        font-family: var(--th-font-2);
        font-size: 16px;
        font-weight: 300;
        line-height: 200%;
        padding: 20px;
    }
    .feedback-rating {
        --star-rating-star-size: 3;
    }
}
/* Small devices (576px and down) */
@media screen and (max-width: 576px) {
    #header {
        max-width: 576px;
      }
    .th-btn {
        font-size: 20px;
        text-align: center;
      }
    .whatsapp-btn {
        width: 40px;
        height: 40px;
      }
    .download-left,
    .download-right {
        height: auto;
        width: 100%;
        display: block;
       }
    .know-box {
        flex-direction: column;
        width: 100%;
       }
    .know-left,
    .know-right {
        width: 100%;
       }
    .footer .footer-links,
    .footer .footer-links .footer-item {
        display: block;
        }
    .footer .footer-links .footer-item {
        margin-bottom: 15px;
       }
    #home-hero .h1 {
        font-size: 30px;
        justify-content: center; /* Further reduce font size on smaller devices */
       }
    .h2 {
        font-size: 55px;
       }
    .testimonal-box {
        width: 100%; /* Full width for smaller devices */
        }
    .testimonal-box h3 {
        font-size: 15px; /* Adjust font size for smaller devices */
         }
    .know-box,
    .footer .footer-item {
        margin-bottom: 15px;
        }
    .know-left p,
    .know-right p {
        font-size: 14px;
        }
    .footer p {
        font-size: 16px;
        }
    .faq-text {
        font-size: 14px;
        }
    .nav-container {
        width: 100%; /* Cover half the screen */
        height: 900vh;
        background-color: #2c3338;
        position: fixed; /* Fix it to the viewport */
        z-index: 1000;
        top: 0;
        right: 0; /* Align it to the right side */
        overflow-y: auto; /* Ensure scrolling if content overflows */
        visibility: hidden; /* Hidden by default */
        opacity: 0; /* Fully transparent by default */
        transition: visibility 0s, opacity 0.5s ease; /* Transition for visibility and opacity */
         }
    #btn-close {
        max-width: 20px; /* Increase size to make it more functional */
        padding: 5px; /* Maintain padding for a small button */
        position: absolute; /* Position it absolutely */
        top: 5px; /* Distance from the top */
        right: 5px; /* Distance from the right */
        background-color: rgba(0, 0, 0, 0.1); /* Light background for visibility */
        border-radius: 50%; /* Fully rounded button */
        border: 1px solid rgba(0, 0, 0, 0.3); /* Optional: Add a subtle border for visibility */
        display: flex; /* Center image within button */
        align-items: center; /* Center image vertically */
        justify-content: center; /* Center image horizontally */
       }
    
    #btn-close img {
        max-width: 50%; /* Ensure image fits well within the button */
        height: auto; /* Maintain aspect ratio */
        }
    .course-box {
        flex: 1 1 150px; /* Flexible sizing for responsiveness */
        max-width: 200px; /* Limits the maximum width */
        height: 350px; /* Increased height */
        border-radius: 30px;
        position: sticky;
        z-index: 1;
        text-align: center;
        transition: transform 0.5s, opacity 0.5s; /* Transition for transform and opacity */
        opacity: 0.9; /* Slightly less opaque to enhance the hover effect */
        transform: translateY(0); /* Initial position */
        }
    .course-box:hover {
        transform: scale(1.1) !important;
        z-index: 10 !important;
        opacity: 1; /* Fully opaque on hover */
        }

    .course-box.scrolled {
        transform: translateY(-30px); /* Moves up 20px */
        opacity: 1; /* Fully opaque */
       }

    /* Swiper adjustments for small devices (576px and down) */
    .swiper-slide {
        width: 200%; /* Full width for slides */
        }
    .swiper-slide img {
        width: 200%; /* Full width for images */
        height: auto; /* Maintain aspect ratio */
       }
    .swiper-slide-shadow {
        display: none; /* Hide shadows for small devices */
          }
    .why-choose .container-xxl .row .col-md-3:last-child img {
        width: 150%;
        max-width: 200px;
        }

    .why-choose .container-xxl .row .col-md-3:nth-child(2) img {
        width: 150%;
        max-width: 200px;
    }    
    .course-box {
        width: 90%;
        margin-bottom: 20px;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    /* Adjust A1 to B2 */
    .course-box-1, /* A1 */
    .course-box-2, /* A2 */
    .course-box-3, /* B1 */
    .course-box-4 { /* B2 */
        margin-top: -5px; /* Small upward adjustment */
    }

    /* Adjust C1 and C2 specifically */
    .course-box-5, /* C1 */
    .course-box-6 { /* C2 */
        margin-top: -10px; /* Small upward adjustment */
    }
}
