.projects {
    background-color: var(--color-white);
    padding: clamp(2rem, 4vw, 4rem) 0;
}

.projects-header {
    max-width: min(1425px, 95%);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 2.5vw, 2.5rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(2rem, 4vw, 4rem);
    flex-wrap: wrap;
    gap: clamp(1rem, 1.25vw, 1.25rem);
}

.projects-title {
    font-size: clamp(1.5rem, 3.438vw, 3.438rem);
    font-weight: 500;
    font-family: 'Montserrat', sans-serif !important;
    line-height: 1.223;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex: 1;
    min-width: 0;
}

.projects-title-black {
    color: #000000;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500;
}

.projects-title-beige {
    color: #D9CAAB;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500;
}

.projects-arrow {
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.projects-arrow svg {
    width: clamp(1.25rem, 1.75vw, 1.75rem);
    height: clamp(1.25rem, 1.75vw, 1.75rem);
}

.projects-arrow:hover {
    transform: translateX(clamp(0.5rem, 0.625vw, 0.625rem));
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* По умолчанию 4 колонки на широких экранах */
    gap: 0;
    width: 100%;
    margin: 0;
}

.project-card {
    position: relative;
    overflow: hidden;
    height: clamp(15rem, 25vw, 25rem);
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1.25rem, 2.5vw, 2.5rem);
    z-index: 2;
    flex-wrap: wrap;
    gap: clamp(0.5rem, 0.625vw, 0.625rem);
}

.project-name {
    font-size: clamp(1.125rem, 1.688vw, 1.688rem);
    font-weight: 400;
    line-height: 1.223;
    color: var(--color-white);
    white-space: nowrap;
    text-shadow: 0 clamp(0.125rem, 0.125vw, 0.125rem) clamp(0.25rem, 0.25vw, 0.25rem) rgba(0, 0, 0, 0.5);
}

.project-arrow-icon {
    width: clamp(0.625rem, 0.875vw, 0.875rem);
    height: clamp(1rem, 1.563vw, 1.563rem);
    flex-shrink: 0;
}


.projects-footer {
    max-width: min(1425px, 95%);
    margin: clamp(2rem, 4vw, 4rem) auto 0;
    padding: 0 clamp(1.25rem, 2.5vw, 2.5rem);
    display: flex;
    justify-content: center;
}

/* На мобильных устройствах */
body.mobile-only .projects-footer,
html.mobile-only .projects-footer {
    margin-top: clamp(1rem, 2vw, 2rem) !important;
    margin-bottom: 0 !important;
}

.projects-btn {
    border: clamp(1px, 0.11vw, 1.7px) solid var(--color-beige);
    background-color: transparent;
    color: var(--color-black);
    border-radius: clamp(0.5rem, 0.75vw, 0.75rem);
    padding: clamp(0.75rem, 1vw, 1rem) clamp(2rem, 4.375vw, 4.375rem);
    font-size: clamp(1rem, 1.25vw, 1.25rem);
    font-weight: 400;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}


