/*----------CUERPO----------*/
body,
html {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
               'Segoe UI', Roboto, sans-serif;
    color: #21232A;
    overflow-x: hidden;
    margin: 0;
    transition: all 0.4s ease;
    background-color: #FAFBFB;
    scroll-behavior: smooth;
    cursor: default;
}
p {
    font-weight: lighter;
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}
.noto-font {
    font-family: "Noto Sans Display", serif;
    font-weight: 400;
    font-style: italic;
    font-size: 110%;
}
strong, b { font-weight: 500; }
i { font-style: italic; }
u { text-decoration: underline; }
body { overflow: hidden; }
section {
    margin: 0;
    padding: 0;
}
.contenido { padding: 80px 0; }
.transitionColor { height: 20vh; }
.reverse { flex-direction: row; }
a, button, .cta, .cursor-pointer { cursor: pointer; }

/*---------BUTTONS----------*/
.button {
    font-size: 30px;
    color: #21232A;
    border: 1px solid #4e515c;
    padding: 7px 20px;
    border-radius: 30px;
    transition: all 0.5s;
    position: relative;
    overflow: hidden;
    scroll-behavior: smooth;
    background-color: #F5F5F5;
    z-index: 2;
    &::before {
        transition-duration: 800ms;
        position: absolute;
        width: 200%;
        height: 200%;
        content: "";
        top: 180%;
        left: -50%;
        color: #F5F5F5;
        background: #21232A;
        transform: translateX(-30%);
        z-index: -1;
    }
    &:hover::before {
        transition-duration: 800ms;
        transform: translateY(-100%);
        background: #21232A;
    }
    &:hover {
        color: #F5F5F5 !important;
        background: none;
    }
}

