/* Colores Institucionales */

:root {
    --color-primario: #2D1B14;
    /* Marrón madera oscuro */
    --color-acento: #9A6B3F;
    /* Nogal (madera media del logo) - para textos, botones y bordes sobre fondo claro */
    --color-roble: #C69C6D;
    /* Roble claro (tono del logo) - para resaltes sobre fondo oscuro */
    --color-acento-hover: #7A5230;
    --color-crema: #FAF6F0;
    --color-gris: #A7A7AF;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #3a2f2a;
    padding-top: 0 !important;
}


/* Header y Fondo Dinámico */

.dynamic-background {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('Fondo-carpinteria.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ---------------------PRUEBA--------------------------------------- */


/* --- NAVBAR DINÁMICO --- */

.navbar {
    background-color: transparent !important;
    transition: all 0.5s ease;
    padding: 15px 0;
}

.navbar.scrolled {
    background-color: var(--color-primario) !important;
    /* Marrón #2D1B14 */
    padding: 2px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}


/* --- LOGO ADAPTATIVO --- */

.logo-custom {
    height: 130px !important;
    width: auto !important;
    transition: all 0.4s ease;
    /* Sin filtro aquí para que se vea a color cuando está arriba */
}

@media (max-width: 768px) {
    .logo-custom {
        height: 50px !important;
    }
}


/* ------------------------------------------------------------ */


/* Botones del Menú */

.nav-btn-custom {
    border: 1.5px solid var(--color-gris) !important;
    border-radius: 5px !important;
    padding: 8px 18px !important;
    margin: 5px 8px !important;
    color: #f8f9fa !important;
    transition: all 0.3s ease;
}

.nav-btn-custom:hover,
.nav-link.active {
    background-color: var(--color-roble) !important;
    border-color: var(--color-roble) !important;
    color: var(--color-primario) !important;
    transform: translateY(-2px);
}


/* WhatsApp Float */


/* Estilo del botón flotante de WhatsApp */

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    /* Verde oficial WhatsApp */
    color: #FFF !important;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    /* Siempre por encima de todo */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    /* Verde más oscuro al pasar el ratón */
    transform: scale(1.1);
    color: #FFF !important;
}


/* Ajuste para móviles (que no tape contenido importante) */

@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
}

.img-carousel {
    height: 600px;
    object-fit: cover;
}


/* --- ANIMACIONES DE ENTRADA --- */

.revelar-derecha,
.revelar-izquierda {
    opacity: 0;
    transition: all 1s ease-out;
}

.revelar-derecha {
    transform: translateX(80px);
}

.revelar-izquierda {
    transform: translateX(-80px);
}

.revelar-derecha.activo,
.revelar-izquierda.activo {
    opacity: 1;
    transform: translateX(0);
}


/* --- AJUSTE DE TAMAÑO Y ZOOM --- */

.img-proyecto {
    /* Altura más pequeña */
    height: 380px !important;
    object-fit: cover;
    transition: transform 0.6s ease;
    /* Duración del zoom */
}

.contenedor-foto {
    overflow: hidden;
    /* Evita que la imagen se salga del cuadro al agrandarse */
}


/* Efecto Zoom al pasar el ratón por la FILA completa */

.row:hover .img-proyecto {
    transform: scale(1.1);
    /* Aumenta un 10% */
}


/* Ajuste de fuentes para que el bloque pequeño sea coherente */

.row h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.row p.small {
    font-size: 0.9rem;
    line-height: 1.4;
}


/* Estilo para el menú desplegable de la pestaña TRABAJOS------------------------------------------------*/

.dropdown-menu {
    border-radius: 8px !important;
    padding: 10px 0;
    margin-top: 10px !important;
}

.dropdown-item {
    padding: 10px 20px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}


/* Efecto hover en las opciones del menú */

.dropdown-item:hover {
    background-color: var(--color-roble) !important;
    color: #2D1B14 !important;
    /* Texto oscuro al resaltar */
    padding-left: 25px;
    /* Pequeño desplazamiento al pasar el ratón */
}


/* Para que la flechita del dropdown también sea blanca/gris */

.dropdown-toggle::after {
    vertical-align: middle;
    margin-left: 8px;
}


/* Estilo para el menú desplegable de la pestaña TRABAJOS - Restauración*/


/* --- ESTILOS DEL COMPARADOR DINÁMICO --- */

