/* =========================================================
   DETALLE DE SERVICIOS
========================================================= */

.service-detail-page {
    width: 100%;
    min-height: 100vh;
    padding: 145px 6vw 100px;
}


/* =========================================================
   INTRODUCCIÓN
========================================================= */

.service-detail-intro {
    position: relative;
    width: min(1200px, 100%);
    margin: 0 auto 85px;
    border-top: 1px solid rgba(31, 97, 139, .20);
}

.service-detail-kicker {
    display: block;
    margin-bottom: 22px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.service-detail-intro h1 {
    position: relative;
    max-width: 1000px;
    margin: 0 0 30px;
    color: var(--blue-dark);
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(44px, 5vw, 70px);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -1.5px;
}

.service-detail-intro p {
    max-width: 720px;
    margin: 0;
    color: var(--gray-dark);
    font-size: 18px;
    line-height: 1.75;
}


/* =========================================================
   LÍNEA TÉCNICA DEL INTRO
========================================================= */

.service-detail-intro .service-detail-kicker {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
}

.service-detail-intro .service-detail-kicker::before {
    content: "";
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    border: 1px solid rgba(31, 97, 139, .65);
    transform: rotate(45deg);
}

.service-detail-intro .service-detail-kicker::after {
    content: "";
    width: 130px;
    height: 1px;
    background:
        repeating-linear-gradient(
            to right,
            rgba(31, 97, 139, .55) 0,
            rgba(31, 97, 139, .55) 8px,
            transparent 8px,
            transparent 14px
        );
}


/* =========================================================
   CONTENIDO
========================================================= */

.service-detail-content {
    position: relative;
    width: min(1200px, 100%);
    margin: 0 auto 90px;
}

.service-detail-content-secondary {
    margin-top: -25px;
}


/* =========================================================
   ENCABEZADO DE SECCIÓN
========================================================= */

.service-detail-heading {
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 35px;
    margin-bottom: 45px;
    border-bottom: 1px solid rgba(31, 97, 139, .18);
    padding-bottom: 22px;
}

.service-detail-heading > span {
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
}

.service-detail-heading h2 {
    margin: 0;
    color: var(--blue-dark);
    font-family: 'Libre Baskerville', serif;
    font-size: 34px;
    font-weight: 400;
}


/* =========================================================
   TARJETAS DE SERVICIOS
========================================================= */

.service-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 22px;
}

.service-item {
    position: relative;
    display: block;
    min-height: 150px;

    /* Espacio adicional a la derecha para el círculo */
    padding: 32px 72px 28px 30px;

    background: rgba(255, 255, 255, .42);
    border: 1px solid rgba(31, 97, 139, .16);

    transition:
        transform .3s ease,
        border-color .3s ease,
        background .3s ease,
        box-shadow .3s ease;
}


/* =========================================================
   CÍRCULO CON NÚMERO
========================================================= */

.service-item > span {
    position: absolute;

    /* Esquina superior derecha */
    top: 18px;
    right: 20px;

    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    border: 1px solid rgba(31, 97, 139, .45);
    border-radius: 50%;

    color: var(--blue);
    background: var(--beige);

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;

    z-index: 2;
}


/* =========================================================
   PEQUEÑA LÍNEA TÉCNICA DEL NÚMERO
========================================================= */

.service-item > span::after {
    content: "";

    position: absolute;
    left: 29px;
    top: 14px;

    width: 22px;

    border-top: 1px dashed rgba(31, 97, 139, .28);
}


/* =========================================================
   TEXTO
========================================================= */

.service-item p {
    margin: 0;
    color: var(--gray-dark);
    font-size: 15px;
    line-height: 1.7;
}


/* =========================================================
   ESQUINAS TÉCNICAS DE LA TARJETA
========================================================= */

.service-item::before,
.service-item::after {
    content: "";
    position: absolute;

    width: 13px;
    height: 13px;

    pointer-events: none;

    opacity: .45;

    transition: opacity .3s ease;
}

.service-item::before {
    left: -1px;
    top: -1px;

    border-left: 1px solid var(--blue);
    border-top: 1px solid var(--blue);
}

.service-item::after {
    right: -1px;
    bottom: -1px;

    border-right: 1px solid var(--blue);
    border-bottom: 1px solid var(--blue);
}


/* =========================================================
   HOVER MUY DISCRETO
========================================================= */

