/*
 Theme Name: Divi Child
 Description: Divi Child Theme
 Author: Deltify
 Author URI: deltify.pt
 Template: Divi
 Version: 1.0.0
*/
 
/* =Theme customization starts here
------------------------------------------------------- */

/*SWITCH IDIOMA*/
.custom-lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    position: relative;
    z-index: 20;
}

.custom-lang-switcher .lang-item,
.custom-lang-switcher .lang-item:visited {
    color: #fff;
    text-decoration: none;
    position: relative;
    display: inline-block;
    pointer-events: auto;
}

.custom-lang-switcher .lang-item:hover {
    opacity: 0.9;
}

.custom-lang-switcher .lang-separator {
    color: #fff;
    font-weight: 700;
}

.custom-lang-switcher .lang-item.is-current {
    color: #fff;
    position: relative;
    display: inline-block;
}

.custom-lang-switcher .lang-item.is-current::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

/*PÁGINA PROJETOS*/
.projects-masonry-wrapper {
    width: 100%;
}

.projects-masonry-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: center;
    margin-bottom: 40px;
}

.projects-masonry-filter {
    background: transparent;
    border: 0;
    padding: 0 0 6px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1.2;
    color: #111;
    border-bottom: 1px solid transparent;
}

.projects-masonry-filter.is-active {
    border-bottom-color: #111;
}

.projects-masonry-results {
    transition: opacity 0.2s ease;
}

.projects-masonry-wrapper.is-loading .projects-masonry-results {
    opacity: 0.65;
}

.projects-masonry-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 10px;
    gap: 24px;
    align-items: start;
}

.projects-masonry-item {
    display: block;
    margin: 0;
}

.projects-masonry-media {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #f3f3f3;
}

.projects-masonry-thumb {
    display: block;
    width: 100%;
    text-decoration: none;
}

.projects-masonry-thumb img {
    display: block;
    width: 100%;
    height: auto;
}

.projects-masonry-thumb-placeholder {
    aspect-ratio: 4 / 5;
    width: 100%;
    background: #e9e9e9;
}

.projects-masonry-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 24px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0.72) 100%);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    transform: translateY(8px);
    pointer-events: none;
}

.projects-masonry-media:hover .projects-masonry-overlay,
.projects-masonry-media:focus-within .projects-masonry-overlay {
    opacity: 1;
    transform: translateY(0);
}

.projects-masonry-overlay-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
}

.projects-masonry-text {
    flex: 1;
    min-width: 0;
}

.projects-masonry-title {
    margin: 0 0 4px;
    font-size: 22px;
    line-height: 1.15;
    font-weight: 700;
}

.projects-masonry-title-link {
    color: #fff;
    text-decoration: none;
    pointer-events: auto;
}

.projects-masonry-category {
    font-size: 16px;
    line-height: 1.3;
    color: #fff;
}

.projects-masonry-arrow {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border: 1.5px solid #fff;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    pointer-events: auto;
    transition: transform 0.2s ease;
}

.projects-masonry-arrow:hover {
    transform: translateX(2px);
}

.projects-masonry-arrow svg {
    width: 22px;
    height: 22px;
    display: block;
}

.projects-masonry-infinite {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 0 0;
}

.projects-masonry-infinite.is-hidden {
    display: none;
}

.projects-masonry-loading-text {
    display: none;
    font-size: 16px;
    line-height: 1.3;
    color: #111;
    margin-bottom: 12px;
}

.projects-masonry-sentinel {
    width: 100%;
    height: 1px;
}

.projects-masonry-empty {
    margin: 0;
    font-size: 16px;
}

@media (max-width: 980px) {
    .projects-masonry-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .projects-masonry-grid {
        grid-template-columns: 1fr;
    }

    .projects-masonry-overlay {
        opacity: 1;
        transform: translateY(0);
        padding: 20px;
    }

    .projects-masonry-title {
        font-size: 20px;
    }
}
