#portfolio-grid {
    background-color: #1f1f1f;
    padding-top: 60px;
    padding-bottom: 100px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    background-image: url("../assets/images/crosshairs/grey-crosshairs-full-faded.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#portfolio-grid p {
    margin-bottom: 2em;
    color: #fff;
}

#portfolio-grid h4 {
    color: #d00909;
}

#portfolio-grid .grid-item {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

#portfolio-grid .category-selectors {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

#portfolio-grid .category-btn {
    padding: 10px 20px;
    border: 1px solid #cccccc;
    background-color: #1f1f1f;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    text-align: center;
}

#portfolio-grid .category-btn:hover {
    background-color: #d00909;
    color: #ffffff;
    border-color: #d00909;
}

#portfolio-grid .category-btn.active {
    background-color: #d00909;
    color: #ffffff;
    border-color: #d00909;
}

/* Portfolio Filtering */
#portfolio-grid .grid-item {
    display: block;
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

#portfolio-grid .grid-item.hidden {
    display: none;
}

br {
    display: none;
}

/* Tablet styles */
@media (max-width: 768px) {
    #portfolio-grid {
        padding-top: 40px;
        padding-bottom: 60px;
    }

    #portfolio-grid .category-selectors {
        gap: 8px;
        margin-bottom: 30px;
    }

    #portfolio-grid .category-btn {
        font-size: 13px;
        min-width: 80px;
    }

    #portfolio-grid button {
        margin: 0px;
    }
}

/* Mobile styles */
@media (max-width: 480px) {
    #portfolio-grid {
        padding-top: 30px;
        padding-bottom: 40px;
    }

    #portfolio-grid .category-selectors {
        gap: 8px;
        margin-bottom: 25px;
        max-width: 90%;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        grid-template-rows: 1fr 1fr;
    }

    #portfolio-grid .category-btn {
        font-size: 12px;
        min-width: unset;
        width: 100%;
    }

    #portfolio-grid button {
        margin: 0px;
    }
}
/* Landscape mobile devices - optimize for limited vertical space */
@media screen and (orientation: landscape) and (max-height: 900px) {

    #portfolio-grid {
        padding-top: 0px;
        padding-bottom: 0px;
    }

    #portfolio-grid .category-selectors {
        margin-bottom: 0px;
    }
}