.service-item:hover {
    transform: translateY(-3px);

    background: rgba(255, 255, 255, .68);

    border-color: rgba(31, 97, 139, .32);

    box-shadow:
        0 12px 30px rgba(23, 74, 105, .07);
}

.service-item:hover::before,
.service-item:hover::after {
    opacity: .9;
}


/* =========================================================
   GALERÍA
========================================================= */

.service-detail-gallery {
    position: relative;
    width: min(1200px, 100%);
    margin: 0 auto 100px;

    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 20px;
}

.service-gallery-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.service-gallery-caption {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;

    padding: 12px 15px;

    background: rgba(255, 255, 255, 0.16);

    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(20px);

    border: 1px solid rgba(255, 255, 255, 0.50);
    border-radius: 8px;

    color: #ffffff;
    font-size: 16px;
    line-height: 1.4;

    text-align: center;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}




.service-gallery-image img {
    width: 100%;
    height: 100%;
    display: block;
    
    object-fit: cover;

    filter: saturate(.82);

    transition:
        transform .5s ease,
        filter .5s ease;

    filter:
        contrast(1.06)
        saturate(1.12)
        brightness(1.02);    
}

.service-gallery-image:hover img {
    transform: scale(1.06);
   
}


/* =========================================================
   CIERRE
========================================================= */

.service-detail-contact {
    position: relative;
    width: min(1200px, 100%);
    margin: 0 auto;

    padding: 65px 0;

    border-top: 1px solid rgba(31, 97, 139, .18);
    border-bottom: 1px solid rgba(31, 97, 139, .18);
}

.service-detail-contact span {
    display: block;
    margin-bottom: 18px;

    color: var(--blue);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 3px;
}

.service-detail-contact h2 {
    position: relative;

    margin: 0 0 28px;

    color: var(--blue-dark);

    font-family: 'Libre Baskerville', serif;
    font-size: 38px;
    font-weight: 400;
}

.service-detail-contact a {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    color: var(--blue);

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;

    text-decoration: none;
    text-transform: uppercase;

    transition:
        gap .25s ease,
        color .25s ease;
}

.service-detail-contact a:hover {
    gap: 15px;
    color: var(--blue-dark);
}


/* =========================================================
   DECORACIÓN TÉCNICA — INTRO
========================================================= */

.service-detail-intro::before {
    content: "";

    position: absolute;
    top: -55px;
    right: 10px;

    width: 190px;
    height: 190px;

    border: 1.5px solid rgba(31, 97, 139, .38);
    border-radius: 50%;

    background:
        linear-gradient(
            to right,
            transparent 0,
            transparent 8%,
            rgba(31, 97, 139, .30) 8%,
            rgba(31, 97, 139, .30) 92%,
            transparent 92%
        ) center / 100% 1px no-repeat,

        linear-gradient(
            to bottom,
            transparent 0,
            transparent 8%,
            rgba(31, 97, 139, .30) 8%,
            rgba(31, 97, 139, .30) 92%,
            transparent 92%
        ) center / 1px 100% no-repeat;

    box-shadow:
        0 0 0 12px rgba(31, 97, 139, .035),
        0 0 0 28px rgba(31, 97, 139, .025);

    pointer-events: none;
}

.service-detail-intro::after {
    content: "";

    position: absolute;
    top: 35px;
    right: 260px;

    width: 70px;
    height: 70px;

    border: 1px solid rgba(31, 97, 139, .30);
    border-radius: 50%;

    background:
        linear-gradient(
            to right,
            rgba(31, 97, 139, .28),
            rgba(31, 97, 139, .28)
        ) center / 100% 1px no-repeat,

        linear-gradient(
            to bottom,
            rgba(31, 97, 139, .28),
            rgba(31, 97, 139, .28)
        ) center / 1px 100% no-repeat;

    pointer-events: none;
}


/* =========================================================
   COTA LATERAL DEL INTRO
========================================================= */

.service-detail-intro h1::after {
    content: "01";

    position: absolute;
    right: 5px;
    top: 150px;

    font-family: 'DM Sans', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 3px;

    color: rgba(31, 97, 139, .45);

    writing-mode: vertical-rl;

    padding: 12px 0;

    border-top: 1px solid rgba(31, 97, 139, .30);
    border-bottom: 1px solid rgba(31, 97, 139, .30);
}


