.work-section {
    text-align: center;
    padding: 50px;
}

h1 {
    font-size: 48px;
    margin-bottom: 10px;
    color: #333;
}

.work-section h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 30px;
}

/* CSS for logos displayed in 3 rows with 3 logos per row */
.work-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Create 3 equal-width columns */
    gap: 2%; /* Space between the logos */
    justify-items: center; /* Align the logos in the center */
    margin: 0 auto;
    max-width: 1200px; /* Max width of the container */
}

.work-item {
    width: 100%;
    height: 150px;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.6s ease, box-shadow 0.6s ease;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
  }
  
  .work-item:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  }
  
  .work-item img {
    width: auto;
    max-height: 90px;
    margin-bottom: 10px;
  }
  
  .work-item .view-project {
    font-size: 14px;
    color: #888;
    font-weight: 500;
    margin-top: 8px;
    opacity: 0.8; /* always visible */
    transition: opacity 0.3s ease;
  }

.work-item img {
    width: 100%; /* Stretch image to fill the container */
    height: 100%; /* Ensure the image fills the container */
    /* object-fit: cover; /* Cover the container without distorting the image */
}
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    overflow-y: auto;
    padding: 60px 20px;
}

.modal-content {
    background-color: #fff;
    color: #333;
    max-width: 800px;
    margin: auto;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    position: relative;
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content h2 {
    color: #333;
    font-size: 28px;
    margin-bottom: 20px;
}

.modal-content ul {
    padding-left: 20px;
    margin: 15px 0;
}

.modal-content ul li {
    margin-bottom: 10px;
    list-style-type: disc;
}

.modal-content p {
    margin-bottom: 15px;
}

.close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 32px;
    color: #888;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #F20505;
}

@keyframes fadeIn {
    from {opacity: 0; transform: translateY(20px);}
    to {opacity: 1; transform: translateY(0);}
}

/* Adjust for smaller screens */

@media (max-width: 768px) {

    .modal{
        z-index: 1002;
    }
    .work-items {
        grid-template-columns: repeat(2, 1fr); /* 2 logos per row on smaller screens */
        gap: 10px; /* уменьшенные отступы */
        padding: 0 10px;
    }

    .work-item {
        width: 100%; /* адаптивная ширина */
        height: 110px;
        padding: 10px;
        margin: 0;
    }

    .work-item img {
        max-height: 70px;
        margin-bottom: 6px;
    }

    .work-item .view-project {
        font-size: 10px;
        margin-top: 4px;
        color: #888;
        position: absolute;
        bottom: 5px;
        left: 50%;
        transform: translateX(-50%);
        pointer-events: none;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .modal-content h2 {
        font-size: 24px;
    }
    .work-section{
        padding: 5vh;
    }

}
@media (max-width: 410px) {
    .modal{
        z-index: 1002;
    }
    .work-items {
        grid-template-columns: repeat(2, 1fr); /* 2 logos per row on smaller screens */
        gap: 10px; /* уменьшенные отступы */
        padding: 0 10px;
    }

    .work-item {
        width: 100%; /* адаптивная ширина */
        height: 70px;
        padding: 10px;
        margin: 0;
    }

    .work-item img {
        max-height: 70px;
        margin-bottom: 6px;
    }

    .work-item .view-project {
        font-size: 10px;
        margin-top: 4px;
        color: #888;
        position: absolute;
        bottom: 5px;
        left: 41%;
        transform: translateX(-50%);
        pointer-events: none;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .modal-content h2 {
        font-size: 24px;
    }
    .work-section{
        padding: 3vh;
    }
}