/* =========================================================
   PROYECTOS
   Proyectos generales + Ambientales + Ingeniería + Residuos
========================================================= */


/* =========================================================
   PROYECTOS GENERALES
========================================================= */

.projects-page {
    width: min(1250px, 100%);
    margin: 0 auto;
}

.projects-header,
.projects-main-header {
    width: min(900px, 100%);
    margin: 0 auto 70px;
    text-align: center;
}

.projects-header h1,
.projects-main-header h1 {
    margin-bottom: 20px;
    color: var(--blue);
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(46px, 5vw,70px);
    font-weight: 400;
}

.projects-header p,
.projects-main-header p {
    color: var(--gray-dark);
    font-size: 16px;
    line-height: 1.75;
    white-space: nowrap;
    
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
}

.project-item {
    overflow: hidden;
}

.project-image {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
}

.project-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform .5s ease;
}

.project-image:hover img {
    transform: scale(1.04);
}

.project-description {
    position: absolute;
    inset: auto 0 0 0;

    padding: 25px;

    color: white;

    background:
        linear-gradient(
            transparent,
            rgba(15, 30, 45, .88)
        );

    transform: translateY(100%);
    transition: transform .35s ease;
}

.project-image:hover .project-description {
    transform: translateY(0);
}

.project-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
    padding: 20px 5px;
}

.project-info h2 {
    margin: 0;
    color: var(--blue-dark);
    font-family: 'Libre Baskerville', serif;
    font-size: 22px;
    font-weight: 400;
}

.project-info span {
    color: var(--gray);
    font-size: 13px;
}


/* =========================================================
   CATEGORÍAS DE PROYECTOS
========================================================= */

.project-category {
    position: relative;

    width: min(1050px, 100%);
    margin: 0 auto 110px;

    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);

    align-items: center;
    gap: 45px;
}

.project-category-image {
    position: relative;

    padding: 7px;
    overflow: hidden;

    border: 1px solid rgba(31, 97, 139, .35);
    border-radius: 18px;

    background: rgba(255, 255, 255, .20);
}

.project-category-image img {
    display: block;

    width: 100%;
    height: 450px;

    object-fit: cover;

    filter:
        saturate(.88)
        contrast(1.04);

    transition:
        transform .6s ease,
        filter .6s ease;
}

.project-category-image:hover img {
    transform: scale(1.025);

    filter:
        saturate(1)
        contrast(1);
}

.project-category-card {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;
    justify-content: center;

    margin-left: -55px;
    padding: 45px;

    background: rgba(255, 255, 255, .17);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 18px;

    box-shadow: var(--shadow);

    transition:
        transform .35s ease,
        background .35s ease,
        box-shadow .35s ease;
}

.project-category-card:hover {
    transform: translateY(-6px);

    background: rgba(255, 255, 255, .30);

    box-shadow: var(--shadow-hover);
}

.project-category-reverse .project-category-card {
    margin-left: 0;
    margin-right: -55px;
}

.project-category-card h2 {
    margin-bottom: 18px;
    color: var(--blue-dark);
    font-family: 'Libre Baskerville', serif;
    font-size: 34px;
    font-weight: 400;
}

.project-category-card p {
    color: var(--gray-dark);
    font-size: 15px;
    line-height: 1.8;
}


/* =========================================================
   ESPECIALIDADES
========================================================= */

.specialty-page {
    width: 100vw;
    min-height: 100vh;

    margin-left: calc(50% - 50vw);

    padding: 145px 4vw 120px;

    box-sizing: border-box;
    overflow: hidden;
}

.specialty-page > * {
    position: relative;
    z-index: 2;
}

.specialty-header {
    width: min(900px, 100%);
    margin: 0 auto 85px;
    text-align: center;
}

.specialty-header .cota {
    width: min(650px, 100%);
    margin: 0 auto 30px;
}