.comparador-container {
    position: relative;
    width: 100%;
    height: 350px;
    /* Altura de la foto */
    background-color: #eee;
    overflow: hidden;
}

.img-antes,
.img-despues {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}


/* El "Antes" empieza mostrando solo la mitad izquierda */

.img-antes {
    z-index: 2;
    clip-path: inset(0 50% 0 0);
    /* El truco está aquí */
}

.img-despues {
    z-index: 1;
}


/* El control (slider) invisible que capta el movimiento */

.slider-comparador {
    position: absolute;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 100%;
    background: transparent;
    outline: none;
    margin: 0;
    cursor: ew-resize;
    z-index: 10;
}


/* La línea blanca que se mueve */

.slider-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #fff;
    z-index: 5;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}


/* --- ESTILOS PÁGINA INDEX --------------------------------------------------------------------------------- */


/* --- ESTILOS SECCIÓN VALORES --- */

.card-valor {
    transition: transform 0.3s ease, border-color 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.card-valor:hover {
    transform: translateY(-10px);
    border-color: var(--color-acento) !important;
}

.icon-circle {
    width: 70px;
    height: 70px;
    background: #2D1B14;
    /* Tu marrón oscuro */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(154, 107, 63, 0.25);
}

.icon-circle i {
    color: var(--color-roble);
    font-size: 1.8rem;
}


/* --- ESTILOS PÁGINA NOSOTROS --------------------------------------------------------------------------------- */


/* --- CORRECCIÓN PÁGINA NOSOTROS --- */

.position-relative {
    /* Añadimos un poco de margen superior interno para que el 
       borde decorativo naranja no suba tanto */
    padding-top: 80px;
}

.img-nosotros {
    max-height: 650px;
    width: 100%;
    object-fit: cover;
    z-index: 2;
    position: relative;
    border: 8px solid white;
    /* Quitamos cualquier margen negativo que pudiera tener */
    margin-top: 0 !important;
}


/* Marco de color miel que sobresale detrás de la foto */

.border-decorativo {
    position: absolute;
    top: 55px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--color-roble);
    border-radius: 8px;
    z-index: 1;
}

.cuerpo-texto-nosotros p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}


/* Ajuste para móviles */

@media (max-width: 768px) {
    .img-nosotros {
        max-height: 350px;
    }
    .border-decorativo {
        display: none;
        /* Quitamos el adorno en móvil para evitar desbordamientos */
    }
}


/* ------------------------------------------------------------------------------------------------*/


/* Estilo del Footer Profesional */

#pie_pagina {
    background-color: #2D1B14 !important;
    /* El mismo marrón oscuro del navbar */
    border-top: 3px solid var(--color-roble);
    /* Línea miel para dar contraste */
}

#pie_pagina h5 {
    letter-spacing: 1px;
}

#pie_pagina ul li {
    margin-bottom: 8px;
}

#pie_pagina a {
    transition: color 0.3s ease;
    opacity: 0.8;
}

#pie_pagina a:hover {
    color: var(--color-roble) !important;
    opacity: 1;
}


/* Ajuste por si tenías estilos antiguos que estorben */

#pie_pagina p {
    color: white !important;
    text-align: inherit;
    /* Permite que el texto se alinee según la columna */
    margin-bottom: 0;
}


/* --- DISEÑO RESPONSIVO CORREGIDO --- PARA MOVILES------------------------------------------------*/


/* En móviles y tablets (menos de 768px) */

@media (max-width: 767px) {
    .row.revelar-derecha,
    .row.revelar-izquierda {
        max-width: 95% !important;
        /* Que ocupe casi todo el ancho del móvil */
        margin-left: auto !important;
        margin-right: auto !important;
    }
    /* Forzamos a que imagen y texto ocupen todo el ancho y se apilen */
    .col-md-5,
    .col-md-7 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    .img-proyecto {
        height: 220px !important;
        /* Un poco más baja para móviles */
    }
    /* Quitamos el efecto de desplazamiento lateral en móvil para que no falle el scroll */
    .revelar-derecha,
    .revelar-izquierda {
        transform: translateY(20px) !important;
        /* En móvil que suba, no que venga de los lados */
    }
}


/* En pantallas grandes (PC / Laptops) */

@media (min-width: 768px) {
    .row.revelar-derecha,
    .row.revelar-izquierda {
        max-width: 900px !important;
    }
    .img-proyecto {
        height: 380px !important;
    }
}


