@keyframes slides {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

.logos {
    overflow: hidden;
    padding: 0;
    white-space: nowrap;
    position: relative;
}


.logos:before {
    left: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0), rgb(255, 255, 255));
}

.logos:after {
    right: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgb(255, 255, 255));
}

.logo_items {
    display: inline-block;
    animation: 50s slides infinite linear;
}

.logos:hover .logo_items {
    animation-play-state: paused;
}

.logo_items img {
    height: 100px;
}


.projects-section {
    padding: 70px 0 100px;
    overflow: hidden;
}

.projects-heading {
    text-align: center;
    margin-bottom: 55px;
}

.projects-heading h2 {
    font-size: clamp(30px, 4vw, 52px);
    font-weight: 700;
    margin-bottom: 12px;
}

.projects-heading p {
    color: #aaa;
    margin: 0;
}

/* Honeycomb layout */
.honeycomb-grid {
    --columns: 4;
    --gap: 5px;

    display: grid;
    grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
    gap: var(--gap);
    align-items: start;
    padding: 0 5px;
}

.project-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1.15 / 1;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    text-decoration: none;
    clip-path: polygon(25% 0,
            75% 0,
            100% 50%,
            75% 100%,
            25% 100%,
            0 50%);

    background: #292929;
    transition: filter 0.35s ease;
}

/* Stagger alternate columns to create the honeycomb pattern */
.project-card:nth-child(8n + 5),
.project-card:nth-child(8n + 6),
.project-card:nth-child(8n + 7),
.project-card:nth-child(8n + 8) {
    transform: translateY(0);
}

.project-card:nth-child(4n + 2),
.project-card:nth-child(4n + 4) {
    transform: translateY(50%);
}

.project-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.65s ease;
    z-index: -2;
}

/* Dark overlay */
.project-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.05) 15%,
            rgba(0, 0, 0, 0.85) 100%);
    opacity: 0.25;
    transition: opacity 0.4s ease;
    z-index: -1;
}

/* Hover content */
.project-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    padding: 12% 14% 20%;
    background: rgba(13, 19, 35, 0.78);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-category {
    color: #ffb21b;
    font-size: clamp(9px, 1vw, 13px);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.project-overlay h3 {
    font-size: clamp(13px, 1.6vw, 23px);
    font-weight: 700;
    margin: 0 0 12px;
}

.view-project {
    font-size: clamp(10px, 1vw, 14px);
    border-bottom: 1px solid #ffb21b;
    padding-bottom: 4px;
}


/* White border around every hexagon */
.project-card {
    position: relative;
    isolation: isolate;
    overflow: visible;
    background: transparent;
}

/* White hexagonal border */
.project-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #fff;
    clip-path: polygon(25% 0,
            75% 0,
            100% 50%,
            75% 100%,
            25% 100%,
            0 50%);
    z-index: -3;
}

/* Keep image slightly inset to reveal the border */
.project-card img {
    inset: 2px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    clip-path: polygon(25% 0,
            75% 0,
            100% 50%,
            75% 100%,
            25% 100%,
            0 50%);
}


/* Hover and keyboard accessibility */
.project-card:hover img,
.project-card:focus-visible img {
    transform: scale(1.12);
}

.project-card:hover::before,
.project-card:focus-visible::before {
    opacity: 0;
}

.project-card:hover .project-overlay,
.project-card:focus-visible .project-overlay {
    opacity: 1;
}

.project-card:focus-visible {
    outline: 3px solid #ffb21b;
    outline-offset: -4px;
}

/* Tablet */
@media (max-width: 991px) {
    .honeycomb-grid {
        --columns: 3;
    }

    .project-card:nth-child(n) {
        transform: none;
    }

    .project-card:nth-child(3n + 2) {
        transform: translateY(50%);
    }
}

/* Mobile */
@media (max-width: 575px) {
    .projects-section {
        padding: 45px 0 70px;
    }

    .projects-heading {
        margin-bottom: 35px;
    }

    .honeycomb-grid {
        --columns: 2;
        --gap: 3px;
        padding: 0 3px;
    }

    .project-card:nth-child(n) {
        transform: none;
    }

    .project-card:nth-child(4n + 2),
    .project-card:nth-child(4n + 3) {
        transform: translateY(35%);
    }

    .project-overlay {
        padding: 10% 12% 18%;
    }

    .project-category {
        letter-spacing: 0.5px;
        margin-bottom: 4px;
    }

    .project-overlay h3 {
        margin-bottom: 6px;
    }
}

@media (hover: none) {
    .project-overlay {
        opacity: 1;
        background: linear-gradient(180deg,
                transparent 20%,
                rgba(0, 0, 0, 0.8) 100%);
    }
}