.specialty-header h1 {
    margin: 0 auto 22px;
    color: var(--blue);
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(48px, 5vw, 70px);
    font-weight: 400;
    line-height: 1.05;
}

.specialty-header > p {
    width: min(680px, 100%);
    margin: 0 auto;
    color: var(--gray-dark);
    font-size: 16px;
    line-height: 1.75;
}


/* =========================================================
   AMBIENTALES
========================================================= */

.environmental-page .specialty-hero-detail {
    width: min(1150px, 100%);
    margin: 0 auto 115px;

    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);

    align-items: center;
}

.environmental-page .specialty-image-frame {
    position: relative;

    width: 100%;
    height: 450px;
    padding: 7px;

    background: rgba(255, 255, 255, .65);

    border: 1px solid rgba(31, 97, 139, .28);
}

.environmental-page .specialty-image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.environmental-page .specialty-floating-card {
    position: relative;
    z-index: 5;

    width: 100%;
    margin-left: -55px;
    padding: 48px;

    background: rgba(255, 255, 255, .96);

    border: 1px solid rgba(31, 97, 139, .16);
    border-radius: 18px;

    box-shadow:
        0 22px 55px rgba(30, 55, 70, .07);
}

.environmental-page .specialty-floating-card h2 {
    max-width: 470px;
    margin-bottom: 20px;

    color: var(--blue-dark);
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(32px, 3vw, 43px);
    font-weight: 400;
    line-height: 1.12;
}

.environmental-page .specialty-floating-card > p {
    max-width: 470px;
    margin-bottom: 30px;
    color: var(--gray-dark);
    font-size: 14px;
    line-height: 1.75;
}

.environmental-page .specialty-mini-process {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding-top: 23px;
    border-top: 1px solid rgba(31, 97, 139, .15);
}

.environmental-process-detail {
    width: min(1050px, 100%);
    margin: 0 auto 105px;
    padding-top: 60px;

    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);

    gap: 80px;

    border-top: 1px solid rgba(31, 97, 139, .15);
}

.environmental-process-intro h2 {
    max-width: 330px;

    color: var(--blue-dark);
    font-family: 'Libre Baskerville', serif;
    font-size: 36px;
    font-weight: 400;
    line-height: 1.15;
}

.environmental-process-item {
    display: grid;
    grid-template-columns: 45px minmax(0, 1fr);
    gap: 20px;

    padding: 23px 0;

    border-bottom: 1px solid rgba(31, 97, 139, .12);
}

.environmental-process-item h3 {
    margin-bottom: 7px;
    color: var(--blue-dark);
    font-size: 20px;
}

.environmental-process-item p {
    max-width: 600px;
    color: var(--gray-dark);
    font-size: 14px;
    line-height: 1.7;
}


/* =========================================================
   INGENIERÍA
========================================================= */

.engineering-page {
    width: min(1380px, 100%);
    margin: 0 auto;
}

.engineering-page .engineering-grid {
    position: relative;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    column-gap: 70px;
    row-gap: 65px;

    padding-top: 15px;
}

.engineering-discipline {
    position: relative;

    min-height: 245px;

    padding: 35px 20px 10px 42px;

    border-top: 1px solid rgba(31, 97, 139, .18);
}

.engineering-discipline::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;
    bottom: 0;

    width: 1px;

    background: rgba(31, 97, 139, .24);
}

.engineering-discipline .process-number {
    position: absolute;

    left: -10px;
    top: -10px;

    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--blue);
    background: var(--white);

    font-size: 18px;
    font-weight: 700;

    border: 1px solid var(--blue);
    border-radius: 50%;
}

.engineering-discipline .discipline-line {
    width: 65px;
    height: 1px;

    margin-bottom: 20px;

    background: var(--blue);
}

.engineering-discipline .btn-secondary {
    display: inline-block;

    margin-bottom: 18px;

    font-size: 16px;
}

