@media (min-width: 1920px) {
    .home-content {
        max-width: 800px;
    }
    
    .home-content h1 {
        font-size: 4rem;
    }
    
    .home-content h3 {
        padding-left: 40px;
    }

    .home-image img {
        max-width: 600px;
    }
    
    .about-image img {
        max-width: 500px;
    }
    
    .services-list {
        max-width: 1600px;
    }
    
    .team-list {
        max-width: 1600px;
    }
}

@media (min-width: 1400px) {
    .home-content h3 {
        padding-left: 40px;
    }
    .home-content {
        max-width: 700px;
    }

    .home-image img {
        max-width: 500px;
    }

    .about-image img {
        max-width: 450px;
    }

    .services-list {
        grid-template-columns: repeat(3, 1fr);
    
    }
    .team-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1399px) and (min-width: 1025px) {
    .navbar a { font-size: 1.3rem; }

    .home-content h1 {
        font-size: 3rem;
        word-break: keep-all;
    }
    
    .home-content h3 {
        font-size: 1.6rem;
        padding-left: 40px;
    }

    .services-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .team-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    :root {
        --gap-desktop: 40px;
    }
    
    .navbar a {
        font-size: 1.3rem;
    }

    .home-content h3 {
        padding-left: 35px;
    }

    .services-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-image img {
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }
    
    .navbar {
        gap: 10px;
    }
    
    .navbar a {
        font-size: 1.1rem;
        padding: 5px 8px;
    }
    
    .home {
        padding: 80px 30px 50px !important;
        flex-direction: column;
        text-align: center;
        gap: 30px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .home-content {
        max-width: 100%;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding: 0 !important;
    }

    .home-content h1 {
        white-space: normal !important;
        font-size: 2rem;
        line-height: 1.3;
        word-break: break-word;
        overflow-wrap: break-word;
        margin-bottom: 15px;
    }
    
    .home-content h3 {
        white-space: normal !important;
        font-size: 1.2rem;
        line-height: 1.4;
        word-break: break-word;
        overflow-wrap: break-word;
        margin-bottom: 20px;
        padding-left: 0 !important;
    }

    .home-content p {
        font-size: 1rem; 
        max-width: 100%;
        margin-bottom: 25px;
        text-align: center;
    }

    .home-image img {
        max-width: 280px;
        width: 100%;
        margin: -20px auto 0;
    }
    
    .story, .mission, .vision, .value {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .story .about-text,
    .mission .about-text,
    .vision .about-text,
    .value .about-text {
        order: 1;
    }
    
    .story .about-image,
    .mission .about-image,
    .vision .about-image,
    .value .about-image {
        order: 2;
    }
    
    .about-text {
        text-align: center;
    }
    
    .about-text h4 {
        justify-content: center;
        margin-bottom: 15px;
    }
    
    .about-text p {
        text-align: justify;
        margin-bottom: 10px;
    }
    .value-list li{
        margin-bottom: 8px;
    }
    
    .about-image img {
        max-width: 280px;
    }

    .value {
        margin-bottom: 1rem;
    }
    
    .services-list {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .team-list {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .contact-content {
        gap: 40px;
    }
    
    .contact-text {
        text-align: center;
    }
    
    .contact-text li {
        justify-content: left;
    }
    
    .contact-icons {
        justify-content: center;
    }
    
    .value-list {
        text-align: left;
    }
    
    .value-list li {
        justify-content: flex-start;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    .home {
        min-height: auto;
        padding: 100px 5% 50px;
    }
    
    .home-image img {
        max-width: 180px;
    }
    
    .about-image img {
        max-width: 200px;
    }
}

@media (max-width: 576px) {
    header {
        padding: 10px 15px;
    }
    
    .navbar {
        gap: 5px;
    }
    
    .navbar a {
        font-size: 1rem;
        padding: 4px 6px;
    }
    
    .home-content h1 {
        font-size: 2rem;
        line-height: 1.3;
        word-break: keep-all;
    }
    
    .home-content h3 {
        font-size: 1.15rem;
    }
    
    .home-content p {
        font-size: 0.95rem;
    }
    
    .home-image img {
        max-width: 250px;
    }
    
    .home-social a {
        width: 35px;
        height: 35px;
    }
    
    .about-text h4 {
        font-size: 1.5rem;
    }
    
    .about-text p {
        font-size: 0.95rem;
        text-indent: 20px;
    }
    
    .about-image img {
        max-width: 250px;
    }
    
    .value {
        margin-bottom: 1rem;
    }

    .value-list li {
        font-size: 1rem;
    }

    .services-list .list {
        padding: 30px 20px;
    }
    
    .services-list .list h2 {
        font-size: 1.3rem;
    }
    
    .services-list .list p {
        font-size: 0.95rem;
    }
    
    .team-list .row h2 {
        font-size: 1.1rem;
        padding: 10px;
    }
    
    .row .layer {
        padding: 20px;
    }
    
    .row .layer h5 {
        font-size: 1.2rem;
    }
    
    .row .layer ul li {
        font-size: 0.85rem;
    }
    
    .contact-text h4 {
        font-size: 1.3rem;
    }
    
    .contact-text p {
        font-size: 0.95rem;
    }
    
    .contact-text li {
        font-size: 0.9rem;
    }
    
    .contact-icons a {
        width: 40px;
        height: 40px;
    }
    
    .contact-icons a svg {
        width: 30px;
        height: 30px;
    }
    
    #top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 360px) {
    .home-content h1 {
        font-size: 1.5rem;
    }
    
    .home-content h3 {
        font-size: 1rem;
    }
    
    .home-image img {
        max-width: 160px;
    }
    
    .about-image img {
        max-width: 180px;
    }
    
    .navbar a {
        font-size: 0.7rem;
        padding: 3px 4px;
    }
}