/* =========================================================
   PROJECTES
========================================================= */

.projectes-hero {

    background: var(--verde-oscuro);

    color: var(--blanco);

    padding: 100px 0 90px;

    text-align: center;

}


.projectes-hero .container {

    max-width: 900px;

}


.projectes-etiqueta {

    display: inline-block;

    margin-bottom: 20px;

    color: var(--verde-claro);

    font-size: .85rem;

    font-weight: 700;

    letter-spacing: 3px;

}


.projectes-hero h1 {

    color: var(--blanco);

    font-size: 3.2rem;

    line-height: 1.1;

    margin-bottom: 25px;

}


.projectes-hero p {

    max-width: 700px;

    margin: 0 auto;

    font-size: 1.15rem;

    line-height: 1.7;

}



/* =========================================================
   SECCIÓ PROJECTES
========================================================= */

.projectes-seccio {

    padding: 80px 0 100px;

    background: #f8f8f8;

}



/* =========================================================
   FILTRES
========================================================= */

.projectes-filtres {

    display: flex;

    justify-content: center;

    align-items: center;

    flex-wrap: wrap;

    gap: 10px;

    margin-bottom: 50px;

}


.filtre-projecte {

    border: 1px solid var(--verde-oliva);

    background: var(--blanco);

    color: var(--verde-oliva);

    padding: 12px 25px;

    font-family: inherit;

    font-size: .9rem;

    font-weight: 700;

    cursor: pointer;

    transition:
        background-color .3s ease,
        border-color .3s ease,
        color .3s ease,
        transform .3s ease;

}


.filtre-projecte:hover {

    background: var(--verde-principal);

    border-color: var(--verde-principal);

    color: var(--blanco);

    transform: translateY(-2px);

}


.filtre-projecte.actiu {

    background: var(--verde-principal);

    border-color: var(--verde-principal);

    color: var(--blanco);

}



/* =========================================================
   GRID
========================================================= */

.projectes-grid {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 35px;

}



/* =========================================================
   TARGETES
========================================================= */

.projecte-card {

    background: var(--blanco);

    overflow: hidden;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, .08);

    opacity: 0;

    transform: translateY(15px);

    transition:
        opacity .25s ease,
        transform .35s ease,
        box-shadow .35s ease;

}


.projecte-card.visible {

    opacity: 1;

    transform: translateY(0);

}


.projecte-card:hover {

    transform: translateY(-6px);

    box-shadow:
        0 20px 45px rgba(0, 0, 0, .13);

}



/* =========================================================
   IMATGE TARGETA
========================================================= */

.projecte-imatge {

    position: relative;

    height: 360px;

    overflow: hidden;

    background: #111;

}


.projecte-imatge img {

    width: 100%;

    height: 100%;

    object-fit: cover;

    display: block;

    transition:
        transform .6s ease;

}


.projecte-card:hover
.projecte-imatge img {

    transform: scale(1.06);

}



/* =========================================================
   CATEGORIA
========================================================= */

.projecte-categoria {

    display: inline-block;

    background:
        var(--verde-principal);

    color:
        var(--blanco);

    padding:
        7px 14px;

    font-size:
        .75rem;

    font-weight:
        700;

    text-transform:
        uppercase;

    letter-spacing:
        .5px;

}


.projecte-imatge
.projecte-categoria {

    position: absolute;

    left: 20px;

    bottom: 20px;

}



/* =========================================================
   BOTÓ VEURE
========================================================= */

.projecte-veure {

    position: absolute;

    right: 20px;

    bottom: 20px;

    width: 48px;

    height: 48px;

    border: none;

    border-radius: 50%;

    background: var(--blanco);

    color: var(--verde-oscuro);

    display: flex;

    align-items: center;

    justify-content: center;

    cursor: pointer;

    font-size: 1rem;

    transition:
        background-color .3s ease,
        color .3s ease,
        transform .3s ease;

}


.projecte-veure:hover {

    background:
        var(--verde-principal);

    color:
        var(--blanco);

    transform:
        rotate(90deg);

}



/* =========================================================
   INFORMACIÓ TARGETA
========================================================= */

.projecte-info {

    padding:
        28px 30px 32px;

}


