/* ==========================================================
   PORTFOLIO - RJL SERVICIOS
   ========================================================== */


/* ==========================================================
   CONFIGURACIÓN GENERAL DEL PORTFOLIO
   ========================================================== */

.portfolio-contenedor {

    width: 90%;

    max-width: 1400px;

    margin: 0 auto;

}


/* ==========================================================
   HERO DEL PORTFOLIO
   ========================================================== */

.hero-portfolio {

    width: 100%;

    min-height: 500px;

    background:
        linear-gradient(
            rgba(42, 30, 23, 0.82),
            rgba(42, 30, 23, 0.82)
        ),
        url("../img/portfolio/img2.jpg");

    background-size: cover;

    background-position: center;

    display: flex;

    justify-content: center;

    align-items: center;

    padding: 80px 20px;

    box-sizing: border-box;

}


/* ==========================================================
   CONTENIDO DEL HERO
   ========================================================== */

.hero-portfolio-contenido {

    width: 90%;

    max-width: 1000px;

    margin: 0 auto;

    text-align: center;

    color: #ffffff;

}


/* ==========================================================
   SUBTÍTULO DEL HERO
   ========================================================== */

.hero-portfolio-subtitulo {

    display: inline-block;

    margin-bottom: 22px;

    padding: 7px 15px;

    background: #d62828;

    color: #ffffff;

    font-size: 16px;

    font-weight: 700;

    letter-spacing: 3px;

}


/* ==========================================================
   TÍTULO DEL HERO
   ========================================================== */

.hero-portfolio-contenido h1 {

    margin: 0 0 25px;

    color: #ffffff;

    font-size: 64px;

    font-weight: 800;

    line-height: 1.1;

}


/* ==========================================================
   PÁRRAFO DEL HERO
   ========================================================== */

.hero-portfolio-contenido p {

    max-width: 800px;

    margin: 0 auto;

    color: #ffffff;

    font-size: 20px;

    line-height: 1.8;

}


/* ==========================================================
   INTRODUCCIÓN DEL PORTFOLIO
   ========================================================== */

.portfolio-introduccion {

    width: 100%;

    padding: 90px 20px 75px;

    background: #ffffff;

    text-align: center;

    box-sizing: border-box;

}


/* ==========================================================
   SUBTÍTULO GENERAL
   ========================================================== */

.portfolio-subtitulo {

    display: block;

    margin-bottom: 20px;

    color: #d62828;

    font-size: 17px;

    font-weight: 700;

    letter-spacing: 3px;

}


/* ==========================================================
   TÍTULO DE INTRODUCCIÓN
   ========================================================== */

.portfolio-introduccion h2 {

    margin: 0 0 25px;

    color: #2a1e17;

    font-size: 48px;

    font-weight: 800;

}


/* ==========================================================
   TEXTO DE INTRODUCCIÓN
   ========================================================== */

.portfolio-introduccion p {

    max-width: 900px;

    margin: 0 auto;

    color: #5f5f5f;

    font-size: 18px;

    line-height: 1.8;

}


/* ==========================================================
   SECCIÓN DE TRABAJOS
   ========================================================== */

.portfolio-trabajos {

    width: 100%;

    padding: 90px 20px;

    background: #f4f0ec;

    box-sizing: border-box;

}


/* ==========================================================
   PROYECTO
   ========================================================== */

.portfolio-proyecto {

    width: 100%;

}


/* ==========================================================
   TEXTO DEL PROYECTO
   ========================================================== */

.portfolio-proyecto-texto {

    max-width: 950px;

    margin: 0 auto 60px;

    text-align: center;

}


/* ==========================================================
   CATEGORÍA DEL PROYECTO
   ========================================================== */

.portfolio-categoria {

    display: inline-block;

    margin-bottom: 18px;

    color: #d62828;

    font-size: 16px;

    font-weight: 700;

    letter-spacing: 3px;

}


/* ==========================================================
   TÍTULO DEL PROYECTO
   ========================================================== */