/* =====================================================================
   MEJORAS VISUALES (propuesta)
   ===================================================================== */

/* Tipografía: títulos con serif clásica, más "artesanal" */
h1, h2, h3, .display-2, .display-5, .display-6 {
    font-family: 'Playfair Display', Georgia, serif;
    letter-spacing: 0.2px;
}

/* El logo se reduce al hacer scroll para que la barra no ocupe tanto */
.navbar.scrolled .logo-custom {
    height: 70px !important;
}

/* Hero: subtítulo y botones de llamada a la acción */
.dynamic-background h1 {
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.hero-kicker {
    color: var(--color-roble);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Botón principal color madera */
.btn-madera,
.btn-presupuesto {
    background-color: var(--color-acento);
    border: 2px solid var(--color-acento);
    color: #fff !important;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-madera:hover,
.btn-presupuesto:hover {
    background-color: var(--color-acento-hover);
    border-color: var(--color-acento-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(45, 27, 20, 0.25);
}

/* Botón secundario (hero, sobre foto) */
.btn-madera-claro {
    border: 2px solid rgba(255, 255, 255, 0.85);
    color: #fff !important;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-madera-claro:hover {
    background-color: var(--color-roble);
    border-color: var(--color-roble);
    color: #2D1B14 !important;
}

/* Los botones pequeños "Consultar diseño", "Ver opciones"... en tono madera */
.btn-outline-dark,
.btn-outline-secondary {
    color: var(--color-acento) !important;
    border-color: var(--color-acento) !important;
    border-radius: 6px;
}

.btn-outline-dark:hover,
.btn-outline-secondary:hover {
    background-color: var(--color-acento) !important;
    color: #fff !important;
}

/* Fondo cálido para las secciones claras en lugar de gris */
.seccion-crema {
    background-color: var(--color-crema) !important;
}

/* Tarjetas de proyectos un poco más elegantes */
.row.revelar-derecha,
.row.revelar-izquierda {
    border-radius: 12px !important;
    box-shadow: 0 6px 24px rgba(45, 27, 20, 0.08) !important;
}

/* Formulario: foco en color madera */
.form-control:focus {
    border-color: var(--color-roble);
    box-shadow: 0 0 0 0.2rem rgba(198, 156, 109, 0.3);
}

/* Footer: enlaces y datos de contacto */
#pie_pagina .footer-logo {
    height: 90px;
    width: auto;
}

#pie_pagina h5 {
    color: var(--color-roble);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}

#pie_pagina a {
    color: #f3ece4;
    text-decoration: none;
}

#pie_pagina .footer-legal {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Botón BearSoft en el copyright */
#pie_pagina a.btn-bearsoft {
    display: inline-block;
    padding: 2px 12px;
    margin: 0 4px;
    border: 1px solid var(--color-roble);
    border-radius: 20px;
    color: var(--color-roble) !important;
    font-weight: 600;
    opacity: 1;
}

#pie_pagina a.btn-bearsoft:hover {
    background-color: var(--color-roble);
    color: #2D1B14 !important;
}

/* =====================================================================
   FONDO DE MADERA (sustituye los fondos blancos/grises)
   Capa fija detrás de toda la página: funciona también en móviles
   ===================================================================== */
body {
    background-color: #B98A57;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: url('fondo-madera.jpg') center / cover no-repeat;
}

/* Las secciones claras dejan ver la madera */
.seccion-crema {
    background-color: transparent !important;
}

/* Textos que van directamente sobre la madera: más oscuros para que se lean */
body > .container .text-muted,
body > .container .text-secondary,
.seccion-crema > .container > .text-center .text-muted,
.cuerpo-texto-nosotros p {
    color: #2D1B14 !important;
}

/* Títulos y textos que van directamente sobre la madera */
body .sobre-madera,
body .sobre-madera h1,
body .sobre-madera h2,
body .sobre-madera h4,
body .sobre-madera p,
body .sobre-madera .text-muted {
    color: #fff !important;
    text-shadow: 0 2px 10px rgba(30, 15, 5, 0.75), 0 1px 2px rgba(30, 15, 5, 0.6);
}

body .sobre-madera hr {
    border-top-color: #fff !important;
    opacity: 0.9 !important;
}