.projecte-info h2 {

    font-size:
        1.5rem;

    line-height:
        1.25;

    margin-bottom:
        14px;

    color:
        var(--verde-oscuro);

}


.projecte-ubicacio {

    display:
        flex;

    align-items:
        center;

    gap:
        8px;

    color:
        var(--verde-principal);

    font-size:
        .9rem;

    font-weight:
        700;

    margin-bottom:
        15px;

}


.projecte-ubicacio i {

    font-size:
        .9rem;

}


.projecte-info p {

    color:
        #555;

    font-size:
        .95rem;

    line-height:
        1.7;

}



/* =========================================================
   MODAL
========================================================= */

.projecte-modal {

    position: fixed;

    inset: 0;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    padding:
        20px;

    opacity:
        0;

    visibility:
        hidden;

    transition:
        opacity .3s ease,
        visibility .3s ease;

    z-index:
        9998;

}


.projecte-modal.obert {

    opacity:
        1;

    visibility:
        visible;

}



/* =========================================================
   OVERLAY
========================================================= */

.projecte-modal-overlay {

    position:
        absolute;

    inset:
        0;

    background:
        rgba(0, 0, 0, .88);

}



/* =========================================================
   CONTINGUT MODAL
========================================================= */

.projecte-modal-contingut {

    position:
        relative;

    width:
        96vw;

    max-width:
        1500px;

    max-height:
        94vh;

    background:
        var(--blanco);

    display:
        grid;

    grid-template-columns:
        1.7fr .65fr;

    overflow:
        hidden;

    z-index:
        2;

    transform:
        scale(.96);

    transition:
        transform .3s ease;

}


.projecte-modal.obert
.projecte-modal-contingut {

    transform:
        scale(1);

}



/* =========================================================
   GALERIA
========================================================= */

.projecte-modal-galeria {

    position:
        relative;

    width:
        100%;

    height:
        88vh;

    min-height:
        650px;

    background:
        #111;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    overflow:
        hidden;

}


.projecte-modal-galeria img {

    width:
        100%;

    height:
        100%;

    object-fit:
        contain;

    display:
        block;

    user-select:
        none;

}



/* =========================================================
   FLETXES
========================================================= */

.projecte-modal-anterior,
.projecte-modal-seguent {

    position:
        absolute;

    top:
        50%;

    transform:
        translateY(-50%);

    width:
        55px;

    height:
        55px;

    border:
        none;

    border-radius:
        50%;

    background:
        rgba(255, 255, 255, .92);

    color:
        var(--verde-oscuro);

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    cursor:
        pointer;

    font-size:
        1.1rem;

    z-index:
        4;

    transition:
        background-color .3s ease,
        color .3s ease,
        transform .3s ease;

}


.projecte-modal-anterior {

    left:
        25px;

}


.projecte-modal-seguent {

    right:
        25px;

}


.projecte-modal-anterior:hover,
.projecte-modal-seguent:hover {

    background:
        var(--verde-principal);

    color:
        var(--blanco);

}


.projecte-modal-anterior:hover {

    transform:
        translateY(-50%)
        translateX(-3px);

}


.projecte-modal-seguent:hover {

    transform:
        translateY(-50%)
        translateX(3px);

}



/* =========================================================
   COMPTADOR
========================================================= */

.projecte-modal-comptador {

    position:
        absolute;

    left:
        50%;

    bottom:
        20px;

    transform:
        translateX(-50%);

    padding:
        8px 15px;

    background:
        rgba(0, 0, 0, .65);

    color:
        var(--blanco);

    font-size:
        .85rem;

    font-weight:
        700;

    letter-spacing:
        1px;

    z-index:
        4;

}



/* =========================================================
   INFORMACIÓ MODAL
========================================================= */

.projecte-modal-info {

    padding:
        55px 45px;

    display:
        flex;

    flex-direction:
        column;

    justify-content:
        center;

    overflow-y:
        auto;

}


.projecte-modal-info
.projecte-categoria {

    align-self:
        flex-start;

    margin-bottom:
        25px;

}


.projecte-modal-info h2 {

    color:
        var(--verde-oscuro);

    font-family:
        'Geometric Slabserif 712',
        serif;

    font-size:
        2.2rem;

    line-height:
        1.2;

    margin-bottom:
        20px;

}