.engineering-discipline > p {
    max-width: 620px;

    margin-bottom: 34px;

    color: var(--gray-dark);

    font-size: 17px;
    line-height: 1.7;
}

.engineering-discipline ul {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 9px 28px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.engineering-discipline li {
    position: relative;

    padding-left: 15px;

    color: var(--gray-dark);

    font-size: 15px;
    line-height: 1.55;
}

.engineering-discipline li::before {
    content: "";

    position: absolute;

    left: 0;
    top: 9px;

    width: 5px;
    height: 5px;

    border: 1px solid var(--blue);
    border-radius: 50%;
}

.engineering-page::after {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    right: 5%;
    top: 190px;

    border: 1px solid rgba(31, 97, 139, .10);
    border-radius: 50%;
}


/* =========================================================
   RESIDUOS
========================================================= */

.waste-page {
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
    box-sizing: border-box;
}

.waste-hero {
    width: min(1180px, calc(100% - 60px));
    margin: 70px auto 110px;

    display: grid;
    grid-template-columns: .85fr 1.35fr;

    align-items: center;
    gap: 70px;
}

.waste-hero-copy {
    padding-bottom: 20px;
}

.waste-hero-copy h1 {
    margin: 12px 0;

    color: var(--blue-dark);
    font-family: 'Libre Baskerville', serif;

    font-size: clamp(36px, 4vw, 54px);
    line-height: 1.08;
}

.waste-hero-copy p {
    margin: 0;

    color: var(--gray-dark);

    font-size: 14px;
    line-height: 1.7;
}

.waste-hero-image {
    position: relative;

    width: 100%;
    height: 480px;
    margin: 0;

    overflow: hidden;

    border-radius: 18px;
}

.waste-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.waste-process {
    width: min(1180px, 100%);
    margin: 0 auto 100px;
}

.waste-process-intro {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 60px;

    align-items: end;

    margin-bottom: 60px;
}

.waste-process-intro h2 {
    margin-top: 10px;

    color: var(--blue-dark);
    font-family: 'Libre Baskerville', serif;

    font-size: 38px;
    font-weight: 400;
    line-height: 1.15;
}

.waste-process-intro > p {
    color: var(--gray-dark);

    font-size: 14px;
    line-height: 1.8;
}

.waste-flow {
    position: relative;

    display: grid;

    grid-template-columns: repeat(6, minmax(0, 1fr));

    gap: 20px;
}

.waste-step {
    position: relative;

    min-width: 0;

    text-align: center;
}

.waste-node {
    position: relative;

    width: 82px;
    height: 82px;

    margin: 0 auto 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, .18);

    border: 1px solid rgba(31, 97, 139, .40);
    border-radius: 50%;
}

.waste-node::before {
    content: "";

    position: absolute;

    inset: 7px;

    border: 1px solid rgba(31, 97, 139, .16);
    border-radius: 50%;
}

.waste-node-number {
    position: absolute;

    top: -8px;
    right: 2px;

    width: 21px;
    height: 21px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--blue);
    background: var(--white);

    font-size: 8px;
    font-weight: 700;

    border: 1px solid rgba(31, 97, 139, .30);
    border-radius: 50%;
}

.waste-node-icon {
    position: relative;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--blue-dark);

    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;

    border: 1px solid rgba(31, 97, 139, .25);
    border-radius: 50%;
}

.waste-step-content {
    width: 100%;
    max-width: 175px;
    margin: 0 auto;
}