/* Bloque de texto de "Nosotros" en tarjeta clara */
.tarjeta-texto {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(30, 15, 5, 0.25);
}

@media (max-width: 768px) {
    .tarjeta-texto {
        padding: 1.5rem;
    }
}

/* =====================================================================
   PÁGINA DE INICIO - NUEVAS SECCIONES
   ===================================================================== */

/* Franja de cifras bajo la portada */
.franja-cifras {
    background-color: #2D1B14;
    border-bottom: 3px solid var(--color-roble);
    padding: 2rem 0;
}

.franja-cifras .cifra {
    display: block;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--color-roble);
    line-height: 1.1;
}

.franja-cifras .cifra-txt {
    display: block;
    color: #f3ece4;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 6px;
}

/* Tarjetas de servicios */
.card-servicio {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(30, 15, 5, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-servicio:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 36px rgba(30, 15, 5, 0.3);
}

.card-servicio-img {
    height: 190px;
    overflow: hidden;
}

.card-servicio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card-servicio:hover .card-servicio-img img {
    transform: scale(1.08);
}

.card-servicio h4 {
    color: #2D1B14;
    font-weight: 700;
    font-size: 1.15rem;
}

.card-servicio p {
    color: #5c4a3d;
    font-size: 0.92rem;
    margin-bottom: 1rem;
}

.card-servicio-link {
    color: var(--color-acento);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Pasos "Cómo trabajamos" */
.paso {
    position: relative;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 16px;
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
    box-shadow: 0 8px 24px rgba(30, 15, 5, 0.2);
}

.paso-num {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-acento);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.paso i {
    font-size: 2rem;
    color: var(--color-acento);
}

.paso h5 {
    color: #2D1B14;
    font-weight: 700;
    margin-top: 0.75rem;
}

.paso p {
    color: #5c4a3d;
    font-size: 0.92rem;
    margin: 0;
}

/* Llamada final */
.cta-final {
    background: linear-gradient(rgba(45, 27, 20, 0.88), rgba(45, 27, 20, 0.88)), url('Fondo-carpinteria.jpg') center / cover;
    color: #fff;
    padding: 4.5rem 0;
}

.cta-final p {
    color: #f3ece4;
    font-size: 1.1rem;
}

.btn-whatsapp {
    background-color: #25d366;
    border: 2px solid #25d366;
    color: #fff !important;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    background-color: #128c7e;
    border-color: #128c7e;
    transform: translateY(-2px);
}

/* Aparición suave al hacer scroll */
.aparecer {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.aparecer.activo {
    opacity: 1;
    transform: none;
}

.aparecer:nth-child(2) { transition-delay: 0.1s; }
.aparecer:nth-child(3) { transition-delay: 0.2s; }
.aparecer:nth-child(4) { transition-delay: 0.3s; }

/* =====================================================================
   CARRUSEL: textos más visibles
   ===================================================================== */
#carouselTrabajos .carousel-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(30, 15, 5, 0.85) 0%, rgba(30, 15, 5, 0.35) 35%, rgba(30, 15, 5, 0) 60%);
    pointer-events: none;
}

.caption-madera {
    z-index: 2;
    left: 6%;
    right: 6%;
    bottom: 2.2rem;
    text-align: left;
    padding: 0;
}

.caption-madera .caption-kicker {
    display: inline-block;
    color: var(--color-roble);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.caption-madera h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.4rem;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.55);
}

.caption-madera h3::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-roble);
    margin-top: 0.6rem;
}

.caption-madera p {
    color: #f3ece4;
    font-size: 1.05rem;
    margin: 0;
}

/* Animación del texto al cambiar de foto */
#carouselTrabajos .carousel-item.active .caption-madera > * {
    animation: subirTexto 0.9s ease both;
}

#carouselTrabajos .carousel-item.active .caption-madera h3 { animation-delay: 0.15s; }
#carouselTrabajos .carousel-item.active .caption-madera p { animation-delay: 0.3s; }

@keyframes subirTexto {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
}

/* Indicadores y flechas más visibles */
#carouselTrabajos .carousel-control-prev-icon,
#carouselTrabajos .carousel-control-next-icon {
    background-color: rgba(45, 27, 20, 0.55);
    border-radius: 50%;
    padding: 1.3rem;
    background-size: 50%;
    transition: background-color 0.3s ease;
}

