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

/*FONTS*/
@font-face {
  font-family: 'Parkinsans';
  src: url('/wp-content/uploads/fonts/Parkinsans-Regular.woff2') format('woff2'),
       url('/wp-content/uploads/fonts/Parkinsans-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Parkinsans';
  src: url('/wp-content/themes/divi-child/fonts/Parkinsans-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* títulos gerais do site */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Parkinsans', sans-serif !important;
}

/* títulos usados pelo Divi */
.et_pb_module h1,
.et_pb_module h2,
.et_pb_module h3,
.et_pb_module h4,
.et_pb_module h5,
.et_pb_module h6,
.et_pb_text h1,
.et_pb_text h2,
.et_pb_text h3,
.et_pb_text h4,
.et_pb_text h5,
.et_pb_text h6,
.et_pb_heading h1,
.et_pb_heading h2,
.et_pb_heading h3,
.et_pb_heading h4,
.et_pb_heading h5,
.et_pb_heading h6,
.et_pb_slide_title,
.et_pb_promo_description h2,
.et_pb_post_title,
.entry-title {
  font-family: 'Parkinsans', sans-serif !important;
}

/*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;
}

.custom-lang-switcher span,
.custom-lang-switcher a,
.custom-lang-switcher .lang-item, .custom-lang-switcher .lang-item:visited,
.custom-lang-switcher span.lang-separator {
    color: #5733f4 !important;
}

/*MENU*/
.line {
    background: #5733f4 !important;
}

/*FOOTER*/
.et_pb_text_2_tb_footer.et_pb_text a, .et_pb_text_3_tb_footer.et_pb_text a, .et_pb_text_4_tb_footer.et_pb_text a {
    color: black !important;
}

/*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;
    }
}

/*PROJETOS HOME*/
.home-featured-projects {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 24px;
}

.home-featured-project-card:first-child {
    grid-column: 1 / -1;
}

.home-featured-project-thumb {
    display: block;
    width: 100%;
    overflow: hidden;
    border-radius: 28px;
    margin-bottom: 16px;
}

.home-featured-project-card:first-child .home-featured-project-thumb {
    aspect-ratio: 16 / 6;
}

.home-featured-project-card:not(:first-child) .home-featured-project-thumb {
    aspect-ratio: 4 / 3;
}

.home-featured-project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-featured-project-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
}

.home-featured-project-text {
    flex: 1;
    min-width: 0;
}

.home-featured-project-title {
    margin: 0 0 4px;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
}

.home-featured-project-title a {
    color: #111;
    text-decoration: none;
}

.home-featured-project-category {
    font-size: 16px;
    line-height: 1.3;
    color: #111;
}

.home-featured-project-arrow {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border: 1.5px solid #111;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.home-featured-project-arrow:hover {
    transform: translateX(2px);
}

.home-featured-project-arrow svg {
    width: 22px;
    height: 22px;
    display: block;
}

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

    .home-featured-project-card:first-child {
        grid-column: auto;
    }

    .home-featured-project-card:first-child .home-featured-project-thumb,
    .home-featured-project-card:not(:first-child) .home-featured-project-thumb {
        aspect-ratio: 4 / 3;
    }

    .home-featured-project-meta {
        align-items: center;
    }
}
