
.restoration-section {
    padding: 60px 20px; 
    max-width: 1200px; /* Consistente con .libro-showcase */
    margin: 50px auto; /* Consistente */
    font-family: 'Open Sans', sans-serif; /* Fuente base para el cuerpo */
    background-color: #fdfcfa; /* Un blanco hueso muy sutil, ligeramente diferente a #f8f5f0 para distinguir secciones */
    border-radius: 15px; /* Consistente */
    box-shadow: 0 15px 35px rgba(0,0,0,0.08); /* Sombra similar pero un poco más suave */
}

/* Encabezado de la sección */
.restoration-section .section-header { /* Añado .restoration-section para especificidad */
    text-align: center;
    margin-bottom: 50px;
}

.restoration-section .section-header h2 {
    font-family: 'Roboto Slab', serif; /* Consistente con .libro-titulo */
    font-size: 2.6em; /* Ligeramente más pequeño que .libro-titulo */
    font-weight: 700;
    color: #2c3e50; /* Consistente */
    margin-bottom: 15px;
    line-height: 1.2;
}

.restoration-section .section-header p {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.15em; /* Ligeramente más grande para el párrafo introductorio */
    color: #34495e; /* Consistente con .libro-autor */
    max-width: 750px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Contenedor de comparación de fotos */
.restoration-section .photo-comparison-container {
    display: flex;
    flex-direction: column;
    gap: 60px; /* Espacio entre cada item de comparación */
}

/* Estilos para cada elemento de comparación */
.restoration-section .comparison-item {
    width: 100%;
    background-color: #ffffff; /* Fondo blanco para los items */
    border-radius: 10px; /* Borde interno más pequeño que el contenedor principal */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06); /* Sombra interna sutil */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.restoration-section .comparison-item:nth-child(even) {
    flex-direction: row-reverse;
}

.restoration-section .comparison-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

/* Columna de la imagen interactiva */
.restoration-section .image-column {
    flex: 1 1 55%; /* Un poco más de espacio para la imagen */
    min-height: 350px;
}

.restoration-section .before-after-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px; /* Altura mínima para el comparador */
    overflow: hidden;
    cursor: ew-resize;
    background-color: #e9e9e9; /* Fondo para el área de imagen si no carga */
}

.restoration-section .photo-before,
.restoration-section .photo-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;   /* AÑADE ESTA LÍNEA */
    background-position: center center;
    background-repeat: no-repeat;
    /* No transition aquí, el JS la maneja con clip-path */
}
/* Ya no es necesario el filtro si la imagen original es B&N */
/* .restoration-section .photo-before { filter: grayscale(100%); } */

.restoration-section .photo-after {
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
    z-index: 2; /* Por encima de photo-before */
}
.restoration-section .photo-before {
    z-index: 1; /* Por debajo de photo-after */
}


/* Deslizador */
.restoration-section .slider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 3px; /* Delgado */
    height: 100%;
    background-color: rgba(44, 62, 80, 0.7); /* Color primario semitransparente */
    z-index: 3;
    transform: translateX(-50%);
    box-shadow: 0 0 8px rgba(0,0,0,0.2);
}

.restoration-section .slider:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #2c3e50; /* Color primario */
    border: 3px solid #f8f5f0; /* Color de fondo del showcase como borde */
    transform: translate(-50%, -50%);
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.restoration-section .slider:hover:before,
.restoration-section .slider.dragging:before {
    background-color: #34495e; /* Un tono más claro del primario al interactuar */
    box-shadow: 0 5px 12px rgba(0,0,0,0.4);
}

.restoration-section .slider:after {
    content: '↔';
    position: absolute;
    top: 50%;
    left: 50%;
    color: white;
    font-size: 18px;
    font-weight: bold;
    transform: translate(-50%, -50%);
    pointer-events: none;
    text-shadow: 0 1px 1px rgba(0,0,0,0.4);
}

/* Etiquetas de antes/después */
.restoration-section .label {
    position: absolute;
    padding: 7px 14px;
    background-color: rgba(44, 62, 80, 0.9); /* Color primario más opaco */
    color: #fff;
    font-size: 0.85rem;
    font-family: 'Raleway', sans-serif; /* Consistente con botones */
    font-weight: 600;
    border-radius: 4px; /* Borde más sutil */
    z-index: 4;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    user-select: none;
}

