        :root {
            --bg: #F6F5F3;
            --panel: #fff;
            --ink: #1C1C1C;
            --muted: #6F6E6A;
            --line: #E2E0DD;
            --accent: #B8B6B0;
            --accent2: #D6D5D0;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: system-ui, Arial, sans-serif;
            background: var(--bg);
            color: var(--ink);
            line-height: 1.6;
        }

        /* --- Layout general --- */
        .section {
            max-width: 1100px;
            margin: auto;
            padding: 3rem 1rem;
        }

        h1,
        h2,
        h3 {
            line-height: 1.2;
        }

        h1 {
            font-size: clamp(1.6rem, 3.5vw, 2.5rem);
        }

        h2 {
            margin-bottom: 1rem;
            font-size: 1.8rem;
        }

        /* --- NAV (con menú hamburguesa responsivo) --- */
        .nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 2rem;
            max-width: 1200px;
            margin: auto;
            border-bottom: 1px solid var(--line);
            background: var(--bg);
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .brand {
            display: flex;
            align-items: center;
            gap: 0.8rem;
        }

        .logo-icon {
            height: 70px;
            /* antes 45px */
        }

        .logo-text {
            height: 85px;
            /* antes 58px */
        }


        .nav-links {
            display: flex;
            align-items: center;
            gap: 1.4rem;
            transition: all 0.3s ease;
        }

        .nav-links a {
            color: var(--ink);
            text-decoration: none;
            font-size: .95rem;
            font-weight: 500;
            opacity: .9;
            transition: opacity .2s ease, color .2s ease;
        }

        .nav-links a:hover {
            opacity: 1;
            color: #000;
        }

        /* --- Botón hamburguesa --- */
        .menu-toggle {
            display: none;
            background: none;
            border: none;
            font-size: 1.8rem;
            cursor: pointer;
            color: var(--ink);
            transition: transform 0.2s ease;
        }

        .menu-toggle:hover {
            transform: scale(1.1);
        }

        /* --- Versión móvil --- */
        @media (max-width: 820px) {
            .menu-toggle {
                display: block;
            }

            .nav {
                flex-wrap: wrap;
                padding: 1rem 1.5rem;
            }

            .nav-links {
                width: 100%;
                flex-direction: column;
                gap: 1rem;
                background: var(--panel);
                border-top: 1px solid var(--line);
                margin-top: 0.8rem;
                padding: 1rem 0;
                display: none;
                border-radius: 0 0 12px 12px;
                box-shadow: 0 3px 10px rgba(0, 0, 0, .05);
            }

            .nav-links.show {
                display: flex;
                animation: fadeIn 0.3s ease;
            }

            @keyframes fadeIn {
                from {
                    opacity: 0;
                    transform: translateY(-5px);
                }

                to {
                    opacity: 1;
                    transform: translateY(0);
                }
            }

            .logo-icon {
                height: 55px;
                /* más grande en móvil */
            }

            .logo-text {
                height: 68px;
                /* más grande en móvil */
            }

        }





        /* --- HERO con alineación clásica (texto izquierda / imagen derecha) --- */
        .hero {
            display: grid;
            grid-template-columns: 1.1fr 0.9fr;
            align-items: center;
            gap: 3rem;
            max-width: 1150px;
            margin: 0 auto;
            padding: 6rem 2rem 5rem;
            background: var(--bg);
            transition: all 0.3s ease-in-out;
        }

        /* --- Columna de texto --- */
        .hero-content {
            text-align: left;
        }

        .hero h1 {
            font-size: clamp(1.8rem, 3.5vw, 2.6rem);
            line-height: 1.35;
            font-weight: 700;
            margin-bottom: 1.5rem;
            color: #1c1c1c;
        }

        .hero p {
            font-size: 1.05rem;
            line-height: 1.75;
            color: #3c3b39;
            margin-bottom: 1.3rem;
            text-align: justify;
        }

        .hero p strong {
            color: #000;
        }

        /* --- Botones --- */
        .hero-buttons {
            margin-top: 1.2rem;
            display: flex;
            flex-wrap: wrap;
            gap: 0.8rem;
        }

        .hero .btn {
            padding: 0.75rem 1.4rem;
            border-radius: 10px;
            font-size: 0.96rem;
            font-weight: 600;
            border: 1px solid var(--line);
            transition: all 0.25s ease;
        }

        .hero .btn-dark {
            background: #1c1c1c;
            color: #fff;
            border: none;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
        }

        .hero .btn-dark:hover {
            background: #000;
            transform: translateY(-1px);
        }

        .hero .btn-outline {
            background: #fff;
            color: #1c1c1c;
            border: 1px solid #dcdad8;
        }

        .hero .btn-outline:hover {
            background: #f1f0ed;
        }

        /* --- Imagen (derecha) --- */
        .hero-media {
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .hero-media img {
            width: 100%;
            max-width: 460px;
            border-radius: 22px;
            box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
            object-fit: cover;
            transition: transform 0.4s ease, box-shadow 0.4s ease;
        }

        .hero-media img:hover {
            transform: scale(1.02);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
        }

        /* --- Ajuste de alineación visual con la siguiente sección --- */
        .hero::after {
            content: "";
            display: block;
            height: 20px;
            background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 0%, transparent 100%);
            margin-top: 1rem;
            border-radius: 10px;
        }

        /* --- VERSIÓN MÓVIL (mantiene la que te gustó) --- */
        @media (max-width: 880px) {
            .hero {
                grid-template-columns: 1fr;
                text-align: center;
                padding: 4rem 1.2rem 3rem;
                gap: 2rem;
            }

            .hero-content {
                text-align: center;
            }

            .hero h1 {
                font-size: clamp(1.6rem, 5vw, 2.1rem);
                line-height: 1.35;
                margin-bottom: 1.2rem;
            }

            .hero p {
                font-size: 1rem;
                line-height: 1.65;
                max-width: 100%;
            }

            .hero-buttons {
                justify-content: center;
            }

            .hero .btn {
                margin: 0.4rem;
            }

            .hero-media img {
                max-width: 90%;
                margin-top: 0.5rem;
                border-radius: 18px;
            }
        }

        /* --- QUitar subrayado del texto de los botones --- */
        button,
        a.button,
        .btn,
        .button-link {
            text-decoration: none !important;
        }



        /* --- Sección Sobre mí --- */
        /* --- SOBRE MÍ (galería izquierda, texto derecha) --- */
        #sobre-mi.sobre-mi-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2.5rem;
            align-items: center;
            background: var(--panel);
            border-radius: 18px;
            box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
            padding: 4rem 2rem;
            min-height: 620px;
            /* fuerza más espacio vertical */
        }

        #sobre-mi .slideshow {
            width: 100%;
            height: 100%;
            overflow: hidden;
            border-radius: 14px;
            background: var(--bg);
            box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
        }

        /* --- Texto y lista --- */
        .sobre-mi-texto h2 {
            margin-bottom: 1rem;
            font-size: 1.8rem;
            font-weight: 700;
        }

        .sobre-mi-texto p {
            margin-bottom: 1rem;
            text-align: justify;
            line-height: 1.7;
        }

        .sobre-mi-texto ul {
            list-style-position: outside;
            padding-left: 1.2rem;
            /* mismo margen que el texto */
            margin: 0;
        }

        .sobre-mi-texto li {
            margin-bottom: 0.5rem;
            text-align: justify;
            /* alinea los textos con el párrafo */
            color: var(--ink);
            line-height: 1.6;
        }

        .sobre-mi-texto strong {
            color: #000;
        }

        @media (max-width: 880px) {
            #sobre-mi {
                grid-template-columns: 1fr;
                text-align: center;
                padding: 2.5rem 1rem;
                min-height: auto;
            }
        }

        /* --- Slideshow ajustado --- */
        .slideshow {
            position: relative;
            width: 100%;
            height: clamp(500px, 65vh, 700px);
            /* ¡más alto! se adapta al viewport */
            /* más alto y flexible */
            overflow: hidden;
            border-radius: 18px;
            background: var(--accent2);
            box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
        }

        .slideshow img {
            position: absolute;
            top: 50%;
            left: 50%;
            width: 100%;
            height: 100%;
            object-fit: contain;
            /* antes era "cover", que recortaba */
            /* mantiene proporción */
            transform: translate(-50%, -50%);
            opacity: 0;
            transition: opacity 1.5s ease-in-out;
            filter: brightness(0.95) contrast(1.05);
            background: var(--panel);
            /* fondo neutro detrás */

        }

        .slideshow img.active {
            opacity: 1;
        }

        @media (max-width: 880px) {
            .slideshow {
                height: clamp(220px, 40vh, 300px);
                /* más compacto en móvil */
            }
        }

        /* --- Texto --- */
        .sobre-mi-texto h2 {
            margin-bottom: 1rem;
            font-size: 1.8rem;
            font-weight: 700;
        }

        .sobre-mi-texto p {
            margin-bottom: 1rem;
            text-align: justify;
            line-height: 1.7;
        }

        .sobre-mi-texto ul {
            list-style-position: outside;
            padding-left: 1.2rem;
            margin: 0;
        }

        .sobre-mi-texto li {
            margin-bottom: 0.5rem;
            text-align: justify;
            color: var(--ink);
            line-height: 1.6;
        }

        .sobre-mi-texto strong {
            color: #000;
        }


        /* Vista móvil */
        @media (max-width: 880px) {
            #sobre-mi.sobre-mi-grid {
                grid-template-columns: 1fr;
                text-align: center;
                padding: 2rem 1rem;
            }

            #sobre-mi .slideshow {
                height: 250px;
                margin-bottom: 1.5rem;
            }
        }



        /* --- INTERVENCIONES --- */
        #intervenciones {
            padding: 5rem 1rem 6rem;
            overflow-x: hidden;
            text-align: center;
        }

        #intervenciones h2 {
            font-size: 2.2rem;
            font-weight: 700;
            margin-bottom: 1.2rem;
            color: var(--ink);
            position: relative;
            text-align: center;
        }

        #intervenciones h2::after {
            display: none
        }

        .filters {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 0.8rem;
            margin: 1.8rem 0 2rem 0;
        }

        .filter-btn {
            padding: .45rem 1rem;
            border: 1px solid var(--line);
            border-radius: 999px;
            background: var(--panel);
            cursor: pointer;
            font-weight: 500;
            font-size: 0.95rem;
            transition: all .3s ease;
        }

        .filter-btn.active {
            background: var(--ink);
            color: #fff;
            box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
        }

        .filter-btn:hover:not(.active) {
            background: var(--accent2);
        }

        /* --- Galería adaptable sin recortes ni dobles barras --- */
        .coverflow {
            position: relative;
            max-width: 1300px;
            margin: 0 auto;
            overflow-y: visible;
            overflow-x: hidden;
            padding-inline: 1rem;
        }

        .track {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 1.5rem;
            overflow-x: auto;
            overflow-y: hidden;
            scroll-snap-type: x mandatory;
            padding: 2rem 0 2.5rem 0;
            scroll-behavior: smooth;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: thin;
            scrollbar-color: var(--line) transparent;
        }

        .track::-webkit-scrollbar {
            height: 8px;
        }

        .track::-webkit-scrollbar-thumb {
            background: var(--line);
            border-radius: 4px;
        }

        /* Cada imagen se alinea y adapta correctamente */
        .item {
            flex: 0 0 clamp(65%, 70vw, 420px);
            border-radius: 18px;
            overflow: hidden;
            scroll-snap-align: center;
            border: 1px solid var(--line);
            background: var(--panel);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform .4s ease, opacity .4s ease, filter .4s ease;
            height: clamp(300px, 55vh, 500px);
            box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
        }

        /* Imagen centrada y visible en todos los formatos */
        .item img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            display: block;
            transition: filter .4s ease, transform .4s ease;
            background: var(--panel);
            border-radius: 12px;
        }

        /* Efecto dinámico */
        .item.active {
            transform: scale(1.15);
            z-index: 3;
        }

        .item.active img {
            filter: brightness(1.08) contrast(1.1) saturate(1.05);
        }

        .item:not(.active) img {
            filter: brightness(0.9) contrast(0.95);
        }

        .item:hover img {
            transform: scale(1.05);
            filter: brightness(1.1) contrast(1.1);
        }

        /* Botones */
        .cf-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: var(--panel);
            border: 1px solid var(--line);
            border-radius: 50%;
            width: 42px;
            height: 42px;
            cursor: pointer;
            font-size: 1.4rem;
            color: var(--ink);
            transition: background .3s ease, transform .2s ease;
            z-index: 5;
        }

        .cf-btn:hover {
            background: var(--line);
            transform: translateY(-50%) scale(1.05);
        }

        .prev {
            left: 5px;
        }

        .next {
            right: 5px;
        }

        /* --- VERSIÓN MÓVIL --- */
        /* 🔧 Corrección completa para mejorar la galería en versión móvil */

        @media (max-width: 768px) {

            /* Espaciado general */
            #intervenciones {
                padding: 3rem 0.5rem 4rem;
            }

            /* Filtros más compactos */
            .filters {
                justify-content: center;
                gap: 0.6rem;
            }

            /* Galería más grande y centrada */
            .coverflow {
                overflow: hidden;
                padding-inline: 0;
            }

            .track {
                display: flex;
                gap: 0.6rem;
                padding: 0;
                overflow-x: scroll;
                scroll-snap-type: x mandatory;
                scroll-behavior: smooth;
            }

            /* Las imágenes ocupan casi toda la pantalla */
            .item {
                flex: 0 0 100%;
                height: 75vh;
                border-radius: 0;
                margin: 0;
                border: none;
                box-shadow: none;
            }

            /* Imagen centrada, más grande y sin márgenes */
            .item img {
                width: 100vw;
                height: 100%;
                object-fit: contain;
                border-radius: 0;
            }

            /* Flechas más pequeñas y centradas */
            .cf-btn {
                width: 40px;
                height: 40px;
                font-size: 1.2rem;
                background: rgba(255, 255, 255, 0.85);
                border: 1px solid var(--line);
                backdrop-filter: blur(6px);
            }

            .prev {
                left: 8px;
            }

            .next {
                right: 8px;
            }
        }



        /* --- SERVICIOS con imagen superior y texto inferior --- */
        #servicios {
            background: var(--bg);
            padding: 5rem 1rem;
        }

        .services-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 1.8rem;
            margin-top: 2.5rem;
        }

        /* ✅ En móvil: solo 1 card por fila */
        @media (max-width: 768px) {
            .services-grid {
                grid-template-columns: 1fr;
                gap: 1.2rem;
            }
        }

        .card {
            background: var(--panel);
            border: 1px solid var(--line);
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
            transition: all 0.35s ease;
            display: flex;
            flex-direction: column;
            height: 100%;
            position: relative;
        }

        .card:hover {
            transform: translateY(-6px);
            box-shadow: 0 10px 22px rgba(0, 0, 0, .1);
            border-color: var(--accent);
        }

        /* Imagen superior */
        .card-image {
            position: relative;
            width: 100%;
            height: 180px;
            overflow: hidden;
            background: var(--accent2);
        }

        .card-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform .5s ease, filter .4s ease;
            filter: brightness(0.9);
        }

        .card:hover .card-image img {
            transform: scale(1.05);
            filter: brightness(1);
        }

        /* Texto inferior */
        .card-content {
            padding: 1.5rem;
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .card-content h3 {
            font-size: 1.1rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
            color: var(--ink);
        }

        .card-content p {
            font-size: 0.95rem;
            color: var(--muted);
            line-height: 1.6;
        }

        /* Efecto de barra lateral al pasar */
        .card::before {
            content: "";
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 4px;
            background: linear-gradient(to bottom, var(--accent2), var(--accent));
            opacity: 0;
            transition: opacity 0.3s ease;
            border-radius: 14px 0 0 14px;
        }

        .card:hover::before {
            opacity: 1;
        }

        /* --- CORRECCIÓN SERVICIOS EN MÓVIL --- */
        @media (max-width: 768px) {
            .services-grid {
                display: grid !important;
                grid-template-columns: 1fr !important;
                /* ✅ una card por fila */
                gap: 1.2rem !important;
            }

            .card {
                width: 100%;
                max-width: 500px;
                margin: 0 auto;
                /* centra cada card */
            }
        }



        /* --- CLIENTES --- */
        .clients {
            display: flex;
            gap: .8rem;
            flex-wrap: wrap;
            margin-top: 1.5rem;
        }

        .pill {
            padding: .5rem 1rem;
            border: 1px solid var(--line);
            border-radius: 999px;
            background: var(--panel);
            font-size: .9rem;
        }

        /* --- CONTACTO con separador elegante y validación --- */
        #contacto {
            display: grid;
            grid-template-columns: 1.1fr 1fr;
            gap: 3rem;
            align-items: start;
            padding: 4rem 2rem;
            background: var(--bg);
            border-radius: 18px;
            position: relative;
        }

        #contacto::before {
            content: "";
            position: absolute;
            top: 10%;
            bottom: 10%;
            left: 50%;
            width: 1px;
            background: var(--accent);
            opacity: 0.4;
            border-radius: 2px;
        }

        #contacto h2 {
            font-size: 1.9rem;
            margin-bottom: 1rem;
        }

        #contacto p {
            line-height: 1.7;
            text-align: justify;
            margin-bottom: 0.8rem;
            margin-right: 0.8rem;
        }

        #contacto a {
            color: var(--ink);
            text-decoration: underline;
            transition: color 0.2s;
        }

        #contacto a:hover {
            color: #000;
        }

        /* --- Formulario estilizado --- */
        #contacto form {
            background: var(--panel);
            border: 1px solid var(--line);
            border-radius: 16px;
            padding: 2rem 2rem 2.2rem;
            box-shadow: 0 3px 12px rgba(0, 0, 0, .06);
            display: flex;
            flex-direction: column;
            z-index: 2;
            position: relative;
        }

        #contacto form label {
            display: block;
            font-weight: 600;
            margin-bottom: .4rem;
            margin-left: .3rem;
            color: var(--ink);
        }

        #contacto form input,
        #contacto form textarea {
            width: 100%;
            padding: .75rem .9rem;
            margin-bottom: 1.3rem;
            border: 1px solid var(--line);
            border-radius: 10px;
            font-family: inherit;
            font-size: .95rem;
            background: #fff;
            transition: border-color .2s, box-shadow .2s;
        }

        #contacto form input:focus,
        #contacto form textarea:focus {
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(184, 182, 176, .25);
            outline: none;
        }

        /* --- Campos válidos e inválidos --- */
        #contacto form input:invalid {
            border-color: #c86a6a;
        }

        #contacto form input:valid {
            border-color: var(--accent);
        }

        /* --- Botón --- */
        #contacto form button {
            background: var(--ink);
            color: #fff;
            font-weight: 600;
            border: none;
            border-radius: 10px;
            padding: .9rem;
            font-size: 1rem;
            cursor: pointer;
            transition: background .25s ease, transform .2s ease;
        }

        #contacto form button:hover {
            background: #000;
            transform: translateY(-2px);
        }

        #contacto form button:active {
            transform: translateY(0);
        }

        /* --- Responsivo --- */
        @media (max-width: 880px) {
            #contacto {
                grid-template-columns: 1fr;
                gap: 2rem;
                padding: 3rem 1rem;
            }

            #contacto::before {
                display: none;
            }

            #contacto form {
                padding: 1.5rem;
            }
        }



        footer {
            border-top: 1px solid var(--line);
            padding: 2rem 1rem;
            text-align: center;
            color: var(--muted);
        }