/*----------COLORS----------*/
.accent-blue { color: #37677D; }
.accent-bgBlue { background-color: #37677D; }
.accent-orange { color: #BD802C; }
.accent-bgOrange { background-color: #BD802C; }
.color-light { color: #F5F5F5; }
.color-bgLight { background-color: #F5F5F5; }
.color-bgDark { background-color: #21232A; }
.color-dark { color: #21232A; }

/*----------SPACING----------*/
.mr-15 { margin-right: 15px; }
.mb-15 { margin-bottom: 15px; }
.mb-45 { margin-bottom: 45px; }

/*---------BTN-TO-TOP----------*/
#btn-to-top {
    position: fixed;
    bottom: 20%;
    right: 10px;
    width: 60px;
    height: 60px;
    background-color: #37677D;
    border-radius: 50%;
    font-size: 25px;
    font-weight: 400;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(17, 16, 46, 0.2);
    transition: all 1s ease;
    opacity: 0;
    &:hover {
        box-shadow: 1px 1px 20px 11px rgb(71 71 71 / 20%);
        border: 20px solid #37677D;
    }
    &.btn-entrando {
        bottom: 80px;
        opacity: 1;
    }
    i { color: #F5F5F5; }
}
.material-symbols-outlined {
    color: #21232A;
    font-variation-settings: 'FILL' 0,
  'wght' 200,
  'GRAD' 0,
  'opsz' 24;
}

/*----------HEADER / MENÚ----------*/
header {
    /*box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05), 0 5px 15px rgba(0, 0, 0, 0.03);*/
    min-height: 100vh;
    padding: 0 !important;
    margin: 0 !important;
}
.title-pag {
    h1 {
        font-size: 60px;
        font-weight: 200;
        padding-bottom: 10px;
        color: #21232A;
        line-height: .9;
        text-align: center;
        font-style: italic;
    }

    h2 {
        font-size: 50px;
        margin-left: 50px;
        margin-right: 10px;
        margin-bottom: 10px;
        font-style: italic;
        font-weight: 200;
    }
}

#logo-hero {
    width: 300px;
    margin: 0 20px 10px 0;
}

/* MENÚ: estilos comunes y estados dentro del componente. */
#menu-top, #menu-bottom {
    position: fixed;
    display: flex;
    justify-content: space-between;
    width: 95%;
    transform: scale(0);
    transition: all 1s ease;

    a {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        white-space: nowrap;
        font-size: clamp(16px, 2.1vw, 22px);
        flex: 0 0 clamp(112px, 17vw, 240px);
        color: #21232A;
        border: 1px solid #868686;
        padding: 10px 30px;
        border-radius: 30px;
        transition: all .5s;
        position: relative;
        overflow: hidden;
        scroll-behavior: smooth;
        background-color: #FAFBFB;

        &::before {
            transition-duration: 800ms;
            position: absolute;
            width: 200%;
            height: 200%;
            content: "";
            top: 180%;
            left: -50%;
            color: #F5F5F5;
            background: #21232A;
            transform: translateX(-30%);
            z-index: -1;
        }

        &:hover {
            color: #F5F5F5 !important;
            background: none;

            &::before {
                transition-duration: 800ms;
                transform: translateY(-100%);
                background: #21232A;
            }
        }
    }

    &.menu-abierto { transform: scale(1); }
}

#menu-top {
    top: 50%;
    z-index: 99;

    &.menu-abierto { top: 1%; }
}

#menu-bottom {
    bottom: 50%;
    z-index: 100;

    &.menu-abierto { bottom: 1%; }

    &.menu-abierto.desplazamiento {
        bottom: inherit;
        top: 1%;
        width: 55%;
    }
}

.abrir-menu,
.cerrar-menu {
    font-size: 20px;
    z-index: 10000;
}
.cerrar-menu { display: none; }
.menu-button {
    position: fixed;
    bottom: 4%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    &.desplazamiento {
        top: 4%;
        color: #FAFBFB;
        bottom: auto;
    }
}
#intro {
    height: 100vh;
    padding-top: 100px;

    &.intro-animation-ready .contenido > div {
        opacity: 0;
        transform: translateX(-90px);
        transition: opacity 750ms ease, transform 750ms cubic-bezier(.2, .75, .25, 1);
    }

    &.intro-animation-ready.intro-entered .contenido > div {
        opacity: 1;
        transform: translateX(0);
        transition-delay: calc(var(--intro-index) * 100ms);
    }

    p {
        font-size: 55px;
        width: 100%;
        font-weight: 400;
        text-align: center;
        line-height: 1;
        letter-spacing: -.045em;
        text-transform: uppercase;
        transition: all 1s ease-in-out;
        white-space: nowrap;

        &:hover {
            letter-spacing: .045em;
            cursor: pointer;
            border-bottom: 1px solid #ffffff2e;
            border-top: 1px solid #ffffff2e;
            padding: 0 50px;
        }
    }

    h3 {
        font-size: 24px;
        font-weight: 600;
        font-style: italic;
        margin-bottom: 2%;
        color: inherit;
    }
}

/* Componente reutilizable, independiente de la home. */
.hover-imagen {
    position: relative;

    img {
        opacity: 0;
        position: absolute;
        visibility: hidden;
        right: clamp(50px, calc(80px - 2vw), -250px);
        top: -50px;
        transition: all 1s ease;
        width: 100px;
    }

    p:hover + img {
        opacity: 1;
        visibility: visible;
        transform: rotate(10deg);
    }
}

/*---------SECCIÓN ABOUT-----------*/
#about {
    min-height: 100vh;
    padding-bottom: 100px;

    .contenido { width: 65%; }

    h2 {
        font-size: 35px;
        font-weight: 400;
        padding-bottom: 35px;
        line-height: 2.8rem;

        &.about-heading-ready {
            .about-line-word {
                opacity: 0;
                display: inline-block;
                transform: translateY(36px);
                transition: opacity 750ms ease, transform 750ms ease;
            }

            &.about-entered .about-line-word {
                opacity: 1;
                transform: translateY(0);
                transition-delay: calc(var(--line-index) * 180ms);
            }

            + h3 {
                opacity: 0;
                transform: translateY(150px);
                transition: opacity 2s ease, transform 2s ease;
            }

            &.about-entered + h3 {
                opacity: 1;
                transform: translateY(0);
                transition-delay: 350ms;
            }
        }
    }

    h3 {
        font-size: 20px;
        line-height: 1.3;
        font-weight: 300;
        padding: 1% 0;
        letter-spacing: .2px;
    }
}

/* ======================================
   PÁGINAS INTERIORES - MENÚ COMPARTIDO
====================================== */

/* No hay hero de presentación como en index */
.seccion-pags {
    overflow-y: auto;

    .menu-header {
        height: 0;
        min-height: 0;
        padding: 0;
        margin: 0;
    }

    #hero {
        height: 0;
        min-height: 0;
        padding: 0;

        .title-pag {
            height: 0;
            padding: 0;
            margin: 0;
        }
    }

    #menu-top.menu-abierto { top: 1%; }

    #menu-bottom.menu-abierto.desplazamiento {
        top: 1%;
        bottom: auto;
        width: 57%;
    }

    /* Ya incluye el estado .desplazamiento. */
    .menu-button {
        top: 3%;
        bottom: auto;
        color: #21232A;
    }
}

.menu-logo {
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    white-space: nowrap;
    color: inherit;
    text-decoration: none;
    margin-bottom: 5px;
    strong { font-weight: 800; }
}

/* El contenedor central es compartido con páginas interiores. */

/* En el hero se ve MENÚ, pero no el nombre */
#inicio {
    .menu-logo { display: none; }

    .menu-button.desplazamiento {
        top: 3%;
        bottom: auto;
        color: #21232A;

        .menu-logo { display: block; }
    }

    &.menu-sobre-oscuro .menu-button.desplazamiento { color: #F5F5F5; }
}

/* En escritorio se oculta únicamente el control, no el contenedor ni el logo.
   Usamos altura/visibilidad en vez de display:none!important para respetar
   el display que jQuery utiliza para alternar abrir/cerrar en móvil. */
.seccion-pags .menu-button .abrir-menu,
.seccion-pags .menu-button .cerrar-menu,
#inicio .menu-button.desplazamiento .abrir-menu,
#inicio .menu-button.desplazamiento .cerrar-menu {
    height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