.restoration-section .label-before { top: 15px; left: 15px; }
.restoration-section .label-after { top: 15px; right: 15px; }

.restoration-section .label span {
    display: block;
    font-size: 0.7rem;
    margin-bottom: 2px;
    color: #e0d9c8; /* Color de borde beige como acento */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Columna de información */
.restoration-section .info-column {
    flex: 1 1 45%; /* Espacio para el texto */
    padding: 30px 40px; /* Ajustar padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(to bottom, #ffffff, #f9f7f2); /* Gradiente sutil similar al de libro-info */
}

.restoration-section .restoration-info h3 {
    font-family: 'Roboto Slab', serif; /* Consistente con títulos */
    font-size: 1.6em;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.3;
    /* border-bottom: 2px solid #e0d9c8; */ /* Opcional, si quieres el mismo borde que en sinopsis */
    /* padding-bottom: 10px; */
}

.restoration-section .restoration-info p {
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem; /* Ligeramente más pequeño que la sinopsis */
    line-height: 1.75;
    color: #333; /* Consistente con sinopsis */
    margin-bottom: 15px;
    text-align: justify; /* Consistente */
}
.restoration-section .restoration-info p:last-of-type {
    margin-bottom: 20px;
}

.restoration-section .restoration-details {
    display: flex;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 8px 10px;
}

.restoration-section .detail-item {
    font-family: 'Raleway', sans-serif; /* Para las "píldoras" */
    background-color: rgba(139, 69, 19, 0.08); /* Color de .libro-categoria muy transparente */
    color: #8b4513; /* Color de .libro-categoria */
    padding: 6px 12px;
    border-radius: 20px; /* Consistente con .libro-categoria */
    font-size: 0.8rem;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.restoration-section .detail-item:hover {
    background-color: rgba(139, 69, 19, 0.15);
    transform: translateY(-1px);
}

.restoration-section .restoration-info .boton-detalle {
    display: inline-block;
    align-self: flex-start;
    font-family: 'Raleway', sans-serif; /* Consistente con otros botones */
    font-weight: 600;
    text-decoration: none;
    color: #8b4513; /* Color marrón para "Ver más detalles", para variar de los botones principales */
    padding: 8px 0;
    margin-top: 10px;
    border-bottom: 2px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
    font-size: 0.9rem; /* Consistente con .btn-leer-mas */
    /* text-transform: uppercase; */ /* Decidí no ponerlo uppercase para diferenciarlo de los botones de acción principales */
}

.restoration-section .restoration-info .boton-detalle:hover {
    color: #2c3e50; /* Al pasar el ratón, color primario */
    border-bottom-color: #2c3e50;
}

/* Sección de llamada a la acción (si la tienes al final) */
.restoration-section .cta-container {
    margin-top: 60px;
    text-align: center;
    padding: 40px 30px;
    background-color: #e8e0d0; /* Usar el beige más oscuro para el CTA, como el final del gradiente de libro-info */
    color: #2c3e50; /* Texto oscuro sobre fondo claro */
    border-radius: 10px;
}

.restoration-section .cta-container h3 {
    font-family: 'Roboto Slab', serif;
    font-size: 2em;
    font-weight: 700;
    color: #2c3e50; /* Texto oscuro */
    margin-bottom: 15px;
}

.restoration-section .cta-container p {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.1em;
    line-height: 1.7;
    margin-bottom: 25px;
    color: #34495e; /* Texto oscuro */
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* Botón principal de solicitud de servicio, adaptado de tus .btn-primario */
.restoration-section .request-service-btn {
    font-family: 'Raleway', sans-serif;
    padding: 12px 24px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px; /* Consistente con tus botones */
    background-color: #2c3e50; /* Color primario */
    color: #fff; /* Texto blanco */
    display: inline-block;
    box-shadow: 0 3px 8px rgba(44, 62, 80, 0.2);
}

.restoration-section .request-service-btn:hover {
    background-color: #34495e; /* Un poco más claro al pasar el ratón */
    transform: translateY(-3px); /* Consistente con tus botones */
    box-shadow: 0 5px 15px rgba(44, 62, 80, 0.3);
}

/* Media Queries para Responsividad */
@media (max-width: 992px) { /* Ajuste para tablets */
    .restoration-section .comparison-item,
    .restoration-section .comparison-item:nth-child(even) {
        flex-direction: column;
    }
    
    .restoration-section .image-column,
    .restoration-section .info-column {
        flex: 1 1 100%;
    }

    .restoration-section .image-column { min-height: 300px; }
    .restoration-section .before-after-container { min-height: 350px; }

    .restoration-section .info-column {
        padding: 25px 30px;
        text-align: center;
    }
    .restoration-section .restoration-info .boton-detalle { align-self: center; }
    .restoration-section .restoration-details { justify-content: center; }
}

@media (max-width: 768px) { /* Consistente con tus breakpoints */
    .restoration-section {
        padding: 40px 15px;
        margin: 30px auto; /* Menos margen en móvil */
    }

    .restoration-section .section-header h2 { font-size: 2em; }
    .restoration-section .section-header p { font-size: 1em; }
    
    .restoration-section .photo-comparison-container { gap: 40px; }

    .restoration-section .image-column { min-height: 250px; }
    .restoration-section .before-after-container { min-height: 300px; }

    .restoration-section .slider:before { width: 45px; height: 45px; } /* Handle más grande para táctil */
    .restoration-section .slider:after { font-size: 20px; }

    .restoration-section .label { padding: 6px 10px; font-size: 0.8rem; }
    .restoration-section .label-before { top: 10px; left: 10px; }
    .restoration-section .label-after { top: 10px; right: 10px; }

    .restoration-section .info-column { padding: 20px; }
    .restoration-section .restoration-info h3 { font-size: 1.4em; }
    .restoration-section .restoration-info p { font-size: 0.95em; }

    .restoration-section .cta-container h3 { font-size: 1.7em; }
    .restoration-section .cta-container p { font-size: 1em; }
    .restoration-section .request-service-btn { width: 100%; padding: 12px; } /* Botón de ancho completo en móvil */
}




/* === INICIO ESTILOS CSS PARA EL MODAL (ADAPTADOS A TU TEMA) === */
.modal {
    display: none;
    position: fixed;
    z-index: 1050; /* Un z-index alto, consistente */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 62, 80, 0.7); /* #2c3e50 con opacidad, consistente con tu tema */
    overflow-y: auto; /* Para permitir scroll si el modal es muy alto en pantallas pequeñas */
    padding: 20px; /* Espacio para que el modal no toque bordes */
    box-sizing: border-box;
}

.modal-content {
    position: relative;
    background-color: #fdfcfa; /* Tu blanco hueso sutil de .restoration-section */
    margin: 5% auto; /* Centrado vertical con margen superior */
    padding: 0; /* Padding se manejará en header/body/footer */
    border-radius: 12px; /* Bordes consistentes con tu sección */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); /* Sombra más pronunciada y suave */
    width: 90%;
    max-width: 650px; /* Un poco más ancho para comodidad */
    animation: modalFadeIn 0.35s cubic-bezier(0.25, 0.8, 0.25, 1); /* Animación más suave */
    font-family: 'Open Sans', sans-serif; /* Fuente base del modal */
    color: #34495e; /* Color de texto base, consistente con .libro-autor */
    display: flex;
    flex-direction: column; /* Para asegurar que el footer se quede abajo si el body crece */
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-25px) scale(0.98);}
    to {opacity: 1; transform: translateY(0) scale(1);}
}