#carouselTrabajos .carousel-control-prev:hover .carousel-control-prev-icon,
#carouselTrabajos .carousel-control-next:hover .carousel-control-next-icon {
    background-color: var(--color-acento);
}

@media (max-width: 768px) {
    .img-carousel { height: 380px; }
    .caption-madera { bottom: 1.2rem; }
    .caption-madera p { font-size: 0.9rem; }
}

/* =====================================================================
   TARJETAS: brillo al pasar el ratón
   ===================================================================== */
.card-servicio,
.paso,
.card-valor {
    position: relative;
    overflow: hidden;
    border: 1px solid transparent !important;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease !important;
}

/* Destello de luz que cruza la tarjeta */
.card-servicio::after,
.paso::after,
.card-valor::after {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 240, 215, 0.55) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-20deg);
    pointer-events: none;
    z-index: 3;
}

.card-servicio:hover::after,
.paso:hover::after,
.card-valor:hover::after {
    animation: destello 0.9s ease;
}

@keyframes destello {
    to { left: 130%; }
}

/* Halo dorado y elevación */
.card-servicio:hover,
.paso:hover,
.card-valor:hover {
    transform: translateY(-10px) !important;
    border-color: var(--color-roble) !important;
    box-shadow: 0 0 0 1px rgba(198, 156, 109, 0.6), 0 0 28px rgba(232, 190, 130, 0.65), 0 18px 40px rgba(30, 15, 5, 0.35) !important;
}

.card-servicio:hover .card-servicio-img img {
    transform: scale(1.1);
    filter: brightness(1.12) saturate(1.1);
}

.card-servicio:hover h4,
.paso:hover h5 {
    color: var(--color-acento) !important;
}

.card-servicio-link i {
    display: inline-block;
    transition: transform 0.3s ease;
}

.card-servicio:hover .card-servicio-link i {
    transform: translateX(6px);
}

/* Iconos que se iluminan */
.paso i,
.icon-circle,
.icon-circle i {
    transition: all 0.35s ease;
}

.paso:hover i {
    transform: scale(1.15);
    color: #C69C6D;
    text-shadow: 0 0 14px rgba(232, 190, 130, 0.8);
}

.paso:hover .paso-num {
    background: var(--color-roble);
    color: #2D1B14;
    box-shadow: 0 0 14px rgba(232, 190, 130, 0.9);
}

.card-valor:hover .icon-circle {
    background: var(--color-acento);
    box-shadow: 0 0 20px rgba(232, 190, 130, 0.9);
    transform: scale(1.08);
}

.card-valor:hover .icon-circle i {
    color: #fff;
}

/* El número del paso va dentro de la tarjeta (la tarjeta recorta el destello) */
.paso { padding-top: 2.2rem; }
.paso-num {
    top: 14px;
    left: 14px;
    transform: none;
}

/* Cifras animadas: ancho fijo de números para que no "bailen" al contar */
.franja-cifras .cifra {
    font-variant-numeric: tabular-nums lining-nums;
}

/* =====================================================================
   CARRUSEL DE RESEÑAS
   ===================================================================== */
.resenas-resumen {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0 auto 2rem;
    width: fit-content;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.8rem 1.6rem;
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(30, 15, 5, 0.25);
}

.resenas-nota {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #2D1B14;
    line-height: 1;
}

.resenas-total {
    display: block;
    font-size: 0.85rem;
    color: #5c4a3d;
}

.resena-estrellas {
    color: #F4B400;
    font-size: 1.15rem;
    letter-spacing: 2px;
}

.resena-estrellas .vacias {
    color: #ddd;
}

.resenas-carrusel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.resenas-pista {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 14px 6px 24px;
    scrollbar-width: none;
    flex: 1;
}

.resenas-pista::-webkit-scrollbar {
    display: none;
}