.portfolio-proyecto-texto h2 {

    margin: 0 0 30px;

    color: #2a1e17;

    font-size: 50px;

    font-weight: 800;

    line-height: 1.2;

}


/* ==========================================================
   PÁRRAFOS DEL PROYECTO
   ========================================================== */

.portfolio-proyecto-texto p {

    margin: 0 0 20px;

    color: #5f5f5f;

    font-size: 18px;

    line-height: 1.8;

}


/* ==========================================================
   COMPARACIÓN ANTES Y DESPUÉS
   ========================================================== */

.portfolio-comparacion {

    width: 100%;

    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 35px;

    align-items: stretch;

}


/* ==========================================================
   CONTENEDOR DE CADA IMAGEN
   ========================================================== */

.portfolio-imagen {

    position: relative;

    width: 100%;

    height: 600px;

    margin: 0;

    overflow: hidden;

    border-radius: 18px;

    background: #ffffff;

    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);

}


/* ==========================================================
   IMÁGENES DEL PORTFOLIO
   ========================================================== */

.portfolio-imagen img {

    display: block;

    width: 100%;

    height: 100%;

    object-fit: cover;

    object-position: center;

}


/* ==========================================================
   ETIQUETAS ANTES Y DESPUÉS
   ========================================================== */

.portfolio-imagen figcaption {

    position: absolute;

    left: 25px;

    bottom: 25px;

    padding: 12px 25px;

    background: #d62828;

    color: #ffffff;

    font-size: 16px;

    font-weight: 700;

    letter-spacing: 2px;

    border-radius: 5px;

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);

}


/* ==========================================================
   RESPONSIVE - TABLETS
   ========================================================== */

@media (max-width: 900px) {

    /* Reduce el tamaño del hero */

    .hero-portfolio {

        min-height: 430px;

        padding: 70px 20px;

    }


    /* Reduce el título principal */

    .hero-portfolio-contenido h1 {

        font-size: 48px;

    }


    /* Coloca las imágenes una debajo de otra */

    .portfolio-comparacion {

        grid-template-columns: 1fr;

    }


    /* Ajusta la altura de las imágenes */

    .portfolio-imagen {

        height: 550px;

    }

}


/* ==========================================================
   RESPONSIVE - MÓVILES
   ========================================================== */

@media (max-width: 600px) {

    /* Ajusta el hero */

    .hero-portfolio {

        min-height: 380px;

        padding: 60px 20px;

    }


    /* Reduce el título del hero */

    .hero-portfolio-contenido h1 {

        font-size: 38px;

    }


    /* Reduce el párrafo del hero */

    .hero-portfolio-contenido p {

        font-size: 16px;

    }


    /* Ajusta la introducción */

    .portfolio-introduccion {

        padding: 65px 20px;

    }


    /* Reduce los títulos */

    .portfolio-introduccion h2,
    .portfolio-proyecto-texto h2 {

        font-size: 36px;

    }


    /* Ajusta la sección de trabajos */

    .portfolio-trabajos {

        padding: 65px 20px;

    }


    /* Reduce la altura de las imágenes */

    .portfolio-imagen {

        height: 450px;

    }


    /* Ajusta la etiqueta */

    .portfolio-imagen figcaption {

        left: 18px;

        bottom: 18px;

        padding: 10px 20px;

        font-size: 14px;

    }

}

/* ==================================================
   AJUSTES DE INTEGRACIÓN - PORTFOLIO
================================================== */

.portfolio-proyecto {
    margin-bottom: 100px;
}

.portfolio-proyecto:last-child {
    margin-bottom: 0;
}

.portfolio-imagen {
    min-width: 0;
}

.portfolio-imagen img {
    transition: transform 0.4s ease;
}

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

@media (max-width: 900px) {
    .portfolio-imagen {
        height: 480px;
    }
}

@media (max-width: 600px) {
    .portfolio-proyecto {
        margin-bottom: 70px;
    }

    .portfolio-imagen {
        height: 360px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portfolio-imagen img {
        transition: none !important;
    }

    .portfolio-imagen:hover img {
        transform: none !important;
    }
}