/* ======================================
   WEB Y PRODUCTO - ESTILOS
====================================== */
#web-portfolio, #producto-portfolio {
    width: 100%;
    padding: 130px 0 100px;
    background-color: #FAFBFB;
    color: #21232A;
    .contenido {
        width: 90%;
        padding: 0;
    }
    /* ---------- CABECERA ---------- */
    .web-cabecera, .producto-cabecera {
        width: 100%;
        padding: 0;
        margin-bottom: 50px;
    }
}
.web-superior, .producto-superior {
    width: 100%;
    gap: 20px;
    margin-bottom: 30px;
    font-size: 12px;
    font-weight: 400;
    color: #63666D;
    text-transform: uppercase;
}
.web-presentacion, .producto-presentacion {
    width: 100%;
    gap: 40px;
    align-items: flex-end;
    margin-bottom: 28px;
    h1 {
        flex: 1;
        font-size: clamp(56px, 6.8vw, 115px);
        font-weight: 800;
        line-height: .92;
        letter-spacing: -.075em;
    }
    p {
        width: 32%;
        max-width: 370px;
        flex-shrink: 0;
        font-size: clamp(15px, 1.2vw, 19px);
        font-weight: 400;
        line-height: 1.35;
        letter-spacing: -.02em;
        margin-bottom: 5px;
    }
}

/* Categorías debajo del hero */
.web-categorias, .producto-categorias {
    width: 100%;
    border-top: 1px solid #777;
    padding-top: 13px;
    font-size: 12px;
    font-weight: 400;
    color: #72747A;
    gap: 15px;
}
.web-categorias-lista, .producto-categorias-lista {
    gap: 13px;
    flex-wrap: wrap;
}
.web-bajar, .producto-bajar {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    text-decoration: none;
    color: #21232A;
    font-size: 12px;
    font-weight: 400;
    &:hover { color: #BD802C; }
}

/* ---------- GRID PROYECTOS ---------- */
#web-portfolio .web-proyectos, #producto-portfolio .producto-proyectos {
    width: 90%;
    padding: 160px 0;
    display: flex;
    column-gap: 10%;
    row-gap: 150px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-around;
}
.web-proyecto, .producto-proyecto {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.web-proyecto-cabecera, .producto-proyecto-cabecera {
    gap: 15px;
    margin-bottom: 12px;
    h2 {
        font-size: 17px;
        font-weight: 700;
        letter-spacing: -.03em;
    }
    > span {
        font-size: 13px;
        font-weight: 400;
        white-space: nowrap;
    }
}
.web-proyecto-imagen, .producto-proyecto-imagen {
    display: block;
    width: 100%;
    overflow: hidden;
    background-color: #f2f2f2;
    margin-bottom: 15px;
    img {
        display: block;
        width: 100%;
        height: auto;
    }
}

/* Información del proyecto */
.web-proyecto-info, .producto-proyecto-info {
    border-top: 1px dotted #ACACAC;
    border-bottom: 1px dotted #ACACAC;
    padding: 8px 0 10px;
    display: flex;
    flex: 1;
    flex-direction: column;
}
.web-proyecto-etiquetas, .producto-proyecto-etiquetas {
    gap: 10px;
    margin-bottom: 8px;
    p {
        font-size: 12px;
        font-weight: 400;
        letter-spacing: -.025em;
        line-height: 1.3;
    }
    b { font-weight: 600; }
    a {
        font-size: 22px;
        color: #BD802C;
        text-decoration: none;
        flex-shrink: 0;
        transition: transform .3s ease;
        &:hover { transform: translateX(6px); }
    }
}
.web-proyecto-descripcion, .producto-proyecto-descripcion {
    max-width: 90%;
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -.015em;
    line-height: 1.3;
}
.web-proyecto-tecnologias, .producto-proyecto-tecnologias {
    margin-top: auto;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    text-align: right;
}
/* ======================================
   CARRUSEL · COMPONENTE GLOBAL
====================================== */

.carrusel {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    background: #E9EAEB;

    .carrusel-pista {
        display: flex;
        width: 100%;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;

        &::-webkit-scrollbar { display: none; }

        > * {
            flex: 0 0 100%;
            min-width: 0;
            scroll-snap-align: start;
        }

        img {
            width: 100%;
            aspect-ratio: 4 / 3;
            object-fit: contain;
            border-radius: 22px;
            padding:10px;
        }
    }

    .carrusel-controles {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
        border-top: 1px solid #D9DDDF;
    }

    .carrusel-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border: 1px solid #21232A;
        border-radius: 50%;
        background: transparent;
        color: #21232A;
        font-size: 20px;
        cursor: pointer;
        transition: all .3s ease;

        &:hover {
            background: #BD802C;
            border-color: #BD802C;
            color: #FAFBFB;
        }
    }
}
/* ---------- CONTACTO: componentes reutilizables ---------- */
.contacto {
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 12px 8px;
    width: 100%;
    min-height: auto;
    height: auto;
    padding: 2% 5%;
    border-top: 1px solid #5e4422;
    border-bottom: 1px solid #5e4422;

    a { margin: 0; }
}