.resena-card {
    position: relative;
    flex: 0 0 calc((100% - 48px) / 3);
    scroll-snap-align: start;
    background: #fff;
    border-radius: 16px;
    padding: 1.8rem 1.6rem 1.4rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(30, 15, 5, 0.22);
    border: 1px solid transparent;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.resena-card:hover {
    transform: translateY(-6px);
    border-color: var(--color-roble);
    box-shadow: 0 0 0 1px rgba(198, 156, 109, 0.6), 0 0 26px rgba(232, 190, 130, 0.6), 0 16px 36px rgba(30, 15, 5, 0.3);
}

.resena-comillas {
    position: absolute;
    top: 6px;
    right: 18px;
    font-size: 3.4rem;
    color: rgba(154, 107, 63, 0.18);
    line-height: 1;
}

.resena-texto {
    color: #3a2f2a;
    font-size: 0.98rem;
    line-height: 1.6;
    margin: 0.8rem 0 1.2rem;
    flex: 1;
}

.resena-autor {
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid #efe6db;
    padding-top: 1rem;
}

.resena-autor strong {
    display: block;
    color: #2D1B14;
}

.resena-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.resena-fuente {
    font-size: 0.8rem;
    color: #7a6a5e;
}

.resenas-flecha {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: rgba(45, 27, 20, 0.85);
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.resenas-flecha:hover {
    background: var(--color-roble);
    color: #2D1B14;
    box-shadow: 0 0 18px rgba(232, 190, 130, 0.8);
}

.resenas-puntos {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 0.5rem;
}

.resenas-puntos button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.resenas-puntos button.activo {
    width: 28px;
    border-radius: 6px;
    background: #fff;
}

.resenas-botones {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 1.8rem;
}

.resenas-botones .btn-madera-claro {
    background: rgba(45, 27, 20, 0.55);
}

@media (max-width: 991px) {
    .resena-card { flex-basis: calc((100% - 24px) / 2); }
}

@media (max-width: 600px) {
    .resena-card { flex-basis: 88%; }
    .resenas-flecha { display: none; }
    .resenas-resumen { padding: 0.6rem 1.2rem; }
}

/* =====================================================================
   MENÚ MÓVIL: al abrir la hamburguesa, la barra se pone marrón oscuro
   (igual que al hacer scroll) para que los botones se lean bien
   ===================================================================== */
@media (max-width: 991.98px) {
    .navbar:has(.navbar-collapse.show),
    .navbar:has(.navbar-collapse.collapsing) {
        background-color: var(--color-primario) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    /* Respaldo para navegadores antiguos: el propio menú desplegado también es oscuro */
    .navbar-collapse.show,
    .navbar-collapse.collapsing {
        background-color: var(--color-primario);
        border-radius: 8px;
        padding-bottom: 8px;
    }
}

/* =====================================================================
   NOSOTROS EN MÓVIL: la foto se ve completa, sin recortar
   ===================================================================== */
@media (max-width: 767.98px) {
    .img-nosotros {
        max-height: none;
        height: auto;
        object-fit: contain;
    }

    /* menos hueco encima de la foto */
    .img-nosotros + *,
    .position-relative:has(.img-nosotros) {
        padding-top: 0;
    }
}

/* =====================================================================
   PROYECTO DESTACADO (Nuevas Obras) y PROYECTO RECIENTE (inicio)
   ===================================================================== */
.destacado {
    max-width: 1100px;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    border: 2px solid var(--color-roble);
    box-shadow: 0 0 30px rgba(232, 190, 130, 0.45), 0 18px 44px rgba(30, 15, 5, 0.35);
}

.destacado-galeria {
    background: #2D1B14;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.destacado-principal {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: opacity 0.25s ease;
}

.destacado-miniaturas {
    display: flex;
    gap: 8px;
    padding: 10px;
}

.destacado-miniaturas button {
    flex: 1;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    opacity: 0.6;
    background: none;
    transition: all 0.3s ease;
}

.destacado-miniaturas button img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.destacado-miniaturas button:hover,
.destacado-miniaturas button.activa {
    opacity: 1;
    border-color: var(--color-roble);
    box-shadow: 0 0 12px rgba(232, 190, 130, 0.7);
}

.destacado-etiqueta {
    display: inline-block;
    background: var(--color-roble);
    color: #2D1B14;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 6px 14px;
    border-radius: 30px;
    box-shadow: 0 0 14px rgba(232, 190, 130, 0.6);
    width: fit-content;
}

.destacado-lista {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
}

.destacado-lista li {
    color: #3a2f2a;
    margin-bottom: 0.5rem;
}

.destacado-lista i {
    color: var(--color-acento);
    margin-right: 6px;
}

/* Tarjeta "Proyecto reciente" en el inicio */
.reciente {
    display: flex;
    max-width: 1000px;
    background: #2D1B14;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid var(--color-roble);
    box-shadow: 0 14px 36px rgba(30, 15, 5, 0.35);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.reciente:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 30px rgba(232, 190, 130, 0.6), 0 18px 44px rgba(30, 15, 5, 0.4);
}

.reciente-img {
    flex: 0 0 50%;
    overflow: hidden;
}

.reciente-img img {
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.reciente:hover .reciente-img img {
    transform: scale(1.06);
}

.reciente-texto {
    padding: 2rem 2.2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.reciente-texto h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: #fff;
    font-weight: 700;
    margin: 1rem 0 0.6rem;
}

.reciente-texto p {
    color: #e9dccd;
}

.reciente .card-servicio-link {
    color: var(--color-roble);
}

@media (max-width: 767.98px) {
    .reciente { flex-direction: column; }
    .reciente-img img { min-height: 200px; }
    .reciente-texto { padding: 1.5rem; }
}

/* =====================================================================
   NUEVAS OBRAS: proyectos con galería, filtros y visor
   ===================================================================== */
.filtros {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2rem;
}

.filtro {
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(45, 27, 20, 0.7);
    color: #fff;
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filtro:hover,
.filtro.activo {
    background: var(--color-roble);
    border-color: var(--color-roble);
    color: #2D1B14;
    box-shadow: 0 0 16px rgba(232, 190, 130, 0.7);
}

.proyectos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.proyecto {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
    box-shadow: 0 8px 24px rgba(30, 15, 5, 0.22);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease, opacity 0.8s ease;
}

.proyecto:hover {
    transform: translateY(-6px);
    border-color: var(--color-roble);
    box-shadow: 0 0 0 1px rgba(198, 156, 109, 0.6), 0 0 26px rgba(232, 190, 130, 0.6), 0 16px 36px rgba(30, 15, 5, 0.3);
}

.proyecto-foto {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #2D1B14;
    cursor: zoom-in;
    overflow: hidden;
}

.proyecto-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s ease, transform 0.6s ease;
}

.proyecto:hover .proyecto-foto img {
    transform: scale(1.04);
}

.proyecto-num,
.proyecto-ampliar {
    position: absolute;
    top: 12px;
    background: rgba(45, 27, 20, 0.8);
    color: #fff;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 0.85rem;
}

.proyecto-num { left: 12px; }
.proyecto-ampliar { right: 12px; opacity: 0; transition: opacity 0.3s ease; }
.proyecto:hover .proyecto-ampliar { opacity: 1; }

.proyecto-minis {
    display: flex;
    gap: 6px;
    padding: 8px;
    background: #2D1B14;
    overflow-x: auto;
    scrollbar-width: thin;
}

.proyecto-minis button {
    flex: 0 0 64px;
    height: 48px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    opacity: 0.55;
    background: none;
    transition: all 0.25s ease;
}

.proyecto-minis button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.proyecto-minis button:hover,
.proyecto-minis button.activa {
    opacity: 1;
    border-color: var(--color-roble);
}

.proyecto-cuerpo {
    padding: 1.3rem 1.5rem 1.6rem;
}

.proyecto-cat {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--color-acento);
    margin-bottom: 0.3rem;
}

.proyecto-cuerpo h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: #2D1B14;
    font-size: 1.35rem;
    font-weight: 700;
}

.proyecto-cuerpo p {
    color: #5c4a3d;
    font-size: 0.95rem;
    margin: 0;
}

/* Visor a pantalla completa */
.visor {
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: rgba(20, 10, 5, 0.94);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.visor.abierto { display: flex; }

.visor figure {
    margin: 0;
    max-width: 92vw;
    text-align: center;
}

.visor img {
    max-width: 92vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.visor figcaption {
    color: #f3ece4;
    margin-top: 12px;
    font-size: 0.95rem;
}

.visor-cerrar,
.visor-flecha {
    position: absolute;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.visor-cerrar:hover,
.visor-flecha:hover {
    background: var(--color-roble);
    color: #2D1B14;
}

.visor-cerrar { top: 18px; right: 18px; }
.visor-flecha.ant { left: 18px; top: 50%; transform: translateY(-50%); }
.visor-flecha.sig { right: 18px; top: 50%; transform: translateY(-50%); }

@media (max-width: 767.98px) {
    .proyectos-grid { grid-template-columns: 1fr; }
    .visor-flecha { width: 40px; height: 40px; }
    .visor-flecha.ant { left: 6px; }
    .visor-flecha.sig { right: 6px; }
}
