.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

@media (max-width: 768px) {
    h1 {
        font-size: 4rem !important;
    }
}

@media (max-width: 390px) {
    h1 {
        font-size: 3rem !important;
    }
}

.content {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.portfolio-item {
    width: 100%;
    height: 100%;
}

.works-container {
    margin: 2rem auto 0;

    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    /* Define 2 rows with specific heights */
    grid-template-rows: 500px 320px;
    max-width: 1200px;
    gap: 16px;
    /* grid-template-columns: repeat(3, 1fr);
    gap: 40px; 
    padding: 20px; */
}

.container-item {
    padding: 0;
    text-align: center;
    border-radius: 8px;
}

@media (max-width: 992px) {
    .works-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .works-container {
        grid-template-columns: 1fr;
    }
}

.item-description {
    display: flex;
    width: 300%;
    justify-self: center;
    text-align: left;
    flex-direction: column;
    margin: 12px 6px;
    text-wrap: wrap;
    
    padding: 1rem;
    border-radius: 12px;
    background-color: var(--first-color);
    color: var(--second-color);
    border: 1px var(--second-color) solid;
}

@media (max-width: 1300px) {
    .item-description {
        width: 175%;
    }
}

@media (max-width: 860px) {
    .item-description {
        width: 120%;
    }
}

@media (max-width: 600px) {
    .item-description {
        width: 90%;
    }
}

.item-description h3 {
    font-size: 1.125em !important;
    text-wrap: wrap;
}

video {
    display: flex;
    flex-wrap: wrap;
    margin: 5rem 0;
    gap: 10px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 125%;
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    /* height: auto; */
    object-fit: cover;
    cursor: pointer;
    border-radius: 12px;
    transition: 300ms ease;
}

.portfolio-item img:hover {
    transform: scale(1.03);
}

.hidden {
    display: none;
}

#pop-up-window {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
}

#pop-up-window .overlay-wrap {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 101;
    background-color: rgba(0, 0, 0, .9);
}

#pop-up-window .content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    width: 100%;
    height: 100%;
    z-index: 102;
}

#pop-up-window .close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 103;
}

@media (max-width: 390px) {
    #pop-up-window .close-btn {
        top: .5rem;
        right: .5rem;
    }
}

#pop-up-window .close-btn button {
    font-size: 2rem;
    color: var(--second-color);
    background-color: transparent;
    border: none;
    cursor: pointer;
}

#pop-up-window .container-item {
    width: min(70%, 400px);
    max-height: 80%;
    font-size: 1.2rem;
    text-align: center;
    color: var(--second-color);
}

@media (max-width: 390px) {
    #pop-up-window .container-item {
        width: min(90%, 400px);
    }
}

/* SEARCHING */

.search-wrapper {
    width: 100%;
}

#search-input {
    justify-self: center;

    width: 250px;
    padding: .5em .6em;
    font-size: 16px;
    border: 1px solid var(--first-color);
    border-radius: 12px;
    outline: none;
    background-color: var(--second-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

#search-input:focus {
    border-color: #5b9df9;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(91, 157, 249, 0.2);
}

/* END SEARCHING */

/* HASHTAGS */

.hashtag-wrapper {
    margin-top: 1.75rem;

    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hashtag-item {
    display: inline-block;
    background-color: var(--second-color);
    border: 1px var(--first-color) solid;
    padding: .2em .6em;
    border-radius: 12px;
    transition: background-color 200ms;
    cursor: pointer;
}

.hashtag-item:hover {
    background-color: #afafaf;
}

.hashtag-item.selected {
    background-color: var(--first-color);
    color: var(--second-color);
}

/* END HASHTAGS */