 :root {
            --azul-primary: #1E3A8A;
            --azul-secondary: #2563EB;
            --blanco: #FFFFFF;
            --rojo-accent: #DC2626;
            --gris-texto: #4B5563;
            --gris-claro: #F3F4F6;
            --fuente-titulos: 'Playfair Display', serif;
            --fuente-texto: 'Roboto', sans-serif;
            --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
            --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
            --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
            --transition: all 0.3s ease;
        }

        body {
            font-family: var(--fuente-texto);
            color: var(--gris-texto);
            background-color: var(--blanco);
            margin: 0;
            padding: 0;
            min-height: 100vh;
            opacity: 0;
            transition: opacity 0.5s ease;
        }

        body.loaded {
            opacity: 1;
        }

        .revista-container {
            scroll-behavior: smooth;
        }

        .pagina {
            min-height: 100vh;
            padding: 60px 20px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Barra de progreso */
        .progress-container {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 5px;
            background: rgba(0, 0, 0, 0.1);
            z-index: 1000;
        }

        .progress-bar {
            height: 100%;
            background: var(--azul-primary);
            width: 0%;
            transition: width 0.2s ease;
        }

        /* Portada */
        .portada {
            background: linear-gradient(rgba(30, 58, 138, 0.8), rgba(30, 58, 138, 0.8)),
                        url('../images/portada.jpg') center/cover no-repeat;
            color: var(--blanco);
            text-align: center;
            padding: 0;
        }

        .portada .contenido {
            max-width: 800px;
            padding: 0 20px;
            margin: auto;
            height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .logo-distrito img {
            max-width: 150px;
            margin-bottom: 30px;
            filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.7));
        }

        .titulo-portada {
            font-family: var(--fuente-titulos);
            font-size: 3.5rem;
            font-weight: 700;
            margin-bottom: 20px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
            line-height: 1.2;
        }

        .subtitulo {
            font-size: 1.3rem;
            margin-bottom: 40px;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
        }

        .btn-leer-mas {
            display: inline-block;
            background: var(--rojo-accent);
            color: var(--blanco);
            padding: 12px 30px;
            border-radius: 30px;
            text-decoration: none;
            font-weight: 500;
            transition: var(--transition);
            box-shadow: var(--shadow-md);
            border: 2px solid transparent;
        }

        .btn-leer-mas:hover {
            background: transparent;
            color: var(--rojo-accent);
            border-color: var(--rojo-accent);
            transform: translateY(-3px);
        }

        /* Páginas internas */
        .titulo-pagina {
            font-family: var(--fuente-titulos);
            font-size: 2.2rem;
            color: var(--azul-primary);
            margin-bottom: 25px;
            position: relative;
            display: inline-block;
        }

        .titulo-pagina::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 80px;
            height: 3px;
            background: var(--rojo-accent);
        }

        .texto-revista {
            font-size: 1rem;
            line-height: 1.7;
            color: var(--gris-texto);
        }

        .firma {
            font-family: var(--fuente-titulos);
            font-style: italic;
            text-align: right;
            color: var(--azul-primary);
            font-weight: 600;
        }

        /* Imagen fija de la obra */
        .obra-imagen-fija {
            margin-bottom: 20px;
        }

        .obra-imagen-fija img {
            width: 100%;
            max-height: 300px;
            object-fit: cover;
            border-radius: 8px;
            box-shadow: var(--shadow-sm);
        }

        /* Carrusel para móviles - MEJORADO */
        .obra-carrusel-mobile {
            display: none;
            width: 100%;
            position: relative;
            margin-bottom: 60px;
        }

        .carrusel-wrapper {
            overflow: hidden;
            border-radius: 8px;
            box-shadow: var(--shadow-sm);
        }

        .carrusel-slides {
            display: flex;
            transition: transform 0.3s ease;
            width: 200%; /* 2 slides = 200% */
        }

        .obra-slide {
            width: 50%; /* Cada slide ocupa la mitad del contenedor */
            flex-shrink: 0;
            background: var(--blanco);
            padding: 25px;
            box-sizing: border-box;
            min-height: 200px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        /* Detalles de obra mejorados */
        .detalles-obra {
            background: var(--gris-claro);
            padding: 20px;
            border-radius: 8px;
            border-left: 4px solid var(--azul-primary);
            overflow-x: auto; /* Permite scroll horizontal si hay demasiadas columnas */
            -webkit-overflow-scrolling: touch;
        }

        .detalles-obra .detalle-item {
            display: flex;
            justify-content: space-between;
            align-items: flex-start; /* Para que los textos se alineen bien si hay varias líneas */
            padding: 12px 0;
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
            font-size: 0.95rem;
            gap: 8px; /* Espacio entre título y valor */
            word-break: break-word; /* Corta palabras largas */
            flex-wrap: wrap; /* Permite que el contenido salte a la siguiente línea si es necesario */
        }

        .detalles-obra .detalle-item:last-child {
            border-bottom: none;
        }

        .detalles-obra .detalle-item strong {
            color: var(--azul-primary);
            flex: 1 1 40%; /* Hace que el título ocupe hasta el 40% */
            min-width: 100px;
        }

        .detalles-obra .detalle-item span {
            flex: 1 1 60%; /* Hace que el valor ocupe el resto del espacio */
            text-align: left;
            overflow-wrap: break-word;
            word-break: break-word;
        }

        .detalles-obra .detalle-item i {
            color: var(--rojo-accent);
            margin-right: 8px;
        }


        /* Indicadores del carrusel mejorados */
        .carrusel-indicadores {
            display: none;
            position: absolute;
            bottom: -40px;
            left: 50%;
            transform: translateX(-50%);
            text-align: center;
            z-index: 10;
        }

        .indicador {
            display: inline-block;
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background-color: #ccc;
            margin: 0 6px;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid transparent;
        }

        .indicador:hover {
            transform: scale(1.1);
        }

        .indicador.activo {
            background-color: var(--azul-primary);
            border-color: var(--blanco);
            box-shadow: 0 0 0 2px var(--azul-primary);
        }

        .indicador:first-child.activo {
            background-color: var(--rojo-accent);
            box-shadow: 0 0 0 2px var(--rojo-accent);
        }

        /* Mapa interactivo */
        .mapa-interactivo {
            height: 400px;
            width: 100%;
            max-width: 100%;
            border-radius: 8px;
            box-shadow: var(--shadow-md);
        }

        /* Formulario de contacto */
        .formulario-contacto {
            max-width: 600px;
            margin: 0 auto;
            background: var(--blanco);
            padding: 25px;
            border-radius: 10px;
            box-shadow: var(--shadow-md);
        }

        .form-control {
            border: 1px solid #ddd;
            padding: 12px;
            margin-bottom: 15px;
            border-radius: 5px;
            transition: border-color 0.3s;
        }

        .form-control:focus {
            border-color: var(--azul-primary);
            box-shadow: 0 0 0 0.25rem rgba(30, 58, 138, 0.25);
        }

        .btn-enviar {
            background: var(--azul-primary);
            color: var(--blanco);
            border: none;
            padding: 12px 30px;
            border-radius: 5px;
            font-weight: 500;
            cursor: pointer;
            transition: var(--transition);
            box-shadow: var(--shadow-sm);
        }

        .btn-enviar:hover {
            background: var(--rojo-accent);
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        /* Redes sociales */
        .redes-sociales {
            margin-top: 30px;
        }

        .red-social {
            width: 45px;
            height: 45px;
            background: var(--azul-primary);
            color: var(--blanco);
            border-radius: 50%;
            transition: var(--transition);
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .red-social:hover {
            background: var(--rojo-accent);
            transform: translateY(-3px);
        }

        /* Botones de navegación */
        .navegacion-paginas {
            position: fixed;
            right: 20px;
            top: 50%;
            transform: translateY(-50%);
            z-index: 1000;
        }

        .btn-pagina {
            background: var(--azul-primary);
            color: var(--blanco);
            border: none;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: var(--shadow-md);
            margin: 10px 0;
            transition: var(--transition);
        }

        .btn-pagina:hover {
            background: var(--rojo-accent);
            transform: scale(1.1);
        }

        .btn-pagina:disabled {
            background: #ccc;
            cursor: not-allowed;
            transform: none;
        }

        /* Responsive - Móviles */
        @media (max-width: 768px) {
            .obra-carrusel-mobile {
                display: block !important;
            }

            .carrusel-indicadores {
                display: block !important;
            }

            .obra-desktop {
                display: none !important;
            }

            .pagina {
                padding: 40px 15px;
            }

            .titulo-pagina {
                font-size: 1.8rem;
            }

            .titulo-portada {
                font-size: 2.5rem;
            }

            .texto-revista {
                font-size: 0.95rem;
                line-height: 1.6;
            }

            .navegacion-paginas {
                right: 15px;
            }

            .btn-pagina {
                width: 45px;
                height: 45px;
            }

            .btn-leer-mas {
                padding: 10px 25px;
                font-size: 0.9rem;
            }

            .mapa-interactivo {
                height: 300px;
            }

            .obra-slide {
                padding: 20px;
                min-height: 180px;
            }

            .detalles-obra {
                padding: 16px;
            }

            .detalles-obra .detalle-item {
                padding: 10px 0;
                font-size: 0.9rem;
            }
        }