.contacto-item {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 20px;
    font-weight: 300;
    color: inherit;
    white-space: nowrap;
}

.contacto-icono, .contacto .rrss {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border: 1px solid #BD802C;
    border-radius: 50%;
    font-size: 17px;
}

#cvButton {
    min-width: 20%;
    font-size: 20px;
}

.footer-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 48px;
    border: 1px solid #F5F5F5;
    color: #F5F5F5;
    font-size: 35px;
    margin-bottom: 25px;
    opacity: .5;
    transition: opacity .5s ease, transform .5s ease;
}

/* ---------- FOOTER ---------- */
footer {
    .contenido {
        width: 100%;
        padding: 0;
    }

    .rrss {
        font-size: 20px;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: 1px solid #BD802C;

        &:hover { background-color: #C9852C; }
    }

    .subfooter-dual {
        height: 80vh;
        padding: 0;
        background-image: url("../imagenes/img-footer.png");
        background-position: bottom;
        background-size: 80%;
        background-repeat: no-repeat;

        > .left, > .right {
            width: 50%;
            flex: 0 0 50%;
            min-width: 0;
            transition: flex-basis .6s ease-in-out;
        }

        /* La izquierda queda activa inicialmente. */
        &:not(:has(.right:hover)) > .left {
            &::before { transform: translateX(0); }
            p { opacity: 1; transform: translateY(0); }
            .footer-arrow { opacity: 1; transform: translateX(-10px); }
        }
    }

    .left, .right {
        padding: 7%;
        flex-direction: column;
        height: 100%;
        position: relative;
        width: 50%;

        &::before {
            content: "";
            position: absolute;
            inset: 0;
            background-color: rgb(33 35 42 / 85%);
            z-index: 1;
            pointer-events: none;
            transition: transform .7s ease-in-out;
        }

        &:hover {
            &::before { transform: translateX(0); }
            p { opacity: 1; transform: translateY(0); }
        }

        > div { position: relative; z-index: 2; }

        h2 {
            font-size: clamp(35px, 4vw, 70px);
            font-weight: 800;
            line-height: 1;
            margin-bottom: 30px;
            transition: opacity .5s ease;
        }

        p {
            opacity: 0;
            transform: translateY(20px);
            transition: opacity .5s ease, transform .5s ease;
        }
    }

    .left {
        &::before { transform: translateX(-100%); }

        h2 {
            font-family: "Noto Serif Display", serif;
            font-style: italic;
            font-weight: 400;
        }

        &:hover .footer-arrow {
            opacity: 1;
            transform: translateX(-10px);
        }
    }

    .right {
        text-align: right;
        align-items: flex-end;
        &::before { transform: translateX(100%); }

        &:hover .footer-arrow {
            opacity: 1;
            transform: translateX(10px);
        }
    }
}

/* ------- FALSO CURSOR ------- */
.cursor-background {
    position: fixed;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    pointer-events: none;
    border: 1px solid #5B7599;
    transition: transform .2s ease;
    z-index: 10000;
    transform: scale(.8) rotate(-45deg) !important;
    display: flex;
    justify-content: center;
    align-items: center;

    .cursor-background-punto {
        width: 30%;
        height: 30%;
        background: #5B7599;
        border-radius: 50%;
        position: absolute;
    }

    &::after {
        content: "\f178";
        font-family: "Font Awesome 6 Free";
        font-weight: 600;
        color: #F5F5F5;
        font-size: 18px;
        position: absolute;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 100%;
        width: 150%;
        height: 150%;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0) rotate(0);
        opacity: 0;
        transition: transform .2s ease, opacity .2s ease;
        z-index: 1000;
        background-color: #5B7599;
    }

    &.pointer::after {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 1;
    }
}

/* ======================================
   MODAL DE PROYECTOS · ESTILO EDITORIAL
   Estilos compartidos: cualquier proyecto que use
   las clases .proyecto-detalle existentes.
====================================== */
.modal-proyecto {
    width: 95%;
    max-width: 1300px;
    max-height: 90dvh;
    padding: 0;
    border: 0;
    background: #FAFBFB;
    color: #21232A;
    overflow-y: auto;
    overscroll-behavior: contain;

    &::backdrop { background: rgba(24, 27, 34, .84); }
}

/* Se conserva el botón de cierre del <dialog> original */
.modal-cerrar {
    position: sticky;
    top: 15px;
    z-index: 10;
    display: block;
    margin: 15px 15px -55px auto;
    width: 44px;
    height: 44px;
    border: 2px solid #BD802C;
    outline: 3px solid #21232A;
    outline-offset: -6px;
    border-radius: 50%;
    background: #21232A;
    color: #FAFBFB;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;

    &:hover,
    &:focus-visible {
        background: #BD802C;
        color: #21232A;
    }
}

.modal-contenido { padding: 60px 5% 55px; }

