


        /* --- ESTILOS DE LA PÁGINA (FONDO) --- */

        main {
            max-width: 900px;
            margin: 20px auto;
            padding: 0 20px;
        }

        /* --- ESTILOS DEL POPUP (MODAL) --- */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.45);
            display: none; /* Se activa por JS */
            justify-content: center;
            align-items: center;
            z-index: 10000;
            transition: opacity 0.5s ease;
        }

        .modal-content {
            background-color: white;
            padding: 10px;
            border-radius: 12px;
            position: relative;
            width: 90%; /* Responsivo: ocupa el 90% en pantallas pequeñas */
            max-width: 600px; /* Tamaño máximo en PC */
            box-shadow: 0 20px 60px rgba(0,0,0,0.7);
            animation: fadeInScale 0.4s ease-out;
        }

        /* Animación de entrada */
        @keyframes fadeInScale {
            from { transform: scale(0.8); opacity: 0; }
            to { transform: scale(1); opacity: 1; }
        }

        /* Botón de cierre (X) */
        .close-btn {
            position: absolute;
            top: -15px;
            right: -15px;
            width: 35px;
            height: 35px;
            background-color: #ff4757;
            color: white;
            border: none;
            border-radius: 50%;
            font-size: 20px;
            font-weight: bold;
            cursor: pointer;
            display: flex;
            justify-content: center;
            align-items: center;
            box-shadow: 0 4px 10px rgba(0,0,0,0.3);
            z-index: 10001;
        }

        .close-btn:hover {
            background-color: #ff6b81;
            transform: scale(1.1);
        }

        /* Imagen responsiva */
        .modal-image {
            width: 100%;
            height: auto;
            max-height: 75vh; /* Evita que la imagen sea más alta que la pantalla */
            display: block;
            border-radius: 8px;
            object-fit: cover;
        }

        /* Ajustes para móviles muy pequeños */
        @media (max-width: 480px) {
            .modal-content {
                width: 85%;
            }
            .close-btn {
                width: 40px;
                height: 40px;
                top: -10px;
                right: -10px;
            }
        }
    