.projecte-modal-info
.projecte-ubicacio {

    margin-bottom:
        25px;

}


.projecte-modal-info p {

    color:
        #555;

    font-size:
        1rem;

    line-height:
        1.8;

}



/* =========================================================
   INDICACIÓ
========================================================= */

.projecte-modal-indicacio {

    display:
        flex;

    align-items:
        center;

    gap:
        10px;

    margin-top:
        30px;

    padding:
        15px;

    background:
        #f5f5f5;

    color:
        var(--verde-oscuro);

    font-size:
        .85rem;

    line-height:
        1.5;

}


.projecte-modal-indicacio i {

    color:
        var(--verde-principal);

    font-size:
        1.1rem;

}



/* =========================================================
   BOTÓ TANCAR
========================================================= */

.projecte-modal-tancar {

    position:
        absolute;

    right:
        18px;

    top:
        18px;

    width:
        48px;

    height:
        48px;

    border:
        none;

    border-radius:
        50%;

    background:
        var(--blanco);

    color:
        var(--verde-oscuro);

    cursor:
        pointer;

    z-index:
        10;

    font-size:
        1.15rem;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    transition:
        background-color .3s ease,
        color .3s ease,
        transform .3s ease;

}


.projecte-modal-tancar:hover {

    background:
        var(--verde-principal);

    color:
        var(--blanco);

    transform:
        rotate(90deg);

}



/* =========================================================
   BLOQUEIG SCROLL
========================================================= */

body.modal-obert {

    overflow:
        hidden;

}



/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {

    .projecte-modal-contingut {

        width:
            94vw;

        grid-template-columns:
            1.4fr .8fr;

    }


    .projecte-modal-galeria {

        height:
            75vh;

        min-height:
            550px;

    }


    .projecte-modal-info {

        padding:
            40px 30px;

    }


    .projecte-modal-info h2 {

        font-size:
            1.8rem;

    }

}



@media (max-width: 900px) {

    .projectes-hero {

        padding:
            80px 20px;

    }


    .projectes-hero h1 {

        font-size:
            2.5rem;

    }


    .projectes-grid {

        grid-template-columns:
            1fr;

    }


    .projecte-modal {

        padding:
            15px;

    }


    .projecte-modal-contingut {

        width:
            95vw;

        max-height:
            92vh;

        display:
            flex;

        flex-direction:
            column;

    }


    .projecte-modal-galeria {

        height:
            60vh;

        min-height:
            400px;

    }


    .projecte-modal-info {

        padding:
            30px;

    }


    .projecte-modal-info h2 {

        font-size:
            1.7rem;

    }

}



@media (max-width: 768px) {

    .projectes-hero {

        padding:
            65px 20px;

    }


    .projectes-hero h1 {

        font-size:
            2rem;

    }


    .projectes-hero p {

        font-size:
            1rem;

    }


    .projectes-seccio {

        padding:
            60px 0 70px;

    }


    .projectes-filtres {

        gap:
            8px;

        margin-bottom:
            35px;

    }


    .filtre-projecte {

        padding:
            10px 18px;

        font-size:
            .8rem;

    }


    .projecte-imatge {

        height:
            280px;

    }


    .projecte-info {

        padding:
            24px 22px 28px;

    }


    .projecte-info h2 {

        font-size:
            1.3rem;

    }

}



@media (max-width: 600px) {

    .projecte-modal {

        padding:
            0;

    }


    .projecte-modal-contingut {

        width:
            100vw;

        height:
            100vh;

        max-height:
            100vh;

    }


    .projecte-modal-galeria {

        height:
            62vh;

        min-height:
            0;

    }


    .projecte-modal-info {

        flex:
            1;

        padding:
            25px 20px;

    }


    .projecte-modal-info h2 {

        font-size:
            1.5rem;

    }


    .projecte-modal-info p {

        font-size:
            .95rem;

    }


    .projecte-modal-anterior,
    .projecte-modal-seguent {

        width:
            44px;

        height:
            44px;

    }


    .projecte-modal-anterior {

        left:
            12px;

    }


    .projecte-modal-seguent {

        right:
            12px;

    }


    .projecte-modal-tancar {

        top:
            12px;

        right:
            12px;

        width:
            44px;

        height:
            44px;

    }

}