.proyecto-detalle {
    color: #21232A;
    font-family: 'Inter', sans-serif;

    p {
        margin: 14px 0 0;
        font-size: 15px;
        font-weight: 300;
        line-height: 1.65;
        letter-spacing: -.015em;
        white-space: normal;
    }

    h2, h3, h4 { margin: 0; }

    img {
        display: block;
        max-width: 100%;
        height: auto;
        border-radius: 20px;
    }

    > section {
        width: 100%;
        margin: 0 0 95px;
    }

    /* Cabecera: se utiliza la clase que ya existía */
    .proyecto-detalle-cabecera {
        min-height: 0;
        height: auto;
        padding: 18px 0 50px !important;
        margin: 0 !important;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 0;

        div:first-child {
            width: 100%;
            padding: 16px 0;
            margin-bottom: clamp(55px, 8vw, 95px);
            border-top: 1px solid #21232A;
            gap: 20px;
            text-transform: uppercase;
            font-size: 11px;
            font-weight: 650;
            letter-spacing: .06em;
        }

        h1 {
            width: 100%;
            margin: 0 0 35px;
            font-size: clamp(62px, 9.6vw, 135px);
            font-weight: 800;
            line-height: .82;
            letter-spacing: -.085em;
            overflow-wrap: anywhere;

            em {
                display: block;
                color: #BD802C;
                font-family: 'Noto Serif Display', Georgia, serif;
                font-weight: 400;
                font-style: italic;
                letter-spacing: -.075em;
            }
        }

        p {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 7px;
            white-space: normal;

            span {
                display: inline-flex;
                align-items: center;
                min-height: 29px;
                padding: 5px 11px;
                border: 1px solid #B9BFC3;
                border-radius: 999px;
                font-size: 10px;
                font-weight: 600;
                line-height: 1.2;
                text-transform: uppercase;
            }
        }
    }

    /* Texto introductorio: titular editorial + descripción lateral */
    .proyecto-detalle-texto:first-of-type {
        display: grid;
        grid-template-columns: 1.6fr .7fr;
        gap: 35px;
        align-items: end;
        padding: 0 0 10px;
        margin-bottom: 42px;

        h2:first-child {
            padding: 0;
            border: 0;
            color: #21232A;
            font-size: clamp(25px, 3.1vw, 36px);
            font-weight: 450;
            line-height: 1.14;
            letter-spacing: -.055em;
            text-transform: none;
        }

        p {
            padding-left: 20px;
            border-left: 1px solid #BD802C;
            font-size: 15px;
        }
    }

    /* Imagen principal que sigue a la introducción */
    .proyecto-detalle-texto:first-of-type + .proyecto-detalle-imagen {
        margin-bottom: 110px;
        background: #ECEDED;
        border-radius: 22px;
        overflow: hidden;
        box-shadow: 1px 4px 11px 0px rgb(0 0 0 / 9%);

        img {
            width: 100%;
            max-height: 570px;
            object-fit: cover;
            border-radius: 22px;
            padding: 10px;
        }
    }

    .proyecto-detalle-video{
        height: 400px;
        overflow-y: scroll;
    }

    /* 01 / Brief: dos tarjetas con contraste de color */
    .proyecto-detalle-texto {
        padding: 0;
        font-size: 16px;
        line-height: 1.4;

        video{
            padding: 50px;
            background-color: white;
            border-radius: 30px;
            margin: 30px 0;
        }

        h2:first-child {
            padding-top: 23px;
            border-top: 1px solid #21232A;
            color: #BD802C;
            font-size: 12px;
            font-weight: 700;
            letter-spacing: .11em;
            text-transform: uppercase;
        }

        div.flex {
            width: 100%;
            gap: 22px;
            margin-top: 30px;
        }

        .column1, .column2 {
            width: calc(50% - 11px);
            min-width: 0;
            padding: clamp(24px, 3.8vw, 50px);
            border-radius: 24px;
            border: 1px solid #DFE0E1;
            background: #F0F1F1;

            h3 {
                margin-bottom: 45px;
                color: #BD802C;
                font-size: 12px;
                font-weight: 700;
                letter-spacing: .12em;
                text-transform: uppercase;
            }

            h4 {
                margin-bottom: 25px;
                padding: 0;
                font-size: clamp(25px, 2.65vw, 38px);
                font-weight: 700;
                line-height: 1.08;
                letter-spacing: -.055em;
            }
        }

        .column2 {
            background: #37677D;
            border-color: #37677D;
            color: #FAFBFB;

            h3 { color: #F2B768; }
        }
    }

    /* 02 / Solución y 05 / Evolución: composiciones imagen + texto */
    .proyecto-detalle-imagen-text {
        display: grid;
        grid-template-columns: .96fr 1.04fr;
        gap: clamp(28px, 5vw, 70px);
        align-items: center;
        padding-top: 38px;
        border-top: 1px solid #21232A;

        img {
            width: 100%;
            max-height: 475px;
            object-fit: contain;
            background: #EAEBEB;
        }

        .text {
            width: 100%;
            min-width: 0;
            padding: 0;
        }

        h2 {
            margin-bottom: 20px;
            color: #BD802C;
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .1em;
        }

        h3 {
            margin-bottom: 28px;
            font-size: clamp(30px, 3.9vw, 59px);
            font-weight: 750;
            line-height: 1.03;
            letter-spacing: -.07em;
            text-transform: none;

            em {
                color: #BD802C;
                font-family: 'Noto Serif Display', Georgia, serif;
                font-weight: 400;
                font-style: italic;
            }
        }

        /* 03 / Resultado: el bloque original solo tiene .text, sin imagen */
        .text:only-child {
            grid-column: 1 / -1;

            h3 {
                max-width: 900px;
                margin-bottom: 18px;
            }

            p {
                max-width: 650px;
                margin-bottom: 34px;
            }

            ul {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 1px;
                padding: 0;
                margin-top: 50px;
                background: #D9DDDF;
                border: 1px solid #D9DDDF;
                border-radius: 22px;
                overflow: hidden;
                counter-reset: funcionalidad;

                li {
                    width: auto;
                    min-width: 0;
                    padding: clamp(22px, 3vw, 38px);
                    background: #F2F3F3;
                    list-style: none;
                    counter-increment: funcionalidad;
                    height: 100%;

                    &::before {
                        content: counter(funcionalidad, decimal-leading-zero);
                        display: block;
                        margin-bottom: 33px;
                        color: #BD802C;
                        font-size: clamp(38px, 4.1vw, 58px);
                        font-weight: 800;
                        line-height: 1;
                        letter-spacing: -.08em;
                    }

                    h4 {
                        margin-bottom: 12px;
                        padding: 0;
                        font-size: 21px;
                        font-weight: 700;
                        letter-spacing: -.045em;
                        line-height: 1.15;
                    }
                }
            }
        }
    }

    /* 04 / Desarrollo: una sola sección. ÚNICA clase nueva para este patrón */
    .proyecto-detalle-tarjetas {
        > h3 {
            max-width: 850px;
            margin: 16px 0 38px;
            font-size: clamp(36px, 4.7vw, 66px);
            font-weight: 750;
            line-height: 1;
            letter-spacing: -.065em;
            text-transform: none;
        }

        > div.flex {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            align-items: start;
            gap: 24px;
            margin-top: 0;
            counter-reset: proceso;

            > div {
                min-width: 0;
                counter-increment: proceso;

                .proyecto-detalle-imagen {
                    margin: 0 0 30px;
                    overflow: hidden;
                    border-radius: 22px;
                    background: #E9EAEB;
                    box-shadow: 1px 4px 11px 0px rgb(0 0 0 / 9%);

                    img {
                        width: 100%;
                        border-radius: 22px;
                        padding: 10px;
                    }
                }

                .text {
                    padding: 0 5px;

                    &::before {
                        content: counter(proceso, decimal-leading-zero);
                        display: block;
                        margin-bottom: 14px;
                        color: #BD802C;
                        font-size: clamp(54px, 5.3vw, 74px);
                        font-weight: 800;
                        line-height: .9;
                        letter-spacing: -.08em;
                    }

                    h4 {
                        min-height: 50px;
                        margin-bottom: 15px;
                        padding: 0;
                        font-size: 22px;
                        font-weight: 750;
                        line-height: 1.1;
                        letter-spacing: -.045em;
                    }
                }
            }
        }
    }

    /* 05 / Evolución: misma clase imagen-text + un modificador oscuro */
    .proyecto-detalle-oscuro {
        margin-left: -5%;
        margin-right: -5%;
        width: 110%;
        padding: 65px 5%;
        border: 0;
        border-radius: 24px;
        background: #21232A;
        color: #FAFBFB;

        > img { background: #3A3D42; }

        h2, h3 em { color: #E3A250; }

        p { color: #E6E7E9; }
    }

    /* Cierre: se reutiliza la última .proyecto-detalle-texto */
    > .proyecto-detalle-texto:last-child {
        display: grid;
        grid-template-columns: 1.5fr .7fr;
        gap: 35px;
        align-items: end;
        margin-bottom: 30px;
        padding: 40px 0 15px;
        border-top: 1px solid #21232A;

        > h2:first-child {
            padding: 0;
            border: 0;
            color: #21232A;
            font-size: clamp(29px, 3.6vw, 50px);
            font-weight: 700;
            line-height: 1.1;
            letter-spacing: -.065em;
            text-transform: none;
        }

        > p {
            font-size: 15px;
            padding-left: 20px;
            border-left: 1px solid #BD802C;
        }
    }
}

/* MOCKUP INTERACTIVO · FREELANCE CONNECT */

.proyecto-detalle .proyecto-detalle-mockup {
    display: block;
    padding: 0;
    border: 0;
}

/* Las secciones 02 y 03, ahora solo con texto,
   ocupan todo el ancho disponible */
.proyecto-detalle .proyecto-detalle-imagen-text:has(> .text:only-child) {
    grid-template-columns: minmax(0, 1fr);
}

.proyecto-detalle .imagen-interactiva {
    position: relative;
    width: min(100%, 1120px);
    margin: 0 auto;
}

.proyecto-detalle .imagen-interactiva > img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
}

/* NÚMEROS SOBRE LA IMAGEN */

.proyecto-detalle .punto-interactivo {
    position: absolute;
    z-index: 2;
    transform: translate(-50%, -50%);

    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;
    padding: 0;

    border: 2px solid #FAFBFB;
    border-radius: 50%;
    background: #BD802C;
    color: #21232A;

    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;

    box-shadow: 0 3px 12px rgba(0, 0, 0, .25);
    cursor: pointer;
    transition: transform .2s ease, background .2s ease;
}

.proyecto-detalle .punto-interactivo:hover,
.proyecto-detalle .punto-interactivo:focus-visible {
    transform: translate(-50%, -50%) scale(1.15);
    background: #F2B768;
    outline: 2px solid #21232A;
}

@media (max-width: 700px) {
    .proyecto-detalle .punto-interactivo {
        width: 25px;
        height: 25px;
        font-size: 11px;
        border-width: 1px;
    }
}


/* =========================================================
   RESPONSIVE · TABLET Y MÓVIL (hasta 900px)
   Desktop es el estilo base, no hace falta min-width.
========================================================= */
@media (max-width: 900px) {
    #menu-top,
    #menu-bottom { width: 95%; }
    #about { height: 80vh; }
    /* Se conserva el dimensionado responsive del footer existente. */
    footer {
        height: 80vh;
        &.footer-interior { height: auto; }
        .subfooter-dual { background-size: clamp(100%, calc(15% + 720px), 200%) auto; }
    }
    #web-portfolio, #producto-portfolio {
        padding-top: 100px;
        > .contenido { width: 92%; }
    }
    .web-presentacion h1, .producto-presentacion h1 { font-size: clamp(48px, 7vw, 75px); }
    .web-presentacion > p, .producto-presentacion > p { width: 38%; }
    #web-portfolio .web-proyectos, #producto-portfolio .producto-proyectos {
        column-gap: 4%;
        row-gap: 45px;
    }
    .web-proyecto-cabecera h2, .producto-proyecto-cabecera h2 { font-size: 15px; }
    .web-proyecto-etiquetas p, .producto-proyecto-etiquetas p { font-size: 10px; }

    /* MODAL · TABLET */
    .proyecto-detalle {
        .proyecto-detalle-imagen-text {
            grid-template-columns: 1fr;
            gap: 25px;

            img { max-height: 350px; }
        }

        .proyecto-detalle-tarjetas > div.flex { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
}

/* =========================================================
   RESPONSIVE · MÓVIL (hasta 700px)
   ÚNICO bloque móvil: navegación, proyectos, home y footer.
========================================================= */
@media (max-width: 700px) {
    /* ---------- NAVEGACIÓN COMPARTIDA ---------- */
    .button { font-size: 18px; }
    .menu-button {
        bottom: 1%;
        /* HOME sin scroll: botón en la parte inferior del hero */
    }
    /* Solo la home muestra MENÚ en el hero; tras scroll, nombre + MENÚ. */
    #inicio .menu-button.desplazamiento,
    .seccion-pags .menu-button,
    .seccion-pags .menu-button.desplazamiento {
        top: 2%;
        bottom: auto;
        color: #21232A;
    }
    .menu-logo {
        font-size: 22px;
        /* Idéntico en index y web, sin reglas #web que interfieran */
    }
    .abrir-menu,
    .cerrar-menu {
        font-size: 14px;
        white-space: nowrap;
        margin-left: 0;
    }
    /* La versión móvil sí conserva la apertura/cierre de las pastillas. */
    .seccion-pags .menu-button .abrir-menu,
    .seccion-pags .menu-button .cerrar-menu,
    #inicio .menu-button.desplazamiento .abrir-menu,
    #inicio .menu-button.desplazamiento .cerrar-menu {
        height: auto;
        opacity: 1;
        overflow: visible;
        pointer-events: auto;
    }
    /* Dar espacio al nombre central en pantallas estrechas. */
    #menu-top a,
    #menu-bottom a {
        flex-basis: clamp(90px, 25vw, 112px);
        padding: 10px 8px;
        font-size: 13px;
    }
    #menu-top.menu-abierto,
    .seccion-pags #menu-top.menu-abierto {
        top: 2%;
        left: auto;
        width: 95%;
    }
    #menu-bottom.menu-abierto,
    #menu-bottom.menu-abierto.desplazamiento,
    .seccion-pags #menu-bottom.menu-abierto.desplazamiento {
        top: auto;
        bottom: 2%;
        left: auto;
        width: 95%;
    }
    #logo-hero { width: 70%; }
    .title-pag h1 { font-size: 35px; }
    #hero.contenido { padding: 0 !important; }
    /* ---------- HOME ---------- */
    #intro p {
        font-size: clamp(30px, 8.5vw, 60px);
        line-height: 100%;
    }
    #intro h3 {
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 5%;
        width: 70%;
        line-height: 110%;
    }
    #about {
        height: 100vh;
        padding-bottom: 100px;
        .contenido {
            width: 90%;
            padding: 0;
        }
        h2 {
            font-size: clamp(22px, 5.8vw, 30px);
            line-height: 1.8rem;
        }
        h3 {
            width: 100%;
            font-size: 16px;
            line-height: 1.45;
        }
    }
    /* ---------- WEB Y PRODUCTO ---------- */
    #web-portfolio > .contenido, #producto-portfolio > .contenido { width: 90%; }
    #web-portfolio .web-cabecera, #producto-portfolio .producto-cabecera { margin-bottom: 35px; }
    .web-superior, .producto-superior {
        margin-bottom: 24px;
        font-size: 10px;
        gap: 10px;
    }
    .web-presentacion, .producto-presentacion {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        margin-bottom: 24px;
        h1 {
            width: 100%;
            font-size: clamp(43px, 10.5vw, 68px);
            line-height: .95;
            letter-spacing: -.075em;
        }
        > p {
            width: 100%;
            max-width: 100%;
            font-size: 14px;
            line-height: 1.35;
            margin: 0;
        }
    }
    .web-categorias, .producto-categorias {
        padding-top: 10px;
        font-size: 10px;
        gap: 10px;
    }
    .web-categorias-lista, .producto-categorias-lista { gap: 6px; }
    .web-bajar, .producto-bajar { font-size: 10px; }
    /* ---------- PROYECTOS ---------- */
    #web-portfolio .web-proyectos, #producto-portfolio .producto-proyectos {
        grid-template-columns: 1fr;
        gap: 38px;
    }
    .web-proyecto-cabecera, .producto-proyecto-cabecera {
        margin-bottom: 10px;
        h2 { font-size: 15px; }
        > span { font-size: 11px; }
    }
    .web-proyecto-etiquetas p, .producto-proyecto-etiquetas p { font-size: 10px; }
    .web-proyecto-descripcion, .producto-proyecto-descripcion {
        font-size: 12px;
        max-width: 100%;
    }
    .web-proyecto-tecnologias, .producto-proyecto-tecnologias { font-size: 11px; }
    /* ---------- FOOTER ---------- */
    footer {
        .left { padding-top: 20%; }
        .right { padding-bottom: 30%; }

        .subfooter-dual {
            height: 100%;
            position: relative;

            > .left, > .right {
                position: absolute;
                top: 0;
                width: 65%;
                flex: none;
                z-index: 1;
                transition: width .7s ease-in-out;
                height: 100%;
            }

            > .left { left: 0; }
            > .right { right: 0; }
            &:not(:has(.right:hover)) > .left { z-index: 2; }
            &:has(.right:hover) > .right { z-index: 2; }
        }
    }
    /* CONTACTO MOBILE */
    .contacto {
        padding: 12px 3%;
        gap: 10px 6px;
    }
    .contacto-item {
        font-size: clamp(10px, 2.8vw, 13px);
        gap: 5px;
    }
    .contacto-icono,
    .contacto .rrss {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
        font-size: 13px;
    }
    #cvButton {
        font-size: 15px;
        min-width: 20%;
        padding: 7px 40px;
    }
    .cursor-background { display: none; }
    .modal-proyecto {
        width: 95%;
        max-height: 95dvh;
    }
    .modal-contenido { padding: 48px 5% 25px; }

    /* MODAL · MÓVIL */
    .modal-proyecto {
        width: 96%;
        max-height: 95dvh;
    }

    .modal-cerrar {
        top: 12px;
        margin: 12px 12px -56px auto;
        width: 40px;
        height: 40px;
    }

    .proyecto-detalle {
        > section { margin-bottom: 65px; }

        .proyecto-detalle-cabecera {
            padding-top: 12px !important;
            padding-bottom: 34px !important;

            div:first-child {
                flex-wrap: wrap;
                margin-bottom: 60px;
                gap: 6px;
                font-size: 9px;
            }

            h1 {
                margin-bottom: 28px;
                font-size: clamp(39px, 11.2vw, 65px);
                line-height: .92;
            }

            p span {
                font-size: 9px;
                padding: 4px 9px;
                min-height: 25px;
            }
        }

        .proyecto-detalle-texto:first-of-type,
        .proyecto-detalle-texto:last-child {
            grid-template-columns: 1fr;
            gap: 18px;

            p { padding-left: 14px; }
        }

        .proyecto-detalle-texto:first-of-type + .proyecto-detalle-imagen {
            margin-bottom: 65px;
            box-shadow: 1px 4px 11px 0px rgb(0 0 0 / 9%);
        }

        .proyecto-detalle-texto {
            div.flex { flex-direction: column; }

            .column1, .column2 {
                width: 100%;
                padding: 25px;
                border-radius: 18px;

                h3 { margin-bottom: 20px; }
            }
        }

        .proyecto-detalle-imagen-text {
            padding-top: 22px;

            h3 { font-size: clamp(30px, 8.5vw, 43px); }

            .text:only-child ul {
                grid-template-columns: 1fr;

                li { padding: 23px; }
            }
        }

        .proyecto-detalle-tarjetas {
            > h3 { font-size: clamp(33px, 9vw, 48px); }

            > div.flex {
                grid-template-columns: 1fr;
                gap: 38px;

                > div .text h4 { min-height: 0; }
            }
        }

        .proyecto-detalle-oscuro {
            padding-top: 35px;
            padding-bottom: 35px;
            border-radius: 17px;
        }
    }
}