/* =========================================================
   CONTENIDO — RETÍCULA DE PUNTOS
========================================================= */

.service-detail-content::after {
    content: "";

    position: absolute;
    left: -75px;
    top: 40px;

    width: 150px;
    height: 150px;

    background-image:
        radial-gradient(
            rgba(31, 97, 139, .48) 1.5px,
            transparent 2px
        );

    background-size: 15px 15px;

    opacity: .55;

    -webkit-mask-image:
        radial-gradient(
            circle,
            black 15%,
            transparent 72%
        );

    mask-image:
        radial-gradient(
            circle,
            black 15%,
            transparent 72%
        );

    pointer-events: none;
}


/* =========================================================
   CONTENIDO — LÍNEA DE COTA
========================================================= */

.service-detail-content::before {
    content: "";

    position: absolute;
    right: 0;
    top: -35px;

    width: 230px;
    height: 14px;

    border-top: 1px solid rgba(31, 97, 139, .30);

    background:
        repeating-linear-gradient(
            to right,
            transparent 0,
            transparent 28px,
            rgba(31, 97, 139, .45) 28px,
            rgba(31, 97, 139, .45) 29px,
            transparent 29px,
            transparent 58px
        );

    pointer-events: none;
}


/* =========================================================
   ENCABEZADO — ESQUINA
========================================================= */

.service-detail-heading::before {
    content: "";

    position: absolute;
    left: -25px;
    top: -5px;

    width: 25px;
    height: 25px;

    border-left: 1.5px solid rgba(31, 97, 139, .50);
    border-top: 1.5px solid rgba(31, 97, 139, .50);
}


/* =========================================================
   ENCABEZADO — CRUZ DE REFERENCIA
========================================================= */

.service-detail-heading::after {
    content: "+";

    position: absolute;
    right: 25px;
    top: -35px;

    width: 25px;
    height: 25px;

    color: rgba(31, 97, 139, .45);

    font-size: 25px;
    font-weight: 300;
    line-height: 20px;

    text-align: center;
}


/* =========================================================
   GALERÍA — MARCO TÉCNICO
========================================================= */

.service-detail-gallery::before {
    content: "";

    position: absolute;
    left: -18px;
    top: -18px;

    width: 55px;
    height: 55px;

    border-left: 2px solid rgba(31, 97, 139, .45);
    border-top: 2px solid rgba(31, 97, 139, .45);

    z-index: 5;
}

.service-detail-gallery::after {
    content: "";

    position: absolute;
    right: -18px;
    bottom: -18px;

    width: 55px;
    height: 55px;

    border-right: 2px solid rgba(31, 97, 139, .45);
    border-bottom: 2px solid rgba(31, 97, 139, .45);

    z-index: 5;
}


/* =========================================================
   CADA IMAGEN — MARCA DE PLANO
========================================================= */

.service-gallery-image::before {
    content: "";

    position: absolute;
    left: 18px;
    top: 18px;

    width: 55px;
    height: 55px;

    border-left: 1.5px solid rgba(243, 237, 226, .80);
    border-top: 1.5px solid rgba(243, 237, 226, .80);

    z-index: 3;
    pointer-events: none;
}

.service-gallery-image::after {
    content: "";

    position: absolute;
    right: 18px;
    bottom: 18px;

    width: 55px;
    height: 55px;

    border-right: 1.5px solid rgba(243, 237, 226, .80);
    border-bottom: 1.5px solid rgba(243, 237, 226, .80);

    z-index: 3;
    pointer-events: none;
}


/* =========================================================
   CIERRE — CÍRCULO GRANDE
========================================================= */

.service-detail-contact::before {
    content: "";

    position: absolute;
    right: 190px;
    top: 25px;

    width: 110px;
    height: 110px;

    border: 1px solid rgba(31, 97, 139, .30);
    border-radius: 50%;

    background:
        linear-gradient(
            to right,
            rgba(31, 97, 139, .25),
            rgba(31, 97, 139, .25)
        ) center / 100% 1px no-repeat,

        linear-gradient(
            to bottom,
            rgba(31, 97, 139, .25),
            rgba(31, 97, 139, .25)
        ) center / 1px 100% no-repeat;

    box-shadow:
        0 0 0 15px rgba(31, 97, 139, .025);

    pointer-events: none;
}


/* =========================================================
   CIERRE — RETÍCULA
========================================================= */