.modal-header {
    padding: 20px 25px;
    background-color: #2c3e50; /* Tu color primario oscuro para el header */
    color: #ffffff; /* Texto blanco */
    border-radius: 12px 12px 0 0; /* Consistente con .modal-content */
    display: flex; /* Para alinear título e icono si se añade */
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-family: 'Roboto Slab', serif; /* Consistente con tus títulos */
    font-size: 1.6em; /* Tamaño adecuado para el título del modal */
    font-weight: 600; /* Un poco menos bold que 700 */
    line-height: 1.3;
}
/* Si quieres añadir un icono al header del modal:
.modal-header i {
    font-size: 1.5em;
    margin-right: 15px;
    opacity: 0.8;
}
*/

.modal-close {
    position: absolute;
    right: 18px;
    top: 15px;
    color: rgba(255, 255, 255, 0.8); /* Blanco semitransparente */
    font-size: 30px;
    font-weight: normal; /* Más elegante que bold para la 'x' */
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 5px;
}
.modal-close:hover {
    color: #ffffff; /* Blanco opaco */
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px 30px; /* Más padding para aire */
    /* max-height: 70vh; Esta propiedad la maneja el .modal si es necesario */
    /* overflow-y: auto; Esta propiedad la maneja el .modal si es necesario */
    flex-grow: 1; /* Para que el cuerpo ocupe el espacio disponible */
}