.waste-step-label {
    display: block;

    margin-bottom: 8px;

    color: var(--blue);

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.waste-step h3 {
    margin-bottom: 9px;

    color: var(--blue-dark);
    font-family: 'Libre Baskerville', serif;

    font-size: 17px;
    font-weight: 400;
    line-height: 1.25;
}

.waste-step p {
    color: var(--gray-dark);

    font-size: 14px;
    line-height: 1.65;
}

.waste-arrow {
    position: absolute;

    top: 41px;
    left: calc(100% - 10px);

    width: 20px;
    height: 1px;

    display: block;

    background: rgba(31, 97, 139, .35);
}

.waste-arrow span {
    position: absolute;

    right: 0;
    top: -3px;

    width: 6px;
    height: 6px;

    border-top: 1px solid var(--blue);
    border-right: 1px solid var(--blue);

    transform: rotate(45deg);
}


/* =========================================================
   ÁREAS DE ESPECIALIDAD
========================================================= */

/*
   IMPORTANTE:
   Esta es la ÚNICA definición de .specialty-areas.
   No usar una segunda versión específica para
   .engineering-page.
*/

.specialty-areas {
    width: min(1380px, 100%);
    margin: 110px auto 80px;

    padding: 65px 0 0;

    border-top: 1px solid rgba(31, 97, 139, .18);

    box-sizing: border-box;
}

.areas-header {
    display: flex;

    align-items: baseline;

    gap: 45px;

    margin-bottom: 30px;

    padding-bottom: 16px;

    border-bottom: 1px solid rgba(20, 92, 137, .25);
}

.areas-header > span {
    flex-shrink: 0;

    color: var(--blue);

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 3px;

    text-transform: uppercase;
}

.areas-header h2 {
    flex: 1;

    margin: 0;

    color: var(--blue-dark);

    font-family: 'Libre Baskerville', serif;

    font-size: 30px;
    font-weight: 400;
    line-height: 1.2;
}

.engineering-page .specialty-areas .areas-description {
    max-width: 700px;

    margin: -8px 0 28px;

    color: #52616b;

    font-size: 13px;
    line-height: 1.7;
}

.areas-list {
    display: flex;

    flex-wrap: wrap;

    gap: 18px;
}

.areas-list span {
    display: inline-flex;

    align-items: center;

    min-height: 56px;

    padding: 14px 24px;

    color: var(--gray-dark);

    font-size: 18px;
    line-height: 1.3;

    border: 1px solid rgba(31, 97, 139, .18);

    background: rgba(255, 255, 255, .22);

    transition: .25s ease;
}

.areas-list span:hover {
    background: rgba(255, 255, 255, .50);

    border-color: rgba(31, 97, 139, .35);

    transform: translateY(-2px);
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {

    .engineering-page .engineering-grid {
        gap: 55px;
    }

    .waste-flow {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 55px;
    }
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 800px) {

    .specialty-page {
        padding: 105px 30px 80px;
    }

    .specialty-header {
        margin-bottom: 65px;
    }

    .environmental-page .specialty-hero-detail {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .environmental-page .specialty-image-frame {
        height: 360px;
    }

    .environmental-page .specialty-floating-card {
        margin: -45px 20px 0;
        width: calc(100% - 40px);
    }

    .environmental-process-detail {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .engineering-page .engineering-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .waste-hero {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .waste-flow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 50px 30px;
    }

    .waste-process-intro {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .areas-header {
        display: block;
    }

    .areas-header > span {
        display: block;
        margin-bottom: 10px;
    }
}


/* =========================================================
   CELULAR
========================================================= */

@media (max-width: 600px) {

    .specialty-page {
        padding: 100px 22px 65px;
    }

    .specialty-header h1 {
        font-size: 38px;
    }

    .environmental-page .specialty-image-frame {
        height: 270px;
    }

    .environmental-page .specialty-floating-card {
        margin: -30px 8px 0;
        width: calc(100% - 16px);
        padding: 28px 23px;
    }

    .environmental-page .specialty-floating-card h2 {
        font-size: 28px;
    }

    .environmental-process-item {
        grid-template-columns: 35px minmax(0, 1fr);
        gap: 12px;
    }

    .engineering-discipline {
        padding-left: 25px;
    }

    .engineering-discipline h3 {
        font-size: 23px;
    }

    .engineering-discipline ul {
        grid-template-columns: 1fr;
    }

    .waste-hero {
        width: calc(100% - 28px);
    }

    .waste-hero-image {
        height: 280px;
    }

    .waste-flow {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .waste-arrow {
        display: none;
    }

    .waste-process-intro h2 {
        font-size: 34px;
    }

    .areas-header h2 {
        font-size: 26px;
    }
}


/* =========================================================
   CELULAR PEQUEÑO
========================================================= */

@media (max-width: 450px) {

    .specialty-page {
        padding-left: 20px;
        padding-right: 20px;
    }

    .specialty-header h1 {
        font-size: 34px;
    }

    .environmental-page .specialty-image-frame {
        height: 260px;
    }

    .environmental-page .specialty-floating-card {
        width: calc(100% - 10px);
        padding: 25px 20px;
    }

    .engineering-discipline {
        padding-left: 22px;
    }

    .waste-flow {
        gap: 40px;
    }
}


/* =========================================================
   AJUSTE FINAL DE IMÁGENES EN CELULAR
========================================================= */

@media (max-width: 700px) {

    .project-image img {
        width: 100%;
        height: auto;

        aspect-ratio: 16 / 10;

        object-fit: cover;
    }

    .project-category-image img {
        width: 100%;
        height: auto;

        aspect-ratio: 16 / 10;

        object-fit: cover;
    }

    .environmental-page .specialty-image-frame {
        width: 100%;
        height: auto;

        aspect-ratio: 16 / 10;
    }

    .environmental-page .specialty-image-frame img {
        width: 100%;
        height: 100%;

        object-fit: cover;
    }
}


/* =========================================================
   RESPONSIVE — TARJETAS DE CATEGORÍAS
========================================================= */

@media (max-width: 800px) {

    .project-category {
        grid-template-columns: 1fr;

        gap: 22px;

        margin-bottom: 65px;
    }

    .project-category-image {
        width: 100%;
    }

    .project-category-image img {
        width: 100%;
        height: auto;

        aspect-ratio: 16 / 10;

        object-fit: cover;
    }

    .project-category-card {
        width: 100%;

        box-sizing: border-box;

        margin-left: 0;

        padding: 28px 24px;
    }

    .project-category-card h2 {
        margin-bottom: 14px;

        font-size: 27px;
        line-height: 1.25;
    }

    .project-category-card p {
        font-size: 15px;
        line-height: 1.7;
    }
}

@media (max-width: 450px) {

    .project-category {
        gap: 18px;
    }

    .project-category-card {
        padding: 24px 20px;
    }

    .project-category-card h2 {
        font-size: 24px;
    }

    .project-category-card p {
        font-size: 14px;
    }
}

/* =========================================================
   ÁREAS DE ESPECIALIDAD — INGENIERÍA
   AJUSTE FINAL
========================================================= */

.engineering-page .specialty-areas {
    width: min(1380px, 100%);
    margin: 150px auto 80px;
    padding: 65px 0 0;
    border-top: 1px solid rgba(31,97,139,.18);
}


/* CABECERA */

.engineering-page .areas-header {
    display: flex;
    align-items: baseline;
    gap: 45px;

    margin-bottom: 35px;
    padding-bottom: 16px;

    border-bottom: 1px solid rgba(20, 92, 137, .25);
}


.engineering-page .areas-header > span {
    flex-shrink: 0;

    color: var(--blue);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
}


.engineering-page .areas-header h2 {
    flex: 1;

    margin: 0;

    color: var(--blue);
    font-family: 'Libre Baskerville', serif;

    font-size: 39px;
    font-weight: 400;
    line-height: 1.2;
}


/* DESCRIPCIÓN */

.engineering-page .specialty-areas .areas-description {
    width: 100%;
    max-width: none;

    margin: 0 0 50px;

    color: #52616b;
    font-size: 20px;
    line-height: 1.75;

    white-space: nowrap;
}

.engineering-page .process-intro h2 {
    white-space: nowrap;
    text-align: center;
}