.service-detail-contact::after {
    content: "";

    position: absolute;
    right: 0;
    bottom: 15px;

    width: 180px;
    height: 120px;

    background-image:
        radial-gradient(
            rgba(31, 97, 139, .50) 1.5px,
            transparent 2px
        );

    background-size: 14px 14px;

    opacity: .60;

    -webkit-mask-image:
        linear-gradient(
            to left,
            black,
            transparent
        );

    mask-image:
        linear-gradient(
            to left,
            black,
            transparent
        );

    pointer-events: none;
}


/* =========================================================
   MARCAS PEQUEÑAS DE REFERENCIA
========================================================= */

.service-detail-contact h2::before {
    content: "";

    position: absolute;
    left: 0;
    top: -25px;

    font-family: 'DM Sans', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 3px;

    color: rgba(31, 97, 139, .45);
}


/* =========================================================
   RESPONSIVE — TABLET
========================================================= */

@media (max-width: 850px) {

    .service-detail-page {
        padding: 125px 5vw 80px;
    }

    /* El intro vuelve a permitir wrap */
    .service-detail-intro {
        margin-bottom: 65px;
        white-space: normal;
    }

    .service-detail-intro h1 {
        white-space: normal;
    }

    .service-list {
        grid-template-columns: 1fr;
    }

    .service-item {
        min-height: auto;
        padding: 32px 70px 28px 30px;
    }

    .service-detail-gallery {
        grid-template-columns: 1fr 1fr;
    }

    .service-gallery-image:first-child {
        grid-column: 1 / -1;
    }


    /* Decoración del intro */

    .service-detail-intro::before {
        width: 130px;
        height: 130px;

        right: -10px;
        top: -35px;
    }

    .service-detail-intro::after {
        right: 150px;

        width: 50px;
        height: 50px;
    }

    .service-detail-intro h1::after {
        display: none;
    }


    /* Decoración de contenido */

    .service-detail-content::after {
        left: -40px;

        width: 100px;
        height: 100px;
    }

    .service-detail-content::before {
        width: 160px;
    }


    /* Encabezado */

    .service-detail-heading::before {
        left: 0;
    }

    .service-detail-heading::after {
        right: 0;
    }


    /* Cierre */

    .service-detail-contact::before {
        right: 100px;

        width: 80px;
        height: 80px;
    }
}


/* =========================================================
   RESPONSIVE — MÓVIL
========================================================= */

@media (max-width: 600px) {

    .service-detail-page {
        padding: 110px 6vw 65px;
    }

    .service-detail-intro {
        white-space: normal;
        margin-bottom: 55px;
    }

    .service-detail-intro h1 {
        font-size: 40px;
        white-space: normal;
    }

    .service-detail-intro p {
        font-size: 16px;
    }


    /* Encabezado */

    .service-detail-heading {
        gap: 20px;
        flex-wrap: wrap;
    }

    .service-detail-heading h2 {
        font-size: 28px;
    }


    /* Tarjetas */

    .service-item {
        padding: 48px 58px 24px 22px;
    }

    .service-item > span {
        top: 15px;
        right: 16px;

        width: 28px;
        height: 28px;
    }

    .service-item p {
        font-size: 14px;
    }


    /* Decoración del intro */

    .service-detail-intro::before {
        width: 80px;
        height: 80px;

        right: -10px;
        top: -20px;
    }

    .service-detail-intro::after {
        display: none;
    }


    /* Decoración de contenido */

    .service-detail-content::after {
        display: none;
    }

    .service-detail-content::before {
        width: 100px;
        top: -25px;
    }


    /* Galería */

    .service-detail-gallery {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .service-gallery-image,
    .service-gallery-image:first-child {
        grid-column: auto;
        height: 230px;
    }

    .service-detail-gallery::before,
    .service-detail-gallery::after {
        width: 30px;
        height: 30px;
    }


    /* Cierre */

    .service-detail-contact h2 {
        font-size: 30px;
    }

    .service-detail-contact::before {
        right: 35px;
        width: 65px;
        height: 65px;
    }

    .service-detail-contact::after {
        width: 110px;
        height: 80px;
    }
}


/* =========================================================
   ESCRITORIO — TÍTULO EN UNA SOLA LÍNEA
========================================================= */

@media (min-width: 1100px) {

    .service-detail-intro h1 {
        white-space: nowrap;
    }
}