.modal-description {
    margin-bottom: 25px;
    font-size: 1.05em; /* Ligeramente más grande */
    line-height: 1.7;
    color: #34495e; /* Consistente */
}

.contact-info, .service-info {
    margin-bottom: 25px;
}

.contact-info h3, .service-info h3 {
    font-family: 'Roboto Slab', serif; /* Consistente */
    font-size: 1.25em; /* Títulos de sección un poco más grandes */
    font-weight: 600;
    margin-bottom: 12px;
    color: #2c3e50; /* Tu primario oscuro */
    border-bottom: 1px solid #e0d9c8; /* Borde sutil con tu color beige de acento */
    padding-bottom: 8px;
}

.contact-info ul, .service-info ul {
    list-style: none;
    padding: 0;
}

.contact-info li, .service-info li {
    margin-bottom: 12px; /* Más espacio entre ítems */
    display: flex;
    align-items: center;
    font-size: 1em;
}

.contact-info i {
    margin-right: 12px;
    font-size: 1.2em; /* Iconos un poco más grandes */
    color: #8b4513; /* Tu color marrón de acento, para consistencia */
    width: 20px; /* Ancho fijo para alineación */
    text-align: center;
}

.contact-info a {
    color: #8b4513; /* Tu color marrón, en lugar del azul genérico */
    text-decoration: none;
    font-weight: 500; /* Un poco de peso */
    transition: color 0.2s ease;
}
.contact-info a:hover {
    color: #2c3e50; /* Tu primario oscuro al pasar el ratón */
    text-decoration: underline;
}

.modal-footer {
    padding: 18px 25px;
    background-color: #f0ebe5; /* Tu beige muy claro del diseño "Elegante" */
    text-align: right;
    border-top: 1px solid #e0d9c8; /* Borde con tu beige de acento */
    border-radius: 0 0 12px 12px; /* Consistente */
}

.btn-cerrar {
    padding: 10px 22px; /* Un poco más de padding horizontal */
    background-color: #8b4513; /* Tu color marrón para el botón de cerrar */
    color: white;
    border: none;
    border-radius: 6px; /* Consistente con tus botones */
    cursor: pointer;
    font-family: 'Raleway', sans-serif; /* Consistente con tus botones */
    font-size: 0.95em;
    font-weight: 600;
    text-transform: uppercase; /* Consistente */
    letter-spacing: 0.5px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.btn-cerrar:hover {
    background-color: #a0522d; /* Marrón un poco más claro */
    transform: translateY(-1px);
}

/* Estilo para dispositivos móviles */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px auto; /* Menos margen vertical en móvil, se ajusta con padding de .modal */
        max-height: calc(100vh - 40px); /* Para que no se salga de pantalla */
    }
    .modal-header h2 {
        font-size: 1.4em;
    }
    .modal-body {
        padding: 20px;
    }
    .contact-info h3, .service-info h3 {
        font-size: 1.15em;
    }
    .modal-footer {
        text-align: center; /* Centrar botón en móvil */
    }
    .btn-cerrar {
        width: 100%; /* Botón de ancho completo en móvil */
        padding: 12px;
    }
}
/* === FIN ESTILOS CSS PARA EL MODAL === */

/* Para que el scroll del body se deshabilite cuando el modal está abierto */
body.modal-is-open {
    overflow: hidden;
}
