@media (max-width: 992px) {
    .container {
        width: 90%;
    }

    /* Header */
    header .container {
        flex-direction: column;
        align-items: flex-start;
    }


    header nav {
        width: 100%;
    }

    header nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #fff;
        /* Add background color for better visibility */
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        padding: 10px 0;
        border-radius: 8px;
        margin-top: 10px;
    }

    header nav li {
        display: block;
        margin-left: 0;
        padding: 10px 20px;
        text-align: left;
    }

    header nav a {
        display: block;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        top: 15px;
        right: 25px;
    }

    /* Hero Section */
    #hero {
        padding: 100px 0;
    }

    #hero h1 {
        font-size: 4.1em;
    }

    #hero p {
        font-size: 1.1em;
        padding: 45px;
    }

    /* About Section */
    .mission-vision {
        flex-direction: column;
    }

    .mv-item {
        width: 100%;
        margin-bottom: 20px;
    }

    .values ul {
        flex-direction: column;
    }

    .values li {
        width: 100%;
        margin-bottom: 15px;
    }

    /* Team Section */
    .team-members {
        flex-direction: column;
        align-items: center;
    }

    .team-member {
        width: 80%;
        margin-bottom: 40px;
    }

    /* Services Section */
    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* Force the rule */

      }

    /* Projects Section */
    .project-slider {
        width: 100%;
    }

    /* Contact Section */
    .contact-form {
        width: 100%;
    }
}

/* Media Query for Responsiveness */
@media (max-width: 768px) {
    .about-item {
        flex-direction: column;
        width: 250px;
        margin-left: 25px;
    }

    .about-item:nth-child(odd),
    .about-item:nth-child(even) {
        flex-direction: row;
        width: 90%;
        /* Stack on smaller screens */
    }

    .about-item-right p{
        font-size: 0.9rem;
        text-align: center;
    }

    .about-item-left,
    .about-item-right {
        width: 100%;
        /* Full width on smaller screens */
        text-align: center;
        /* Center content on smaller screens */
    }

    .about-item-right h1 {
        font-size: 1em;
        /* Adjust heading size on smaller screens */
    }

    .about-item-left img {
        max-width: 70%;
        /* Adjust image size on smaller screens */
        margin: 0 auto;
        /* Center the image */
    }

    .services-grid {
        grid-template-columns: 1fr;
        
        margin-left: 35px;
    }

    .service-item {
        padding: 20px;
        /* Reduce padding */
        font-size: 0.9em;
        /* Decrease font size */
    }

    .services-intro {
        min-width: auto;
        font-size: 1em;

    }

    .team-intro {
        font-size: 1em;
        margin-bottom: 50px;
        margin-right: 25px;
        margin-left: 25px;
    }

    h1,
    h2,
    h3,
    h4 {
        font-size: 1em;
    }

    .values-container {

        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on smaller screens */
        gap: 10px;
        /* Add some spacing between the cards */
    }

    .value-card {
        width: auto;
        /* Allow cards to fill the grid cell */
        height: auto;
        /* Adjust height to content */
        margin: 5px;
        /* Reduce margin */
    }

    .value-card img {
        margin-top: 25px;
        margin-bottom: 0px;
    }

    .mission-vision {
        flex-direction: column;  /* Stack on smaller screens */
        align-items: center;   /* Center items horizontally */
    }
    
    .mv-item {
        width: 90%;  /* Make the items wider */
        margin-bottom: 20px; /* Add some spacing between items */
        padding: 20px; /* Reduce the padding */
    }

    .why-choose-item {
        width: 200px;
        margin-left: 40px;
    }

    .why-choose-item h4{
        font-size: 1.2em;
    }

    .section-title {
        font-size: 2.2em;
    }

    #projects .section-title {
        font-size: 2em;
    }

    .btn {
        padding: 12px 25px;
    }

    .footer-top-container {
        flex-direction: column;
        /* Stack items on smaller screens */
        text-align: center;
        /* Center content */
    }

    .footer-nav ul {
        gap: 15px;
        flex-direction: column;
        /* Stack nav items on smaller screens */
        align-items: center;
        /* Center the nav links */
        margin: 10px;
    }

    .footer-social {
        text-align: center;
        /* Center content */
        margin-top: 20px;

    }

    .footer-social p {
        text-align: center;
        /* Center content */
    }

    .social-icons {
        margin-top: 10px;
        /* Center content */
        text-align: center;
        /* Center the icons */
    }

    .why-choose-grid {
        grid-template-columns: repeat(1, 1fr);
        /* Stack items on smaller screens */
    }

    .value-card {
        width: 150px;
        height: 150px;
        margin: 10px;
    }

    .contact-form {
        max-width: 100%;
        /* Make the form wider on smaller screens */
    }

    .contact-form input[type="text"],
    .contact-form input[type="email"],
    .contact-form textarea {
        font-size: 14px;
        /* Slightly reduce font size on smaller screens */
    }

    header {
        padding: 0px 0px;
    }

    header .logo img {
        width: 150px;
        /* Further reduce logo size on smaller screens */
        margin-right: 5px;
    }

    .footer-bottom p {
        font-size: 12px;
    }

    .project-slide-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-slide h3 {
        font-size: 1em;
    }

    .project-tab-buttons{
        gap: 15px;
    }
    .project-tab-buttons li {
        margin: 0 5px;
        /* Reduce the margin */
    }

    .project-tab-buttons a {
        padding: 8px 12px;
        /* Reduce padding */
        font-size: 0.9em;
        /* Reduce font size */
    }
}


@media (max-width: 500px) {

    .about-content {
        width: 90% !important;
    }
    #hero h1 {
        font-size: 2.1em !important;
    }
    .contact-form {
        max-width: 100%;
        /* Full width on very small screens */
    }

    .contact-intro {
        font-size: 1em;
        /* Further reduce font size for intro text */
    }

    .services-grid {
        grid-template-columns: 1fr !important;
        width: 90%;
        margin-left: 20px;
      }

    .project-slide-grid {
        grid-template-columns: 1fr;
        /* One project per row on phones */
    }

    .project-tab-buttons li {
        margin: 0 3px;
        /* Reduce the margin */
    }

    .project-tab-buttons a {
        padding: 10px 15px;
        /* Increase padding to increase size of tabs */
        font-size: 1.1em;
        /* Increase font size for better readability */
    }
    .about-item:nth-child(odd),
    .about-item:nth-child(even) {
        flex-direction: column !important;
        /* Stack on smaller screens */
    }
    
    .values-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
      }

}
